r2293 - in tags/kernel/source/kernel-source-2.6.8-2.6.8: . 2.6.8-13 2.6.8-13/debian 2.6.8-13/debian/patches 2.6.8-13/debian/patches/series

Norbert Tretkowski nobse at costa.debian.org
Fri Oct 19 11:04:07 UTC 2007


Author: nobse
Date: 2005-01-13 17:30:40 +0100 (Thu, 13 Jan 2005)
New Revision: 2293

Added:
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/README.Debian
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/apply
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/changelog
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/compat
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/control
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/copyright
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/make-substvars
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/official
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/028-do_brk_security_fixes.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/029-random_poolsize_overflow.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/030-moxa_user_copy_checking.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/031-sg_scsi_ioctl_int_overflows.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/034-stack_resize_exploit.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/035-do_brk_security_fixes-2.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/SG_IO-cap.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/SG_IO-safe-commands-2.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/SG_IO-safe-commands-3.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/SG_IO-safe-commands-5.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/SG_IO-safe-commands.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/acpi-early.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/acpi-osname.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/acpi-printk-breakpoint.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/acpi-speedstep-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic79xx-nohw.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0001-to-2.6.9.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0006-1.1832.91.1.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0007-1.1832.91.17.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0008-1.1832.91.18.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0009-1.1832.91.19.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0010-1.1832.91.20.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0011-1.1832.91.28.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0017-1.1988.96.15.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-delay_h-update.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-pcitable.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-update.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/alpha-epoch-comment.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/alpha-termbits.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/alsa-module-load-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aout-loader-fixes.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/arch-x86_64-signal-bug.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/arch-x86_64-sys32_ni-overflow.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/arch-x86_64-sys32_quotactl-overflow.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ata_piix-combinde-mode-fix-2.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ata_piix-combinde-mode-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/binfmt-huge-vma-dos.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/binfmt-huge-vma-dos2.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/bio_uncopy_user-memleak-2.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/bio_uncopy_user-memleak.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/capi-freeing-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/cciss-update.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/changelog.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/cmsg-compat-signedness-fix-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/copy_to_high_bio_irq-leak-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/dell-dbda-bios-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/dm_io-ENOMEM-goof.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/doc-post_halloween.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-firmware-pcdp-register.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-ftape.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-ide-dma-blacklist-toshiba.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-ide-dma-ricoh.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-input-hiddev-HIDIOCGUCODE.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-input-psaux-hacks.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-macintosh-adb-trackpad.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-net-3c59x-build-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-net-8139too-locking.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-net-arcnet-crash.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-net-tg3-readd.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-net-wireless-airo-build-smp.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-pci-quirks-via8233a.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-scsi-generic_proc_info.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-scsi-sym53c8xx_revert.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-scsi-sym_2-dv-hang.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-scsi_changer.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-serial-8250-ioremap-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-usb-storage-revoltec.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-usb-storage-transport-1.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-usb-storage-transport-2.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-usb-storage-transport_dimage_getmaxlun.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drm-locking-fixes.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/elf-loader-fixes-the-return.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/elf-loader-fixes.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ext3-direct-io-assert-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/extraversion.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fix-alpha-ext3-oops.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fix-ip-options-leak.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fix-sn_console-for-config_smp.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fix-url-bsd-acct.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/forcedeth-update.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fs-asfs.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fs-ntfs-disconnect-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fs-partitions-check.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fs-tmpfs-free_inode-leak.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/hfs-loop-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/i915-agp.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-generic-no-smp-1-to-2.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-generic-no-smp.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-hp-sba_iommu-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-mem-boot-param-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-mem-max_addr-cmdline-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-sparse-access_ok.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-sparse-copy_to_user.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64_cyclone_nosmp.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/igmp-src-list-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/include-missing-includes.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/intel-cache-descriptors.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ip-conntrack-ftp-leak.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ipsec-missing_wakeup.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/jfs-memory-leak.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mark-vmio.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/marvell-mm.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/marvell-pegasos-2.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/marvell-pegasos.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/microcode-devfs-name.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/minix-block-accounting-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mm-vmscan-1.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mm-vmscan-2.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mm-vmscan-3.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mm-vmscan-4.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mm-vmscan-5.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/modular-ide-pnp.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/modular-ide.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/modular-vesafb.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/modular-xfrm_tunnel-export-symbol.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/modular-xfrm_tunnel.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/net-sched-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/net-sched-sch-cbq-leak.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/net-sched-sch-slab-corruption.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/netfilter-localhost-frag.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/netstat-fix-output.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/nfs-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/nfsd-subtreecheck-nostale.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/openpromfs-loop.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/parport_pc-via8231.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/pcxx-is-broken.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/pmac-no-of-stdout.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-970fx-support.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-cmdline.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-g4-errata.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-g4-l2-flush-errata.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-g5-thermal-management-update.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-ibm-240-e30.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-misc-powermac-fixes.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-pegasos-2.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-pegasos-via82cxxx.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-pegasos.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-prep-powerstack-irq.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-serial.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ppc-boot-isa.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ptmx-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/qla1280-isp1040.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-sucks-0.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-sucks-1.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-sucks-2.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-sucks-3.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-sucks-4.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-write-signed-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-xattr-dont-dirty-mark.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-xattr.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/remove-references-to-removed-drivers.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/s390-build-sclp-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/s390-export-copy_in_user.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/s390-sacf-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/scm_send-dos-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/scm_send-dos-fix2.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/scsi-blacklist-2.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/scsi-blacklist.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/scsi-shutdown-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sec_brk-locked.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/selinux-seqpacket-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-1
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-10
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-11
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-12
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-13
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-2
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-3
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-4
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-5
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-6
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-7
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-8
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-9
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/shm-segment-count-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sis900-add-phy.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/smbfs-overflow-fixes-2.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/smbfs-overflow-fixes.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/smbfs-overrun.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc-ET_DYN_BASE.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc-cg14-init.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc-cg6-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc-sunzilog-timeout.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc-warning-fixes.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc32-export-more-ksyms.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc32-hypersparc-dvma.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc32-initrd-memcpy.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc32-sun4d-support.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc32-vm-fault-codes.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc64-hme-lockup.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc64-sunsab-break-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc64-sunsab-fix.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc64-syslog-register.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc64-update.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sys_select-user_copy-check.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tcp_default_win_scale.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tg3-update.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes2.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes3.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes4.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes5.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes6.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes7.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes8.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes9.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/unix-serialize-dgram.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-01.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-02.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-03.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-04.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-05.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-06.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-07.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-08.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-09.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-10.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-11.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-12.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-13.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/vlan-update-1.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/vlan-update-2.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/vt-of-death.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/x86-i486_emu.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/xfs-ioctl32.dpatch
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/prune-non-free
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/rules
   tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/unpatch
Log:
tagged kernel-source-2.6.8 2.6.8-13


Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/README.Debian
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/README.Debian	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/README.Debian	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,78 @@
+kernel-source for DEBIAN
+------------------------
+
+Patches
+-------
+Debian applies various changes to the kernel source.  These are split up
+into small patches addressing individual problems.  Each of the patch files
+contains a description and mentions the author.  The patches can be found
+at http://svn.debian.org/wsvn/kernel/tags/kernel/source/.
+
+Rebuilding Adaptec AIC7xxx/79xx firmware
+----------------------------------------
+You can rebuild the firmware for the Adaptec AIC7xxx/79xx SCSI Adapters. To
+do so you need to set AIC7XXX_BUILD_FIRMWARE/AIC79XX_BUILD_FIRMWARE config
+options.  Note that this requires to have the development packages for
+berkelydb (libdb4.2-dev) installed.
+
+PS/2 Mice
+---------
+If your PS/2 mouse does not work, make sure that the modules psmouse and
+mousedev are loaded.
+
+AMD 768 erratum 10
+------------------
+If you have a motherboard with the AMD 768 chipset, and you are experiencing
+IDE errors or lock ups, then you should either connect a PS/2 mouse to the
+system or disable APIC.  Refer to the following link for details:
+
+http://lists.insecure.org/lists/linux-kernel/2002/Sep/5966.html
+
+mem= on 2.4.19 and later
+------------------------
+mem=xxxM can no longer be used to enlarge the RAM that the kernel uses.
+You must specify the exact memory map.  For example, Compaq Proliant users
+can specify mem=48M at 16M if they have 64M of memory.
+
+80386 compatibility
+-------------------
+DRM modules will not work on true 80386 processors.  These drivers all assume
+that cmpxchg is available.
+
+IDE bswap option
+----------------
+The bswap option is obsolete and may disappear in future.  For the moment
+it does work provided that you disable dma with the nodma option.
+
+Additional Drivers
+------------------
+* SCSI Media Changer
+  http://bytesex.org/patches/
+* Amiga Smart Filesystem driver
+  http://march.home.staszic.waw.pl/asfs/
+
+Non-free bits removed
+---------------------
+* Keyspan firmware, driver disabled
+  . drivers/usb/serial/ksyspan_{mpr,usa*}_fw.h
+* Emagic EMI 2|6 usb audio interface firmware loader
+  . drivers/usb/misc/emi62_fw_*.h
+
+Firmware removed
+----------------
+* SMC Token Ring firmware, driver disabled:
+  . drivers/net/tokenring/smctr_firmware.h
+* ACENIC firwmare, driver disabled:
+  . drivers/net/acenic_firmware.h
+* DGRS firmware, driver disabled:
+  . drivers/net/dgrs_firmware.c
+* DAB firmware, driver disabled:
+  . drivers/usb/media/dabfirmware.h
+* QLA2XXX firmware, driver disabled:
+  . drivers/scsi/qla2xxx/*_fw.c
+* TIGON3 firmware:
+  . drivers/net/tg3.c
+* Unused firmware:
+  . sound/oss/724hwmcode.h
+  . sound/oss/Hwmcode.h
+

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/apply
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/apply	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/apply	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,200 @@
+#!/bin/sh 
+# $Id: apply,v 1.4 2003/06/30 12:49:09 herbert Exp $
+
+set -e
+
+length=50
+
+die() {
+	echo "E: $@" >&2
+	exit 1
+}
+
+warn() {
+	echo "W: $@" >&2
+}
+
+uncompress_patch() {
+	patch=$1
+	case "$patch" in
+		*.bz2) bzcat $patch ;;
+		*.gz) zcat $patch ;;
+		*) cat $patch ;;
+	esac
+}
+
+find_patch() {
+	patch=$1
+
+	if [ -f "$patch" ]; then
+		echo "$patch"
+	elif [ -f "$patch.bz2" ]; then
+		echo "$patch.bz2"
+	elif [ -f "$patch.gz" ]; then
+		echo "$patch.gz"
+	else
+		die "$patch is in the series, but doesn't exist!"
+	fi
+}
+		
+apply_patch() {
+	patch=$(find_patch $home/$1)
+	base=$1
+	if uncompress_patch "$patch" | patch -p1 -f -s -t --no-backup-if-mismatch; then
+		printf "%-${length}s\tOK (+)\n" "$base"
+	else
+		printf "%-${length}s\tFAIL (+)\n" "$base"
+		exit 1
+	fi
+}
+
+deapply_patch() {
+	patch=$(find_patch $home/$1)
+	base=$1
+	if uncompress_patch "$patch" | patch -p1 -f -s -t -R --no-backup-if-mismatch; then
+		printf "%-${length}s\tOK (-)\n" "$base"
+	else
+		printf "%-${length}s\tFAIL (-)\n" "$base"
+		exit 1
+	fi
+}
+
+unpatch_series() {
+	series=$1
+	[ -f "$series" ] || die "I wasn't passed a series: $series"
+
+	tac $series | while read action patch; do
+		case "$action" in
+			+) deapply_patch $patch ;;
+			-) apply_patch $patch ;;
+			X)
+				bakfile="$(dirname $patch)/.$(basename $patch).bak"
+				if [ -f "$bakfile" ]; then
+					mv -f "$bakfile" "$patch"
+					printf "%-${length}s\tRESTORED (X)\n" "$patch"
+				else
+					printf "%-${length}s\tNO BACKUP (X)\n" "$patch"
+				fi
+			;;
+		esac
+	done 
+	echo "--> $(basename $series) fully unapplied."
+}
+
+patch_series() {
+	series=$1
+	[ -f "$series" ] || die "I wasn't passed a series: $series"
+
+	while read action patch; do
+		case "$action" in
+			+) apply_patch $patch ;;
+			-) deapply_patch $patch ;;
+			X)
+				bakfile="$(dirname $patch)/.$(basename $patch).bak"
+				if [ -f "$patch" ]; then
+					mv -f "$patch" "$bakfile"
+					printf "%-${length}s\tREMOVED (X)\n" "$patch"
+				else
+					printf "%-${length}s\tNO FILE (X)\n" "$patch"
+				fi
+			;;
+		esac
+	done < $series
+	echo "--> $(basename $series) fully applied."
+}
+
+if ! [ -d Documentation ] || ! [ -d kernel ]; then
+	die 'Not in kernel top level directory.  Exiting'
+	exit 1
+fi
+
+# for THIS particular version of the source package
+version=${override_version:- at version@}
+upstream=${version%-*}
+revision=${version#*-}
+
+home=${home:-/usr/src/kernel-patches/all/$upstream/debian}
+
+if [ -f version.Debian ]; then
+	current=$(cat version.Debian)
+	current_rev=${current#*-}
+	current_up=${current%-*}
+
+	if [ "$current" = "$upstream" ]; then
+		current_rev=0
+	fi
+else
+	warn "No version.Debian file, assuming pristine Linux $upstream"
+	current=$upstream
+	current_rev=0
+fi
+
+target=${1:-$version}
+
+target_rev=${target#*-}
+target_up=${target%-*}
+
+# Sanity checks
+if [ "$target_up" != "$upstream" ]; then
+	die "Upstream $target_up doesn't match $upstream!"
+# We don't have that version out yet!
+elif [ ! -n "$target_rev" ] || ( [ "$target_rev" != "$target" ] && [ $target_rev -gt $revision ] ); then
+	year=$(($(date +%Y) + 1))
+	die "Can't patch to nonexistent revision $target_rev (wait until $year)"
+fi
+
+# At this point, we must handle three cases.
+# 1. $target_rev is greater than $current_rev. We must patch forward for this.
+# 2. $target_rev is less than $current_rev. We must reverse the list of series,
+#    reverse each used series (tac) and unapply applied patches and vice versa.
+# 3. $target_rev is undefined, and $target is $upstream.
+
+# Revert to upstream.
+if [ "$target_rev" = "$target" ]; then
+	# already reverted
+	if [ "$current" = "$target" ]; then 
+		echo "Nothing to do, exiting."
+		exit 0
+	fi
+
+	for base in $((cd $home/series/ && ls -d *) | sort -rnt- -k 2); do
+		srev=${base#*-}
+		if [ -n "$srev" ]; then
+			if [ $srev -le $current_rev ]; then
+				unpatch_series $home/series/$base
+			fi
+		else
+			die "Series doesn't have a revision!"
+		fi
+	done
+elif [ "$current_rev" = "$upstream" ] || [ $target_rev -gt $current_rev ]; then
+	for base in $((cd $home/series/ && ls -d *) | sort -nt- -k 2); do
+		srev=${base#*-}
+		if [ -n "$srev" ]; then
+			if [ $srev -gt $current_rev ] && [ $srev -le $target_rev ]; then
+				patch_series $home/series/$base
+			fi
+		else
+			die "Series doesn't have a revision!"
+		fi
+	done
+elif [ $target_rev -eq $current_rev ]; then
+	echo "Nothing to do, exiting."
+	exit 0
+elif [ $target_rev -lt $current_rev ]; then
+	for base in $((cd $home/series/ && ls -d *) | sort -rnt- -k 2); do
+		srev=${base#*-}
+		if [ -n "$srev" ]; then
+			# -gt because you don't want to unapply the target series
+			if [ $srev -le $current_rev ] && [ $srev -gt $target_rev ]; then
+				unpatch_series $home/series/$base
+			fi
+		else
+			die "Series doesn't have a revision!"
+		fi
+	done
+fi
+
+echo $target > version.Debian
+
+# vim:noet:ai:ts=4

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/changelog
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/changelog	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/changelog	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,2084 @@
+kernel-source-2.6.8 (2.6.8-13) unstable; urgency=high
+
+  * add more USB card reader blacklist entries.  Patch from Fedora via
+    Otavio Salvador <otavio at debian.org>. (Christoph Hellwig) (closes: #289247)
+
+  * Fix viewsvn url for patches in README.Debian as reported by
+    Alexander E. Patrakov. (Christoph Hellwig) (closes: #288062).
+
+  * Replace smbfs-overflow-fixes.patch with a newer version from 2.6.10-ac
+    that actually works.  Thanks to S?ren Hansen <sh at warma.dk> for finding
+    and submitting it. (Christoph Hellwig) (closes: #283241).
+
+  * [SECURITY] 034-stack_resize_exploit.dpatch
+    Fix exploitable race condition on SMP and HT systems where two
+    threads attempt to expand the stack at the same time.  This is
+    CAN-2005-0001 (happy new year!) (Andres Salomon).
+
+  * [SECURITY] 035-do_brk_security_fixes-2.dpatch
+    Further do_brk fixes; just to be safe, lock everywhere do_brk
+    is used (Andres Salomon).
+ 
+  * Apply patch to fix compat cmsg_len checks (Christoph Hellwig).
+ 
+ -- Norbert Tretkowski <nobse at debian.org>  Thu, 13 Jan 2005 17:23:35 +0100
+
+kernel-source-2.6.8 (2.6.8-12) unstable; urgency=high
+
+  * [powerpc - prep] Fix bad irq assignement for pci devices on motorola
+    powerstack boxes. (Sven Luther)
+
+  * add dh_fixperms to the build targets to kernel-patch-debian-2.6.8
+    to ensure that the permissions of the files in this package are
+    sensible. (See: Bug#288279) (Simon Horman)
+
+  * [SECURITY] Fix vulnerability in the ELF loader code allowing 
+    local attacker to execute code as root, CAN-2004-1235. 
+    (Maximilian Attems)
+
+  * Added backport of qla1280 driver from 2.6.10. (Norbert Tretkowski)
+
+  * [alpha] Added a workaround for ext3 oops. (Norbert Tretkowski)
+
+  * [SECURITY] 028-do_brk_security_fixes.dpatch
+    Drop Marcelo's fix for this; use Linus' instead.
+    Fix local root vulnerability for various do_brk() calls;
+    ensure an exclusive lock on memory while modifying it; CAN-2004-1235
+    (Andres Salomon) (closes: #289155).
+
+  * [SECURITY] 029-random_poolsize_overflow.dpatch
+    drivers/char/random allows you to set the poolsize; its sanity checking
+    on that input isn's very good.  We fix that here.
+    See http://seclists.org/lists/fulldisclosure/2005/Jan/0270.html for
+    more details.  This fixes #3 on that list (Andres Salomon).
+
+  * [SECURITY] 030-moxa_user_copy_checking.dpatch
+    The moxa driver does some ugly things w/ signed integers.  This fixes
+    #4 on Brad Spengler's advisory (Andres Salomon).
+
+  * [SECURITY] 031-sg_scsi_ioctl_int_overflows.dpatch
+    SG ioctl stuff doesn't actually check whether the scsi command length
+    is positive.  #5 on the above advisory (Andres Salomon).
+
+ -- Andres Salomon <dilinger at voxel.net>  Sat, 08 Jan 2005 05:18:05 -0500
+
+kernel-source-2.6.8 (2.6.8-11) unstable; urgency=high
+
+  * [SECURITY] serialize dgram read using semaphore just like stream;
+    CAN-2004-1068.  Thanks to Fabio M. Di Nitto (Andres Salomon).
+
+  * [SECURITY] Fix insufficient locking checks in DRM code;
+    CAN-2004-1056.  Thanks to Fabio M. Di Nitto (Andres Salomon).
+
+  * [SECURITY] Fix SELinux crashes with SOCK_SEQPACKET; see
+    http://marc.theaimsgroup.com/?l=linux-kernel&m=110045613004761
+    for reference; CAN-2004-1069.  Thanks to Fabio M. Di Nitto
+    (Andres Salomon).
+
+  * [SECURITY] Fix problems in VM_IO refcount; CAN not yet assigned.
+    Thanks to Fabio M. Di Nitto (Andres Salomon).
+
+  * Delay registration of HCDP described UARTs, fixing the PDH console
+    on HP rx1600s (dann frazier).
+
+  * [SECURITY] Fix buffer overrun in x86_64's sys32_ni_syscall
+    (Andres Salomon).
+
+  * Restore BLKRRPART semantics - breaks partitioning programms on empty disks
+    (Maximilian Attems).
+
+  * [SECURITY] scm_send local DoS fix (advisory:
+    http://www.isec.pl/vulnerabilities/isec-0019-scm.txt) (Andres Salomon).
+
+  * [SECURITY] igmp remotely exploitable bugfix
+    (http://www.isec.pl/vulnerabilities/isec-0018-igmp.txt) (Andres Salomon).
+
+  * [SECURITY] additional scm_send fix (thanks to Andre Tomt for pointing
+    this out) (Andres Salomon).
+
+  * [SECURITY] memory exhaustion fix where malformed binaries can create
+    local DoS (CAN-2004-1074).  Thanks to Moritz Muehlenhoff for pointing
+    this out.  64bit-arch fixes are also in here (Andres Salomon).
+
+  * [SECURITY] additional x86_64 buffer overflow fix; this time,
+    sys32_quotactl (Andres Salomon).
+
+  * [SECURITY] fix ip_conntrack_ftp leak;
+    https://lists.netfilter.org/pipermail/netfilter-devel/2004-December/017677.html
+    Thanks to Fabio M. Di Nitto for pointing this out (Andres Salomon).
+
+  * Add some additional reiserfs locking and error handling fixes, in
+    hopes of lessening reports of reiser corruption (Andres Salomon).
+
+  * [SECURITY] Fix memory leak in ip_options_get allowing a DoS
+    attack.  Thanks to Fabio M. Di Nitto (Andres Salomon).
+
+  * [SECURITY] Fix integer overflow in vc_resize.  Thanks to
+    Fabio M. Di Nitto (Andres Salomon).
+
+  * Fix Revoltec USB burner problem introduced in 2.6.8.  Thanks
+    to Ian Gulliver.  Note to other bug reporters: I accept bribes..
+    (Andres Salomon) (closes: #285168).
+
+  * [x86_64] Fix nasty little signal bug, where orig_rax was assumed
+    to be unsigned.  Andi Kleen assures me it's not exploitable, but
+    better to be safe than sorry (Andres Salomon).
+
+  * [powerpc] Added a couple of powermac patches from Benjamin Herrenschmidt :
+    - 970FX cpu support
+    - G5 thermal management update
+    - Misc powermac fixes backports
+    (Closes: #287030, #276397) (Sven Luther)
+
+  * [powerpc] Moved from powerpc kernel-patch package :
+    - powermac legacy serial fix.
+    - pegasos via-ide dual interrupt fix.
+    (Sven Luther)
+
+  * [powerpc] Added _chrp_type support though pegasos patch (Sven Luther)
+
+  * Sparc fixes from 2.6.10-rc3-wli-1:
+    - fix DVMA on UP HyperSPARC (fixes hack used in sparc32-initrd-memcpy)
+    - Chris Newport and Thomas Bogendoerfer's sun4d support patch.
+    - A lot of warning fixes for RTC/__exit/serial code.
+    - Fix cg6 framebuffer initialization.
+    - fix up VM fault code handling
+
+  * Also a fix from David S. Miller which reverts ELF_ET_DYN_BASE setting,
+    which was was put in place to make an obscure corner case work.
+    closes: #287287
+
+ -- Joshua Kwan <joshk at triplehelix.org>  Tue, 28 Dec 2004 07:21:24 +0000
+
+kernel-source-2.6.8 (2.6.8-10) unstable; urgency=high
+
+  * Fix missing backport of ssleep declaration so that new aic7xxx works.
+    Thanks Matt Taggart for pointing out the problem. (Joshua Kwan)
+
+  * Add missing check for tty == NULL in uart_tasklet_action to fix an init
+    oops on serial console. (Joshua Kwan)
+
+  * Make sparc32-initrd-memcpy.dpatch just the diff, not the mail message
+    that came with it. (Joshua Kwan)
+
+  * [SECURITY] s390: Fix for local root exploit: Force user process back to
+    home space mode in space switch event exception handler. (CAN-2004-0887)
+    (Bastian Blank)
+
+  * s390: Export copy_in_user. (Bastian Blank)
+
+  * s390: Fix sclp build. (Bastian Blank)
+
+ -- Joshua Kwan <joshk at triplehelix.org>  Wed, 24 Nov 2004 21:43:46 +0000
+
+kernel-source-2.6.8 (2.6.8-9) unstable; urgency=high
+
+  * [SECURITY] Fix problems in binfmt_elf and binfmt_aout loaders; see
+    http://isec.pl/vulnerabilities/isec-0017-binfmt_elf.txt for more
+    details (Andres Salomon).
+
+  * Adding drivers-serial-8250-ioremap-fix.dpatch: a patch from Alex
+    Williamson that prevents setserial from crashing the kernel.
+    See: http://marc.theaimsgroup.com/?l=linux-kernel&m=109913237604338&w=2
+    (Dann Frazier)
+
+  * sparc fixes from ML (Joshua Kwan):
+    - fix possible timeouts with sunzilog (benh)
+    - fix broken initialization method for cg14 framebuffer (Bob Breuer)
+    - sparc32: fix memcpy() bug that caused ramdisk failure (Jurij Smakov)
+    - sparc64: don't let breaks get eaten by sunsab (Jurij Smakov)
+
+  * Split out aic7xxx-update patch into separate changesets, and drop
+    the pci-id-table and hostraid changesets; people are still reporting
+    problems having the driver detect their controller (Andres Salomon).
+
+  * PCI IDE legacy mode fix for ata_piix
+    (Possible fix for: #279902, #273171) (Simon Horman)
+
+  *  VLAN updates (Potential fix for: Bug#280743) (Simon Horman)
+
+  * copy_to_user checking in select.c
+    (Potential fix for: Bug#278183) (Simon Horman)
+
+  * Remove bogus DMA blacklist for RICOH CD-R/RW MP7083A (Maximilian Attems)
+
+  * Don't spew debug on bioses with acpi breakpoints (Maximilian Attems)
+
+  * tmpfs inode accounting leak fix (Maximilian Attems)
+
+  * Fix disconnected dentries on NFS exports (Maximilian Attems)
+
+  * [SECURITY] Further smbfs overflow fixes, stolen from -ac tree
+    (Andres Salomon).
+
+ -- Joshua Kwan <joshk at triplehelix.org>  Sun, 21 Nov 2004 19:06:31 -0800
+
+kernel-source-2.6.8 (2.6.8-8) unstable; urgency=medium
+
+  * Add workaround for broken Happy Meal ethernet controllers.
+    (closes: #275485) (Joshua Kwan)
+
+  * Fix goof in dm-io.c that led to uncaught errors on ENOMEM (Joshua Kwan)
+    using Nigel Cunningham's patch on LKML.
+
+  * Include a couple fixes for the mem= & max_addr= boot params on ia64.
+    (dann frazier)
+
+  * Resolved grammatical error in README.Debian
+    (closes: Bug#276359) (Simon Horman)
+
+  * Security: fix race conditions in linux terminal subsystem (CAN-2004-0814)
+    (dann frazier)
+
+  * Fix a couple ia64 argument order problems discovered by David Mosberger's
+    sparse runs (dann frazier)
+
+  * Ext3 direct io assert fix, update stale journal (Andres Salomon).
+
+  * Revert aic7xxx-pcitable patch (closes: #275302) (Andres Salomon).
+
+  * Another reiserfs xattr fix; this one keeps inodes from being marked
+    dirty if it hasn't been hashed (Andres Salomon).
+
+  * Reiserfs's write() return values should be signed, not unsigned
+    (Andres Salomon).
+
+  * Added work-around to allow usb storage device to access
+    a Konica-Minolta DiMAGE A2 camera. (closes: Bug#276134) (Simon Horman)
+
+  * Fix memory leak in packet scheduler.
+    (closes: Bug#276476) (closes: Bug#275059) (Simon Horman)
+
+  * Fix slab corruption on packet scheduler. (Simon Horman)
+
+  * NFS localhost mount netfilter fix (closes: #254645) (Andres Salomon).
+
+  * Correctly detect VIA 8233A sound card (closes: #254645) (Simon Horman)
+
+  * Update aic7xxx/aic79xx to current mainline versions (Christoph Hellwig).
+
+  * Drop aic79xx-nohw; superceded by aic7xxx-update (Andres Salomon).
+
+  * Fix smbfs overrun/leak (Andres Salomon).
+
+  * VIA8231 support for parallel port driver (closes: #279174) (Simon Horman)
+
+  * [ACPI] reserve EBDA for Dell BIOS that neglects to.
+    (Possible fix for: Bug#277298) (Simon Horman)
+
+  * Changed recomends libqt3-dev to libqt3-mt-dev as the former is debricated.
+    (closes: #279605) (Simon Horman)
+
+  * Via Velocity Driver update from 2.6.9
+    (closes: Bug#278508) (Simon Horman)
+
+  * Allow more SCSI ioctls.
+    (Possible fix for: Bug#277083) (Simon Horman)
+
+  * [ia64] fix a bug that causes HP systems to run out of DMA mapping resources
+    under heavy load (dann frazier)
+
+  * Backport of vmscan fixes from upstream. (Simon Horman)
+
+  * Fixes to cope with hardware with broken GetMaxLUN responses (Simon Horman).
+    (Possible fix for: Bug#279889)
+
+ -- Andres Salomon <dilinger at voxel.net>  Tue, 09 Nov 2004 01:28:16 -0500
+
+kernel-source-2.6.8 (2.6.8-7) unstable; urgency=medium
+
+  * Fix VGA console on PReP systems (closes: #271852) (Jens Schmalzing).
+
+  * Really enable i915 agpgart support (Christoph Hellwig).
+
+  * Fix yet another bio leak (Christoph Hellwig).
+
+  * Switch /proc/sys/net/ipv4/tcp_default_win_scale default back to 0, there's
+    just too many broken system out there in the wild. (closes: #267342)
+    (Christoph Hellwig).
+
+  * Fix ata_piix controller numbering in combined mode (closes: #270194)
+    (Christoph Hellwig).
+
+  * Update tg3 driver (Christoph Hellwig).
+  
+  * Update forcedeth driver to fix autoneg on 100Mbit cards (Christoph Hellwig).
+
+  * Fix ALSA module locking issue (closes: #259056) (Andres Salomon).
+
+  * Build-fix for 3c59x without pci (closes: #267240) (Maximilian Attems).
+
+  * Fix crash in ArcNet PCMCIA card (Maximilian Attems).
+
+  * Build-fix for airo on smp (Maximilian Attems).
+
+  * ACK old nmu (closes: #181350, #126482, #153451, #206984)
+
+  * Back out acpi-early caused problems on laptops, where APIC should not 
+    be enabled. (closes: #272177, #273474, #274011) (Maximilian Attems)
+
+ -- Andres Salomon <dilinger at voxel.net>  Sun, 03 Oct 2004 03:21:14 -0400
+
+kernel-source-2.6.8 (2.6.8-6) unstable; urgency=medium
+
+  * reiserfs xattr/acl fix if root fs (Max Attems).
+
+  * fix /proc/net/netstat output for `netstat -s` (Max Attems).
+
+  * Add missing intel CPU descriptors (Max Attems).
+
+  * Revert changelog.dpatch that was silently added (Christoph Hellwig).
+
+  * JFS: fix memory leak (Max Attems).
+
+  * Add sis900 phy (Max Attems).
+
+  * Fix bad URL in BSD acct help entry (closes: #268871) (Max Attems).
+
+  * Mark CONFIG_DIGI broken (closes: #258676) (Christoph Hellwig).
+
+  * Fix devfs name for microcode driver (closes: #221813) (Christoph Hellwig).
+
+  * Fix loop on hfs/hfsplus (closes: #261195) (Christoph Hellwig).
+
+  * Fix default kernel boot args on openfirmware powerpc (Sven Luther).
+
+  * Add CAPI skb freeing fix (closes: #269134) (Christoph Hellwig).
+
+  * Update debian/apply from 2.4 to allow us to base prune-non-free on
+    file removals in the patch series. (Closes: #267655)
+
+  * Make sure SCSI disk caches are flushed on shutdown (Christoph Hellwig).
+
+  * Handle loaded but no hardware present properly in aic79xx (closes: 270102)
+    (Christoph Hellwig).
+
+  * Export proper PCI ID table to hotplug in aic7xxx/aic79xx
+    (Christoph Hellwig).
+
+  * Add a patch by davem which suppresses a loop when reading from openpromfs.
+    (Joshua Kwan)
+  
+  * Set all files in the patch dir non-executable.
+
+ -- Joshua Kwan <joshk at triplehelix.org>  Mon,  6 Sep 2004 21:28:18 -0700
+
+kernel-source-2.6.8 (2.6.8-5) unstable; urgency=high
+
+  * Patches by the infintely wise and awesome David S. Miller:
+    - sparc64-sunsab-fix.dpatch: Fix the infamous serial output
+      bug causing every other character in kernel messages to be omitted.
+    - sparc64-syslog-register.dpatch: Fix a critical typo that
+      caused the 32-bit syslog wrapper to halt the entire system.
+    (Joshua Kwan).
+
+  * sparc32: Export enough ksyms for our modules to work  (Joshua Kwan).
+
+  * Drop patch modular-xfrm4_tunnel, which caused far more trouble than it
+    was worth. (Joshua Kwan).
+
+  * Switch to the 2.4.x patch-series system. Drop build-dependency on dpatch
+    (Joshua Kwan).
+
+  * Add myself to Uploaders (Joshua Kwan).
+
+  * Build kernel-tree package before kernel-doc, because it takes a _long_
+    time (Joshua Kwan).
+
+ -- Joshua Kwan <joshk at triplehelix.org>  Fri, 27 Aug 2004 16:36:39 -0700
+
+kernel-source-2.6.8 (2.6.8-4) unstable; urgency=high
+
+  * Added patch by Alex Clausen to stop spurious mouse button events
+    on older ADB using pmac notebooks (Sven Luther).
+
+  * Added two SCSI commands, namely VERIFY_16 and GPCMD_SEND_CUE_SHEET,
+    that were mentioned in the list from 2.6.9-rc1 but missing from the
+    corresponding header files (closes: #268128) (Jens Schmalzing).
+
+  * Added g4-errata followup patch that clears the BTIC bit, instead of
+    just not setting it (Sven Luther).
+
+  * Add some Sparc64 backports to make Josh happy (Christoph Hellwig).
+
+ -- Jens Schmalzing <jensen at debian.org>  Thu, 26 Aug 2004 14:30:01 +0200
+
+kernel-source-2.6.8 (2.6.8-3) unstable; urgency=high
+
+  * Suggest libqt3-dev for xconfig (closes: #261784) (Andres Salomon).
+
+  * Update documentation (Christoph Hellwig).
+
+  * Add bio_uncopy_user leak fix from Kurt Garloff (closes: #256871)
+    (Christoph Hellwig).
+
+  * Update scsi blacklist for USB multi card readers (Christoph Hellwig).
+
+  * Claim we're Windows (TM) to ACPI to work around broken BIOSes
+    (Christoph Hellwig).
+
+  * Fix early boot crash on some oldworld Power Macs. (closes: #266731)
+    (Christoph Hellwig).
+
+  * Add qdisc crash fix (closes: #266892) (Christoph Hellwig).
+
+  * Replace the drivers-scsi-sym53c8xx_revert workaround with
+    drivers-scsi-sym_2-dv-hang, which is a proper fix for the hang
+    (dann frazier).
+
+  * Enter ACPI mode earlier (closes: #258061) (Christoph Hellwig).
+
+  * Add a comment about the Adaptec firmware rebuild situation to
+    README.Debian (closes: #256757) (Christoph Hellwig).
+
+  * Update bio_uncopy_user-memleak to really fix the problem
+    (closes: #267464, #267338) (Christoph Hellwig).
+
+  * Update list of safe SCSI commands for SG_IO to match 2.6.9-rc1
+    (Christoph Hellwig).
+
+  * Update CCISS driver (Christoph Hellwig).
+
+  * Add minix block accounting fix (Christoph Hellwig).
+
+  * Fix nfsd to not errornously return ESTALE on failed permission check
+    (closes: #255931) (Christoph Hellwig).
+
+  * Fix SHM segment count limit off by one (Christoph Hellwig).
+
+  * Modularize xfrm_tunnel (Christoph Hellwig).
+
+  * Add small ACPI fix that makes speedstep work on some Centrino Laptops
+    (closes: #257763) (Christoph Hellwig).
+
+ -- Sven Luther <luther at debian.org>  Wed, 25 Aug 2004 17:40:07 +0200
+
+kernel-source-2.6.8 (2.6.8-2) unstable; urgency=high
+
+  * Add updated fix for generic UP kernel builds on IA64 (dann frazier).
+
+  * Added g4 l2 flush and MSR patch from Jacob Pan (Sven Luther).
+ 
+  * Added marvell gigabit ethernet driver errata patch from Nicolas Det
+    (Sven Luther).
+
+  * Added UP build fixes for sn_console & cyclone on ia64 (dann frazier).
+
+ -- Sven Luther <luther at debian.org>  Tue, 17 Aug 2004 15:34:59 +0200
+
+kernel-source-2.6.8 (2.6.8-1) unstable; urgency=high
+
+  * New upstream release.
+  
+  * Nuke tg3.c properly in prune-non-free; rely on patch to supply driver
+    (Andres Salomon).
+
+  * The following patches have been merged upstream (Andres Salomon):
+    . acpi-typo
+    . chown-gid-check
+    . chown-procfs
+    . dont-dereference-netdev.name-before-register_netdev
+      (partially applied; this is a broken patch)
+    . drivers-atkbd-quiten
+    . drivers-dpt_i2o-fixup
+    . drivers-isdn-io_funcs-fixup
+    . drivers-net-irda-dma_api
+    . drivers-net-via_rhine-avoid_bitfield
+    . drivers-sb-pnp_unregister
+    . drivers-scsi-advansys-dma_api
+    . drivers-scsi-sd-NO_SENSE
+    . drivers-usb-net-pegasus-startstop_queue
+    . envp
+    . fs-isofs-acorn
+    . fs-isofs-dont-check-period
+    . fs-jfs-compile
+    . include-linux-mca.h-fixups
+    . netfilter-signedcharbug
+    . netlink-macro-fixups
+    . powerpc-g4-errata
+    . xfs-update
+
+  * The following patches have been modified (Andres Salomon):
+    . drivers-input-hiddev-HIDIOCGUCODE
+      (sparse fixes; s/(void *) arg/user_arg/g)
+    . remove-references-to-removed-drivers
+      (upstream now considers SMCTR a broken and legacy driver)
+    . drivers-net-tg3-readd
+      (forward port firmware changes to new tg3; from version 3.3
+      of driver to version 3.8)
+
+  * Stop the kernel distclean from nuking the debian directory by
+    having the clean rule check for debian/official (Andres Salomon).
+
+  * Fix typo in alpha-termbits patch naming (Christoph Hellwig).
+
+  * Drop two unneeded patches (Christoph Hellwig):
+    . fs-cramfs-constify
+    . include-thread_info-ifdefs
+
+  * Remove -2 postfixes from patches, this is a new upstream release
+    (Christoph Hellwig).
+
+  * Add NFS OOPS fix (Christoph Hellwig).
+
+  * Add SG_IO WRITE_BUFFER capability check (Christoph Hellwig).
+
+  * Fix IA64 generic kernel compile on UP (Christoph Hellwig).
+
+  * Add pty leak fix from Al Viro (Christoph Hellwig).
+
+  * Add patch from Gustavo Barbier to support IBM RS/6000 7043-240 and -E30
+    (Christoph Hellwig).
+
+  * Add 32bit ioctl translation support to XFS (closes: Bug#257265)
+    (Christoph Hellwig).
+
+  * Revert sym53c8xx driver (dann frazier).
+
+ -- Andres Salomon <dilinger at voxel.net>  Sat, 14 Aug 2004 02:40:50 -0400
+
+kernel-source-2.6.7 (2.6.7-4) unstable; urgency=high
+
+  * Migrated pegasos patch from the powerpc package, as it will be accepted
+    upstream (Sven Luther).
+
+  * Added a errata fix for some recent G4 processors (Sven Luther).
+
+  * Fixed the Powerpc/Pegasos marvell discovery II builtin gigabit ethernet
+    driver to use the MAC address set by the firmware, instead of reading the
+    value from the prom in a way specific to the mips board (Sven Luther).
+
+ -- Jens Schmalzing <jensen at debian.org>  Thu,  5 Aug 2004 18:32:00 +0200
+
+kernel-source-2.6.7 (2.6.7-3) unstable; urgency=low
+
+  * Upgraded the fs-asfs patch to 1.0beta7 (Jens Schmalzing).
+
+  * Updated README.NMU to explain the new build process based on split
+    patches and dpatch (Jens Schmalzing).
+
+  * Added chown security fixes (closes: Bug#257504) (Christoph Hellwig).
+
+  * Dropped modular-swsusp, doesn't work and unmaintained (Christoph Hellwig).
+
+  * Added 3ware SATA-RAID driver, backported from mainline (Christoph Hellwig).
+
+  * Update XFS to most current upstream BK version (Christoph Hellwig).
+
+  * Added Marvell Ethernet driver (closes: Bug#256064) (Christoph Hellwig).
+
+  * Added a backport of the netfilter signed char fix (Christoph Hellwig).
+
+ -- Sven Luther <luther at debian.org>  Wed,  7 Jul 2004 18:12:20 +0200
+
+kernel-source-2.6.7 (2.6.7-2) unstable; urgency=low
+
+  * Removed another tainted driver (closes: Bug#242895), and amended
+    remove-references-to-removed-drivers.dpatch accordingly.  Actually,
+    this was done in the previous revision, but we forgot the changelog
+    entry (Christoph Hellwig, Jens Schmalzing).
+
+  * Renamed debian/revision back to version.Debian.  Having it outside the
+    debian/ directory is mandatory for kernel-tree to work (Jens Schmalzing).
+
+  * Added the drivers-net-tg3 patch.  It only adds firmware loading
+    support, contrary to the drivers-net-tg3-readd patch which re-adds the
+    whole driver.  As a consequence, the Debian patch also applies to the
+    vanilla kernel again.  Note that this patch is only kept here for
+    reference for the time being and will not be activated until the next
+    upstream release (Jens Schmalzing).
+
+  * Added the fs-asfs patch by Marek Szyprowski, containing support for
+    the Amiga Smart Filesystem.  Actually, the patch was already part of
+    the kernel-patch-powerpc package and has been moved over from there
+    (Jens Schmalzing).
+
+ -- Jens Schmalzing <jensen at debian.org>  Thu, 24 Jun 2004 09:56:13 +0200
+
+kernel-source-2.6.7 (2.6.7-1) unstable; urgency=low
+
+  * New upstream release.
+
+  * Added split patches in dpatch format (Christoph Hellwig and Sven Luther).
+
+  * Lots of patches merged upstream:
+    . acpi-link
+    . console-refcounting
+    . doc-sound
+    . drivers-hotplug-acpi-unregister
+    . drivers-i810-update
+    . drivers-ide-CONFIG_IDE_STROKE-at-runtime (slight changes, allows drops
+      the config option completely)
+    . drivers-mca_53c9x-needs_mca_legacy
+    . drivers-mtd-sharp-missing-includes
+    . drivers-mtd-uclinux-rootfs
+    . drivers-neomagic-ids
+    . drivers-neomagic-oss-ids
+    . drivers-paride-epat (with minor updates)
+    . drivers-pnp-needs-x86
+    . drivers-scsi-aic7xxx-fixes (slightly different)
+    . drivers-usb-storage-new-sony-device
+    . drivers-video-tgafb-needs-selection.h
+    . drivers-watchdog-missing-includes
+    . fs-isofs-remove-unused
+    . include-linux-mca.h-fixups (only partially)
+    . makefile-wc-fixup
+    . sparc64-NR_CPUS
+    . x86-dma-mapping.h-fixups
+
+  * Dropped some patches (Christoph Hellwig):
+    . alpha_cia_window - incorrect (closes: #253787)
+    . doc-initrd_devfs - incorrect, devfs names for initrd are okay
+    . drivers-mwave_paper_over_sysfs_crap - buggy driver model integration
+      removed completely upstream
+    . drivers-net-ns83820-needs-FW_LOADER - incorrect, ns83820 doesn't
+      load firmware at all
+    . drivers-scsi-3w-xxxx-no_unregister - incorrect
+    . export-proc_get_inode - the symbol is internal for a reason.  buggy
+      drivers using it removed in 2.6.7
+    . fs-msdos-dontbug - rejected upstream
+    . fs-umsdosfs-crapola - umdos is disconnected from the build in 2.6
+    . ppc-higher-binutils-requirement - upstream disagrees, Debian uses
+      dpkg build depencies anyway
+    . 00_doc-README.Debian - now handled differently by the packaging
+  
+  * Renamed version.Debian to debian/revision, in order to have all Debian
+    specific bits in the debian directory (Jens Schmalzing).
+
+  * Added the prune target to debian/rules.  It unpacks the vanilla
+    kernel, removes the tainted bits, and creates a free .orig.tar.gz
+    (Jens Schmalzing).
+
+  * Added the monolith target to debian/rules.  It saves a copy of the
+    original kernel tree, then for each revision applies the split patches
+    via dpatch and creates a monolithic patch (Jens Schmalzing).
+
+  * Add fs-jfs-compile to fix JFS compilation (Christoph Hellwig).
+
+  * Package the upstream changelog file, taken from ChangeLog-<release>,
+    into kernel-tree.  The rationale of this being that we should
+    distribute the upstream changelog in the usual location, but it is
+    enough to do this once (Jens Schmalzing).
+
+ -- Jens Schmalzing <jensen at debian.org>  Mon, 21 Jun 2004 12:55:48 +0200
+
+kernel-source-2.6.6 (2.6.6-2) unstable; urgency=low
+
+  * Fix i386 FPU bug.
+  * Transfer control of package to debian kernel team.
+
+ -- William Lee Irwin III <wli at debian.org>  Tue, 15 Jun 2004 11:06:35 -0700
+
+kernel-source-2.6.6 (2.6.6-1) unstable; urgency=low
+
+  * New upstream release (closes: #243084, #244728, #245959, #247486).
+  * Deleted unused exit prototype in drivers/scsi/aic7xxx/aic7xxx_osm.c.
+  * Unregister properly if no devices are found in
+    drivers/scsi/aic7xxx/aic79xx_osm.c (closes: #246277, #247298).
+  * Fixed GUCODE type check in drivers/usb/input/hiddev.c (Sergey Vlasov).
+  * Added basic highmem support in drivers/scsi/advansys.c (closes: #245238).
+  * Changed all occurrences herbert at debian.org:
+    . arch/i386/power/swsusp_syms.c
+    . arch/x86_64/kernel/swsusp_syms.c
+    . kernel/power/swsusp-core.c
+    . kernel/power/swsusp.h
+  * Reverted broken "VIA KT400-8235" change in arch/i386/kernel/dmi_scan.c.
+  * Fixed IRQ assignment in drivers/acpi/pci_link.c (Len Brown).
+  * Fixed resume device check (Sau Dan Lee):
+    . kernel/power/swsusp-core.c
+    . kernel/power/swsusp.c
+    . kernel/power/swsusp.h
+  * Restored driver without firmware:
+    . drivers/net/Kconfig
+    . drivers/net/Makefile
+    . drivers/net/tg3.c
+  * Added firmware loading support (Nathaneal Nerode):
+    . drivers/net/Kconfig
+    . drivers/net/tg3.c
+
+ -- Herbert Xu <herbert at debian.org>  Tue, 11 May 2004 19:42:16 +1000
+
+kernel-source-2.6.5 (2.6.5-4) unstable; urgency=high
+
+  * Unregister PCI driver in drivers/pci/hotplug/acpiphp_glue.c.
+  * Fixed print_pirt NULL deref in drivers/pci/hotplug/shpchprm_acpi.c
+    (closes: #246149).
+  * Reverted radeon/r128 firmware changes (closes: #246587, #246594, #246627):
+    . drivers/char/drm/Kconfig
+    . drivers/char/drm/Makefile
+    . drivers/char/drm/r128_cce.c
+    . drivers/char/drm/r128_drv.h
+    . drivers/char/drm/r128_firmware_loader.c
+    . drivers/char/drm/radeon_cp.c
+    . drivers/char/drm/radeon_drv.h
+    . drivers/char/drm/radeon_firmware_loader.c
+
+ -- Herbert Xu <herbert at debian.org>  Fri, 30 Apr 2004 09:05:39 +1000
+
+kernel-source-2.6.5 (2.6.5-3) unstable; urgency=medium
+
+  * Added firmware loading support (Nathaneal Nerode):
+    . drivers/char/drm/Kconfig
+    . drivers/char/drm/Makefile
+    . drivers/char/drm/r128_cce.c
+    . drivers/char/drm/r128_drv.h
+    . drivers/char/drm/r128_firmware_loader.c
+    . drivers/char/drm/radeon_cp.c
+    . drivers/char/drm/radeon_drv.h
+    . drivers/char/drm/radeon_firmware_loader.c
+  * Removed non-free firmware:
+    . R128 firmware: drivers/char/drm/r128_cce.c
+    . Radeon firmware: drivers/char/drm/radeon_cp.c
+  * Read .extraversion if it exists in Makefile.
+  * Added support for removal in drivers/ide/ide-generic.c.
+  * Set GPL license in arch/i386/kernel/cpu/mcheck/non-fatal.c.
+  * Copy pages in reverse (closes: #234976):
+    . arch/i386/power/pmdisk.S
+    . arch/i386/power/swsusp.S
+  * Lowered maximum NR_CPUS to 32 in arch/sparc64/Kconfig (closes: #245971).
+
+ -- Herbert Xu <herbert at debian.org>  Tue, 27 Apr 2004 20:31:41 +1000
+
+kernel-source-2.6.5 (2.6.5-2) unstable; urgency=low
+
+  * Reverted pid == 1 change in kernel/fork.c.
+  * Allow PCI IDE drivers to be unloaded if probing fails in
+    drivers/ide/pci/atiixp.c.
+  * Fixed single word src misalign > dest misalign case in
+    arch/alpha/lib/stxncpy.S (glibc).
+  * Removed obsolete gcc workaround in sound/core/oss/Makefile.
+  * Fixed boundary checks for GUSAGE/SUSAGE in drivers/usb/input/hiddev.c.
+  * Fake inquiry for Sony Clie PEG-TJ25 in drivers/usb/storage/unusual_devs.h
+    (closes: #243650).
+  * Strip quotes from parameters in kernel/params.c (bk, closes: #243588).
+  * Added device release function in drivers/char/mwave/mwavedd.c
+    (closes: #244207).
+  * Set __exit tags on module_exit in drivers/ide/pci/*.
+  * Partially modularised software suspend:
+    . arch/i386/power/Makefile
+    . arch/i386/power/swsusp_syms.c
+    . arch/x86_64/kernel/Makefile
+    . arch/x86_64/kernel/swsusp_syms.c
+    . drivers/acpi/sleep/proc.c
+    . fs/buffer.c
+    . include/linux/suspend.h
+    . kernel/sys.c
+    . kernel/power/Kconfig
+    . kernel/power/Makefile
+    . kernel/power/console.c
+    . kernel/power/process.c
+    . kernel/power/swsusp-core.c
+    . kernel/power/swsusp.c
+    . kernel/power/swsusp.h
+    . mm/vmscan.c
+  * Fixed illegal __exit reference:
+    . drivers/scsi/aic7xxx/aic7xxx_osm.c
+    . drivers/scsi/aic7xxx/aic7xxx_osm.h
+  * Fixed local root exploit in fs/isofs/rock.c (Ernie Petrides).
+  * Clear b_data in journal_get_descriptor_buffer in fs/jbd/journal.c
+    (Ted Ts'o).
+  * Added module option parsing in drivers/video/vesafb.c (closes: #244031).
+  * Fixed vesafb_exit leaks in drivers/video/vesafb.c.
+
+ -- Herbert Xu <herbert at debian.org>  Fri, 23 Apr 2004 21:50:18 +1000
+
+kernel-source-2.6.5 (2.6.5-1) unstable; urgency=low
+
+  * New upstream release (closes: #235419, #238569).
+  * Applied SCSI Media Changer patch (closes: #238476).
+  * Fixed strcmp in sysfs store (closes: #234446):
+    . kernel/power/main.c
+    . kernel/power/disk.c
+  * Do not unshare files for pid == 1 in kernel/fork.c (closes: #239029).
+  * Removed ide-detect in favour of ide-generic:
+    . drivers/ide/Makefile
+    . drivers/ide/ide-default.c
+    . drivers/ide/ide-generic.c
+    . drivers/ide/ide-io.c
+    . drivers/ide/ide-probe.c
+    . drivers/ide/ide-probe-mini.c
+  * Check __HAVE_THREAD_FUNCTIONS in include/linux/thread_info.h (m68k).
+  * Unregister properly if no devices are found (closes: #237477):
+    . drivers/scsi/aic7xxx/aic7770_osm.c
+    . drivers/scsi/aic7xxx/aic7xxx_osm.c
+    . drivers/scsi/aic7xxx/aic7xxx_osm.h
+  * Fixed X86_PM_TIMER description in drivers/acpi/Kconfig (Jochen Voss,
+    closes: #241941).
+  * Removed non-free firmware and disabled their drivers (see #239952):
+    . QLA2XXX: drivers/scsi/qla2xxx/*_fw.c
+    . TIGON3: drivers/net/tg3.c
+    . Unused: sound/oss/724hwmcode.h
+    . Unused: sound/oss/Hwmcode.h
+  * Lowered priority of "too many keys" message in
+    drivers/input/keyboard/atkbd.c (closes: #239036).
+  * Made %docs depend on scripts_basic instead of scripts in Makefile.
+  * Fixed syntax error in Documentation/DocBook/parportbook.tmpl.
+  * Include linux/init.h for __init in sound/pcmcia/pdaudiocf/pdaudiocf.c
+  * Fixed bashism in Makefile.
+
+ -- Herbert Xu <herbert at debian.org>  Tue,  6 Apr 2004 20:42:02 +1000
+
+kernel-source-2.6.4 (2.6.4-1) unstable; urgency=low
+
+  * New upstream release (closes: #234631, #234754, #236570).
+  * Added vmlinux.syms:
+    . scripts/Makefile.modpost
+    . scripts/modpost.c
+  * Allow X86_MCE_NONFATAL to be a module:
+    . arch/i386/Kconfig
+    . arch/i386/kernel/cpu/mcheck/mce.c (Andrew Morton)
+  * Black listed "TOSHIBA CD-ROM XM-1702BC" in drivers/ide/ide-dma.c.
+  * Black listed "VIA KT400-8235" for broken_pirq in
+    arch/i386/kernel/dmi_scan.c (closes: #235188).
+  * Handle NO_SENSE in sd_rw_intr in drivers/scsi/sd.c (Alan Stern,
+    closes: #232494).
+  * Reverted tasklet change in drivers/usb/host/uhci-hcd.*.
+  * Fixed ThinkPad lock up problem in drivers/usb/host/uhci-hcd.c (Alan Stern).
+  * Put __modpost under MODVERDIR in scripts/Makefile.modpost.
+  * Provide *-2.6 instead of *-2.4 (closes: #236779).
+  * Fixed IDE CD capacity detection in drivers/ide/ide-cd.c (Jens Axboe,
+    closes: #216581).
+  * Removed dev->name lookups before register_netdev (closes: #234817):
+    . drivers/net/3c501.c
+    . drivers/net/3c503.c
+    . drivers/net/8390.c
+    . drivers/net/8390.h
+    . drivers/net/ac3200.c
+    . drivers/net/apne.c
+    . drivers/net/e2100.c
+    . drivers/net/es3210.c
+    . drivers/net/hp-plus.c
+    . drivers/net/hp.c
+    . drivers/net/hydra.c
+    . drivers/net/lne390.c
+    . drivers/net/mac8390.c
+    . drivers/net/ne.c
+    . drivers/net/ne2.c
+    . drivers/net/ne2k-pci.c
+    . drivers/net/ne2k_cbus.c
+    . drivers/net/ne3210.c
+    . drivers/net/oaknet.c
+    . drivers/net/smc-mca.c
+    . drivers/net/smc-ultra.c
+    . drivers/net/smc-ultra32.c
+    . drivers/net/stnic.c
+    . drivers/net/wd.c
+    . drivers/net/zorro8390.c
+  * Set MODVERDIR based on SUBDIRS in Makefile (Andreas Gruenbacher,
+    closes: #236626).
+  * Remove reference to drivers/parport/init.c in
+    Documentation/DocBook/parportbook.tmp.
+
+ -- Herbert Xu <herbert at debian.org>  Sat, 13 Mar 2004 14:13:45 +1100
+
+kernel-source-2.6.3 (2.6.3-2) unstable; urgency=low
+
+  * Rebuilt to fix tarball in kernel-source package.
+  * Really added the Post-Halloween document.
+
+ -- Herbert Xu <herbert at debian.org>  Mon, 23 Feb 2004 08:01:24 +1100
+
+kernel-source-2.6.3 (2.6.3-1) unstable; urgency=low
+
+  * New upstream release.
+  * Replaced irq_resource usage:
+    . drivers/isdn/hardware/avm/b1isa.c
+    . drivers/isdn/hardware/avm/t1isa.c
+    . drivers/isdn/hisax/hisax_fcclassic.c
+  * Added Post-Halloween document.
+  * Allow PCI IDE drivers to be unloaded if probing fails (closes: #202828):
+    . drivers/ide/arm/*.c
+    . drivers/ide/pci/*.c
+
+ -- Herbert Xu <herbert at debian.org>  Fri, 20 Feb 2004 20:48:48 +1100
+
+kernel-source-2.6.2 (2.6.2-2) unstable; urgency=high
+
+  * Added build-dependency on gs (closes: #232631).
+  * Restored generic SCSI proc_info function in drivers/scsi/scsi_proc.c
+    (closes: #232533).
+  * Fixed early chip programming in tg3_setup_copper_phy() in drivers/net/tg3.c
+    (David Miller).
+  * Fixed dev timer SMP deadlock in drivers/scsi/aic7xxx/aic7xxx_osm.c
+    (Andrew Morton).
+  * Check return value of do_munmap in do_mremap in mm/mremap.c (2.6.3).
+
+ -- Herbert Xu <herbert at debian.org>  Wed, 18 Feb 2004 21:29:09 +1100
+
+kernel-source-2.6.2 (2.6.2-1) unstable; urgency=low
+
+  * New upstream release (closes: #227071, #229745, #227240, #231466).
+  * Made PDC202XX_{BURST,FORCE} available even if it is a module in
+    drivers/ide/Kconfig.
+  * Fixed dead lock in drain_dac in sound/oss/i810_audio.c.
+  * Added drivers/ide/ide-probe-mini.c (2.4, closes: #224082, #227317, #228906,
+    #230195, #230755).
+  * Updated kernel-source description from kernel-package (closes: #226816).
+  * Added upstream changelog (closes: #230183).
+  * Added build-dependency on docbook-utils and transfig.
+  * Put kernel_thread_helper in right segment in arch/i386/kernel/process.c
+    (bk).
+
+ -- Herbert Xu <herbert at debian.org>  Sat,  7 Feb 2004 10:36:58 +1100
+
+kernel-source-2.6.0 (2.6.0-2) unstable; urgency=low
+
+  * Don't allow mremap of zero-sized areas in mm/mremap.c (2.6.1,
+    closes: #226542).
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 11 Jan 2004 16:34:27 +1100
+
+kernel-source-2.6.0 (2.6.0-1) unstable; urgency=low
+
+  * New upstream release.
+  * Documented psmouse/mousedev in README.Debian (closes: #223596).
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 21 Dec 2003 16:16:02 +1100
+
+kernel-source-2.6.0-test11 (2.6.0-test11-1) unstable; urgency=low
+
+  * New upstream release (closes: #212831, #215530, #217908, #218749, #218768,
+    #219239, #219944, #220432).
+  * Reverted set_blocksize change in fs/block_dev.c (closes: #214131).
+  * Removed libqt-dev suggestion in kernel-source.
+  * Added Freecom FX-5/FX-50 in drivers/usb/storage/unusual_devs.h
+    (Luke Kenneth Casson Leighton, closes: #218781).
+  * Unregister driver if probing fails in sound/oss/sb_card.c
+    (closes: #218845).
+  * Work around gcc bug in sound/core/oss/Makefile (closes: #203195).
+  * Use page cache for cramfs_read in fs/cramfs/inode.c (Al Viro).
+  * Fixed DMA overruns/bugs in sound/oss/i810_audio.c.
+  * Include asm/io.h and asm/scatterlist.h in include/asm-i386/dma-mapping.h.
+  * Removed uses of isa_vir_to_bus (closes: #218878):
+    . drivers/net/irda/ali-ircc.c
+    . drivers/net/irda/nsc-ircc.c
+    . drivers/net/irda/smsc-ircc2.c
+    . drivers/net/irda/via-ircc.c
+    . drivers/net/irda/via-ircc.h
+    . drivers/net/irda/w83977af_ir.c
+    . include/net/irda/ali-ircc.h
+    . include/net/irda/irda_device.h
+    . include/net/irda/nsc-ircc.h
+    . include/net/irda/w83977af_ir.h
+    . net/irda/irda_device.c
+  * Fixed Tekram DC390 driver (Guennadi Liakhovetski, closes: #221865):
+    . drivers/scsi/Kconfig
+    . drivers/scsi/dc390.h
+    . drivers/scsi/scsiiom.c
+    . drivers/scsi/tmscsim.c
+    . drivers/scsi/tmscsim.h
+  * Flush bundles when devices go down:
+    . include/net/xfrm.h
+    . net/xfrm/xfrm_policy.c
+    . net/xfrm/xfrm_state.c
+  * Fixed inclusion loop with include/net/sctp/sm.h:
+    . include/net/sctp/sctp.h
+    . net/sctp/associola.c
+    . net/sctp/outqueue.c
+    . net/sctp/socket.c
+    . net/sctp/transport.c
+  * Fixed connect/disconnect race in drivers/usb/core/hub.c (2.4,
+    closes: #218670).
+  * Initialise state for /proc/net/tcp in net/ipv4/tcp_ipv4.c (bk).
+  * Cleaned up debian/rules a little.
+  * Schedule tasklets for async removal in drivers/usb/host/uhci-hcd.*.
+
+ -- Herbert Xu <herbert at debian.org>  Mon,  8 Dec 2003 20:23:22 +1100
+
+kernel-source-2.6.0-test9 (2.6.0-test9-1) unstable; urgency=low
+
+  * New upstream release (closes: #216972).
+  * Applied x86/64bit fix in drivers/char/ftape/lowlevel/ftape-calibr.c (2.4).
+  * Include linux/fs.h for struct file:
+    . drivers/char/watchdog/scx200_wdt.c
+    . drivers/char/watchdog/wdt_pci.c
+    . drivers/char/watchdog/i810-tco.c
+    . drivers/char/watchdog/alim7101_wdt.c
+    . drivers/char/watchdog/alim1535_wdt.c
+    . drivers/char/watchdog/sc1200wdt.c
+    . drivers/char/watchdog/amd7xx_tco.c
+    . drivers/char/applicom.c
+  * Include linux/init.h for __init:
+    . drivers/char/moxa.c
+    . drivers/char/mxser.c
+    . drivers/mtd/chips/jedec_probe.c
+    . drivers/mtd/chips/sharp.c
+    . drivers/net/sb1000.c
+    . drivers/net/wan/sealevel.c
+    . drivers/net/wan/cosa.c
+  * Removed unnecessary asm/setup.h in drivers/mtd/cmdlinepart.c.
+  * Support architectures without asm/mca.h:
+    . include/linux/mca.h
+    . include/linux/mca-legacy.h
+  * Made PNPBIOS X86 only in drivers/pnp/Kconfig.
+  * Added CIBAUD/CMSPAR in include/asm-alpha/termbits.h.
+  * Include linux/selection.h for color_table in drivers/video/tgafb.c.
+  * Added optimise by size option:
+    . Makefile
+    . init/Kconfig
+  * Fixed reference count bug in net/xfrm/xfrm_policy.c.
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 26 Oct 2003 16:16:43 +1100
+
+kernel-source-2.6.0-test7 (2.6.0-test7-1) unstable; urgency=low
+
+  * Fixed NLMSG_OK and RTA_OK:
+    . include/linux/netlink.h
+    . include/linux/rtnetlink.h
+  * Reverted process group accessor change (bk):
+    . arch/ia64/kernel/unaligned.c
+    . arch/sparc64/solaris/misc.c
+    . drivers/char/n_tty.c
+    . drivers/char/rocket.c
+    . drivers/char/tty_io.c
+    . drivers/char/vt.c
+    . drivers/char/vt_ioctl.c
+    . drivers/net/slip.c
+    . fs/binfmt_elf.c
+    . fs/compat_ioctl.c
+    . fs/dquot.c
+    . fs/exec.c
+    . fs/open.c
+    . fs/proc/array.c
+    . include/linux/sched.h
+    . kernel/acct.c
+    . kernel/exit.c
+    . kernel/fork.c
+    . kernel/pid.c
+    . kernel/signal.c
+    . kernel/sys.c
+    . net/ipv4/netfilter/ipt_owner.c
+    . net/ipv6/netfilter/ip6t_owner.c
+  * Export blk_queue_activity_fn for ide-probe in drivers/block/ll_rw_blk.c.
+    This change did not make it into the package (closes: #215223).
+  * Include mca-legacy.h for MCA_NOTFOUND in drivers/isdn/eicon/eicon_mod.c.
+  * Use gcc-2.95 compatible variadic macro in
+    drivers/media/video/saa7134/saa7134-core.c.
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 12 Oct 2003 09:51:18 +1000
+
+kernel-source-2.6.0-test6 (2.6.0-test6-2) unstable; urgency=low
+
+  * Export blk_queue_activity_fn for ide-probe in drivers/block/ll_rw_blk.c.
+
+ -- Herbert Xu <herbert at debian.org>  Sat,  4 Oct 2003 13:45:40 +1000
+
+kernel-source-2.6.0-test6 (2.6.0-test6-1) unstable; urgency=low
+
+  * New upstream release (closes: #209307).
+  * Use mac_len for move ll headers:
+    . include/linux/skbuff.h
+    . net/core/dev.c
+    . net/ipv4/xfrm4_input.c
+    . net/ipv6/xfrm6_input.c
+  * Removed ACENIC/DGRS/DABUSB in arch/*/defconfig (closes: #211852).
+  * Fixed double request_region:
+    . drivers/net/arcnet/com20020.c
+    . drivers/net/arcnet/com20020-isa.c
+    . drivers/net/arcnet/com20020-pci.c
+  * Forbid unspecified tunnel mode SAs in net/xfrm/xfrm_policy.c.
+  * Removed duplicate policy checks for ipip tunnels:
+    . net/ipv4/ipip.c
+    . net/ipv4/xfrm4_tunnel.c
+  * Restored err_tty_modem label in drivers/isdn/i4l/isdn_common.c.
+  * Added probe declaration in drivers/net/wireless/arlan-main.c.
+  * Include linux/termios.h for TCGETS in fs/intermezzo/dir.c
+    (Kalle Olavi Niemitalo, closes: #208966).
+
+ -- Herbert Xu <herbert at debian.org>  Fri,  3 Oct 2003 19:38:37 +1000
+
+kernel-source-2.6.0-test4 (2.6.0-test4-3) unstable; urgency=low
+
+  * Fixed fatal bug in xfrm ll header patch:
+    . net/ipv4/xfrm4_input.c
+    . net/ipv6/xfrm6_input.c
+
+ -- Herbert Xu <herbert at debian.org>  Thu,  4 Sep 2003 20:51:57 +1000
+
+kernel-source-2.6.0-test4 (2.6.0-test4-2) unstable; urgency=low
+
+  * Added MODULE_LICENSE to net/xfrm/xfrm_user.c.
+  * Export idedefault_driver in drivers/ide/ide-default.c.
+
+ -- Herbert Xu <herbert at debian.org>  Mon,  1 Sep 2003 21:16:07 +1000
+
+kernel-source-2.6.0-test4 (2.6.0-test4-1) unstable; urgency=low
+
+  * New upstream release (closes: #206656).
+  * Fixed ll header of tunnel packets:
+    . include/linux/skbuff.h
+    . net/ipv4/xfrm4_input.c
+    . net/ipv6/xfrm6_input.c
+  * Fixed gcc 3 declaration in drivers/net/sis190.c.
+  * Fixed synchronize_irq() call in drivers/net/sis190.c.
+  * Fixed freenet_devtypo in drivers/net/wan/cosa.c.
+  * Fixed device name setting in drivers/net/3c509.c.
+  * Removed release timer in sound/pcmcia/vx/vx_entry.c.
+  * Always define cmpxchg in include/asm-i386/system.h (closes: #206956).
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 31 Aug 2003 13:41:55 +1000
+
+kernel-source-2.6.0-test2 (2.6.0-test2-1) unstable; urgency=low
+
+  * Cope with exit status 2 from md5sum in drivers/isdn/hisax/cert.c.
+  * Fixed binutils test in scripts/ver_linux.
+  * Wrapped long line in kernel-source description.
+  * Marked IDE PCI proc entries as __devinitdata (closes: #202412):
+    . drivers/ide/pci/*.h
+  * Fixed binutils version recommendation in arch/ppc/Makefile.
+  * Added per-SA ECN flag:
+    . include/linux/pfkeyv2.h
+    . include/linux/xfrm.h
+    . include/net/inet_ecn.h
+    . include/net/xfrm.h
+    . net/ipv4/ah4.c
+    . net/ipv4/esp4.c
+    . net/ipv4/ipcomp.c
+    . net/ipv4/xfrm4_input.c
+    . net/ipv6/ah6.c
+    . net/ipv6/esp6.c
+    . net/ipv6/ipcomp.c
+    . net/ipv6/xfrm6_input.c
+    . net/key/af_key.c
+    . net/xfrm/xfrm_user.c
+  * Fixed secpath xfrm state leak:
+    . include/net/xfrm.h
+    . net/ipv4/xfrm4_input.c
+    . net/ipv4/xfrm4_policy.c
+    . net/ipv6/xfrm6_input.c
+    . net/ipv6/xfrm6_policy.c
+    . net/netsyms.c
+    . net/xfrm/xfrm_input.c
+    . net/xfrm/xfrm_policy.c
+  * Fixed owner setting in drivers/net/arcnet/com20020-isa.c.
+  * Fixed module refcounting in drivers/net/pcmcia/com20020_cs.c.
+  * Fixed hdlc proto type:
+    . drivers/net/wan/dscc4.c
+    . drivers/net/wan/pc300_drv.c
+  * Use gcc-2.95 compatible variadic macro in drivers/net/wireless/wl3501_cs.c.
+  * Applied 486 emulation patch (Willy Tarreau):
+    . arch/i386/Kconfig
+    . arch/i386/kernel/Makefile
+    . arch/i386/kernel/emu.c
+    . arch/i386/kernel/entry.S
+
+ -- Herbert Xu <herbert at debian.org>  Thu, 31 Jul 2003 20:01:30 +1000
+
+kernel-source-2.6.0-test1 (2.6.0-test1-1) unstable; urgency=low
+
+  * New upstream release (closes: #194242, #199893).
+  * Fixed size of default_port in drivers/net/via-rhine.c.
+  * Added general notes from 2.4 README.Debian file.
+  * Removed cmd640 from drivers/ide/pci/Makefile (closes: #195286).
+  * Made MCA_53C9X depend on MCA_LEGACY in drivers/scsi/Kconfig.
+  * Setup two 1G mappings if cia_rev == 1 in arch/alpha/kernel/core_cia.c.
+  * Added inclusion of linux/stddef.h due to NULL in linux/timer.h.
+  * Fixed multiline string literals in drivers/net/wan/sdla_chdlc.c.
+  * Suggest libqt-dev in kernel-source package (closes: #196296).
+  * Fixed IDE PCI proc entries for modules in drivers/ide/ide-proc.c.
+  * Fixed assembly specification in drivers/net/wan/sbni.c.
+  * Enable hw_resend_irq if io_apic is on (ac):
+    . include/asm-i386/hw_irq.h
+    . arch/i386/kernel/io_apic.c
+  * Include linux/skbuff.h for skb_put in include/linux/netlink.h.
+  * Include linux/spinlock.h for rwlock_t in include/net/ip6_fib.h.
+  * Include linux/ipv6.h for inet6_sk in include/net/ip6_route.h.
+  * Include net/sock.h for struct sock in include/net/ip6_route.h.
+  * Include linux/netdevice.h for MAX_ADDR_LEN in include/net/neighbour.h.
+  * Added forward declaration for struct neighbour in include/net/neighbour.h.
+  * Include linux/types.h for __u32 in include/linux/watchdog.h.
+  * Added forward declaration for struct net_device in include/linux/skbuff.h.
+  * Wake up km_waitq after policy changes in net/xfrm/xfrm_policy.c.
+  * Restored mdio_sem that replaced rtnl_lock in drivers/net/8139too.c.
+  * Include linux/root_dev.h for ROOT_DEV in drivers/mtd/maps/uclinux.c.
+  * Removed bogus devfs references in Documentation/initrd.txt (Nikolaus Rath).
+  * Kill temp addresses and regen timer on shutdown in net/ipv6/addrconf.c.
+  * Fixed optional choice setting in scripts/kconfig/confdata.c.
+  * Made CONFIG_IDEDISK_STROKE a runtime option (Joerg Platte):
+    . include/linux/ide.h
+    . drivers/ide/ide.c
+    . drivers/ide/ide-disk.c
+  * Export blk_rq_prep_restart for ide-disk in drivers/block/ll_rw_blk.c.
+  * Fixed IDE modularisation:
+    . drivers/ide/Kconfig
+    . drivers/ide/Makefile
+    . drivers/ide/ide.c
+    . drivers/ide/ide-io.c
+    . drivers/ide/ide-pnp.c
+    . drivers/ide/ide-probe.c
+    . drivers/ide/pci/*
+    . drivers/ide/setup-pci.c
+    . include/linux/ide.h
+
+ -- Herbert Xu <herbert at debian.org>  Tue, 15 Jul 2003 21:36:05 +1000
+
+kernel-source-2.5.69 (2.5.69-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Herbert Xu <herbert at debian.org>  Wed,  7 May 2003 20:54:36 +1000
+
+kernel-source-2.4.20 (2.4.20-6) unstable; urgency=low
+
+  * Documented mem= change in README.Debian.
+  * Fixed printk warnings in init/do_mounts.c.
+  * Fixed printk warnings in fs/fat/file.c (closes: #178355).
+  * Commented out non-TeX heading in Documentation/smp.tex (Daniel van Eeden,
+    closes: #174554).
+  * Fixed dupliate detection problem in drivers/net/tokenring/ibmtr.c
+    (closes: #178874).
+  * Close old_fd and root_fd in init/do_mounts.c (Brian May, closes: #180934).
+  * Ignore errors from tw_setfeature in drivers/scsi/3w-xxxx.c
+    (closes: #181581).
+  * Changed all occurances of infobox+sleep to msgbox in scripts/Menuconfig
+    (closes: #181640).
+  * Use rq->special instead of rq->buffer in drivers/scsi/ide-scsi.c
+    (closes: #180125).
+  * Fixed precedence bug in drivers/sound/trident.c (John Levon).
+  * Documented AMD 768 erratum (closes: #177139).
+  * Fixed initialisation error handling in drivers/block/cciss.c.
+  * Fixed initialisation error handling in drivers/block/cpqarray.c.
+  * Fixed ptrace security hole (closes: #185375).
+  * Work around broken Toshiba keyboards (2.4.21pre, closes: #121335).
+  * Fixed sock address length check (2.4.21pre, closes: #171983).
+
+ -- Herbert Xu <herbert at debian.org>  Sat, 22 Mar 2003 10:05:53 +1100
+
+kernel-source-2.4.20 (2.4.20-5) unstable; urgency=high
+
+  * Fixed ethernet packet padding information leak (2.4ac, see #176178):
+    . via-rhine
+  * Added sk_padto function (closes: #176487).
+
+ -- Herbert Xu <herbert at debian.org>  Mon, 13 Jan 2003 19:17:48 +1100
+
+kernel-source-2.4.20 (2.4.20-4) unstable; urgency=high
+
+  * Added missing printk newlines in net/sched/sch_htb.c
+    (Alexandra N. Kossovsky, closes: #174152).
+  * Removed bogus VIA KT266 IO-APIC check.  It is a useful warning.
+  * Removed bogus ip_conntrack_{ftp,irc} check.
+  * Fixed a typo in Documentation/sound/Introduction (Daniel van Eeden,
+    closes: #174944).
+  * Reverted CONFIG_VIDEO_VESA change (closes: #175614).
+  * Fixed ethernet packet padding information leak (2.4ac, see #176178):
+    . 3c501
+    . 3c505
+    . 3c507
+    . 3c523
+    . 3c527
+    . 7990
+    . 8139too
+    . 82596
+    . 8390
+    . a2065
+    . am79c961a
+    . ariadne
+    . at1700
+    . atarilance
+    . atp
+    . bagetlance
+    . de600
+    . de620
+    . declance
+    . depca
+    . eepro
+    . eexpress
+    . epic100
+    . eth16i
+    . fmv18x
+    . hp100
+    . lance
+    . lasi_82596
+    . lp486e
+    . ni5010
+    . ni52
+    . ni65
+    . axnet_cs
+    . fmvj18x_cs
+    . ray_cs
+    . xirc2ps_cs
+    . xircom_tulip_cb
+    . seeq8005
+    . sgiseeq
+    . sk_g16
+    . smc9194
+    . sun3_82586
+    . sun3lance
+    . wavelan
+    . yellowfin
+    . znet
+
+ -- Herbert Xu <herbert at debian.org>  Sat, 11 Jan 2003 17:31:43 +1100
+
+kernel-source-2.4.20 (2.4.20-3) unstable; urgency=low
+
+  * Fixed ext3 remount deadlock added in 2.4.20-2 (Andrew Morton).
+  * Fixed ext3 use-after-free bug (Andrew Morton).
+  * Fixed i845G AGP Gart initialisation (Michael Milligan, closes: #172724).
+  * Updated i810_audio driver (2.4.21pre1, closes: #172194).
+
+ -- Herbert Xu <herbert at debian.org>  Sat, 21 Dec 2002 13:49:15 +1100
+
+kernel-source-2.4.20 (2.4.20-2) unstable; urgency=low
+
+  * Include acpidrv.o in the kernel (Mario Holbe, closes: #168439).
+  * Removed CONFIG_INET_ECN_DISABLED option.
+  * Removed CONFIG_INET_ECN check in net/ipv4/tcp_diag.c.
+  * Fixed stxncpy on alpha (2.4.21pre).
+  * Fixed ext3 data=journal umount problem (2.4.21pre1, closes: #171632).
+  * Added dependency on MTD_CONCAT for sc520cdp (closes: #173045).
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 15 Dec 2002 14:53:05 +1100
+
+kernel-source-2.4.20 (2.4.20-1) unstable; urgency=low
+
+  * New upstream release (closes: #164065, #164204, #165478, #166312, #168141,
+    #168190, #170962).
+  * Disable CONFIG_VIDEO_VESA unless VESA FB support is turned on.
+  * Mention Debian changes in kernel-source package description.
+  * Fixed a bug where ACPI is always compiled as a module (closes: #168439).
+  * CONFIG_VIDEO_SELECT is always on again.
+  * Modularised VESA FB.
+  * Added coreutils as an alternative to fileutils (closes: #170459).
+  * Replaced BUG() with printk() in fs/fat/file.c (closes: #168886).
+  * Fixed circular dependency in include/linux/netfilter_ipv4/ip_conntrack.h.
+  * Do not get seqno if we will not use it in fs/isofs/inode.c.
+  * Fixed HID name fix so that produce id is actually read.
+  * Added missing semicolons in drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
+    (Michael Osamu Shiobara, closes: #165375).
+  * Made CONFIG_PARIDE_EPATC8 into a runtime option.
+  * Fixed double PCI unregistration in drivers/char/joystick/pcigame.c.
+  * Include linux/init.h in drivers/char/amd76x_pm.c.
+  * Include linux/init.h in drivers/scsi/cpqfcTSinit.c.
+
+ -- Herbert Xu <herbert at debian.org>  Sat, 30 Nov 2002 16:39:30 +1100
+
+kernel-source-2.4.19 (2.4.19-5) unstable; urgency=high
+
+  * Fixed i386 lcall DoS (Petr Vandrovec).
+
+ -- Herbert Xu <herbert at debian.org>  Mon, 18 Nov 2002 21:22:02 +1100
+
+kernel-source-2.4.19 (2.4.19-4) unstable; urgency=low
+
+  * Added missing headers in drivers/isdn/hisax/avma1_cs.c.
+  * Added missing headers in drivers/net/wan/comx-hw-munich.c.
+
+ -- Herbert Xu <herbert at debian.org>  Wed, 16 Oct 2002 22:42:01 +1000
+
+kernel-source-2.4.19 (2.4.19-3) unstable; urgency=low
+
+  * Fixed more ACPI module building problems.
+  * Fixed initialisation oops in drivers/scsi/aic7xxx/aic7770.c
+    (closes: #162347).
+  * Made CONFIG_VIDEO_SELECT conditional in drivers/video.
+
+ -- Herbert Xu <herbert at debian.org>  Sun,  6 Oct 2002 16:33:04 +1000
+
+kernel-source-2.4.19 (2.4.19-2) unstable; urgency=low
+
+  * Inlucde pagemap.h for unlock_page in drivers/char/drm/i810_dma.c
+    (closes: #144971).
+  * Set ?time to zero in fs/cramfs/inode.c.
+  * Allow ACPI to be compiled as a module.
+  * Fixed umsdos_solve_hlink oops in fs/umsdos/dir.c (closes: #159772).
+  * Honour ide?=dma in drivers/ide/via82cxxx.c (Arne Nordmark,
+    closes: #157925).
+  * Restored priority of invalidate messages in fs/buffer.c.  The submitter of
+    #131419 did a badblocks -f.
+  * Wait before flushing in drivers/char/drm/mga_dma.c (ac, closes: #161100).
+  * Applied SCSI Media Changer patch (closes: #144850).
+  * Applied Big Physical Area Reservation patch (closes: #144849).
+  * Removed period check for executables in fs/isofs/inode.c (closes: #162190).
+
+ -- Herbert Xu <herbert at debian.org>  Sat, 28 Sep 2002 16:53:27 +1000
+
+kernel-source-2.4.19 (2.4.19-1) unstable; urgency=low
+
+  * New upstream release (closes: #139617, #146349).
+  * ip_nat_{ftp,irc} cannot be m if ip_conntrack_{ftp,irc} is y, respectively
+    (closes: #142532).
+  * Removed volume checks in fs/isofs/inode.c (closes: #138384).
+  * Removed gsem from drivers/usb/pegasus.c.
+  * Always call complete after unlinking an urb in drivers/usb/usb-ohci.c.
+  * Set hardsect size to 512 in drivers/scsi/sr.c (closes: #154510).
+  * Removed non-free firmware and disabled their drivers (closes: #150052):
+   . SMC Token Ring
+   . ACENIC
+   . DGRS
+   . DABUSB
+  * Lowed invalidate messages to priority DEBUG in fs/buffer.c
+    (closes: #131349).
+
+ -- Herbert Xu <herbert at debian.org>  Wed,  7 Aug 2002 21:12:03 +1000
+
+kernel-source-2.4.18 (2.4.18-5) unstable; urgency=low
+
+  * Corrected AdvWriteDWordLramNoSwap in drivers/scsi/advansys.c
+    (Jerome L. Quinn, closes: #128080).
+  * Added check for VIA KT266 IO-APIC, version == 2 (closes: #136163).
+  * Updated pegasus driver (2.4.19pre6).
+  * Added ATARAID device names to main.c (Eduard Bloch, closes: #139604).
+  * Updated uhci driver (Johannes Erdfelt, closes: #135785).
+  * Translate slashes in broken Acorn ISO9660 file systems (Darren Salt,
+    closes: #141660).
+  * Added newline to printk in drivers/sound/i810_audio.c
+    (handler-case at gmx.net, closes: #142214).
+  * Updated parport driver (2.4.19pre6).
+
+ -- Herbert Xu <herbert at debian.org>  Sat, 13 Apr 2002 22:07:22 +1000
+
+kernel-source-2.4.18 (2.4.18-4) unstable; urgency=high
+
+  * Fixed remaining double free in
+     drivers/net/zlib.c
+     fs/jffs2/zlib.c
+
+ -- Herbert Xu <herbert at debian.org>  Wed, 20 Mar 2002 20:02:18 +1100
+
+kernel-source-2.4.18 (2.4.18-3) unstable; urgency=high
+
+  * Fixed double free in
+     drivers/net/zlib.c
+     fs/jffs2/zlib.c
+
+ -- Herbert Xu <herbert at debian.org>  Wed, 13 Mar 2002 20:24:09 +1100
+
+kernel-source-2.4.18 (2.4.18-2) unstable; urgency=low
+
+  * Removed -g from driviers/atm/Makefile.
+  * Added missing personality patch to fs/binfmt_elf.c.
+  * Export est_cycle_freq (needed for removing CONFIG_FT_ALPHA_CLOCK).
+  * Extern inline -> static inline in
+     drivers/char/specialx.c
+     drivers/net/hamradio/soundmodem
+  * Added asm/io.h for in*/out* to
+     drivers/isdn/hisax/hisax_fcpcipnp.c
+     drivers/net/wan/farsync.c
+
+ -- Herbert Xu <herbert at debian.org>  Wed,  6 Mar 2002 19:53:30 +1100
+
+kernel-source-2.4.18 (2.4.18-1) unstable; urgency=low
+
+  * New upstream release (closes: #126391, #135156).
+  * Reverted tulip BMCR_FULLDPLX patch.
+  * Moved mkcramfs to the cramfs source package.
+  * CONFIG_SERIAL_ACPI now depends on CONFIG_SERIAL == y (closes: #132038).
+  * Fixed negative inodes in /proc/net (Arnaud Giersch, closes: #134704).
+  * pcnet32_purge_tx_ring may be called from IRQ context (Darren Salt,
+    closes: #134930).
+  * Check old_bbpnt in drivers/scsi/sr.c (2.5).
+  * Removed CONFIG_FT_ALPHA_CLOCK.
+  * Fixed the use of return values from mem*_io in drivers/isdn/sc.
+  * Added missing headers in drivers/pcmcia/i82092.c.
+  * Fixed compile error in drivers/scsi/dpt_i2o.c on alpha.
+
+ -- Herbert Xu <herbert at debian.org>  Thu, 28 Feb 2002 19:40:29 +1100
+
+kernel-source-2.4.17 (2.4.17-1) unstable; urgency=low
+
+  * New upstream release (closes: #122168, #123471).
+  * Only set startup to 0 for 21143 (rev 65) in tulip.
+  * Don't clear BMCR_FULLDPLX bit in tulip_find_mii as it breaks some cards
+    (closes: #100624).
+  * Fixed atyfb compilation problem (Tobias Ringstrom).
+  * Removed obsolete vfat patch.
+  * Fixed double cache allocation in mount_devfs_fs.
+
+ -- Herbert Xu <herbert at debian.org>  Sat, 22 Dec 2001 13:41:46 +1100
+
+kernel-source-2.4.16 (2.4.16-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Herbert Xu <herbert at debian.org>  Wed, 28 Nov 2001 07:30:44 +1100
+
+kernel-source-2.4.15 (2.4.15-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Herbert Xu <herbert at debian.org>  Sat, 24 Nov 2001 13:34:51 +1100
+
+kernel-source-2.4.14 (2.4.14-1) unstable; urgency=low
+
+  * New upstream release (closes: #117368, #118111).
+  * Made mkcramfs more verbose about write errors.
+  * Fixed compilation problem in loopback driver.
+  * Fixed compilation problem in ps2esdi.c.
+  * Fixed compilation problem in i2c-core.c.
+
+ -- Herbert Xu <herbert at debian.org>  Fri,  9 Nov 2001 20:15:49 +1100
+
+kernel-source-2.4.13 (2.4.13-1) unstable; urgency=low
+
+  * New upstream release.
+  * Updated kernel-source suggests (closes: #115716).
+  * Added support for nm256xl+ (Mattia Monga, closes: #116378).
+  * Fixed comment about epochs in arch/alpha/kernel/time.c.
+  * Fixed symlink size bug on tmpfs.
+  * Fixed handling of HIDs with product strings bug no manufacturer.
+  * Work around tmpfs symlink size bug in mkcramfs.
+
+ -- Herbert Xu <herbert at debian.org>  Sat, 27 Oct 2001 17:39:07 +1000
+
+kernel-source-2.4.12 (2.4.12-1) unstable; urgency=low
+
+  * New upstream release.
+  * Fixed typo in debian/rules (closes: #114065).
+  * Fixed ECN compilation problem (closes: #114192).
+  * Fixed typo in Documentation/sound/OPL3-SA
+    (Marius Gedminas, closes: #114760).
+  * Fixed typo in drivers/parport/ieee1284_ops.c (Tim Waugh).
+  * Don't kill page cache entries in set_blocksize.
+
+ -- Herbert Xu <herbert at debian.org>  Sat, 13 Oct 2001 11:41:03 +1000
+
+kernel-source-2.4.10 (2.4.10-1) unstable; urgency=low
+
+  * New upstream release.
+  * Added support for EPAT C7/C8 chips.
+  * Fixed dead lock on shutdown in 8139too (closes: #107779).
+  * Removed const from drivers/net/irda/smc-ircc.c
+    (Keith Owens, closes: #110193).
+  * Allow ECN to be compiled in but disabled.
+  * Removed non-free Keyspan firmware.  We're no longer pristine.
+  * Fixed list_del bug in usb-uhci (ac patches).
+  * Fixed apm argument processing (ac patches).
+  * Added ioctl defines for cpq (ac patches).
+  * Included linux/init.h in drivers/net/aironet4500_card.c.
+
+ -- Herbert Xu <herbert at debian.org>  Sat, 29 Sep 2001 16:05:20 +1000
+
+kernel-source-2.4.9 (2.4.9-1) unstable; urgency=low
+
+  * New upstream release (closes: #63393).
+  * Fixed highmem CramFS bug (closes: #108893).
+  * Added missing include in fs/ntfs/unistr.c.
+  * Reverted startup==1 patch from drivers/net/tulip/21142.c.
+  * Fixed obsolete use of min: drivers/net/rrunner.c.
+  * Exported snprintf/vsnprintf (ac patches).
+
+ -- Herbert Xu <herbert at debian.org>  Sat, 18 Aug 2001 21:23:07 +1000
+
+kernel-source-2.4.8 (2.4.8-1) unstable; urgency=low
+
+  * New upstream release.
+  * Menuconfig now exits with 1 if screen is too small (closes: #106510).
+  * Applied NFS client seekdir patch (closes: #63063, #107045).
+  * Build-depend on kernel-package >= 7.48 (closes: #107545).
+  * Applied emu10k fixes (ac patches).
+  * Fixed ldm macros (ac patches).
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 12 Aug 2001 09:04:44 +1000
+
+kernel-source-2.4.7 (2.4.7-1) unstable; urgency=low
+
+  * New upstream release (closes: #97516, #104141, #104267).
+  * Applied ReiserFS umount patch (closes: #100740).
+  * Applied DAC960 completion patch (Jens Axboe).
+  * Restricted CONFIG_FB_PVR2 to SH (ac patches).
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 22 Jul 2001 11:52:29 +1000
+
+kernel-source-2.4.6 (2.4.6-1) unstable; urgency=low
+
+  * New upstream release (closes: #102864).
+  * Fixed pegasus_set_multicast lockup.
+  * Reverted sysinfo patch.
+
+ -- Herbert Xu <herbert at debian.org>  Thu,  5 Jul 2001 19:24:12 +1000
+
+kernel-source-2.4.5 (2.4.5-1) unstable; urgency=low
+
+  * New upstream release (closes: #78761, #96443).
+  * Fixed set_blocksize() on RAMDISKs.
+  * Removed flavour patch from Makefile as it is now obsolete.
+  * Fixed typo in drivers/usb/ov511.c (ac patches).
+  * Fixed race in fs/super.c (Alexander Viro).
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 27 May 2001 10:25:42 +1000
+
+kernel-source-2.4.4 (2.4.4-2) unstable; urgency=low
+
+  * Hacked ide_xlate_1024 to work when IDE is modularised (closes: #94853).
+  * Fixed typo in pci2220i.c (ac patches).
+  * Treat files that begin with FD_FILL_BYTE correctly in vfat
+    (closes: #75413).
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 13 May 2001 09:33:09 +1000
+
+kernel-source-2.4.4 (2.4.4-1) unstable; urgency=low
+
+  * New upstream release.
+  * Fixed a typo in Documentation/sound/OPL3-SA (Carlos Valdivia Yague,
+    closes: #95255).
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 29 Apr 2001 10:32:51 +1000
+
+kernel-source-2.4.3 (2.4.3-4) unstable; urgency=low
+
+  * ip_conntrack_ftp fix (netfilter, closes: #94216).
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 22 Apr 2001 11:15:02 +1000
+
+kernel-source-2.4.3 (2.4.3-3) unstable; urgency=low
+
+  * Added missing SIEMENS PCI ID (ac patches).
+  * Exported proc_get_inode (ac patches).
+
+ -- Herbert Xu <herbert at debian.org>  Mon, 16 Apr 2001 08:42:17 +1000
+
+kernel-source-2.4.3 (2.4.3-2) unstable; urgency=low
+
+  * Correct devfs path name in scsi-generic.txt (closes: #93405).
+  * Fixed negative padding in struct sysinfo.
+
+ -- Herbert Xu <herbert at debian.org>  Fri, 13 Apr 2001 19:42:42 +1000
+
+kernel-source-2.4.3 (2.4.3-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Herbert Xu <herbert at debian.org>  Sun,  8 Apr 2001 16:50:40 +1000
+
+kernel-source-2.4.2 (2.4.2-3) unstable; urgency=low
+
+  * Added build-time dependency on libz-dev (closes: #89722).
+  * Compilation fixes in 6pack.c and genhd.h (closes: #90646).
+
+ -- Herbert Xu <herbert at debian.org>  Fri, 23 Mar 2001 20:30:03 +1100
+
+kernel-source-2.4.2 (2.4.2-2) unstable; urgency=low
+
+  * Added initrd support for cramfs.
+  * Fixed bug that prevented initrd from being freed (ac patches).
+  * Fixed a typo in Documentation/sound/VIBRA16 (Carlos Valdivia,
+    closes: #88018).
+  * Removed misleading securetty note in devfs README files (closes: #89148).
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 11 Mar 2001 08:56:27 +1100
+
+kernel-source-2.4.2 (2.4.2-1) unstable; urgency=low
+
+  * New upstream release.
+  * Created mkcramfs package.
+  * Accomodate option change in binutils (closes: #87009).
+  * Applied loopback patch by Jens Axobe.
+
+ -- Herbert Xu <herbert at debian.org>  Fri, 23 Feb 2001 20:19:31 +1100
+
+kernel-source-2.4.1 (2.4.1-3) unstable; urgency=low
+
+  * Applied tmpfs patch by Christoph Rohland.
+  * Fixed incorrect conditional check in struct sysinfo (closes: #85603).
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 11 Feb 2001 21:08:05 +1100
+
+kernel-source-2.4.1 (2.4.1-2) unstable; urgency=low
+
+  * Fixed the struct sysinfo warning properly (closes: #84234).
+
+ -- Herbert Xu <herbert at debian.org>  Sat, 10 Feb 2001 23:10:44 +1100
+
+kernel-source-2.4.1 (2.4.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * Added support for flavours to Makefile.
+  * Only include asm/bitops.h if __KERNEL__ is defined in linux/fs.h
+    (closes: #84238).
+  * Added padding to struct sysinfo so that it's identical to 2.2 (#84234).
+  * Fixed typos in asm/socket.h (closes: #39168).
+  * Updated IrDA URL in asm/termios.h (closes: #42222).
+
+ -- Herbert Xu <herbert at debian.org>  Sun,  4 Feb 2001 10:11:47 +1100
+
+kernel-source-2.4.0 (2.4.0-1) unstable; urgency=low
+
+  * New upstream release (closes: #71874, #79490).
+  * Added missing build-time dependencies (closes: #81728).
+
+ -- Herbert Xu <herbert at debian.org>  Tue, 16 Jan 2001 11:14:16 +1100
+
+kernel-source-2.4.0-test11 (2.4.0-test11-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Herbert Xu <herbert at debian.org>  Sat,  9 Dec 2000 11:34:37 +1100
+
+kernel-source-2.4.0-test5 (2.4.0-test5-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Herbert Xu <herbert at debian.org>  Sat, 29 Jul 2000 17:55:37 +1000
+
+kernel-source-2.4.0-test4 (2.4.0-test4-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Herbert Xu <herbert at debian.org>  Wed, 19 Jul 2000 18:37:17 +1000
+
+kernel-source-2.4.0-test3 (2.4.0-test3-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Herbert Xu <herbert at debian.org>  Wed, 12 Jul 2000 09:49:57 +1000
+
+kernel-source-2.4.0-test2 (2.4.0-test2-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Herbert Xu <herbert at debian.org>  Mon, 10 Jul 2000 19:24:59 +1000
+
+kernel-source-2.2.17 (2.2.17pre6-1) frozen unstable; urgency=low
+
+  * New upstream release.
+
+ -- Herbert Xu <herbert at debian.org>  Sat, 24 Jun 2000 21:53:40 +1000
+
+kernel-source-2.2.16 (2.2.16-1) frozen unstable; urgency=high
+
+  * New upstream release (closes: #65745).
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 18 Jun 2000 12:42:37 +1000
+
+kernel-source-2.2.15 (1:2.2.15-3) frozen unstable; urgency=low
+
+  * Bring capabilities closer to POSIX spec (Andrew Morgan)
+    | Note. This subtly changes cap_bset behaviour.
+
+ -- Herbert Xu <herbert at debian.org>  Thu,  1 Jun 2000 09:32:11 +1000
+
+kernel-source-2.2.15 (1:2.2.15-2) frozen unstable; urgency=low
+
+  * AIC7XXX 5.1.29 (closes: #63946).
+
+ -- Herbert Xu <herbert at debian.org>  Sat, 13 May 2000 09:29:50 +1000
+
+kernel-source-2.2.15 (1:2.2.15-1) frozen unstable; urgency=low
+
+  * New upstream release (closes: #63675).
+  * Built with kernel-package 7.04.potato.1 (closes: #63290).
+
+ -- Herbert Xu <herbert at debian.org>  Tue,  9 May 2000 12:54:09 +1000
+
+kernel-source-2.2.15pre19 (2.2.15pre19-2) frozen unstable; urgency=low
+
+  * New upstream release (pre20).
+
+ -- Herbert Xu <herbert at debian.org>  Tue, 25 Apr 2000 15:31:03 +1000
+
+kernel-source-2.2.15pre19 (2.2.15pre19-1) frozen unstable; urgency=low
+
+  * New upstream release (closes: #55383).
+  * Applied patch from Chris Evans.
+  * Applied patch from David Miller.
+
+ -- Herbert Xu <herbert at debian.org>  Fri, 21 Apr 2000 12:15:30 +1000
+
+kernel-source-2.2.14 (2.2.14-5) frozen unstable; urgency=low
+
+  * Delete my copy of the control file before calling make-kpkg
+    (closes: #62269).
+
+ -- Herbert Xu <herbert at debian.org>  Thu, 13 Apr 2000 08:33:18 +1000
+
+kernel-source-2.2.14 (2.2.14-4) frozen unstable; urgency=medium
+
+  * Applied patch from Alexey Kuznetsov that fixes the AF_UNIX socket crash
+    (closes: #61335).
+  * Rebuilt with new kernel-package (closes: #61261).
+
+ -- Herbert Xu <herbert at debian.org>  Fri, 31 Mar 2000 14:12:43 +1000
+
+kernel-source-2.2.14 (2.2.14-3) frozen unstable; urgency=low
+
+  * Rebuilt with new kernel-package (closes: #60001).
+  * Included a patch from Eric Delaunay <delaunay at lix.polytechnique.fr> that
+    fixes a couple of argument parsing bugs in main.c (closes: #58566).
+
+ -- Herbert Xu <herbert at debian.org>  Thu, 23 Mar 2000 19:05:11 +1100
+
+kernel-source-2.2.14 (2.2.14-2) unstable; urgency=low
+
+  * Fixed incorrect assembly code for i386.
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 16 Jan 2000 12:36:59 +1100
+
+kernel-source-2.2.14 (2.2.14-1) unstable; urgency=low
+
+  * New upstream release.
+  * Fixed a typo in aha152x.c (closes: #12636).
+
+ -- Herbert Xu <herbert at debian.org>  Thu, 13 Jan 2000 12:09:06 +1100
+
+kernel-source-2.2.13 (2.2.13-2) unstable; urgency=low
+
+  * Updated version number in README.Debian (closes: #49033).
+  * Removed kernel-image as it will be generated by the kernel-image source
+    package.
+
+ -- Herbert Xu <herbert at debian.org>  Fri, 19 Nov 1999 19:41:45 +1100
+
+kernel-source-2.2.13 (2.2.13-1) unstable; urgency=low
+
+  * New upstream release.
+  * Enabled ServeRAID (closes: #47653).
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 24 Oct 1999 14:22:49 +1000
+
+kernel-source-2.2.12 (2.2.12-4) unstable; urgency=low
+
+  * Fixed a typo in tgafb.c.
+  * Added CONFIG_APM_DISABLE_BY_DEFAULT.
+  * Call make-kpkg to clean up (closes: #45603).
+
+ -- Herbert Xu <herbert at debian.org>  Thu, 14 Oct 1999 09:06:57 +1000
+
+kernel-source-2.2.12 (2.2.12-3) unstable; urgency=low
+
+  * Compiled with stacks aligned on dwords.
+  * Enabled serial consoles (closes: #46152).
+
+ -- Herbert Xu <herbert at debian.org>  Tue, 28 Sep 1999 17:39:34 +1000
+
+kernel-source-2.2.12 (2.2.12-2) unstable; urgency=low
+
+  * Rewrote the kmod patch to only bail out when the other side is our parent.
+  * Use the VFS patch rather than the autofs patch.
+  * Enabled Joliet extensions (fixes #42006).
+  * Enabled APM (fixes #42258).
+
+ -- Herbert Xu <herbert at debian.org>  Sat, 11 Sep 1999 23:51:00 +1000
+
+kernel-source-2.2.12 (2.2.12-1) unstable; urgency=low
+
+  * New upstream release (fixes #43865).
+  * Fixed an nlink update problem in nfs.
+  * New rules file from Hartmut Koptein.
+  * Fixed an overflow bug in the stallion driver.
+  * Fixed an autofs deadlock.
+  * Don't load a module that we're already trying to load (Chris Butler) (fixes
+    #39910).
+
+ -- Herbert Xu <herbert at debian.org>  Wed,  1 Sep 1999 09:12:15 +1000
+
+kernel-source-2.2.10 (2.2.10-1) unstable; urgency=low
+
+  * New upsream release.
+  * Moved default.config to new kernel-patch for i386.
+
+ -- Herbert Xu <herbert at debian.org>  Tue, 15 Jun 1999 21:59:48 +1000
+
+kernel-source-2.2.9 (2.2.9-2) unstable; urgency=high
+
+  * Fixed a network DoS attack.
+
+ -- Herbert Xu <herbert at debian.org>  Fri,  4 Jun 1999 21:06:28 +1000
+
+kernel-source-2.2.9 (2.2.9-1) unstable; urgency=low
+
+  * New upstream relesae.
+
+ -- Herbert Xu <herbert at debian.org>  Tue, 18 May 1999 10:20:08 +1000
+
+kernel-source-2.2.7 (2.2.7-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Herbert Xu <herbert at debian.org>  Fri,  7 May 1999 22:19:56 +1000
+
+kernel-source-2.2.5 (1:2.2.5-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Herbert Xu <herbert at debian.org>  Fri, 16 Apr 1999 13:56:45 +1000
+
+kernel-source-2.0.36 (2.0.36-3) frozen unstable; urgency=low
+
+  * Upgraded AIC7XXX to 5.1.11 which should make some owners of Adaptec cards
+    able to install Debian.
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 21 Feb 1999 14:56:42 +1100
+
+kernel-source-2.0.36 (2.0.36-2) frozen unstable; urgency=low
+
+  * Applied ISDN patch from Paul Slootman that enables idle timeouts in the
+    manual dialmode and allows callback syncPPP connections to be made
+    (fixes #31516).
+  * Enlarged kernel message buffer so that all messages are caught by klogd.
+  * Included module for TLAN based network cards (fixes #31623).
+  * Include EtherExpressPro and FMV0181/182/183/184 as modules.
+
+ -- Herbert Xu <herbert at debian.org>  Sat, 16 Jan 1999 16:39:01 +1100
+
+kernel-source-2.0.36 (2.0.36-1) unstable; urgency=low
+
+  * New upstream release.
+  * Enabled ETH16I.
+
+ -- Herbert Xu <herbert at debian.org>  Sat, 28 Nov 1998 17:40:21 +1100
+
+kernel-source-2.0.35 (2.0.35-3) frozen; urgency=low
+
+  * Upgraded to aic7xxx 5.1.4 (fixes #29480, #27859, #28946).
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 22 Nov 1998 15:41:44 +1100
+
+kernel-source-2.0.35 (2.0.35-2) unstable; urgency=low
+
+  * Upgraded to aic7xxx 5.1.0.
+  * Removed spurious definition in 3c523.c (fixes #25370).
+  * Built with kernel-package 5.11 (fixes #25623).
+  * Enabled autofs (fixes #22338, #27860).
+
+ -- Herbert Xu <herbert at debian.org>  Sat, 24 Oct 1998 17:32:06 +1000
+
+kernel-source-2.0.35 (2.0.35-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 19 Jul 1998 08:59:44 +1000
+
+kernel-source-2.0.34 (2.0.34-4) frozen unstable; urgency=high
+
+  * Updated to aic7xxx 5.0.19 (fixes #24252).
+
+ -- Herbert Xu <herbert at debian.org>  Wed,  8 Jul 1998 20:06:08 +1000
+
+kernel-source-2.0.34 (2.0.34-3) frozen unstable; urgency=high
+
+  * Reversed euid test in fs/fcntl.c.
+
+ -- Herbert Xu <herbert at debian.org>  Tue, 30 Jun 1998 16:27:49 +1000
+
+kernel-source-2.0.34 (2.0.34-2) frozen unstable; urgency=low
+
+  * Upload to hamm as well.
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 21 Jun 1998 16:48:13 +1000
+
+kernel-source-2.0.34 (2.0.34-1) unstable; urgency=low
+
+  * New upstream release (fixes #17651, #18788, #21231, #22330).
+
+ -- Herbert Xu <herbert at debian.org>  Sun,  7 Jun 1998 12:29:27 +1000
+
+kernel-source-2.0.33 (2.0.33-9) frozen unstable; urgency=low
+
+  * Disabled certain MCA NIC drivers (fixes #22254).
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 10 May 1998 15:59:32 +1000
+
+kernel-source-2.0.33 (2.0.33-8) frozen unstable; urgency=low
+
+  * Disabled experimental drivers.
+  * Reapplied joliet patch (fixes #19160, #21537).
+  * Built with kernel-package 4.07 (fixes #21229).
+  * Replaced NO_PCI with !CONFIG_PCI in 3c59x.c (fixes #21916).
+
+ -- Herbert Xu <herbert at debian.org>  Fri,  1 May 1998 18:29:03 +1000
+
+kernel-source-2.0.33 (2.0.33-7) frozen unstable; urgency=high
+
+  * Applied IP fragmentation patch from Alan Cox.
+
+ -- Herbert Xu <herbert at debian.org>  Sat, 18 Apr 1998 12:57:56 +1000
+
+kernel-source-2.0.33 (2.0.33-6) frozen unstable; urgency=low
+
+  * Disabled scc since we don't support ax25 by default (fixes #20307).
+
+ -- Herbert Xu <herbert at debian.org>  Wed,  1 Apr 1998 19:21:05 +1000
+
+kernel-source-2.0.33 (2.0.33-5) unstable; urgency=low
+
+  * Turned rst cookies off.
+
+ -- Herbert Xu <herbert at debian.org>  Wed, 18 Mar 1998 20:41:27 +1100
+
+kernel-source-2.0.33 (2.0.33-4) unstable; urgency=low
+
+  * Applied patch from Paul Slootman (fixes #18787).
+
+ -- Herbert Xu <herbert at debian.org>  Fri,  6 Mar 1998 11:30:44 +1100
+
+kernel-source-2.0.33 (2.0.33-3) stable unstable; urgency=low
+
+  * Built with new kernel-package (3.61).
+  * Added support for fat32 (fixes #14042).
+
+ -- Herbert Xu <herbert at debian.org>  Fri, 20 Feb 1998 16:33:40 +1100
+
+kernel-source-2.0.33 (2.0.33-2) stable unstable; urgency=low
+
+  * built with new kernel-package (3.57)
+
+ -- Herbert Xu <herbert at debian.org>  Mon, 16 Feb 1998 08:59:11 +1100
+
+kernel-source-2.0.33 (2.0.33-1) stable unstable; urgency=high
+
+  * New upstream release (fixes #15736).
+
+ -- Herbert Xu <herbert at debian.org>  Sat,  7 Feb 1998 15:06:57 +1100
+
+kernel-source-2.0.32 (2.0.32-3) stable unstable; urgency=low
+
+  * Built with new kernel-package (3.49).
+
+ -- Herbert Xu <herbert at debian.org>  Mon, 15 Dec 1997 12:22:45 +1100
+
+kernel-source-2.0.32 (2.0.32-2) stable unstable; urgency=low
+
+  * Removed teles driver which was accidentally left in.
+  * Applied patch from Andreas Jaeger.
+  * Built with new kernel-package (3.48) for use by libc6.
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 14 Dec 1997 09:29:26 +1100
+
+kernel-source-2.0.32 (2.0.32-1) unstable; urgency=low
+
+  * New upstream release.
+  * Pristine source.
+  * Bugs fixed (#6132, #6133, #8647, #11823, #13705).
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 23 Nov 1997 18:34:38 +1100
+
+kernel-source-2.0.29 (1:2.0.29-10) unstable; urgency=low
+
+  * NCR53C8XX driver updates.
+  * Installed 3c59x 0.46C (#10902).
+  * Modified scc.c to compile with libc6 (#14367).
+
+ -- Herbert Xu <herbert at debian.org>  Mon, 17 Nov 1997 20:46:57 +1100
+
+kernel-source-2.0.29 (1:2.0.29-9) unstable; urgency=low
+
+  * Slight mod to pci.c to ignore bridges that the kernel can't handle (#11865).
+  * Removed sound module support.
+
+ -- Herbert Xu <herbert at debian.org>  Fri,  3 Oct 1997 11:17:02 +1000
+
+kernel-source-2.0.29 (1:2.0.29-8) unstable; urgency=low
+
+  * Used epoch numbers to deal with old kernel-source releases.
+  * Enabled support for NCPFS.
+  * Added sound support.
+  * Enabled IP firewalls, forwarding, and aliasing.
+  * Applied ne2000 patch from Paul Gortmaker.
+
+ -- Herbert Xu <herbert at debian.org>  Fri,  4 Jul 1997 22:01:16 +1000
+
+kernel-source-2.0.29 (2.0.29-7) frozen unstable; urgency=high
+
+  * Applied security patch from Alan Cox.
+  * Applied patch from Andreas Jellinghaus.
+
+ -- Herbert Xu <herbert at debian.org>  Sat, 31 May 1997 11:59:56 +1000
+
+kernel-source-2.0.29 (2.0.29-6) frozen unstable; urgency=medium
+
+  * Merged Debian changes from 2.0.30.
+
+ -- Herbert Xu <herbert at debian.org>  Sun, 25 May 1997 22:26:30 +1000
+

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/compat
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/compat	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/compat	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1 @@
+4

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/control
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/control	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/control	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,78 @@
+Source: kernel-source-2.6.8
+Section: devel
+Priority: optional
+Maintainer: Debian kernel team <debian-kernel at lists.debian.org>
+Uploaders: William Lee Irwin III <wli at debian.org>, Jens Schmalzing <jensen at debian.org>, Sven Luther <luther at debian.org>, Andres Salomon <dilinger at voxel.net>, Joshua Kwan <joshk at triplehelix.org>
+Standards-Version: 3.6.1
+Build-Depends-Indep: bzip2, debhelper (>= 4), docbook-utils, gs, kernel-package (>= 7.48), transfig
+
+Package: kernel-source-2.6.8
+Architecture: all
+Section: devel
+Priority: optional
+Provides: kernel-source, kernel-source-2.6
+Conflicts: kernel-patch-powerpc-2.6.8
+Replaces: kernel-patch-powerpc-2.6.8
+Depends: binutils, bzip2, coreutils | fileutils (>= 4.0)
+Recommends: libc6-dev | libc-dev, gcc, make
+Suggests: libncurses-dev | ncurses-dev, kernel-package, libqt3-mt-dev
+Description: Linux kernel source for version 2.6.8 with Debian patches
+ This package provides the source code for the Linux kernel version 2.6.8.
+ .
+ You may configure the kernel to your setup by typing "make config"
+ and following instructions, but you could get ncursesX.X-dev and try
+ "make menuconfig" for a jazzier, and easier to use interface. There 
+ are options to use QT or GNOME based configuration interfaces, but they
+ need additional packages to be installed. Also, please read the detailed 
+ documentation in the file
+ /usr/share/doc/kernel-source-2.6.8/README.headers.gz.
+ .
+ If you wish to use this package to create a custom Linux kernel, then
+ it is suggested that you investigate the package kernel-package,
+ which has been designed to ease the task of creating kernel image
+ packages. 
+
+Package: kernel-doc-2.6.8
+Architecture: all
+Section: doc
+Priority: optional
+Provides: kernel-doc-2.6
+Depends: coreutils | fileutils (>= 4.0)
+Description: Linux kernel specific documentation for version 2.6.8
+ This package provides the various readme's in the 2.6.8 kernel
+ Documentation/ subdirectory: these typically contain kernel-specific
+ installation notes for some drivers for example. See
+ /usr/share/doc/kernel-doc-X.X.XX/Documentation/00-INDEX for a list of what
+ is contained in each file.  Please read the Changes file, as it
+ contains information about the problems, which may result by
+ upgrading your kernel.
+
+Package: kernel-patch-debian-2.6.8
+Architecture: all
+Section: devel
+Priority: optional
+Depends: bzip2
+Suggests: kernel-source-2.6.8
+Description: Debian patches to Linux 2.6.8
+ This package includes the patches used to produce the prepackaged
+ kernel-source-2.6.8 package.  Note that these patches do NOT apply
+ against a pristine Linux 2.6.8 kernel but only against
+ kernel-source-2.6.8_2.6.8.orig.tar.gz from the Debian archive.
+
+Package: kernel-tree-2.6.8
+Architecture: all
+Section: devel
+Priority: optional
+Depends: kernel-patch-debian-2.6.8 (= ${Source-Version}), ${kt-depends}
+Provides: ${kt-provides}
+Description: Linux kernel tree for building prepackaged Debian kernel images
+ This meta package is used as a build-time dependency of prepackaged
+ Debian kernel-image packages.  Its dependencies are structured so that a
+ complete kernel tree with Debian patches applied will be available after
+ this package is installed.  It also contains the upstream changelog file.
+ .
+ For those intending to use this package as a build-time dependency, this
+ package provides a list of virtual packages that guarantees the availability
+ of a particular Debian revision of the kernel tree.  The
+ kernel-image-2.6.8-i386 package is an example of this.
+

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/copyright
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/copyright	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/copyright	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,36 @@
+This is the Debian GNU/Linux prepackaged version of the Linux kernel.
+Linux was written by Linus Torvalds <Linus.Torvalds at cs.Helsinki.FI>
+and others.
+
+This package was put together by Simon Shapiro <Shimon at i-Connect.Net>, from
+sources retrieved from directories under
+ftp.cs.helsinki.fi:/pub/Software/Linux/Kernel/
+The sources may be found at most Linux ftp sites, including 
+ftp://ftp.kernel.org/pub/linux/kernel/
+
+This package was then maintained by Sven Rudolph.
+
+This package was maintained by Herbert Xu <herbert at debian.org>
+from March 1997 to May 2004.
+
+This package is currently maintained by the
+Debian Kernel Team <debian-kernel at lists.debian.org>
+
+Linux is copyrighted by Linus Torvalds and others.
+
+   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; version 2 dated June, 1991.
+
+   This program 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, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+   02111-1307, USA.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/make-substvars
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/make-substvars	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/make-substvars	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+upstream=$1
+
+ktdepends="kt-depends="
+ktprovides="kt-provides="
+
+for series in debian/patches/series/*; do
+	base=$(basename $series)
+	ktdepends="${ktdepends}kernel-source-$upstream (= $base) | "
+	ktprovides="${ktprovides}kernel-tree-$base, "
+done
+
+ktprovides=${ktprovides%, }
+ktdepends=${ktdepends%| }
+
+echo $ktdepends
+echo $ktprovides
+
+# vim:ts=4:noet:ai

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/official
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/official	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/official	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1 @@
+This is the Debian version of Linux 2.6.8.

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/028-do_brk_security_fixes.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/028-do_brk_security_fixes.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/028-do_brk_security_fixes.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,58 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix do_brk() locking in library loader
+## DP: Patch author: torvalds at ppc970.osdl.org
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2005/01/07 15:58:52-08:00 torvalds at ppc970.osdl.org 
+#   Fix do_brk() locking in library loader
+#   
+#   The regular executable loader path doesn't need the locking,
+#   because it's the only user of its VM. But the same is not true
+#   at library load time. So get the mmap semaphore.
+# 
+# fs/binfmt_aout.c
+#   2005/01/07 15:58:44-08:00 torvalds at ppc970.osdl.org +2 -0
+#   Fix do_brk() locking in library loader
+# 
+# fs/binfmt_elf.c
+#   2005/01/07 15:58:45-08:00 torvalds at ppc970.osdl.org +4 -1
+#   Fix do_brk() locking in library loader
+# 
+diff -Nru a/fs/binfmt_aout.c b/fs/binfmt_aout.c
+--- a/fs/binfmt_aout.c	2005-01-08 01:41:21 -08:00
++++ b/fs/binfmt_aout.c	2005-01-08 01:41:21 -08:00
+@@ -512,7 +512,9 @@
+ 	len = PAGE_ALIGN(ex.a_text + ex.a_data);
+ 	bss = ex.a_text + ex.a_data + ex.a_bss;
+ 	if (bss > len) {
++		down_write(&current->mm->mmap_sem);
+ 		error = do_brk(start_addr + len, bss - len);
++		up_write(&current->mm->mmap_sem);
+ 		retval = error;
+ 		if (error != start_addr + len)
+ 			goto out;
+diff -Nru a/fs/binfmt_elf.c b/fs/binfmt_elf.c
+--- a/fs/binfmt_elf.c	2005-01-08 01:41:21 -08:00
++++ b/fs/binfmt_elf.c	2005-01-08 01:41:21 -08:00
+@@ -1024,8 +1024,11 @@
+ 
+ 	len = ELF_PAGESTART(elf_phdata->p_filesz + elf_phdata->p_vaddr + ELF_MIN_ALIGN - 1);
+ 	bss = elf_phdata->p_memsz + elf_phdata->p_vaddr;
+-	if (bss > len)
++	if (bss > len) {
++		down_write(&current->mm->mmap_sem);
+ 		do_brk(len, bss - len);
++		up_write(&current->mm->mmap_sem);
++	}
+ 	error = 0;
+ 
+ out_free_ph:

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/029-random_poolsize_overflow.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/029-random_poolsize_overflow.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/029-random_poolsize_overflow.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,55 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [SECURITY] check user-supplied length before copy_from_user
+## DP: Patch author: Andres Salomon <dilinger at voxel.net>
+## DP: Upstream status: not yet submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+Revision: linux-drivers-char--ps-int-overflow--0--patch-1
+Archive: dilinger at voxel.net--2005-public
+Creator: Andres Salomon <dilinger at voxel.net>
+Date: Fri Jan  7 17:45:21 EST 2005
+Standard-date: 2005-01-07 22:45:21 GMT
+Modified-files: random.c
+New-patches: dilinger at voxel.net--2005-public/linux-drivers-char--ps-int-overflow--0--patch-1
+Summary: integer overflow fix for poolsize_strategy()
+Keywords: 
+
+Pointed out by Brad Spengler here:
+http://seclists.org/lists/fulldisclosure/2005/Jan/0270.html
+
+The fix is simple; we're passed a size_t (generally an unsigned int
+or unsigned long, depending on arch); copy_from_user expects an
+unsigned long.  We can simply cast it to an unsigned long; table->maxlen
+guarantees that we'll always have a small amount, anyways.
+
+
+* modified files
+
+--- orig/drivers/char/random.c
++++ mod/drivers/char/random.c
+@@ -1906,7 +1906,7 @@
+ 			     void __user *oldval, size_t __user *oldlenp,
+ 			     void __user *newval, size_t newlen, void **context)
+ {
+-	int	len;
++	unsigned long len;
+ 	
+ 	sysctl_poolsize = random_state->poolinfo.POOLBYTES;
+ 
+@@ -1916,7 +1916,7 @@
+ 	 * write case happens twice; it's harmless).
+ 	 */
+ 	if (newval && newlen) {
+-		len = newlen;
++		len = (unsigned long) newlen;
+ 		if (len > table->maxlen)
+ 			len = table->maxlen;
+ 		if (copy_from_user(table->data, newval, len))
+
+
+

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/030-moxa_user_copy_checking.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/030-moxa_user_copy_checking.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/030-moxa_user_copy_checking.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,69 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [SECURITY] make the moxa driver check user supplied lengths before doing copy_from_users
+## DP: Patch author: Andres Salomon <dilinger at voxel.net>
+## DP: Upstream status: not yet submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+Revision: linux-drivers-char--moxa-overflow--0--patch-1
+Archive: dilinger at voxel.net--2005-public
+Creator: Andres Salomon <dilinger at voxel.net>
+Date: Fri Jan  7 18:05:38 EST 2005
+Standard-date: 2005-01-07 23:05:38 GMT
+Modified-files: moxa.c
+New-patches: dilinger at voxel.net--2005-public/linux-drivers-char--moxa-overflow--0--patch-1
+Summary: sanity check dltmp.len size before all copy_from_user() calls
+Keywords: 
+
+Make sure the length we're passing copy_from_user() is never negative or
+too large for moxaBuff.
+
+
+
+* modified files
+
+--- orig/drivers/char/moxa.c
++++ mod/drivers/char/moxa.c
+@@ -1666,7 +1666,7 @@
+ 
+ 	if(copy_from_user(&dltmp, argp, sizeof(struct dl_str)))
+ 		return -EFAULT;
+-	if(dltmp.cardno < 0 || dltmp.cardno >= MAX_BOARDS)
++	if(dltmp.cardno < 0 || dltmp.cardno >= MAX_BOARDS || dltmp.len < 0)
+ 		return -EINVAL;
+ 
+ 	switch(cmd)
+@@ -2775,6 +2775,8 @@
+ 	void __iomem *baseAddr;
+ 	int i;
+ 
++	if(len < 0 || len > sizeof(moxaBuff))
++		return -EINVAL;
+ 	if(copy_from_user(moxaBuff, tmp, len))
+ 		return -EFAULT;
+ 	baseAddr = moxaBaseAddr[cardno];
+@@ -2822,7 +2824,7 @@
+ 	void __iomem *baseAddr;
+ 	int i;
+ 
+-	if(len > sizeof(moxaBuff))
++	if(len < 0 || len > sizeof(moxaBuff))
+ 		return -EINVAL;
+ 	if(copy_from_user(moxaBuff, tmp, len))
+ 		return -EFAULT;
+@@ -2842,6 +2844,8 @@
+ 	void __iomem *baseAddr, *ofsAddr;
+ 	int retval, port, i;
+ 
++	if(len < 0 || len > sizeof(moxaBuff))
++		return -EINVAL;
+ 	if(copy_from_user(moxaBuff, tmp, len))
+ 		return -EFAULT;
+ 	baseAddr = moxaBaseAddr[cardno];
+
+
+

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/031-sg_scsi_ioctl_int_overflows.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/031-sg_scsi_ioctl_int_overflows.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/031-sg_scsi_ioctl_int_overflows.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,43 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix exploitable hole in sg_scsi_ioctl
+## DP: Patch author: James Bottomley <James.Bottomley at SteelEye.com>
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2005/01/07 16:38:51-05:00 jejb at mulgrave.(none) 
+#   Fix exploitable hole in sg_scsi_ioctl
+#   
+#   in_len and out_len are signed quantites copied from
+#   user space but are only checked to see if they're >
+#   PAGE_SIZE.  The exploit would be to pass in a negative
+#   quantity which would pass the check.
+#   
+#   Fix by making them unsigned.
+#   
+#   Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
+# 
+# drivers/block/scsi_ioctl.c
+#   2005/01/07 16:36:05-05:00 jejb at mulgrave.(none) +2 -1
+#   Fix exploitable hole in sg_scsi_ioctl
+# 
+diff -Nru a/drivers/block/scsi_ioctl.c b/drivers/block/scsi_ioctl.c
+--- a/drivers/block/scsi_ioctl.c	2005-01-07 17:24:38 -08:00
++++ b/drivers/block/scsi_ioctl.c	2005-01-07 17:24:38 -08:00
+@@ -339,7 +339,8 @@
+ 			 struct gendisk *bd_disk, Scsi_Ioctl_Command __user *sic)
+ {
+ 	struct request *rq;
+-	int err, in_len, out_len, bytes, opcode, cmdlen;
++	int err;
++	unsigned int in_len, out_len, bytes, opcode, cmdlen;
+ 	char *buffer = NULL, sense[SCSI_SENSE_BUFFERSIZE];
+ 
+ 	/*

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/034-stack_resize_exploit.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/034-stack_resize_exploit.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/034-stack_resize_exploit.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,101 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Handle two threads both trying to expand their stack simultaneously.
+## DP: Patch author: torvalds at ppc970.osdl.org
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2005/01/12 08:09:20-08:00 torvalds at ppc970.osdl.org 
+#   Handle two threads both trying to expand their stack simultaneously.
+#   
+#   We had all the locking right, but we didn't check whether one of the
+#   threads now no longer needed to expand, so we could incorrectly _shrink_
+#   the stack in the other thread instead (not only causing segfaults, but
+#   since we didn't do a proper unmap, we'd possibly leak pages too).
+#   
+#   So re-check the need for expand after getting the lock.
+#   
+#   Noticed by Paul Starzetz.
+# 
+# mm/mmap.c
+#   2005/01/12 08:09:12-08:00 torvalds at ppc970.osdl.org +25 -13
+#   Handle two threads both trying to expand their stack simultaneously.
+# 
+diff -Nru a/mm/mmap.c b/mm/mmap.c
+--- a/mm/mmap.c	2005-01-12 20:22:12 -08:00
++++ b/mm/mmap.c	2005-01-12 20:22:12 -08:00
+@@ -1475,7 +1475,6 @@
+ int expand_stack(struct vm_area_struct * vma, unsigned long address)
+ {
+ 	int error;
+-	unsigned long size, grow;
+ 
+ 	if (!(vma->vm_flags & VM_GROWSUP))
+ 		return -EFAULT;
+@@ -1495,12 +1494,19 @@
+ 	 */
+ 	address += 4 + PAGE_SIZE - 1;
+ 	address &= PAGE_MASK;
+-	size = address - vma->vm_start;
+-	grow = (address - vma->vm_end) >> PAGE_SHIFT;
++	error = 0;
+ 
+-	error = acct_stack_growth(vma, size, grow);
+-	if (!error)
+-		vma->vm_end = address;
++	/* Somebody else might have raced and expanded it already */
++	if (address > vma->vm_end) {
++		unsigned long size, grow;
++
++		size = address - vma->vm_start;
++		grow = (address - vma->vm_end) >> PAGE_SHIFT;
++
++		error = acct_stack_growth(vma, size, grow);
++		if (!error)
++			vma->vm_end = address;
++	}
+ 	anon_vma_unlock(vma);
+ 	return error;
+ }
+@@ -1528,7 +1534,6 @@
+ int expand_stack(struct vm_area_struct *vma, unsigned long address)
+ {
+ 	int error;
+-	unsigned long size, grow;
+ 
+ 	/*
+ 	 * We must make sure the anon_vma is allocated
+@@ -1544,13 +1549,20 @@
+ 	 * anon_vma lock to serialize against concurrent expand_stacks.
+ 	 */
+ 	address &= PAGE_MASK;
+-	size = vma->vm_end - address;
+-	grow = (vma->vm_start - address) >> PAGE_SHIFT;
++	error = 0;
+ 
+-	error = acct_stack_growth(vma, size, grow);
+-	if (!error) {
+-		vma->vm_start = address;
+-		vma->vm_pgoff -= grow;
++	/* Somebody else might have raced and expanded it already */
++	if (address < vma->vm_start) {
++		unsigned long size, grow;
++
++		size = vma->vm_end - address;
++		grow = (vma->vm_start - address) >> PAGE_SHIFT;
++
++		error = acct_stack_growth(vma, size, grow);
++		if (!error) {
++			vma->vm_start = address;
++			vma->vm_pgoff -= grow;
++		}
+ 	}
+ 	anon_vma_unlock(vma);
+ 	return error;

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/035-do_brk_security_fixes-2.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/035-do_brk_security_fixes-2.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/035-do_brk_security_fixes-2.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,334 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [PATCH] do_brk() needs mmap_sem write-locked
+## DP: Patch author: marcelo.tosatti at cyclades.com
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2005/01/12 08:12:09-08:00 marcelo.tosatti at cyclades.com 
+#   [PATCH] do_brk() needs mmap_sem write-locked
+#   
+#   It seems to be general consensus that its safer to require all do_brk() callers
+#   to grab mmap_sem, and have do_brk to warn otherwise. This is what the following
+#   patch does.
+#   
+#   Similar version has been changed to in v2.4.
+#   
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# arch/mips/kernel/irixelf.c
+#   2005/01/11 17:35:36-08:00 marcelo.tosatti at cyclades.com +10 -1
+#   do_brk() needs mmap_sem write-locked
+# 
+# arch/sparc64/kernel/binfmt_aout32.c
+#   2005/01/11 17:37:28-08:00 marcelo.tosatti at cyclades.com +12 -0
+#   do_brk() needs mmap_sem write-locked
+# 
+# arch/x86_64/ia32/ia32_aout.c
+#   2005/01/11 17:34:26-08:00 marcelo.tosatti at cyclades.com +11 -1
+#   do_brk() needs mmap_sem write-locked
+# 
+# fs/binfmt_aout.c
+#   2005/01/11 17:31:51-08:00 marcelo.tosatti at cyclades.com +14 -3
+#   do_brk() needs mmap_sem write-locked
+# 
+# fs/binfmt_elf.c
+#   2005/01/11 18:07:01-08:00 marcelo.tosatti at cyclades.com +11 -1
+#   do_brk() needs mmap_sem write-locked
+# 
+# mm/mmap.c
+#   2005/01/11 17:43:11-08:00 marcelo.tosatti at cyclades.com +6 -0
+#   do_brk() needs mmap_sem write-locked
+# 
+diff -Nru a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c
+--- a/arch/mips/kernel/irixelf.c	2005-01-12 20:26:27 -08:00
++++ b/arch/mips/kernel/irixelf.c	2005-01-12 20:26:27 -08:00
+@@ -127,7 +127,9 @@
+ 	end = PAGE_ALIGN(end);
+ 	if (end <= start)
+ 		return;
++	down_write(&current->mm->mmap_sem);
+ 	do_brk(start, end - start);
++	up_write(&current->mm->mmap_sem);
+ }
+ 
+ 
+@@ -375,7 +377,9 @@
+ 
+ 	/* Map the last of the bss segment */
+ 	if (last_bss > len) {
++		down_write(&current->mm->mmap_sem);
+ 		do_brk(len, (last_bss - len));
++		up_write(&current->mm->mmap_sem);
+ 	}
+ 	kfree(elf_phdata);
+ 
+@@ -562,7 +566,9 @@
+ 	unsigned long v;
+ 	struct prda *pp;
+ 
++	down_write(&current->mm->mmap_sem);
+ 	v =  do_brk (PRDA_ADDRESS, PAGE_SIZE);
++	up_write(&current->mm->mmap_sem);
+ 
+ 	if (v < 0)
+ 		return;
+@@ -852,8 +858,11 @@
+ 
+ 	len = (elf_phdata->p_filesz + elf_phdata->p_vaddr+ 0xfff) & 0xfffff000;
+ 	bss = elf_phdata->p_memsz + elf_phdata->p_vaddr;
+-	if (bss > len)
++	if (bss > len) {
++	  down_write(&current->mm->mmap_sem);
+ 	  do_brk(len, bss-len);
++	  up_write(&current->mm->mmap_sem);
++	}
+ 	kfree(elf_phdata);
+ 	return 0;
+ }
+diff -Nru a/arch/sparc64/kernel/binfmt_aout32.c b/arch/sparc64/kernel/binfmt_aout32.c
+--- a/arch/sparc64/kernel/binfmt_aout32.c	2005-01-12 20:26:27 -08:00
++++ b/arch/sparc64/kernel/binfmt_aout32.c	2005-01-12 20:26:27 -08:00
+@@ -49,7 +49,9 @@
+ 	end = PAGE_ALIGN(end);
+ 	if (end <= start)
+ 		return;
++	down_write(&current->mm->mmap_sem);
+ 	do_brk(start, end - start);
++	up_write(&current->mm->mmap_sem);
+ }
+ 
+ /*
+@@ -246,10 +248,14 @@
+ 	if (N_MAGIC(ex) == NMAGIC) {
+ 		loff_t pos = fd_offset;
+ 		/* Fuck me plenty... */
++		down_write(&current->mm->mmap_sem);	
+ 		error = do_brk(N_TXTADDR(ex), ex.a_text);
++		up_write(&current->mm->mmap_sem);
+ 		bprm->file->f_op->read(bprm->file, (char __user *)N_TXTADDR(ex),
+ 			  ex.a_text, &pos);
++		down_write(&current->mm->mmap_sem);
+ 		error = do_brk(N_DATADDR(ex), ex.a_data);
++		up_write(&current->mm->mmap_sem);
+ 		bprm->file->f_op->read(bprm->file, (char __user *)N_DATADDR(ex),
+ 			  ex.a_data, &pos);
+ 		goto beyond_if;
+@@ -257,8 +263,10 @@
+ 
+ 	if (N_MAGIC(ex) == OMAGIC) {
+ 		loff_t pos = fd_offset;
++		down_write(&current->mm->mmap_sem);
+ 		do_brk(N_TXTADDR(ex) & PAGE_MASK,
+ 			ex.a_text+ex.a_data + PAGE_SIZE - 1);
++		up_write(&current->mm->mmap_sem);
+ 		bprm->file->f_op->read(bprm->file, (char __user *)N_TXTADDR(ex),
+ 			  ex.a_text+ex.a_data, &pos);
+ 	} else {
+@@ -272,7 +280,9 @@
+ 
+ 		if (!bprm->file->f_op->mmap) {
+ 			loff_t pos = fd_offset;
++			down_write(&current->mm->mmap_sem);
+ 			do_brk(0, ex.a_text+ex.a_data);
++			up_write(&current->mm->mmap_sem);
+ 			bprm->file->f_op->read(bprm->file,
+ 				  (char __user *)N_TXTADDR(ex),
+ 				  ex.a_text+ex.a_data, &pos);
+@@ -389,7 +399,9 @@
+ 	len = PAGE_ALIGN(ex.a_text + ex.a_data);
+ 	bss = ex.a_text + ex.a_data + ex.a_bss;
+ 	if (bss > len) {
++		down_write(&current->mm->mmap_sem);
+ 		error = do_brk(start_addr + len, bss - len);
++		up_write(&current->mm->mmap_sem);
+ 		retval = error;
+ 		if (error != start_addr + len)
+ 			goto out;
+diff -Nru a/arch/x86_64/ia32/ia32_aout.c b/arch/x86_64/ia32/ia32_aout.c
+--- a/arch/x86_64/ia32/ia32_aout.c	2005-01-12 20:26:27 -08:00
++++ b/arch/x86_64/ia32/ia32_aout.c	2005-01-12 20:26:27 -08:00
+@@ -115,7 +115,9 @@
+ 	end = PAGE_ALIGN(end);
+ 	if (end <= start)
+ 		return;
++	down_write(&current->mm->mmap_sem);
+ 	do_brk(start, end - start);
++	up_write(&current->mm->mmap_sem);
+ }
+ 
+ #if CORE_DUMP
+@@ -325,7 +327,10 @@
+ 		pos = 32;
+ 		map_size = ex.a_text+ex.a_data;
+ 
++		down_write(&current->mm->mmap_sem);
+ 		error = do_brk(text_addr & PAGE_MASK, map_size);
++		up_write(&current->mm->mmap_sem);
++
+ 		if (error != (text_addr & PAGE_MASK)) {
+ 			send_sig(SIGKILL, current, 0);
+ 			return error;
+@@ -361,7 +366,9 @@
+ 
+ 		if (!bprm->file->f_op->mmap||((fd_offset & ~PAGE_MASK) != 0)) {
+ 			loff_t pos = fd_offset;
++			down_write(&current->mm->mmap_sem);
+ 			do_brk(N_TXTADDR(ex), ex.a_text+ex.a_data);
++			up_write(&current->mm->mmap_sem);
+ 			bprm->file->f_op->read(bprm->file,(char *)N_TXTADDR(ex),
+ 					ex.a_text+ex.a_data, &pos);
+ 			flush_icache_range((unsigned long) N_TXTADDR(ex),
+@@ -469,8 +476,9 @@
+ 			error_time = jiffies;
+ 		}
+ #endif
+-
++		down_write(&current->mm->mmap_sem);
+ 		do_brk(start_addr, ex.a_text + ex.a_data + ex.a_bss);
++		up_write(&current->mm->mmap_sem);
+ 		
+ 		file->f_op->read(file, (char *)start_addr,
+ 			ex.a_text + ex.a_data, &pos);
+@@ -494,7 +502,9 @@
+ 	len = PAGE_ALIGN(ex.a_text + ex.a_data);
+ 	bss = ex.a_text + ex.a_data + ex.a_bss;
+ 	if (bss > len) {
++		down_write(&current->mm->mmap_sem);
+ 		error = do_brk(start_addr + len, bss - len);
++		up_write(&current->mm->mmap_sem);
+ 		retval = error;
+ 		if (error != start_addr + len)
+ 			goto out;
+diff -Nru a/fs/binfmt_aout.c b/fs/binfmt_aout.c
+--- a/fs/binfmt_aout.c	2005-01-12 20:26:27 -08:00
++++ b/fs/binfmt_aout.c	2005-01-12 20:26:27 -08:00
+@@ -50,7 +50,10 @@
+ 	start = PAGE_ALIGN(start);
+ 	end = PAGE_ALIGN(end);
+ 	if (end > start) {
+-		unsigned long addr = do_brk(start, end - start);
++		unsigned long addr;
++		down_write(&current->mm->mmap_sem);
++		addr = do_brk(start, end - start);
++		up_write(&current->mm->mmap_sem);
+ 		if (BAD_ADDR(addr))
+ 			return addr;
+ 	}
+@@ -323,10 +326,14 @@
+ 		loff_t pos = fd_offset;
+ 		/* Fuck me plenty... */
+ 		/* <AOL></AOL> */
++		down_write(&current->mm->mmap_sem);	
+ 		error = do_brk(N_TXTADDR(ex), ex.a_text);
++		up_write(&current->mm->mmap_sem);
+ 		bprm->file->f_op->read(bprm->file, (char *) N_TXTADDR(ex),
+ 			  ex.a_text, &pos);
++		down_write(&current->mm->mmap_sem);
+ 		error = do_brk(N_DATADDR(ex), ex.a_data);
++		up_write(&current->mm->mmap_sem);
+ 		bprm->file->f_op->read(bprm->file, (char *) N_DATADDR(ex),
+ 			  ex.a_data, &pos);
+ 		goto beyond_if;
+@@ -346,8 +353,9 @@
+ 		pos = 32;
+ 		map_size = ex.a_text+ex.a_data;
+ #endif
+-
++		down_write(&current->mm->mmap_sem);
+ 		error = do_brk(text_addr & PAGE_MASK, map_size);
++		up_write(&current->mm->mmap_sem);
+ 		if (error != (text_addr & PAGE_MASK)) {
+ 			send_sig(SIGKILL, current, 0);
+ 			return error;
+@@ -382,7 +390,9 @@
+ 
+ 		if (!bprm->file->f_op->mmap||((fd_offset & ~PAGE_MASK) != 0)) {
+ 			loff_t pos = fd_offset;
++			down_write(&current->mm->mmap_sem);
+ 			do_brk(N_TXTADDR(ex), ex.a_text+ex.a_data);
++			up_write(&current->mm->mmap_sem);
+ 			bprm->file->f_op->read(bprm->file,
+ 					(char __user *)N_TXTADDR(ex),
+ 					ex.a_text+ex.a_data, &pos);
+@@ -487,8 +497,9 @@
+ 			       file->f_dentry->d_name.name);
+ 			error_time = jiffies;
+ 		}
+-
++		down_write(&current->mm->mmap_sem);
+ 		do_brk(start_addr, ex.a_text + ex.a_data + ex.a_bss);
++		up_write(&current->mm->mmap_sem);
+ 		
+ 		file->f_op->read(file, (char __user *)start_addr,
+ 			ex.a_text + ex.a_data, &pos);
+diff -Nru a/fs/binfmt_elf.c b/fs/binfmt_elf.c
+--- a/fs/binfmt_elf.c	2005-01-12 20:26:27 -08:00
++++ b/fs/binfmt_elf.c	2005-01-12 20:26:27 -08:00
+@@ -88,7 +88,10 @@
+ 	start = ELF_PAGEALIGN(start);
+ 	end = ELF_PAGEALIGN(end);
+ 	if (end > start) {
+-		unsigned long addr = do_brk(start, end - start);
++		unsigned long addr;
++		down_write(&current->mm->mmap_sem);
++		addr = do_brk(start, end - start);
++		up_write(&current->mm->mmap_sem);
+ 		if (BAD_ADDR(addr))
+ 			return addr;
+ 	}
+@@ -409,7 +412,9 @@
+ 
+ 	/* Map the last of the bss segment */
+ 	if (last_bss > elf_bss) {
++		down_write(&current->mm->mmap_sem);
+ 		error = do_brk(elf_bss, last_bss - elf_bss);
++		up_write(&current->mm->mmap_sem);
+ 		if (BAD_ADDR(error))
+ 			goto out_close;
+ 	}
+@@ -449,7 +454,9 @@
+ 		goto out;
+ 	}
+ 
++	down_write(&current->mm->mmap_sem);	
+ 	do_brk(0, text_data);
++	up_write(&current->mm->mmap_sem);
+ 	if (!interpreter->f_op || !interpreter->f_op->read)
+ 		goto out;
+ 	if (interpreter->f_op->read(interpreter, addr, text_data, &offset) < 0)
+@@ -457,8 +464,11 @@
+ 	flush_icache_range((unsigned long)addr,
+ 	                   (unsigned long)addr + text_data);
+ 
++
++	down_write(&current->mm->mmap_sem);	
+ 	do_brk(ELF_PAGESTART(text_data + ELF_MIN_ALIGN - 1),
+ 		interp_ex->a_bss);
++	up_write(&current->mm->mmap_sem);
+ 	elf_entry = interp_ex->a_entry;
+ 
+ out:
+diff -Nru a/mm/mmap.c b/mm/mmap.c
+--- a/mm/mmap.c	2005-01-12 20:26:27 -08:00
++++ b/mm/mmap.c	2005-01-12 20:26:27 -08:00
+@@ -1903,6 +1903,12 @@
+ 	}
+ 
+ 	/*
++	 * mm->mmap_sem is required to protect against another thread
++	 * changing the mappings in case we sleep.
++	 */
++	WARN_ON(down_read_trylock(&mm->mmap_sem));
++
++	/*
+ 	 * Clear old maps.  this also does some error checking for us
+ 	 */
+  munmap_back:

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/SG_IO-cap.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/SG_IO-cap.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/SG_IO-cap.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,36 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: SCSI WRITE_BUFFER commands needs CAP_SYS_RAWIO
+## DP: Patch author: Linux Torvalds <torvalds at osdl.org>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/08/14 03:24:55-07:00 torvalds at ppc970.osdl.org 
+#   Make 'WRITE_BUFFER' require CAP_RAWIO capability
+#   
+#   Pointed out by Kai Makisara.
+# 
+# drivers/block/scsi_ioctl.c
+#   2004/08/14 03:24:49-07:00 torvalds at ppc970.osdl.org +0 -1
+#   Make 'WRITE_BUFFER' require CAP_RAWIO capability
+#   
+#   Pointed out by Kai Makisara.
+# 
+diff -Nru a/drivers/block/scsi_ioctl.c b/drivers/block/scsi_ioctl.c
+--- a/drivers/block/scsi_ioctl.c	2004-08-14 13:32:03 +02:00
++++ b/drivers/block/scsi_ioctl.c	2004-08-14 13:32:03 +02:00
+@@ -154,7 +154,6 @@
+ 		safe_for_write(WRITE_12),
+ 		safe_for_write(WRITE_VERIFY_12),
+ 		safe_for_write(WRITE_16),
+-		safe_for_write(WRITE_BUFFER),
+ 		safe_for_write(WRITE_LONG),
+ 	};
+ 	unsigned char type = cmd_type[cmd[0]];

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/SG_IO-safe-commands-2.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/SG_IO-safe-commands-2.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/SG_IO-safe-commands-2.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,90 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Update list of safe SCSI commands for SG_IO
+## DP: Patch author: Linux Torvalds, Jens Axboe
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- linux-2.6.8/drivers/block/scsi_ioctl.c	2004-08-25 11:54:11.000000000 +0200
++++ linux-2.5/drivers/block/scsi_ioctl.c	2004-08-25 00:31:03.000000000 +0200
+@@ -127,12 +127,16 @@
+ 		safe_for_read(MODE_SENSE),
+ 		safe_for_read(MODE_SENSE_10),
+ 		safe_for_read(START_STOP),
++		safe_for_read(GPCMD_VERIFY_10),
++		safe_for_read(VERIFY_16),
++		safe_for_read(READ_BUFFER),
+ 
+ 		/* Audio CD commands */
+ 		safe_for_read(GPCMD_PLAY_CD),
+ 		safe_for_read(GPCMD_PLAY_AUDIO_10),
+ 		safe_for_read(GPCMD_PLAY_AUDIO_MSF),
+ 		safe_for_read(GPCMD_PLAY_AUDIO_TI),
++		safe_for_read(GPCMD_PAUSE_RESUME),
+ 
+ 		/* CD/DVD data reading */
+ 		safe_for_read(GPCMD_READ_CD),
+@@ -146,6 +150,12 @@
+ 		safe_for_read(GPCMD_READ_TOC_PMA_ATIP),
+ 		safe_for_read(GPCMD_REPORT_KEY),
+ 		safe_for_read(GPCMD_SCAN),
++		safe_for_read(GPCMD_GET_CONFIGURATION),
++		safe_for_read(GPCMD_READ_FORMAT_CAPACITIES),
++		safe_for_read(GPCMD_GET_EVENT_STATUS_NOTIFICATION),
++		safe_for_read(GPCMD_GET_PERFORMANCE),
++		safe_for_read(GPCMD_SEEK),
++		safe_for_read(GPCMD_STOP_PLAY_SCAN),
+ 
+ 		/* Basic writing commands */
+ 		safe_for_write(WRITE_6),
+@@ -154,8 +164,25 @@
+ 		safe_for_write(WRITE_12),
+ 		safe_for_write(WRITE_VERIFY_12),
+ 		safe_for_write(WRITE_16),
+-		safe_for_write(WRITE_BUFFER),
+ 		safe_for_write(WRITE_LONG),
++		safe_for_write(ERASE),
++		safe_for_write(GPCMD_MODE_SELECT_10),
++		safe_for_write(MODE_SELECT),
++		safe_for_write(GPCMD_BLANK),
++		safe_for_write(GPCMD_CLOSE_TRACK),
++		safe_for_write(GPCMD_FLUSH_CACHE),
++		safe_for_write(GPCMD_FORMAT_UNIT),
++		safe_for_write(GPCMD_REPAIR_RZONE_TRACK),
++		safe_for_write(GPCMD_RESERVE_RZONE_TRACK),
++		safe_for_write(GPCMD_SEND_DVD_STRUCTURE),
++		safe_for_write(GPCMD_SEND_EVENT),
++		safe_for_write(GPCMD_SEND_KEY),
++		safe_for_write(GPCMD_SEND_OPC),
++		safe_for_write(GPCMD_SEND_CUE_SHEET),
++		safe_for_write(GPCMD_SET_SPEED),
++		safe_for_write(GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL),
++		safe_for_write(GPCMD_LOAD_UNLOAD),
++		safe_for_write(GPCMD_SET_STREAMING),
+ 	};
+ 	unsigned char type = cmd_type[cmd[0]];
+ 
+--- linux-2.6.8/include/linux/cdrom.h	2004-08-26 09:15:56.891296646 +0200
++++ linux-2.6.8/include/linux/cdrom.h	2004-08-26 09:14:34.434684402 +0200
+@@ -468,6 +468,7 @@
+ #define GPCMD_RESERVE_RZONE_TRACK	    0x53
+ #define GPCMD_SCAN			    0xba
+ #define GPCMD_SEEK			    0x2b
++#define GPCMD_SEND_CUE_SHEET    	    0x5d
+ #define GPCMD_SEND_DVD_STRUCTURE	    0xad
+ #define GPCMD_SEND_EVENT		    0xa2
+ #define GPCMD_SEND_KEY			    0xa3
+--- linux-2.6.8/include/scsi/scsi.h	2004-08-25 19:55:21.000000000 +0200
++++ linux-2.6.8/include/scsi/scsi.h	2004-08-26 09:12:24.594594554 +0200
+@@ -111,6 +111,7 @@
+ #define WRITE_LONG_2          0xea
+ #define READ_16               0x88
+ #define WRITE_16              0x8a
++#define VERIFY_16             0x8f
+ #define SERVICE_ACTION_IN     0x9e
+ /* values for service action in */
+ #define	SAI_READ_CAPACITY_16  0x10

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/SG_IO-safe-commands-3.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/SG_IO-safe-commands-3.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/SG_IO-safe-commands-3.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,56 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [PATCH] update SG_IO command table
+## DP: Patch author: Jens Axobe <axboe at suse.de>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: axboe (BitKeeper)
+# cset: 1.1803.144.222 (2.6) key=412a53f2QNsqhYybefqcMSOffiZb2g
+# inclusion: upstream
+# descrition: [PATCH] update SG_IO command table
+# revision date: Fri, 05 Nov 2004 17:18:22 +0900
+#
+# rset: ChangeSet|1.1803.144.221..1.1803.144.222
+# rset: include/linux/cdrom.h|1.21..1.22
+# rset: drivers/block/scsi_ioctl.c|1.53..1.54
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/08/23 13:30:42-07:00 axboe at suse.de 
+#   [PATCH] update SG_IO command table
+#   
+#   Here's a better table of acceptable commands, I've added some more
+#   commands.  Should be pretty complete from the cd/dvd side now.
+# 
+# include/linux/cdrom.h
+#   2004/08/23 08:17:56-07:00 axboe at suse.de +2 -1
+#   update SG_IO command table
+# Updated for Debian kernel-source-2.6.8
+# 
+# drivers/block/scsi_ioctl.c
+#   2004/08/23 08:18:56-07:00 axboe at suse.de +27 -0
+#   update SG_IO command table
+# Deleted for Debian kernel-source-2.6.8 by Horms
+# 
+diff -Nru a/include/linux/cdrom.h b/include/linux/cdrom.h
+--- a/include/linux/cdrom.h	2004-11-05 17:52:26.000000000 +0900
++++ b/include/linux/cdrom.h	2004-11-05 17:53:56.000000000 +0900
+@@ -466,10 +466,10 @@
+ #define GPCMD_REPORT_KEY		    0xa4
+ #define GPCMD_REQUEST_SENSE		    0x03
+ #define GPCMD_RESERVE_RZONE_TRACK	    0x53
++#define GPCMD_SEND_CUE_SHEET    	    0x5d
+ #define GPCMD_SCAN			    0xba
+ #define GPCMD_SEEK			    0x2b
+-#define GPCMD_SEND_CUE_SHEET    	    0x5d
+-#define GPCMD_SEND_DVD_STRUCTURE	    0xad
++#define GPCMD_SEND_DVD_STRUCTURE	    0xbf
+ #define GPCMD_SEND_EVENT		    0xa2
+ #define GPCMD_SEND_KEY			    0xa3
+ #define GPCMD_SEND_OPC			    0x54

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/SG_IO-safe-commands-5.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/SG_IO-safe-commands-5.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/SG_IO-safe-commands-5.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,63 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: READ_BUFFER_CAPACITY as read-ok command
+## DP: Patch author: Daniel Drake <dsd at gentoo.org>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: axboe (BitKeeper)
+# cset: 1.2457 (2.6) key=418a4f0df36yYLVdEKUY8xRMnS3HfA
+# inclusion: upstream
+# descrition: [PATCH] add READ_BUFFER_CAPACITY as read-ok command
+# revision date: Fri, 05 Nov 2004 17:18:42 +0900
+#
+# rset: ChangeSet|1.2456..1.2457
+# rset: include/linux/cdrom.h|1.24..1.25
+# rset: drivers/block/scsi_ioctl.c|1.57..1.58
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/11/04 07:47:25-08:00 axboe at suse.de 
+#   [PATCH] add READ_BUFFER_CAPACITY as read-ok command
+#   
+#   Patch is from Daniel Drake <dsd at gentoo.org>
+#   
+#   Signed-off-by: Jens Axboe <axboe at suse.de>
+#   Signed-off-by: Daniel Drake <dsd at gentoo.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# include/linux/cdrom.h
+#   2004/11/03 14:01:16-08:00 axboe at suse.de +1 -0
+#   add READ_BUFFER_CAPACITY as read-ok command
+# 
+# drivers/block/scsi_ioctl.c
+#   2004/11/03 14:05:08-08:00 axboe at suse.de +1 -0
+#   add READ_BUFFER_CAPACITY as read-ok command
+# 
+diff -Nru a/drivers/block/scsi_ioctl.c b/drivers/block/scsi_ioctl.c
+--- a/drivers/block/scsi_ioctl.c	2004-11-05 17:18:42 +09:00
++++ b/drivers/block/scsi_ioctl.c	2004-11-05 17:18:42 +09:00
+@@ -139,6 +139,7 @@
+ 		safe_for_read(GPCMD_PAUSE_RESUME),
+ 
+ 		/* CD/DVD data reading */
++		safe_for_read(GPCMD_READ_BUFFER_CAPACITY),
+ 		safe_for_read(GPCMD_READ_CD),
+ 		safe_for_read(GPCMD_READ_CD_MSF),
+ 		safe_for_read(GPCMD_READ_DISC_INFO),
+diff -Nru a/include/linux/cdrom.h b/include/linux/cdrom.h
+--- a/include/linux/cdrom.h	2004-11-05 17:18:42 +09:00
++++ b/include/linux/cdrom.h	2004-11-05 17:18:42 +09:00
+@@ -452,6 +452,7 @@
+ #define GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL  0x1e
+ #define GPCMD_READ_10			    0x28
+ #define GPCMD_READ_12			    0xa8
++#define GPCMD_READ_BUFFER_CAPACITY	    0x5c
+ #define GPCMD_READ_CDVD_CAPACITY	    0x25
+ #define GPCMD_READ_CD			    0xbe
+ #define GPCMD_READ_CD_MSF		    0xb9

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/SG_IO-safe-commands.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/SG_IO-safe-commands.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/SG_IO-safe-commands.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,70 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Update list of safe SCSI commands for SG_IO
+## DP: Patch author: Linux Torvalds, Jens Axboe
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- linux-2.6.8/drivers/block/scsi_ioctl.c	2004-08-25 11:54:11.000000000 +0200
++++ linux-2.5/drivers/block/scsi_ioctl.c	2004-08-25 00:31:03.000000000 +0200
+@@ -127,12 +127,16 @@
+ 		safe_for_read(MODE_SENSE),
+ 		safe_for_read(MODE_SENSE_10),
+ 		safe_for_read(START_STOP),
++		safe_for_read(GPCMD_VERIFY_10),
++		safe_for_read(VERIFY_16),
++		safe_for_read(READ_BUFFER),
+ 
+ 		/* Audio CD commands */
+ 		safe_for_read(GPCMD_PLAY_CD),
+ 		safe_for_read(GPCMD_PLAY_AUDIO_10),
+ 		safe_for_read(GPCMD_PLAY_AUDIO_MSF),
+ 		safe_for_read(GPCMD_PLAY_AUDIO_TI),
++		safe_for_read(GPCMD_PAUSE_RESUME),
+ 
+ 		/* CD/DVD data reading */
+ 		safe_for_read(GPCMD_READ_CD),
+@@ -146,6 +150,12 @@
+ 		safe_for_read(GPCMD_READ_TOC_PMA_ATIP),
+ 		safe_for_read(GPCMD_REPORT_KEY),
+ 		safe_for_read(GPCMD_SCAN),
++		safe_for_read(GPCMD_GET_CONFIGURATION),
++		safe_for_read(GPCMD_READ_FORMAT_CAPACITIES),
++		safe_for_read(GPCMD_GET_EVENT_STATUS_NOTIFICATION),
++		safe_for_read(GPCMD_GET_PERFORMANCE),
++		safe_for_read(GPCMD_SEEK),
++		safe_for_read(GPCMD_STOP_PLAY_SCAN),
+ 
+ 		/* Basic writing commands */
+ 		safe_for_write(WRITE_6),
+@@ -154,8 +164,25 @@
+ 		safe_for_write(WRITE_12),
+ 		safe_for_write(WRITE_VERIFY_12),
+ 		safe_for_write(WRITE_16),
+-		safe_for_write(WRITE_BUFFER),
+ 		safe_for_write(WRITE_LONG),
++		safe_for_write(ERASE),
++		safe_for_write(GPCMD_MODE_SELECT_10),
++		safe_for_write(MODE_SELECT),
++		safe_for_write(GPCMD_BLANK),
++		safe_for_write(GPCMD_CLOSE_TRACK),
++		safe_for_write(GPCMD_FLUSH_CACHE),
++		safe_for_write(GPCMD_FORMAT_UNIT),
++		safe_for_write(GPCMD_REPAIR_RZONE_TRACK),
++		safe_for_write(GPCMD_RESERVE_RZONE_TRACK),
++		safe_for_write(GPCMD_SEND_DVD_STRUCTURE),
++		safe_for_write(GPCMD_SEND_EVENT),
++		safe_for_write(GPCMD_SEND_KEY),
++		safe_for_write(GPCMD_SEND_OPC),
++		safe_for_write(GPCMD_SEND_CUE_SHEET),
++		safe_for_write(GPCMD_SET_SPEED),
++		safe_for_write(GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL),
++		safe_for_write(GPCMD_LOAD_UNLOAD),
++		safe_for_write(GPCMD_SET_STREAMING),
+ 	};
+ 	unsigned char type = cmd_type[cmd[0]];
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/acpi-early.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/acpi-early.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/acpi-early.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,234 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Enter ACPI mode earlier
+## DP: Patch author: Len Brown <len.brown at intel.com>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/08/14 01:11:05-04:00 len.brown at intel.com 
+#   [ACPI] Enter ACPI mode earlier
+#   Fixes two common boot failures due to buggy SMM BIOS code
+#   
+#   SMP boot crash if SMI_CMD=ACPI written from CPU1
+#   http://bugzilla.kernel.org/show_bug.cgi?id=2941
+#   
+#   laptop crash due to LAPIC timer before SMI_CMD=ACPI
+#   http://bugzilla.kernel.org/show_bug.cgi?id=1269
+# 
+# arch/i386/kernel/dmi_scan.c
+#   2004/08/14 01:10:58-04:00 len.brown at intel.com +0 -44
+#   delete local_apic_kills_bios()
+# 
+# drivers/acpi/bus.c
+#   2004/08/14 01:10:58-04:00 len.brown at intel.com +32 -6
+#   add acpi_early_init()
+# 
+# drivers/acpi/osl.c
+#   2004/08/14 01:10:58-04:00 len.brown at intel.com +10 -0
+#   defer acpi_os_initialize() to acpi_os_initialize1()
+# 
+# init/main.c
+#   2004/08/14 01:10:59-04:00 len.brown at intel.com +7 -0
+#   acpi_early_init()
+# 
+diff -Nru a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c
+--- a/arch/i386/kernel/dmi_scan.c	2004-08-19 12:35:05 -07:00
++++ b/arch/i386/kernel/dmi_scan.c	2004-08-19 12:35:05 -07:00
+@@ -162,26 +162,6 @@
+ #define NO_MATCH	{ DMI_NONE, NULL}
+ #define MATCH		DMI_MATCH
+ 
+-/*
+- * Some machines, usually laptops, can't handle an enabled local APIC.
+- * The symptoms include hangs or reboots when suspending or resuming,
+- * attaching or detaching the power cord, or entering BIOS setup screens
+- * through magic key sequences.
+- */
+-static int __init local_apic_kills_bios(struct dmi_blacklist *d)
+-{
+-#ifdef CONFIG_X86_LOCAL_APIC
+-	extern int enable_local_apic;
+-	if (enable_local_apic == 0) {
+-		enable_local_apic = -1;
+-		printk(KERN_WARNING "%s with broken BIOS detected. "
+-		       "Refusing to enable the local APIC.\n",
+-		       d->ident);
+-	}
+-#endif
+-	return 0;
+-}
+-
+
+ /* 
+  * Toshiba keyboard likes to repeat keys when they are not repeated.
+@@ -793,30 +773,6 @@
+ 			} },
+ 
+ 	/* Machines which have problems handling enabled local APICs */
+-
+-	{ local_apic_kills_bios, "Dell Inspiron", {
+-			MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+-			MATCH(DMI_PRODUCT_NAME, "Inspiron"),
+-			NO_MATCH, NO_MATCH
+-			} },
+-
+-	{ local_apic_kills_bios, "Dell Latitude", {
+-			MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+-			MATCH(DMI_PRODUCT_NAME, "Latitude"),
+-			NO_MATCH, NO_MATCH
+-			} },
+-
+-	{ local_apic_kills_bios, "IBM Thinkpad T20", {
+-			MATCH(DMI_BOARD_VENDOR, "IBM"),
+-			MATCH(DMI_BOARD_NAME, "264741U"),
+-			NO_MATCH, NO_MATCH
+-			} },
+-
+-	{ local_apic_kills_bios, "ASUS L3C", {
+-			MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
+-			MATCH(DMI_BOARD_NAME, "P4_L3C"),
+-			NO_MATCH, NO_MATCH
+-			} },
+ 
+ 	{ broken_acpi_Sx, "ASUS K7V-RM", {		/* Bad ACPI Sx table */
+ 			MATCH(DMI_BIOS_VERSION,"ASUS K7V-RM ACPI BIOS Revision 1003A"),
+diff -Nru a/drivers/acpi/bus.c b/drivers/acpi/bus.c
+--- a/drivers/acpi/bus.c	2004-08-19 12:35:05 -07:00
++++ b/drivers/acpi/bus.c	2004-08-19 12:35:05 -07:00
+@@ -590,10 +590,9 @@
+ }
+ 
+ 
+-static int __init
+-acpi_bus_init (void)
++void __init
++acpi_early_init (void)
+ {
+-	int			result = 0;
+ 	acpi_status		status = AE_OK;
+ 	struct acpi_buffer	buffer = {sizeof(acpi_fadt), &acpi_fadt};
+ 
+@@ -617,7 +616,7 @@
+ 	status = acpi_get_table(ACPI_TABLE_FADT, 1, &buffer);
+ 	if (ACPI_FAILURE(status)) {
+ 		printk(KERN_ERR PREFIX "Unable to get the FADT\n");
+-		goto error1;
++		goto error0;
+ 	}
+ 
+ #ifdef CONFIG_X86
+@@ -640,12 +639,40 @@
+ 	}
+ #endif
+ 
+-	status = acpi_enable_subsystem(ACPI_FULL_INITIALIZATION);
++	status = acpi_enable_subsystem(~(ACPI_NO_HARDWARE_INIT | ACPI_NO_ACPI_ENABLE));
++	if (ACPI_FAILURE(status)) {
++		printk(KERN_ERR PREFIX "Unable to enable ACPI\n");
++		goto error0;
++	}
++
++	return;
++
++error0:
++	disable_acpi();
++	return;
++}
++
++static int __init
++acpi_bus_init (void)
++{
++	int			result = 0;
++	acpi_status		status = AE_OK;
++	extern acpi_status	acpi_os_initialize1(void);
++
++	ACPI_FUNCTION_TRACE("acpi_bus_init");
++
++	status = acpi_os_initialize1();
++
++	status = acpi_enable_subsystem(ACPI_NO_HARDWARE_INIT | ACPI_NO_ACPI_ENABLE);
+ 	if (ACPI_FAILURE(status)) {
+ 		printk(KERN_ERR PREFIX "Unable to start the ACPI Interpreter\n");
+ 		goto error1;
+ 	}
+ 
++	if (ACPI_FAILURE(status)) {
++		printk(KERN_ERR PREFIX "Unable to initialize ACPI OS objects\n");
++		goto error1;
++	}
+ #ifdef CONFIG_ACPI_EC
+ 	/*
+ 	 * ACPI 2.0 requires the EC driver to be loaded and work before
+@@ -693,7 +720,6 @@
+ 	/* Mimic structured exception handling */
+ error1:
+ 	acpi_terminate();
+-error0:
+ 	return_VALUE(-ENODEV);
+ }
+ 
+diff -Nru a/drivers/acpi/osl.c b/drivers/acpi/osl.c
+--- a/drivers/acpi/osl.c	2004-08-19 12:35:05 -07:00
++++ b/drivers/acpi/osl.c	2004-08-19 12:35:05 -07:00
+@@ -71,6 +71,12 @@
+ acpi_status
+ acpi_os_initialize(void)
+ {
++	return AE_OK;
++}
++
++acpi_status
++acpi_os_initialize1(void)
++{
+ 	/*
+ 	 * Initialize PCI configuration space access, as we'll need to access
+ 	 * it while walking the namespace (bus 0 and root bridges w/ _BBNs).
+@@ -470,6 +476,8 @@
+ 		return AE_ERROR;
+ 	}
+ 
++	BUG_ON(!raw_pci_ops);
++
+ 	result = raw_pci_ops->read(pci_id->segment, pci_id->bus,
+ 				PCI_DEVFN(pci_id->device, pci_id->function),
+ 				reg, size, value);
+@@ -495,6 +503,8 @@
+ 	default:
+ 		return AE_ERROR;
+ 	}
++
++	BUG_ON(!raw_pci_ops);
+ 
+ 	result = raw_pci_ops->write(pci_id->segment, pci_id->bus,
+ 				PCI_DEVFN(pci_id->device, pci_id->function),
+diff -Nru a/init/main.c b/init/main.c
+--- a/init/main.c	2004-08-19 12:35:05 -07:00
++++ b/init/main.c	2004-08-19 12:35:05 -07:00
+@@ -91,6 +91,11 @@
+ extern void populate_rootfs(void);
+ extern void driver_init(void);
+ extern void prepare_namespace(void);
++#ifdef	CONFIG_ACPI
++extern void acpi_early_init(void);
++#else
++static inline void acpi_early_init(void) { }
++#endif
+ 
+ #ifdef CONFIG_TC
+ extern void tc_init(void);
+@@ -481,6 +486,8 @@
+ 	proc_root_init();
+ #endif
+ 	check_bugs();
++
++	acpi_early_init(); /* before LAPIC and SMP init */
+ 
+ 	/* 
+ 	 *	We count on the initial thread going ok 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/acpi-osname.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/acpi-osname.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/acpi-osname.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,23 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: claim we're windows to ACPI to work around broken BIOSes
+## DP: Patch author: unknown
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- linux/include/acpi/platform/aclinux.h~	2004-08-18 21:35:34.433788552 +0200
++++ linux/include/acpi/platform/aclinux.h	2004-08-18 21:35:59.580965600 +0200
+@@ -44,7 +44,8 @@
+ #ifndef __ACLINUX_H__
+ #define __ACLINUX_H__
+ 
+-#define ACPI_OS_NAME                "Linux"
++/* Microsoft, Microsoft Windows, Microsoft Windows NT are trademarks of Microsoft Corp. */
++#define ACPI_OS_NAME                "Microsoft Windows NT"
+ 
+ #define ACPI_USE_SYSTEM_CLIBRARY
+ #define ACPI_USE_DO_WHILE_0

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/acpi-printk-breakpoint.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/acpi-printk-breakpoint.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/acpi-printk-breakpoint.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,43 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: disable printk on AML breakpoint
+## DP: Patch author: Len Brown <len.brown at intel.com>
+## DP: Upstream status: backport 2.6.10-rc2
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- a/drivers/acpi/osl.c	2004-11-18 11:51:56 -08:00
++++ b/drivers/acpi/osl.c	2004-11-18 11:51:56 -08:00
+@@ -220,7 +220,7 @@
+ 
+ 	*new_val = NULL;
+ 	if (!memcmp (init_val->name, "_OS_", 4) && strlen(acpi_os_name)) {
+-		printk(KERN_INFO PREFIX "Overriding _OS definition %s\n",
++		printk(KERN_INFO PREFIX "Overriding _OS definition to '%s'\n",
+ 			acpi_os_name);
+ 		*new_val = acpi_os_name;
+ 	}
+@@ -985,11 +985,15 @@
+ 		printk(KERN_ERR PREFIX "Fatal opcode executed\n");
+ 		break;
+ 	case ACPI_SIGNAL_BREAKPOINT:
+-		{
+-			char *bp_info = (char*) info;
+-
+-			printk(KERN_ERR "ACPI breakpoint: %s\n", bp_info);
+-		}
++		/*
++		 * AML Breakpoint
++		 * ACPI spec. says to treat it as a NOP unless
++		 * you are debugging.  So if/when we integrate
++		 * AML debugger into the kernel debugger its
++		 * hook will go here.  But until then it is
++		 * not useful to print anything on breakpoints.
++		 */
++		break;
+ 	default:
+ 		break;
+ 	}

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/acpi-speedstep-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/acpi-speedstep-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/acpi-speedstep-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,32 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: fix acpi speedstep interaction (#257763)
+## DP: Patch author: unknown
+## DP: Upstream status: from ACPICA 20040715, so probably soon merged
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -Bru 2.6.new/drivers/acpi/dispatcher/dsopcode.c patched/drivers/acpi/dispatcher/dsopcode.c
+--- 2.6.new/drivers/acpi/dispatcher/dsopcode.c	2004-04-28 11:45:01.000000000 +0800
++++ patched/drivers/acpi/dispatcher/dsopcode.c	2004-05-20 19:36:31.000000000 +0800
+@@ -79,7 +79,6 @@
+ 	acpi_status                     status;
+ 	union acpi_parse_object         *op;
+ 	struct acpi_walk_state          *walk_state;
+-	union acpi_parse_object         *arg;
+ 
+ 
+ 	ACPI_FUNCTION_TRACE ("ds_execute_arguments");
+@@ -126,9 +125,7 @@
+ 
+ 	/* Get and init the Op created above */
+ 
+-	arg = op->common.value.arg;
+ 	op->common.node = node;
+-	arg->common.node = node;
+ 	acpi_ps_delete_parse_tree (op);
+ 
+ 	/* Evaluate the deferred arguments */

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic79xx-nohw.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic79xx-nohw.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic79xx-nohw.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,50 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Handle loaded but no hardware present properly in aic79xx
+## DP: Patch author: Christoph Hellwig <hch at lst.de>
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- 1.56/drivers/scsi/aic7xxx/aic79xx_osm.c	2004-08-25 01:09:04 +02:00
++++ edited/drivers/scsi/aic7xxx/aic79xx_osm.c	2004-09-06 20:46:53 +02:00
+@@ -851,6 +851,7 @@
+ {
+ 	struct	ahd_softc *ahd;
+ 	int     found;
++	int	error = 0;
+ 
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+ 	/*
+@@ -902,7 +903,9 @@
+ 	ahd_list_lockinit();
+ 
+ #ifdef CONFIG_PCI
+-	ahd_linux_pci_init();
++	error = ahd_linux_pci_init();
++	if (error)
++		return error;
+ #endif
+ 
+ 	/*
+@@ -919,7 +922,7 @@
+ 	spin_lock_irq(&io_request_lock);
+ #endif
+ 	aic79xx_detect_complete++;
+-	return (found);
++	return 0;
+ }
+ 
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+@@ -5073,7 +5076,7 @@
+ ahd_linux_init(void)
+ {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+-       return (ahd_linux_detect(&aic79xx_driver_template) ? 0 : -ENODEV);
++	return ahd_linux_detect(&aic79xx_driver_template);
+ #else
+ 	scsi_register_module(MODULE_SCSI_HA, &aic79xx_driver_template);
+ 	if (aic79xx_driver_template.present == 0) {

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0001-to-2.6.9.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0001-to-2.6.9.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0001-to-2.6.9.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,264 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: all aic7xxx changes between 2.6.8 and 2.6.9
+## DP: Patch author: various
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -urN linux-2.6.8/drivers/scsi/aic7xxx/aic79xx_osm.c linux-2.6.9/drivers/scsi/aic7xxx/aic79xx_osm.c
+--- linux-2.6.8/drivers/scsi/aic7xxx/aic79xx_osm.c	2004-08-14 01:37:14.000000000 -0400
++++ linux-2.6.9/drivers/scsi/aic7xxx/aic79xx_osm.c	2004-10-18 17:54:31.000000000 -0400
+@@ -61,6 +61,7 @@
+ #endif
+ 
+ #include <linux/mm.h>		/* For fetching system memory size */
++#include <linux/delay.h>	/* For ssleep/msleep */
+ 
+ /*
+  * Lock protecting manipulation of the ahd softc list.
+@@ -415,7 +416,6 @@
+ /*
+  * Module information and settable options.
+  */
+-#ifdef MODULE
+ static char *aic79xx = NULL;
+ /*
+  * Just in case someone uses commas to separate items on the insmod
+@@ -426,9 +426,8 @@
+ 
+ MODULE_AUTHOR("Maintainer: Justin T. Gibbs <gibbs at scsiguy.com>");
+ MODULE_DESCRIPTION("Adaptec Aic790X U320 SCSI Host Bus Adapter driver");
+-#ifdef MODULE_LICENSE
+ MODULE_LICENSE("Dual BSD/GPL");
+-#endif
++MODULE_VERSION(AIC79XX_DRIVER_VERSION);
+ MODULE_PARM(aic79xx, "s");
+ MODULE_PARM_DESC(aic79xx,
+ "period delimited, options string.\n"
+@@ -463,7 +462,6 @@
+ "		Change Read Streaming for Controller's 2 and 3\n"
+ "\n"
+ "	options aic79xx 'aic79xx=rd_strm:{..0xFFF0.0xC0F0}'");
+-#endif
+ 
+ static void ahd_linux_handle_scsi_status(struct ahd_softc *,
+ 					 struct ahd_linux_device *,
+@@ -513,9 +511,6 @@
+ 			    struct scsi_cmnd *cmd,
+ 			    struct ahd_devinfo *devinfo,
+ 			    struct ahd_linux_target *targ);
+-static __inline int
+-	   ahd_linux_dv_fallback(struct ahd_softc *ahd,
+-				 struct ahd_devinfo *devinfo);
+ static int ahd_linux_fallback(struct ahd_softc *ahd,
+ 			      struct ahd_devinfo *devinfo);
+ static __inline int ahd_linux_dv_fallback(struct ahd_softc *ahd,
+@@ -2915,6 +2910,19 @@
+ 	ahd_unlock(ahd, &s);
+ }
+ 
++static __inline int
++ahd_linux_dv_fallback(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
++{
++	u_long s;
++	int retval;
++
++	ahd_lock(ahd, &s);
++	retval = ahd_linux_fallback(ahd, devinfo);
++	ahd_unlock(ahd, &s);
++
++	return (retval);
++}
++
+ static void
+ ahd_linux_dv_transition(struct ahd_softc *ahd, struct scsi_cmnd *cmd,
+ 			struct ahd_devinfo *devinfo,
+@@ -3163,7 +3171,7 @@
+ 				break;
+ 			}
+ 			if (status & SSQ_DELAY)
+-				scsi_sleep(1 * HZ);
++				ssleep(1);
+ 
+ 			break;
+ 		case SS_START:
+@@ -3323,7 +3331,7 @@
+ 			}
+ 			if (targ->dv_state_retry <= 10) {
+ 				if ((status & (SSQ_DELAY_RANDOM|SSQ_DELAY))!= 0)
+-					scsi_sleep(ahd->our_id*HZ/10);
++					msleep(ahd->our_id*1000/10);
+ 				break;
+ 			}
+ #ifdef AHD_DEBUG
+@@ -3367,7 +3375,7 @@
+ 				targ->dv_state_retry--;
+ 			} else if (targ->dv_state_retry < 60) {
+ 				if ((status & SSQ_DELAY) != 0)
+-					scsi_sleep(1 * HZ);
++					ssleep(1);
+ 			} else {
+ #ifdef AHD_DEBUG
+ 				if (ahd_debug & AHD_SHOW_DV) {
+@@ -3551,19 +3559,6 @@
+ 	cmd->cmnd[4] = le | SSS_START;
+ }
+ 
+-static __inline int
+-ahd_linux_dv_fallback(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
+-{
+-	u_long s;
+-	int retval;
+-
+-	ahd_lock(ahd, &s);
+-	retval = ahd_linux_fallback(ahd, devinfo);
+-	ahd_unlock(ahd, &s);
+-
+-	return (retval);
+-}
+-
+ static int
+ ahd_linux_fallback(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
+ {
+diff -urN linux-2.6.8/drivers/scsi/aic7xxx/aic79xx_pci.c linux-2.6.9/drivers/scsi/aic7xxx/aic79xx_pci.c
+--- linux-2.6.8/drivers/scsi/aic7xxx/aic79xx_pci.c	2004-08-14 01:36:57.000000000 -0400
++++ linux-2.6.9/drivers/scsi/aic7xxx/aic79xx_pci.c	2004-10-18 17:54:08.000000000 -0400
+@@ -452,8 +452,10 @@
+ 	 * or read prefetching could be initiated by the
+ 	 * CPU or host bridge.  Our device does not support
+ 	 * either, so look for data corruption and/or flaged
+-	 * PCI errors.
++	 * PCI errors.  First pause without causing another
++	 * chip reset.
+ 	 */
++	hcntrl &= ~CHIPRST;
+ 	ahd_outb(ahd, HCNTRL, hcntrl|PAUSE);
+ 	while (ahd_is_paused(ahd) == 0)
+ 		;
+diff -urN linux-2.6.8/drivers/scsi/aic7xxx/aic7xxx_osm.c linux-2.6.9/drivers/scsi/aic7xxx/aic7xxx_osm.c
+--- linux-2.6.8/drivers/scsi/aic7xxx/aic7xxx_osm.c	2004-08-14 01:36:14.000000000 -0400
++++ linux-2.6.9/drivers/scsi/aic7xxx/aic7xxx_osm.c	2004-10-18 17:53:11.000000000 -0400
+@@ -140,6 +140,7 @@
+ 
+ #include <linux/mm.h>		/* For fetching system memory size */
+ #include <linux/blkdev.h>		/* For block_size() */
++#include <linux/delay.h>	/* For ssleep/msleep */
+ 
+ /*
+  * Lock protecting manipulation of the ahc softc list.
+@@ -436,7 +437,6 @@
+ /*
+  * Module information and settable options.
+  */
+-#ifdef MODULE
+ static char *aic7xxx = NULL;
+ /*
+  * Just in case someone uses commas to separate items on the insmod
+@@ -447,9 +447,8 @@
+ 
+ MODULE_AUTHOR("Maintainer: Justin T. Gibbs <gibbs at scsiguy.com>");
+ MODULE_DESCRIPTION("Adaptec Aic77XX/78XX SCSI Host Bus Adapter driver");
+-#ifdef MODULE_LICENSE
+ MODULE_LICENSE("Dual BSD/GPL");
+-#endif
++MODULE_VERSION(AIC7XXX_DRIVER_VERSION);
+ MODULE_PARM(aic7xxx, "s");
+ MODULE_PARM_DESC(aic7xxx,
+ "period delimited, options string.\n"
+@@ -479,7 +478,6 @@
+ "\n"
+ "	options aic7xxx 'aic7xxx=probe_eisa_vl.tag_info:{{}.{.10}}.seltime:1'\n"
+ );
+-#endif
+ 
+ static void ahc_linux_handle_scsi_status(struct ahc_softc *,
+ 					 struct ahc_linux_device *,
+@@ -2825,7 +2823,7 @@
+ 				break;
+ 			}
+ 			if (status & SSQ_DELAY)
+-				scsi_sleep(1 * HZ);
++				ssleep(1);
+ 
+ 			break;
+ 		case SS_START:
+@@ -2985,7 +2983,7 @@
+ 			}
+ 			if (targ->dv_state_retry <= 10) {
+ 				if ((status & (SSQ_DELAY_RANDOM|SSQ_DELAY))!= 0)
+-					scsi_sleep(ahc->our_id*HZ/10);
++					msleep(ahc->our_id*1000/10);
+ 				break;
+ 			}
+ #ifdef AHC_DEBUG
+@@ -3029,7 +3027,7 @@
+ 				targ->dv_state_retry--;
+ 			} else if (targ->dv_state_retry < 60) {
+ 				if ((status & SSQ_DELAY) != 0)
+-					scsi_sleep(1 * HZ);
++					ssleep(1);
+ 			} else {
+ #ifdef AHC_DEBUG
+ 				if (ahc_debug & AHC_SHOW_DV) {
+diff -urN linux-2.6.8/drivers/scsi/aic7xxx/aic7xxx_pci.c linux-2.6.9/drivers/scsi/aic7xxx/aic7xxx_pci.c
+--- linux-2.6.8/drivers/scsi/aic7xxx/aic7xxx_pci.c	2004-08-14 01:36:13.000000000 -0400
++++ linux-2.6.9/drivers/scsi/aic7xxx/aic7xxx_pci.c	2004-10-18 17:53:10.000000000 -0400
+@@ -1284,8 +1284,10 @@
+ 	 * or read prefetching could be initiated by the
+ 	 * CPU or host bridge.  Our device does not support
+ 	 * either, so look for data corruption and/or flagged
+-	 * PCI errors.
++	 * PCI errors.  First pause without causing another
++	 * chip reset.
+ 	 */
++	hcntrl &= ~CHIPRST;
+ 	ahc_outb(ahc, HCNTRL, hcntrl|PAUSE);
+ 	while (ahc_is_paused(ahc) == 0)
+ 		;
+diff -urN linux-2.6.8/drivers/scsi/aic7xxx/aicasm/Makefile linux-2.6.9/drivers/scsi/aic7xxx/aicasm/Makefile
+--- linux-2.6.8/drivers/scsi/aic7xxx/aicasm/Makefile	2004-08-14 01:37:40.000000000 -0400
++++ linux-2.6.9/drivers/scsi/aic7xxx/aicasm/Makefile	2004-10-18 17:55:06.000000000 -0400
+@@ -34,10 +34,14 @@
+ 	$(AICASM_CC) $(AICASM_CFLAGS) $(SRCS) -o $(PROG) $(LIBS)
+ 
+ aicdb.h:
+-	@if [ -e "/usr/include/db3/db_185.h" ]; then		\
++	@if [ -e "/usr/include/db4/db_185.h" ]; then		\
++		echo "#include <db4/db_185.h>" > aicdb.h;	\
++	 elif [ -e "/usr/include/db3/db_185.h" ]; then		\
+ 		echo "#include <db3/db_185.h>" > aicdb.h;	\
+ 	 elif [ -e "/usr/include/db2/db_185.h" ]; then		\
+ 		echo "#include <db2/db_185.h>" > aicdb.h;	\
++	 elif [ -e "/usr/include/db1/db_185.h" ]; then		\
++		echo "#include <db1/db_185.h>" > aicdb.h;	\
+ 	 elif [ -e "/usr/include/db/db_185.h" ]; then		\
+ 		echo "#include <db/db_185.h>" > aicdb.h;	\
+ 	 elif [ -e "/usr/include/db_185.h" ]; then		\
+diff -urN linux-2.6.8/drivers/scsi/aic7xxx/Kconfig.aic79xx linux-2.6.9/drivers/scsi/aic7xxx/Kconfig.aic79xx
+--- linux-2.6.8/drivers/scsi/aic7xxx/Kconfig.aic79xx	2004-08-14 01:36:56.000000000 -0400
++++ linux-2.6.9/drivers/scsi/aic7xxx/Kconfig.aic79xx	2004-10-18 17:53:51.000000000 -0400
+@@ -46,7 +46,7 @@
+ 
+ config AIC79XX_BUILD_FIRMWARE
+ 	bool "Build Adapter Firmware with Kernel Build"
+-	depends on SCSI_AIC79XX
++	depends on SCSI_AIC79XX && !PREVENT_FIRMWARE_BUILD
+ 	help
+ 	This option should only be enabled if you are modifying the firmware
+ 	source to the aic79xx driver and wish to have the generated firmware
+diff -urN linux-2.6.8/drivers/scsi/aic7xxx/Kconfig.aic7xxx linux-2.6.9/drivers/scsi/aic7xxx/Kconfig.aic7xxx
+--- linux-2.6.8/drivers/scsi/aic7xxx/Kconfig.aic7xxx	2004-08-14 01:36:45.000000000 -0400
++++ linux-2.6.9/drivers/scsi/aic7xxx/Kconfig.aic7xxx	2004-10-18 17:53:46.000000000 -0400
+@@ -61,7 +61,7 @@
+ 
+ config AIC7XXX_BUILD_FIRMWARE
+ 	bool "Build Adapter Firmware with Kernel Build"
+-	depends on SCSI_AIC7XXX
++	depends on SCSI_AIC7XXX && !PREVENT_FIRMWARE_BUILD
+ 	help
+ 	This option should only be enabled if you are modifying the firmware
+ 	source to the aic7xxx driver and wish to have the generated firmware

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0006-1.1832.91.1.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0006-1.1832.91.1.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0006-1.1832.91.1.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,139 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [PATCH] aic79xx hostraid support
+## DP: Patch author: arjanv at redhat.com
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/09/10 12:31:59-04:00 arjanv at redhat.com 
+#   [PATCH] aic79xx hostraid support
+#   
+#   Patch ported to 2.6.8 by John A. Hull (john_hull at dell.com) to add
+#   support for the aic79xx hostraid family support.
+#   
+#   Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
+#   
+#   since AHD_HOSTRAID_BOARD wasn't actually used... a more minimal patch:
+# 
+# drivers/scsi/aic7xxx/aic79xx_osm_pci.c
+#   2004/08/21 09:27:19-04:00 arjanv at redhat.com +4 -0
+#   aic79xx hostraid support
+# 
+# drivers/scsi/aic7xxx/aic79xx_pci.c
+#   2004/08/21 09:27:19-04:00 arjanv at redhat.com +15 -20
+#   aic79xx hostraid support
+# 
+diff -Nru a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
+--- a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c	2004-11-13 23:12:41 -08:00
++++ b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c	2004-11-13 23:12:41 -08:00
+@@ -64,6 +64,10 @@
+ 		0x9005, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
+ 		PCI_CLASS_STORAGE_SCSI << 8, 0xFFFF00, 0
+ 	},
++	{
++		0x9005, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
++		PCI_CLASS_STORAGE_RAID << 8, 0xFFFF00, 0
++	},
+ 	{ 0 }
+ };
+ 
+diff -Nru a/drivers/scsi/aic7xxx/aic79xx_pci.c b/drivers/scsi/aic7xxx/aic79xx_pci.c
+--- a/drivers/scsi/aic7xxx/aic79xx_pci.c	2004-11-13 23:12:41 -08:00
++++ b/drivers/scsi/aic7xxx/aic79xx_pci.c	2004-11-13 23:12:41 -08:00
+@@ -65,10 +65,10 @@
+ }
+ 
+ #define ID_ALL_MASK			0xFFFFFFFFFFFFFFFFull
+-#define ID_ALL_IROC_MASK		0xFFFFFF7FFFFFFFFFull
++#define ID_ALL_IROC_MASK		0xFF7FFFFFFFFFFFFFull
+ #define ID_DEV_VENDOR_MASK		0xFFFFFFFF00000000ull
+ #define ID_9005_GENERIC_MASK		0xFFF0FFFF00000000ull
+-#define ID_9005_GENERIC_IROC_MASK	0xFFF0FF7F00000000ull
++#define ID_9005_GENERIC_IROC_MASK	0xFF70FFFF00000000ull
+ 
+ #define ID_AIC7901			0x800F9005FFFF9005ull
+ #define ID_AHA_29320A			0x8000900500609005ull
+@@ -92,6 +92,8 @@
+ #define ID_AIC7902_PCI_REV_B0		0x10
+ #define SUBID_HP			0x0E11
+ 
++#define DEVID_9005_HOSTRAID(id) ((id) & 0x80)
++
+ #define DEVID_9005_TYPE(id) ((id) & 0xF)
+ #define		DEVID_9005_TYPE_HBA		0x0	/* Standard Card */
+ #define		DEVID_9005_TYPE_HBA_2EXT	0x1	/* 2 External Ports */
+@@ -134,18 +136,18 @@
+ 		"Adaptec 29320ALP Ultra320 SCSI adapter",
+ 		ahd_aic7901_setup
+ 	},
+-	/* aic7901A based controllers */
++	/* aic7902 based controllers */	
+ 	{
+ 		ID_AHA_29320,
+ 		ID_ALL_MASK,
+ 		"Adaptec 29320 Ultra320 SCSI adapter",
+-		ahd_aic7901A_setup
++		ahd_aic7902_setup
+ 	},
+ 	{
+ 		ID_AHA_29320B,
+ 		ID_ALL_MASK,
+ 		"Adaptec 29320B Ultra320 SCSI adapter",
+-		ahd_aic7901A_setup
++		ahd_aic7902_setup
+ 	},
+ 	{
+ 		ID_AHA_29320LP,
+@@ -153,7 +155,6 @@
+ 		"Adaptec 29320LP Ultra320 SCSI adapter",
+ 		ahd_aic7901A_setup
+ 	},
+-	/* aic7902 based controllers */	
+ 	{
+ 		ID_AHA_39320,
+ 		ID_ALL_MASK,
+@@ -196,22 +197,10 @@
+ 		"Adaptec (HP OEM) 39320D Ultra320 SCSI adapter",
+ 		ahd_aic7902_setup
+ 	},
+-	{
+-		ID_AHA_29320,
+-		ID_ALL_MASK,
+-		"Adaptec 29320 Ultra320 SCSI adapter",
+-		ahd_aic7902_setup
+-	},
+-	{
+-		ID_AHA_29320B,
+-		ID_ALL_MASK,
+-		"Adaptec 29320B Ultra320 SCSI adapter",
+-		ahd_aic7902_setup
+-	},
+ 	/* Generic chip probes for devices we don't know 'exactly' */
+ 	{
+-		ID_AIC7901 & ID_DEV_VENDOR_MASK,
+-		ID_DEV_VENDOR_MASK,
++		ID_AIC7901 & ID_9005_GENERIC_MASK,
++		ID_9005_GENERIC_MASK,
+ 		"Adaptec AIC7901 Ultra320 SCSI adapter",
+ 		ahd_aic7901_setup
+ 	},
+@@ -293,6 +282,12 @@
+ 				 vendor,
+ 				 subdevice,
+ 				 subvendor);
++
++	/*
++	 * Controllers, mask out the IROC/HostRAID bit
++	 */
++	
++	full_id &= ID_ALL_IROC_MASK;
+ 
+ 	for (i = 0; i < ahd_num_pci_devs; i++) {
+ 		entry = &ahd_pci_ident_table[i];

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0007-1.1832.91.17.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0007-1.1832.91.17.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0007-1.1832.91.17.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,43 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [PATCH] Remove redundant freeing code from aic7770
+## DP: Patch author: davej at redhat.com
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/09/10 13:37:47-04:00 davej at redhat.com 
+#   [PATCH] Remove redundant freeing code from aic7770
+#   
+#   ahc_alloc already frees the 'name' if ahc=NULL
+#   
+#   Spotted with the source checker from Coverity.com.
+#   
+#   Signed-off-by: Dave Jones <davej at redhat.com>
+#   Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
+# 
+# drivers/scsi/aic7xxx/aic7770_osm.c
+#   2004/06/03 08:42:30-04:00 davej at redhat.com +1 -3
+#   Remove redundant freeing code from aic7770
+# 
+diff -Nru a/drivers/scsi/aic7xxx/aic7770_osm.c b/drivers/scsi/aic7xxx/aic7770_osm.c
+--- a/drivers/scsi/aic7xxx/aic7770_osm.c	2004-11-13 23:12:04 -08:00
++++ b/drivers/scsi/aic7xxx/aic7770_osm.c	2004-11-13 23:12:04 -08:00
+@@ -185,10 +185,8 @@
+ 		return (ENOMEM);
+ 	strcpy(name, buf);
+ 	ahc = ahc_alloc(&aic7xxx_driver_template, name);
+-	if (ahc == NULL) {
+-		free(name, M_DEVBUF);
++	if (ahc == NULL)
+ 		return (ENOMEM);
+-	}
+ 	error = aic7770_config(ahc, entry, eisaBase);
+ 	if (error != 0) {
+ 		ahc->bsh.ioport = 0;

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0008-1.1832.91.18.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0008-1.1832.91.18.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0008-1.1832.91.18.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,67 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [PATCH] plug leaks in aic79xx
+## DP: Patch author: davej at redhat.com
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/09/10 13:39:48-04:00 davej at redhat.com 
+#   [PATCH] plug leaks in aic79xx
+#   
+#   Spotted with the source checker from Coverity.com.
+#   
+#   Signed-off-by: Dave Jones <davej at redhat.com>
+#   Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
+# 
+# drivers/scsi/aic7xxx/aic79xx_osm.c
+#   2004/09/01 08:31:12-04:00 davej at redhat.com +6 -0
+#   plug leaks in aic79xx
+# 
+diff -Nru a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
+--- a/drivers/scsi/aic7xxx/aic79xx_osm.c	2004-11-13 23:12:15 -08:00
++++ b/drivers/scsi/aic7xxx/aic79xx_osm.c	2004-11-13 23:12:15 -08:00
+@@ -1560,6 +1560,8 @@
+ 
+ 	ahd = *(struct ahd_softc **)cmd->device->host->hostdata;
+ 	recovery_cmd = malloc(sizeof(struct scsi_cmnd), M_DEVBUF, M_WAITOK);
++	if (!recovery_cmd)
++		return (FAILED);
+ 	memset(recovery_cmd, 0, sizeof(struct scsi_cmnd));
+ 	recovery_cmd->device = cmd->device;
+ 	recovery_cmd->scsi_done = ahd_linux_dev_reset_complete;
+@@ -1575,10 +1577,12 @@
+ 				   cmd->device->lun, /*alloc*/FALSE);
+ 	if (dev == NULL) {
+ 		ahd_midlayer_entrypoint_unlock(ahd, &s);
++		kfree(recovery_cmd);
+ 		return (FAILED);
+ 	}
+ 	if ((scb = ahd_get_scb(ahd, AHD_NEVER_COL_IDX)) == NULL) {
+ 		ahd_midlayer_entrypoint_unlock(ahd, &s);
++		kfree(recovery_cmd);
+ 		return (FAILED);
+ 	}
+ 	tinfo = ahd_fetch_transinfo(ahd, 'A', ahd->our_id,
+@@ -1773,6 +1777,7 @@
+ 	if (ahd->dev_softc != NULL)
+ 		if (ahd_pci_set_dma_mask(ahd->dev_softc, 0xFFFFFFFF)) {
+ 			printk(KERN_WARNING "aic79xx: No suitable DMA available.\n");
++			kfree(map);
+ 			return (ENODEV);
+ 		}
+ 	*vaddr = pci_alloc_consistent(ahd->dev_softc,
+@@ -1781,6 +1786,7 @@
+ 		if (ahd_pci_set_dma_mask(ahd->dev_softc,
+ 				     ahd->platform_data->hw_dma_mask)) {
+ 			printk(KERN_WARNING "aic79xx: No suitable DMA available.\n");
++			kfree(map);
+ 			return (ENODEV);
+ 		}
+ #else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) */

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0009-1.1832.91.19.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0009-1.1832.91.19.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0009-1.1832.91.19.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,37 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [PATCH] Remove possible reuse of stale pointer in aic7xxx
+## DP: Patch author: davej at redhat.com
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/09/10 13:41:20-04:00 davej at redhat.com 
+#   [PATCH] Remove possible reuse of stale pointer in aic7xxx
+#   
+#   Spotted with the source checker from Coverity.com.
+#   
+#   Signed-off-by: Dave Jones <davej at redhat.com>
+#   Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
+# 
+# drivers/scsi/aic7xxx_old.c
+#   2004/09/01 08:31:11-04:00 davej at redhat.com +1 -0
+#   Remove possible reuse of stale pointer in aic7xxx
+# 
+diff -Nru a/drivers/scsi/aic7xxx_old.c b/drivers/scsi/aic7xxx_old.c
+--- a/drivers/scsi/aic7xxx_old.c	2004-11-13 23:12:26 -08:00
++++ b/drivers/scsi/aic7xxx_old.c	2004-11-13 23:12:26 -08:00
+@@ -9243,6 +9243,7 @@
+ 	    {
+               /* duplicate PCI entry, skip it */
+ 	      kfree(temp_p);
++	      temp_p = NULL;
+               continue;
+ 	    }
+ 	    current_p = current_p->next;

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0010-1.1832.91.20.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0010-1.1832.91.20.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0010-1.1832.91.20.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,45 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [PATCH] plug leaks in aic7xxx_osm
+## DP: Patch author: davej at redhat.com
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/09/10 13:42:45-04:00 davej at redhat.com 
+#   [PATCH] plug leaks in aic7xxx_osm
+#   
+#   Spotted with the source checker from Coverity.com.
+#   
+#   Signed-off-by: Dave Jones <davej at redhat.com>
+#   Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
+# 
+# drivers/scsi/aic7xxx/aic7xxx_osm.c
+#   2004/09/01 08:31:12-04:00 davej at redhat.com +2 -0
+#   plug leaks in aic7xxx_osm
+# 
+diff -Nru a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
+--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c	2004-11-13 23:12:34 -08:00
++++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c	2004-11-13 23:12:34 -08:00
+@@ -1408,6 +1408,7 @@
+ 	if (ahc->dev_softc != NULL)
+ 		if (ahc_pci_set_dma_mask(ahc->dev_softc, 0xFFFFFFFF)) {
+ 			printk(KERN_WARNING "aic7xxx: No suitable DMA available.\n");
++			kfree(map);
+ 			return (ENODEV);
+ 		}
+ 	*vaddr = pci_alloc_consistent(ahc->dev_softc,
+@@ -1416,6 +1417,7 @@
+ 		if (ahc_pci_set_dma_mask(ahc->dev_softc,
+ 				     ahc->platform_data->hw_dma_mask)) {
+ 			printk(KERN_WARNING "aic7xxx: No suitable DMA available.\n");
++			kfree(map);
+ 			return (ENODEV);
+ 		}
+ #else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) */

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0011-1.1832.91.28.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0011-1.1832.91.28.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0011-1.1832.91.28.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,65 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [PATCH] fix aic79xx module_init return value when no hardware
+## DP: Patch author: hch at lst.de
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/09/10 14:26:42-04:00 hch at lst.de 
+#   [PATCH] fix aic79xx module_init return value when no hardware
+#   
+#   So much rearranging to just propagate the pci_module_init return value..
+#   
+#   Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
+# 
+# drivers/scsi/aic7xxx/aic79xx_osm.c
+#   2004/09/06 14:46:53-04:00 hch at lst.de +6 -3
+#   fix aic79xx module_init return value when no hardware
+# 
+diff -Nru a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
+--- a/drivers/scsi/aic7xxx/aic79xx_osm.c	2004-11-14 00:16:39 -08:00
++++ b/drivers/scsi/aic7xxx/aic79xx_osm.c	2004-11-14 00:16:39 -08:00
+@@ -851,6 +851,7 @@
+ {
+ 	struct	ahd_softc *ahd;
+ 	int     found;
++	int	error = 0;
+ 
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+ 	/*
+@@ -902,7 +903,9 @@
+ 	ahd_list_lockinit();
+ 
+ #ifdef CONFIG_PCI
+-	ahd_linux_pci_init();
++	error = ahd_linux_pci_init();
++	if (error)
++		return error;
+ #endif
+ 
+ 	/*
+@@ -919,7 +922,7 @@
+ 	spin_lock_irq(&io_request_lock);
+ #endif
+ 	aic79xx_detect_complete++;
+-	return (found);
++	return 0;
+ }
+ 
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+@@ -5079,7 +5082,7 @@
+ ahd_linux_init(void)
+ {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+-       return (ahd_linux_detect(&aic79xx_driver_template) ? 0 : -ENODEV);
++	return ahd_linux_detect(&aic79xx_driver_template);
+ #else
+ 	scsi_register_module(MODULE_SCSI_HA, &aic79xx_driver_template);
+ 	if (aic79xx_driver_template.present == 0) {

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0017-1.1988.96.15.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0017-1.1988.96.15.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-0017-1.1988.96.15.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,160 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: aic7xxx and aic79xx: fix sleeping while holding a lock
+## DP: Patch author: jejb at mulgrave.(none)
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/18 15:57:44-05:00 jejb at mulgrave.(none) 
+#   aic7xxx and aic79xx: fix sleeping while holding a lock
+#   
+#   From: Luben Tuikov <luben_tuikov at adaptec.com>
+#   
+#   Fix sleeping while holding a lock on host removal and on
+#   killing the DV thread.
+#   
+#   Signed-off-by: Luben Tuikov <luben_tuikov at adaptec.com>
+#   Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
+# 
+# drivers/scsi/aic7xxx/aic79xx_core.c
+#   2004/10/18 15:56:33-05:00 jejb at mulgrave.(none) +0 -1
+#   aic7xxx and aic79xx: fix sleeping while holding a lock
+# 
+# drivers/scsi/aic7xxx/aic79xx_osm.c
+#   2004/10/18 15:56:33-05:00 jejb at mulgrave.(none) +1 -3
+#   aic7xxx and aic79xx: fix sleeping while holding a lock
+# 
+# drivers/scsi/aic7xxx/aic79xx_osm_pci.c
+#   2004/10/18 15:56:33-05:00 jejb at mulgrave.(none) +4 -2
+#   aic7xxx and aic79xx: fix sleeping while holding a lock
+# 
+# drivers/scsi/aic7xxx/aic7xxx_core.c
+#   2004/10/18 15:56:33-05:00 jejb at mulgrave.(none) +0 -1
+#   aic7xxx and aic79xx: fix sleeping while holding a lock
+# 
+# drivers/scsi/aic7xxx/aic7xxx_osm.c
+#   2004/10/18 15:56:33-05:00 jejb at mulgrave.(none) +0 -3
+#   aic7xxx and aic79xx: fix sleeping while holding a lock
+# 
+# drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
+#   2004/10/18 15:56:33-05:00 jejb at mulgrave.(none) +4 -2
+#   aic7xxx and aic79xx: fix sleeping while holding a lock
+# 
+diff -Nru a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c
+--- a/drivers/scsi/aic7xxx/aic79xx_core.c	2004-11-13 23:13:09 -08:00
++++ b/drivers/scsi/aic7xxx/aic79xx_core.c	2004-11-13 23:13:09 -08:00
+@@ -5270,7 +5270,6 @@
+ 	default:
+ 	case 5:
+ 		ahd_shutdown(ahd);
+-		TAILQ_REMOVE(&ahd_tailq, ahd, links);
+ 		/* FALLTHROUGH */
+ 	case 4:
+ 		ahd_dmamap_unload(ahd, ahd->shared_data_dmat,
+diff -Nru a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
+--- a/drivers/scsi/aic7xxx/aic79xx_osm.c	2004-11-13 23:13:09 -08:00
++++ b/drivers/scsi/aic7xxx/aic79xx_osm.c	2004-11-13 23:13:09 -08:00
+@@ -5032,7 +5032,6 @@
+ ahd_linux_exit(void)
+ {
+ 	struct ahd_softc *ahd;
+-	u_long l;
+ 
+ 	/*
+ 	 * Shutdown DV threads before going into the SCSI mid-layer.
+@@ -5040,12 +5039,11 @@
+ 	 * kernel so that waiting for our DV threads to exit leads
+ 	 * to deadlock.
+ 	 */
+-	ahd_list_lock(&l);
+ 	TAILQ_FOREACH(ahd, &ahd_tailq, links) {
+ 
+ 		ahd_linux_kill_dv_thread(ahd);
+ 	}
+-	ahd_list_unlock(&l);
++
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+ 	/*
+ 	 * In 2.4 we have to unregister from the PCI core _after_
+diff -Nru a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
+--- a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c	2004-11-13 23:13:09 -08:00
++++ b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c	2004-11-13 23:13:09 -08:00
+@@ -105,12 +105,14 @@
+ 	if (ahd != NULL) {
+ 		u_long s;
+ 
++		TAILQ_REMOVE(&ahd_tailq, ahd, links);
++		ahd_list_unlock(&l);
+ 		ahd_lock(ahd, &s);
+ 		ahd_intr_enable(ahd, FALSE);
+ 		ahd_unlock(ahd, &s);
+ 		ahd_free(ahd);
+-	}
+-	ahd_list_unlock(&l);
++	} else
++		ahd_list_unlock(&l);
+ }
+ 
+ static int
+diff -Nru a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c
+--- a/drivers/scsi/aic7xxx/aic7xxx_core.c	2004-11-13 23:13:09 -08:00
++++ b/drivers/scsi/aic7xxx/aic7xxx_core.c	2004-11-13 23:13:09 -08:00
+@@ -3973,7 +3973,6 @@
+ 	default:
+ 	case 5:
+ 		ahc_shutdown(ahc);
+-		TAILQ_REMOVE(&ahc_tailq, ahc, links);
+ 		/* FALLTHROUGH */
+ 	case 4:
+ 		ahc_dmamap_unload(ahc, ahc->shared_data_dmat,
+diff -Nru a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
+--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c	2004-11-13 23:13:09 -08:00
++++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c	2004-11-13 23:13:09 -08:00
+@@ -5033,7 +5033,6 @@
+ ahc_linux_exit(void)
+ {
+ 	struct ahc_softc *ahc;
+-	u_long l;
+ 
+ 	/*
+ 	 * Shutdown DV threads before going into the SCSI mid-layer.
+@@ -5041,12 +5040,10 @@
+ 	 * kernel so that waiting for our DV threads to exit leads
+ 	 * to deadlock.
+ 	 */
+-	ahc_list_lock(&l);
+ 	TAILQ_FOREACH(ahc, &ahc_tailq, links) {
+ 
+ 		ahc_linux_kill_dv_thread(ahc);
+ 	}
+-	ahc_list_unlock(&l);
+ 
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+ 	/*
+diff -Nru a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
+--- a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c	2004-11-13 23:13:09 -08:00
++++ b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c	2004-11-13 23:13:09 -08:00
+@@ -160,12 +160,14 @@
+ 	if (ahc != NULL) {
+ 		u_long s;
+ 
++		TAILQ_REMOVE(&ahc_tailq, ahc, links);
++		ahc_list_unlock(&l);
+ 		ahc_lock(ahc, &s);
+ 		ahc_intr_enable(ahc, FALSE);
+ 		ahc_unlock(ahc, &s);
+ 		ahc_free(ahc);
+-	}
+-	ahc_list_unlock(&l);
++	} else
++		ahc_list_unlock(&l);
+ }
+ #endif /* !LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) */
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-delay_h-update.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-delay_h-update.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-delay_h-update.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,17 @@
+# origin: Debian (joshk)
+# cset: n/a (backport)
+# inclusion: part of 2.6.9 already
+# revision date: 2004-11-22
+
+--- x/include/linux/delay.h~	2004-11-23 19:21:52.000000000 +0000
++++ x/include/linux/delay.h	2004-11-23 19:22:55.000000000 +0000
+@@ -40,4 +40,9 @@
+ 
+ void msleep(unsigned int msecs);
+ 
++static inline void ssleep (unsigned int seconds)
++{
++	msleep(seconds * 1000);
++}
++
+ #endif /* defined(_LINUX_DELAY_H) */

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-pcitable.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-pcitable.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-pcitable.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,463 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Export proper PCI ID table to hotplug in aic7xxx/aic79xx
+## DP: Patch author: Andi Kleen <ak at suse.de>
+## DP: Upstream status: submitted (long ago, aic7xx maintaince is horrible)
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -u linux/drivers/scsi/aic7xxx/aic79xx_pci.c-o linux/drivers/scsi/aic7xxx/aic79xx_pci.c
+--- linux/drivers/scsi/aic7xxx/aic79xx_pci.c-o	2004-03-21 21:11:51.000000000 +0100
++++ linux/drivers/scsi/aic7xxx/aic79xx_pci.c	2004-06-21 15:15:28.000000000 +0200
+@@ -51,46 +51,7 @@
+ #include <dev/aic7xxx/aic79xx_inline.h>
+ #endif
+ 
+-static __inline uint64_t
+-ahd_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor)
+-{
+-	uint64_t id;
+-
+-	id = subvendor
+-	   | (subdevice << 16)
+-	   | ((uint64_t)vendor << 32)
+-	   | ((uint64_t)device << 48);
+-
+-	return (id);
+-}
+-
+-#define ID_ALL_MASK			0xFFFFFFFFFFFFFFFFull
+-#define ID_ALL_IROC_MASK		0xFFFFFF7FFFFFFFFFull
+-#define ID_DEV_VENDOR_MASK		0xFFFFFFFF00000000ull
+-#define ID_9005_GENERIC_MASK		0xFFF0FFFF00000000ull
+-#define ID_9005_GENERIC_IROC_MASK	0xFFF0FF7F00000000ull
+-
+-#define ID_AIC7901			0x800F9005FFFF9005ull
+-#define ID_AHA_29320A			0x8000900500609005ull
+-#define ID_AHA_29320ALP			0x8017900500449005ull
+-
+-#define ID_AIC7901A			0x801E9005FFFF9005ull
+-#define ID_AHA_29320			0x8012900500429005ull
+-#define ID_AHA_29320B			0x8013900500439005ull
+-#define ID_AHA_29320LP			0x8014900500449005ull
+-
+-#define ID_AIC7902			0x801F9005FFFF9005ull
+-#define ID_AIC7902_B			0x801D9005FFFF9005ull
+-#define ID_AHA_39320			0x8010900500409005ull
+-#define ID_AHA_39320_B			0x8015900500409005ull
+-#define ID_AHA_39320A			0x8016900500409005ull
+-#define ID_AHA_39320D			0x8011900500419005ull
+-#define ID_AHA_39320D_B			0x801C900500419005ull
+-#define ID_AHA_39320D_HP		0x8011900500AC0E11ull
+-#define ID_AHA_39320D_B_HP		0x801C900500AC0E11ull
+-#define ID_AIC7902_PCI_REV_A4		0x3
+-#define ID_AIC7902_PCI_REV_B0		0x10
+-#define SUBID_HP			0x0E11
++#include "aic79xx_pci.h"
+ 
+ #define DEVID_9005_TYPE(id) ((id) & 0xF)
+ #define		DEVID_9005_TYPE_HBA		0x0	/* Standard Card */
+diff -u linux/drivers/scsi/aic7xxx/aic79xx_osm_pci.c-o linux/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
+--- linux/drivers/scsi/aic7xxx/aic79xx_osm_pci.c-o	2004-03-21 21:11:51.000000000 +0100
++++ linux/drivers/scsi/aic7xxx/aic79xx_osm_pci.c	2004-06-21 18:23:15.000000000 +0200
+@@ -41,6 +41,7 @@
+ 
+ #include "aic79xx_osm.h"
+ #include "aic79xx_inline.h"
++#include "aic79xx_pci.h"
+ 
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
+ struct pci_device_id
+@@ -58,12 +59,34 @@
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ static void	ahd_linux_pci_dev_remove(struct pci_dev *pdev);
+ 
+-/* We do our own ID filtering.  So, grab all SCSI storage class devices. */
+ static struct pci_device_id ahd_linux_pci_id_table[] = {
+-	{
+-		0x9005, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
+-		PCI_CLASS_STORAGE_SCSI << 8, 0xFFFF00, 0
+-	},
++#define LINUXID(x,s) (unsigned)((((x) >> s) & 0xffff) ?: PCI_ANY_ID)
++#define ID(x) \
++	{ \
++		LINUXID(x,32), LINUXID(x,48), LINUXID(x,0), LINUXID(x,16), \
++		PCI_CLASS_STORAGE_SCSI << 8, 0xFFFF00, 0 \
++	}
++#define ID4(x,y) \
++	ID(x | ((y+0)<<48)), ID(x | ((y+1)<<48)), ID(x | ((y+2)<<48)), \
++	ID(x | ((y+3)<<48))
++#define ID16(x) ID4(x,0ULL), ID4(x,4ULL), ID4(x,8ULL), ID4(x,12ULL)
++	ID(ID_AHA_29320A),
++	ID(ID_AHA_29320ALP),
++	ID(ID_AHA_29320),
++	ID(ID_AHA_29320B),
++	ID(ID_AHA_29320LP),
++	ID(ID_AHA_39320),
++	ID(ID_AHA_39320_B),
++	ID(ID_AHA_39320A),
++	ID(ID_AHA_39320D),
++	ID(ID_AHA_39320D_HP),
++	ID(ID_AHA_39320D_B),
++	ID(ID_AHA_39320D_B_HP),
++	ID(ID_AHA_29320),
++	ID(ID_AHA_29320B),
++	ID(ID_AIC7901 & ID_DEV_VENDOR_MASK),
++	ID(ID_AIC7901A & ID_DEV_VENDOR_MASK),
++	ID16(ID_AIC7902),
+ 	{ 0 }
+ };
+ 
+diff -u /dev/null linux/drivers/scsi/aic7xxx/aic79xx_pci.h
+--- /dev/null	2004-02-18 23:32:57.000000000 +0100
++++ linux/drivers/scsi/aic7xxx/aic79xx_pci.h	2004-06-21 15:04:07.000000000 +0200
+@@ -0,0 +1,41 @@
++
++static __inline uint64_t
++ahd_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor)
++{
++	uint64_t id;
++
++	id = subvendor
++	   | (subdevice << 16)
++	   | ((uint64_t)vendor << 32)
++	   | ((uint64_t)device << 48);
++
++	return (id);
++}
++
++#define ID_ALL_MASK			0xFFFFFFFFFFFFFFFFull
++#define ID_ALL_IROC_MASK		0xFFFFFF7FFFFFFFFFull
++#define ID_DEV_VENDOR_MASK		0xFFFFFFFF00000000ull
++#define ID_9005_GENERIC_MASK		0xFFF0FFFF00000000ull
++#define ID_9005_GENERIC_IROC_MASK	0xFFF0FF7F00000000ull
++
++#define ID_AIC7901			0x800F9005FFFF9005ull
++#define ID_AHA_29320A			0x8000900500609005ull
++#define ID_AHA_29320ALP			0x8017900500449005ull
++
++#define ID_AIC7901A			0x801E9005FFFF9005ull
++#define ID_AHA_29320			0x8012900500429005ull
++#define ID_AHA_29320B			0x8013900500439005ull
++#define ID_AHA_29320LP			0x8014900500449005ull
++
++#define ID_AIC7902			0x801F9005FFFF9005ull
++#define ID_AIC7902_B			0x801D9005FFFF9005ull
++#define ID_AHA_39320			0x8010900500409005ull
++#define ID_AHA_39320_B			0x8015900500409005ull
++#define ID_AHA_39320A			0x8016900500409005ull
++#define ID_AHA_39320D			0x8011900500419005ull
++#define ID_AHA_39320D_B			0x801C900500419005ull
++#define ID_AHA_39320D_HP		0x8011900500AC0E11ull
++#define ID_AHA_39320D_B_HP		0x801C900500AC0E11ull
++#define ID_AIC7902_PCI_REV_A4		0x3
++#define ID_AIC7902_PCI_REV_B0		0x10
++#define SUBID_HP			0x0E11
+diff -u /dev/null linux/drivers/scsi/aic7xxx/aic7xxx_pci.h
+--- /dev/null	2004-02-18 23:32:57.000000000 +0100
++++ linux/drivers/scsi/aic7xxx/aic7xxx_pci.h	2004-06-21 15:05:13.000000000 +0200
+@@ -0,0 +1,92 @@
++
++static __inline uint64_t
++ahc_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor)
++{
++	uint64_t id;
++
++	id = subvendor
++	   | (subdevice << 16)
++	   | ((uint64_t)vendor << 32)
++	   | ((uint64_t)device << 48);
++
++	return (id);
++}
++
++#define ID_ALL_MASK			0xFFFFFFFFFFFFFFFFull
++#define ID_DEV_VENDOR_MASK		0xFFFFFFFF00000000ull
++#define ID_9005_GENERIC_MASK		0xFFF0FFFF00000000ull
++#define ID_9005_SISL_MASK		0x000FFFFF00000000ull
++#define ID_9005_SISL_ID			0x0005900500000000ull
++#define ID_AIC7850			0x5078900400000000ull
++#define ID_AHA_2902_04_10_15_20C_30C	0x5078900478509004ull
++#define ID_AIC7855			0x5578900400000000ull
++#define ID_AIC7859			0x3860900400000000ull
++#define ID_AHA_2930CU			0x3860900438699004ull
++#define ID_AIC7860			0x6078900400000000ull
++#define ID_AIC7860C			0x6078900478609004ull
++#define ID_AHA_1480A			0x6075900400000000ull
++#define ID_AHA_2940AU_0			0x6178900400000000ull
++#define ID_AHA_2940AU_1			0x6178900478619004ull
++#define ID_AHA_2940AU_CN		0x2178900478219004ull
++#define ID_AHA_2930C_VAR		0x6038900438689004ull
++
++#define ID_AIC7870			0x7078900400000000ull
++#define ID_AHA_2940			0x7178900400000000ull
++#define ID_AHA_3940			0x7278900400000000ull
++#define ID_AHA_398X			0x7378900400000000ull
++#define ID_AHA_2944			0x7478900400000000ull
++#define ID_AHA_3944			0x7578900400000000ull
++#define ID_AHA_4944			0x7678900400000000ull
++
++#define ID_AIC7880			0x8078900400000000ull
++#define ID_AIC7880_B			0x8078900478809004ull
++#define ID_AHA_2940U			0x8178900400000000ull
++#define ID_AHA_3940U			0x8278900400000000ull
++#define ID_AHA_2944U			0x8478900400000000ull
++#define ID_AHA_3944U			0x8578900400000000ull
++#define ID_AHA_398XU			0x8378900400000000ull
++#define ID_AHA_4944U			0x8678900400000000ull
++#define ID_AHA_2940UB			0x8178900478819004ull
++#define ID_AHA_2930U			0x8878900478889004ull
++#define ID_AHA_2940U_PRO		0x8778900478879004ull
++#define ID_AHA_2940U_CN			0x0078900478009004ull
++
++#define ID_AIC7895			0x7895900478959004ull
++#define ID_AIC7895_ARO			0x7890900478939004ull
++#define ID_AIC7895_ARO_MASK		0xFFF0FFFFFFFFFFFFull
++#define ID_AHA_2940U_DUAL		0x7895900478919004ull
++#define ID_AHA_3940AU			0x7895900478929004ull
++#define ID_AHA_3944AU			0x7895900478949004ull
++
++#define ID_AIC7890			0x001F9005000F9005ull
++#define ID_AIC7890_ARO			0x00139005000F9005ull
++#define ID_AAA_131U2			0x0013900500039005ull
++#define ID_AHA_2930U2			0x0011900501819005ull
++#define ID_AHA_2940U2B			0x00109005A1009005ull
++#define ID_AHA_2940U2_OEM		0x0010900521809005ull
++#define ID_AHA_2940U2			0x00109005A1809005ull
++#define ID_AHA_2950U2B			0x00109005E1009005ull
++
++#define ID_AIC7892			0x008F9005FFFF9005ull
++#define ID_AIC7892_ARO			0x00839005FFFF9005ull
++#define ID_AHA_29160			0x00809005E2A09005ull
++#define ID_AHA_29160_CPQ		0x00809005E2A00E11ull
++#define ID_AHA_29160N			0x0080900562A09005ull
++#define ID_AHA_29160C			0x0080900562209005ull
++#define ID_AHA_29160B			0x00809005E2209005ull
++#define ID_AHA_19160B			0x0081900562A19005ull
++
++#define ID_AIC7896			0x005F9005FFFF9005ull
++#define ID_AIC7896_ARO			0x00539005FFFF9005ull
++#define ID_AHA_3950U2B_0		0x00509005FFFF9005ull
++#define ID_AHA_3950U2B_1		0x00509005F5009005ull
++#define ID_AHA_3950U2D_0		0x00519005FFFF9005ull
++#define ID_AHA_3950U2D_1		0x00519005B5009005ull
++
++#define ID_AIC7899			0x00CF9005FFFF9005ull
++#define ID_AIC7899_ARO			0x00C39005FFFF9005ull
++#define ID_AHA_3960D			0x00C09005F6209005ull
++#define ID_AHA_3960D_CPQ		0x00C09005F6200E11ull
++
++#define ID_AIC7810			0x1078900400000000ull
++#define ID_AIC7815			0x7815900400000000ull
+diff -u linux/drivers/scsi/aic7xxx/aic7xxx_pci.c-o linux/drivers/scsi/aic7xxx/aic7xxx_pci.c
+--- linux/drivers/scsi/aic7xxx/aic7xxx_pci.c-o	2004-03-21 21:11:51.000000000 +0100
++++ linux/drivers/scsi/aic7xxx/aic7xxx_pci.c	2004-06-21 15:15:24.000000000 +0200
+@@ -54,101 +54,11 @@
+ #include <dev/aic7xxx/aic7xxx_93cx6.h>
+ #endif
+ 
++#include "aic7xxx_pci.h"
++
+ #define AHC_PCI_IOADDR	PCIR_MAPS	/* I/O Address */
+ #define AHC_PCI_MEMADDR	(PCIR_MAPS + 4)	/* Mem I/O Address */
+ 
+-static __inline uint64_t
+-ahc_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor)
+-{
+-	uint64_t id;
+-
+-	id = subvendor
+-	   | (subdevice << 16)
+-	   | ((uint64_t)vendor << 32)
+-	   | ((uint64_t)device << 48);
+-
+-	return (id);
+-}
+-
+-#define ID_ALL_MASK			0xFFFFFFFFFFFFFFFFull
+-#define ID_DEV_VENDOR_MASK		0xFFFFFFFF00000000ull
+-#define ID_9005_GENERIC_MASK		0xFFF0FFFF00000000ull
+-#define ID_9005_SISL_MASK		0x000FFFFF00000000ull
+-#define ID_9005_SISL_ID			0x0005900500000000ull
+-#define ID_AIC7850			0x5078900400000000ull
+-#define ID_AHA_2902_04_10_15_20C_30C	0x5078900478509004ull
+-#define ID_AIC7855			0x5578900400000000ull
+-#define ID_AIC7859			0x3860900400000000ull
+-#define ID_AHA_2930CU			0x3860900438699004ull
+-#define ID_AIC7860			0x6078900400000000ull
+-#define ID_AIC7860C			0x6078900478609004ull
+-#define ID_AHA_1480A			0x6075900400000000ull
+-#define ID_AHA_2940AU_0			0x6178900400000000ull
+-#define ID_AHA_2940AU_1			0x6178900478619004ull
+-#define ID_AHA_2940AU_CN		0x2178900478219004ull
+-#define ID_AHA_2930C_VAR		0x6038900438689004ull
+-
+-#define ID_AIC7870			0x7078900400000000ull
+-#define ID_AHA_2940			0x7178900400000000ull
+-#define ID_AHA_3940			0x7278900400000000ull
+-#define ID_AHA_398X			0x7378900400000000ull
+-#define ID_AHA_2944			0x7478900400000000ull
+-#define ID_AHA_3944			0x7578900400000000ull
+-#define ID_AHA_4944			0x7678900400000000ull
+-
+-#define ID_AIC7880			0x8078900400000000ull
+-#define ID_AIC7880_B			0x8078900478809004ull
+-#define ID_AHA_2940U			0x8178900400000000ull
+-#define ID_AHA_3940U			0x8278900400000000ull
+-#define ID_AHA_2944U			0x8478900400000000ull
+-#define ID_AHA_3944U			0x8578900400000000ull
+-#define ID_AHA_398XU			0x8378900400000000ull
+-#define ID_AHA_4944U			0x8678900400000000ull
+-#define ID_AHA_2940UB			0x8178900478819004ull
+-#define ID_AHA_2930U			0x8878900478889004ull
+-#define ID_AHA_2940U_PRO		0x8778900478879004ull
+-#define ID_AHA_2940U_CN			0x0078900478009004ull
+-
+-#define ID_AIC7895			0x7895900478959004ull
+-#define ID_AIC7895_ARO			0x7890900478939004ull
+-#define ID_AIC7895_ARO_MASK		0xFFF0FFFFFFFFFFFFull
+-#define ID_AHA_2940U_DUAL		0x7895900478919004ull
+-#define ID_AHA_3940AU			0x7895900478929004ull
+-#define ID_AHA_3944AU			0x7895900478949004ull
+-
+-#define ID_AIC7890			0x001F9005000F9005ull
+-#define ID_AIC7890_ARO			0x00139005000F9005ull
+-#define ID_AAA_131U2			0x0013900500039005ull
+-#define ID_AHA_2930U2			0x0011900501819005ull
+-#define ID_AHA_2940U2B			0x00109005A1009005ull
+-#define ID_AHA_2940U2_OEM		0x0010900521809005ull
+-#define ID_AHA_2940U2			0x00109005A1809005ull
+-#define ID_AHA_2950U2B			0x00109005E1009005ull
+-
+-#define ID_AIC7892			0x008F9005FFFF9005ull
+-#define ID_AIC7892_ARO			0x00839005FFFF9005ull
+-#define ID_AHA_29160			0x00809005E2A09005ull
+-#define ID_AHA_29160_CPQ		0x00809005E2A00E11ull
+-#define ID_AHA_29160N			0x0080900562A09005ull
+-#define ID_AHA_29160C			0x0080900562209005ull
+-#define ID_AHA_29160B			0x00809005E2209005ull
+-#define ID_AHA_19160B			0x0081900562A19005ull
+-
+-#define ID_AIC7896			0x005F9005FFFF9005ull
+-#define ID_AIC7896_ARO			0x00539005FFFF9005ull
+-#define ID_AHA_3950U2B_0		0x00509005FFFF9005ull
+-#define ID_AHA_3950U2B_1		0x00509005F5009005ull
+-#define ID_AHA_3950U2D_0		0x00519005FFFF9005ull
+-#define ID_AHA_3950U2D_1		0x00519005B5009005ull
+-
+-#define ID_AIC7899			0x00CF9005FFFF9005ull
+-#define ID_AIC7899_ARO			0x00C39005FFFF9005ull
+-#define ID_AHA_3960D			0x00C09005F6209005ull
+-#define ID_AHA_3960D_CPQ		0x00C09005F6200E11ull
+-
+-#define ID_AIC7810			0x1078900400000000ull
+-#define ID_AIC7815			0x7815900400000000ull
+-
+ #define DEVID_9005_TYPE(id) ((id) & 0xF)
+ #define		DEVID_9005_TYPE_HBA		0x0	/* Standard Card */
+ #define		DEVID_9005_TYPE_AAA		0x3	/* RAID Card */
+diff -u linux/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c-o linux/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
+--- linux/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c-o	2004-03-21 21:11:51.000000000 +0100
++++ linux/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c	2004-06-21 18:23:44.000000000 +0200
+@@ -40,6 +40,7 @@
+  */
+ 
+ #include "aic7xxx_osm.h"
++#include "aic7xxx_pci.h"
+ 
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
+ struct pci_device_id
+@@ -57,16 +58,77 @@
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ static void	ahc_linux_pci_dev_remove(struct pci_dev *pdev);
+ 
+-/* We do our own ID filtering.  So, grab all SCSI storage class devices. */
+ static struct pci_device_id ahc_linux_pci_id_table[] = {
+-	{
+-		0x9004, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
+-		PCI_CLASS_STORAGE_SCSI << 8, 0xFFFF00, 0
+-	},
+-	{
+-		0x9005, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
+-		PCI_CLASS_STORAGE_SCSI << 8, 0xFFFF00, 0
+-	},
++#define LINUXID(x,s) (unsigned)((((x) >> s) & 0xffff) ?: PCI_ANY_ID)
++#define ID(x) \
++	{ \
++		LINUXID(x,32), LINUXID(x,48), LINUXID(x,0), LINUXID(x,16), \
++		PCI_CLASS_STORAGE_SCSI << 8, 0xFFFF00, 0 \
++	}
++#define ID4(x,y) \
++	ID(x | ((y+0)<<48)), ID(x | ((y+1)<<48)), ID(x | ((y+2)<<48)), \
++	ID(x | ((y+3)<<48))
++#define ID16(x) ID4(x,0ULL), ID4(x,4ULL), ID4(x,8ULL), ID4(x,12ULL)
++	ID(ID_AHA_2902_04_10_15_20C_30C),
++	ID(ID_AHA_2930CU),
++	ID(ID_AHA_1480A & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_2940AU_0 & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_2940AU_CN & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_2930C_VAR & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_2940),
++	ID(ID_AHA_3940),
++	ID(ID_AHA_398X),
++	ID(ID_AHA_2944),
++	ID(ID_AHA_3944),
++	ID(ID_AHA_4944),
++	ID(ID_AHA_2940U & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_3940U & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_2944U & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_3944U & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_398XU & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_4944U & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_2930U & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_2940U_PRO & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_2940U_CN & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_2930U2),
++	ID(ID_AHA_2940U2B),
++	ID(ID_AHA_2940U2_OEM),
++	ID(ID_AHA_2940U2),
++	ID(ID_AHA_2950U2B),
++	ID(ID_AIC7890_ARO),
++	ID(ID_AAA_131U2),
++	ID(ID_AHA_29160),
++	ID(ID_AHA_29160_CPQ),
++	ID(ID_AHA_29160N),
++	ID(ID_AHA_29160C),
++	ID(ID_AHA_29160B),
++	ID(ID_AHA_19160B),
++	ID(ID_AIC7892_ARO),
++	ID(ID_AHA_2940U_DUAL),
++	ID(ID_AHA_3940AU),
++	ID(ID_AHA_3944AU),
++	ID(ID_AIC7895_ARO),
++	ID(ID_AHA_3950U2B_0),
++	ID(ID_AHA_3950U2B_1),
++	ID(ID_AHA_3950U2D_0),
++	ID(ID_AHA_3950U2D_1),
++	ID(ID_AIC7896_ARO),
++	ID(ID_AHA_3960D),
++	ID(ID_AHA_3960D_CPQ),
++	ID(ID_AIC7899_ARO),
++	ID(ID_AIC7850 & ID_DEV_VENDOR_MASK),
++	ID(ID_AIC7855 & ID_DEV_VENDOR_MASK),
++	ID(ID_AIC7859 & ID_DEV_VENDOR_MASK),
++	ID(ID_AIC7860 & ID_DEV_VENDOR_MASK),
++	ID(ID_AIC7870 & ID_DEV_VENDOR_MASK),
++	ID(ID_AIC7880 & ID_DEV_VENDOR_MASK),
++	ID16(ID_AIC7890),
++	ID16(ID_AIC7892),
++	ID(ID_AIC7895 & ID_DEV_VENDOR_MASK),
++	ID(ID_AIC7896),
++	ID(ID_AIC7899),
++	ID(ID_AIC7810 & ID_DEV_VENDOR_MASK),
++	ID(ID_AIC7815 & ID_DEV_VENDOR_MASK),
+ 	{ 0 }
+ };
+ 
+-
+To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
+the body of a message to majordomo at vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-update.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-update.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aic7xxx-update.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,2513 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Update aic7xxx/aic79xx to mainline as of 2004/10/26
+## DP: Patch author: various
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -pruN a/drivers/scsi/aic7xxx/Kconfig.aic79xx b/drivers/scsi/aic7xxx/Kconfig.aic79xx
+--- a/drivers/scsi/aic7xxx/Kconfig.aic79xx	2004-08-14 14:36:56.000000000 +0900
++++ b/drivers/scsi/aic7xxx/Kconfig.aic79xx	2004-11-02 16:31:10.000000000 +0900
+@@ -46,7 +46,7 @@ config AIC79XX_RESET_DELAY_MS
+ 
+ config AIC79XX_BUILD_FIRMWARE
+ 	bool "Build Adapter Firmware with Kernel Build"
+-	depends on SCSI_AIC79XX
++	depends on SCSI_AIC79XX && !PREVENT_FIRMWARE_BUILD
+ 	help
+ 	This option should only be enabled if you are modifying the firmware
+ 	source to the aic79xx driver and wish to have the generated firmware
+diff -pruN a/drivers/scsi/aic7xxx/Kconfig.aic7xxx b/drivers/scsi/aic7xxx/Kconfig.aic7xxx
+--- a/drivers/scsi/aic7xxx/Kconfig.aic7xxx	2004-08-14 14:36:45.000000000 +0900
++++ b/drivers/scsi/aic7xxx/Kconfig.aic7xxx	2004-11-02 16:31:10.000000000 +0900
+@@ -61,7 +61,7 @@ config AIC7XXX_PROBE_EISA_VL
+ 
+ config AIC7XXX_BUILD_FIRMWARE
+ 	bool "Build Adapter Firmware with Kernel Build"
+-	depends on SCSI_AIC7XXX
++	depends on SCSI_AIC7XXX && !PREVENT_FIRMWARE_BUILD
+ 	help
+ 	This option should only be enabled if you are modifying the firmware
+ 	source to the aic7xxx driver and wish to have the generated firmware
+diff -pruN a/drivers/scsi/aic7xxx/aic7770_osm.c b/drivers/scsi/aic7xxx/aic7770_osm.c
+--- a/drivers/scsi/aic7xxx/aic7770_osm.c	2004-08-14 14:37:25.000000000 +0900
++++ b/drivers/scsi/aic7xxx/aic7770_osm.c	2004-11-02 16:31:10.000000000 +0900
+@@ -185,10 +185,8 @@ aic7770_linux_config(struct aic7770_iden
+ 		return (ENOMEM);
+ 	strcpy(name, buf);
+ 	ahc = ahc_alloc(&aic7xxx_driver_template, name);
+-	if (ahc == NULL) {
+-		free(name, M_DEVBUF);
++	if (ahc == NULL)
+ 		return (ENOMEM);
+-	}
+ 	error = aic7770_config(ahc, entry, eisaBase);
+ 	if (error != 0) {
+ 		ahc->bsh.ioport = 0;
+diff -pruN a/drivers/scsi/aic7xxx/aic79xx.h b/drivers/scsi/aic7xxx/aic79xx.h
+--- a/drivers/scsi/aic7xxx/aic79xx.h	2004-08-14 14:37:25.000000000 +0900
++++ b/drivers/scsi/aic7xxx/aic79xx.h	2004-11-02 17:24:18.000000000 +0900
+@@ -549,7 +549,7 @@ struct ahd_dma64_seg {
+ 
+ struct map_node {
+ 	bus_dmamap_t		 dmamap;
+-	bus_addr_t		 physaddr;
++	dma_addr_t		 physaddr;
+ 	uint8_t			*vaddr;
+ 	SLIST_ENTRY(map_node)	 links;
+ };
+@@ -626,8 +626,8 @@ struct scb {
+ 	struct map_node	 	 *sense_map;
+ 	void			 *sg_list;
+ 	uint8_t			 *sense_data;
+-	bus_addr_t		  sg_list_busaddr;
+-	bus_addr_t		  sense_busaddr;
++	dma_addr_t		  sg_list_busaddr;
++	dma_addr_t		  sense_busaddr;
+ 	u_int			  sg_count;/* How full ahd_dma_seg is */
+ #define	AHD_MAX_LQ_CRC_ERRORS 5
+ 	u_int			  crc_retry_count;
+@@ -1198,7 +1198,7 @@ struct ahd_softc {
+ 	bus_dma_tag_t		  parent_dmat;
+ 	bus_dma_tag_t		  shared_data_dmat;
+ 	bus_dmamap_t		  shared_data_dmamap;
+-	bus_addr_t		  shared_data_busaddr;
++	dma_addr_t		  shared_data_busaddr;
+ 
+ 	/* Information saved through suspend/resume cycles */
+ 	struct ahd_suspend_state  suspend_state;
+diff -pruN a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c
+--- a/drivers/scsi/aic7xxx/aic79xx_core.c	2004-08-14 14:36:10.000000000 +0900
++++ b/drivers/scsi/aic7xxx/aic79xx_core.c	2004-11-02 16:31:10.000000000 +0900
+@@ -5270,7 +5270,6 @@ ahd_free(struct ahd_softc *ahd)
+ 	default:
+ 	case 5:
+ 		ahd_shutdown(ahd);
+-		TAILQ_REMOVE(&ahd_tailq, ahd, links);
+ 		/* FALLTHROUGH */
+ 	case 4:
+ 		ahd_dmamap_unload(ahd, ahd->shared_data_dmat,
+@@ -5493,9 +5492,9 @@ ahd_probe_scbs(struct ahd_softc *ahd) {
+ static void
+ ahd_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error) 
+ {
+-	bus_addr_t *baddr;
++	dma_addr_t *baddr;
+ 
+-	baddr = (bus_addr_t *)arg;
++	baddr = (dma_addr_t *)arg;
+ 	*baddr = segs->ds_addr;
+ }
+ 
+@@ -5926,9 +5925,9 @@ ahd_alloc_scbs(struct ahd_softc *ahd)
+ 	struct map_node *sense_map;
+ 	uint8_t		*segs;
+ 	uint8_t		*sense_data;
+-	bus_addr_t	 hscb_busaddr;
+-	bus_addr_t	 sg_busaddr;
+-	bus_addr_t	 sense_busaddr;
++	dma_addr_t	 hscb_busaddr;
++	dma_addr_t	 sg_busaddr;
++	dma_addr_t	 sense_busaddr;
+ 	int		 newcount;
+ 	int		 i;
+ 
+@@ -6161,7 +6160,7 @@ ahd_init(struct ahd_softc *ahd)
+ {
+ 	uint8_t		*base_vaddr;
+ 	uint8_t		*next_vaddr;
+-	bus_addr_t	 next_baddr;
++	dma_addr_t	 next_baddr;
+ 	size_t		 driver_data_size;
+ 	int		 i;
+ 	int		 error;
+@@ -6205,7 +6204,7 @@ ahd_init(struct ahd_softc *ahd)
+ 	if (ahd_dma_tag_create(ahd, ahd->parent_dmat, /*alignment*/1,
+ 			       /*boundary*/BUS_SPACE_MAXADDR_32BIT + 1,
+ 			       /*lowaddr*/ahd->flags & AHD_39BIT_ADDRESSING
+-					? (bus_addr_t)0x7FFFFFFFFFULL
++					? (dma_addr_t)0x7FFFFFFFFFULL
+ 					: BUS_SPACE_MAXADDR_32BIT,
+ 			       /*highaddr*/BUS_SPACE_MAXADDR,
+ 			       /*filter*/NULL, /*filterarg*/NULL,
+diff -pruN a/drivers/scsi/aic7xxx/aic79xx_inline.h b/drivers/scsi/aic7xxx/aic79xx_inline.h
+--- a/drivers/scsi/aic7xxx/aic79xx_inline.h	2004-08-14 14:36:57.000000000 +0900
++++ b/drivers/scsi/aic7xxx/aic79xx_inline.h	2004-11-02 16:31:10.000000000 +0900
+@@ -231,7 +231,7 @@ ahd_unpause(struct ahd_softc *ahd)
+ 
+ /*********************** Scatter Gather List Handling *************************/
+ static __inline void	*ahd_sg_setup(struct ahd_softc *ahd, struct scb *scb,
+-				      void *sgptr, bus_addr_t addr,
++				      void *sgptr, dma_addr_t addr,
+ 				      bus_size_t len, int last);
+ static __inline void	 ahd_setup_scb_common(struct ahd_softc *ahd,
+ 					      struct scb *scb);
+@@ -242,10 +242,10 @@ static __inline void	 ahd_setup_noxfer_s
+ 
+ static __inline void *
+ ahd_sg_setup(struct ahd_softc *ahd, struct scb *scb,
+-	     void *sgptr, bus_addr_t addr, bus_size_t len, int last)
++	     void *sgptr, dma_addr_t addr, bus_size_t len, int last)
+ {
+ 	scb->sg_count++;
+-	if (sizeof(bus_addr_t) > 4
++	if (sizeof(dma_addr_t) > 4
+ 	 && (ahd->flags & AHD_64BIT_ADDRESSING) != 0) {
+ 		struct ahd_dma64_seg *sg;
+ 
+@@ -361,7 +361,7 @@ ahd_sg_size(struct ahd_softc *ahd)
+ static __inline void *
+ ahd_sg_bus_to_virt(struct ahd_softc *ahd, struct scb *scb, uint32_t sg_busaddr)
+ {
+-	bus_addr_t sg_offset;
++	dma_addr_t sg_offset;
+ 
+ 	/* sg_list_phys points to entry 1, not 0 */
+ 	sg_offset = sg_busaddr - (scb->sg_list_busaddr - ahd_sg_size(ahd));
+@@ -371,7 +371,7 @@ ahd_sg_bus_to_virt(struct ahd_softc *ahd
+ static __inline uint32_t
+ ahd_sg_virt_to_bus(struct ahd_softc *ahd, struct scb *scb, void *sg)
+ {
+-	bus_addr_t sg_offset;
++	dma_addr_t sg_offset;
+ 
+ 	/* sg_list_phys points to entry 1, not 0 */
+ 	sg_offset = ((uint8_t *)sg - (uint8_t *)scb->sg_list)
+diff -pruN a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
+--- a/drivers/scsi/aic7xxx/aic79xx_osm.c	2004-11-02 17:49:59.000000000 +0900
++++ b/drivers/scsi/aic7xxx/aic79xx_osm.c	2004-11-02 16:31:10.000000000 +0900
+@@ -52,29 +52,20 @@
+  */
+ #include "aiclib.c"
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
+ #include <linux/init.h>		/* __setup */
+-#endif
+ 
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+ #include "sd.h"			/* For geometry detection */
+ #endif
+ 
+ #include <linux/mm.h>		/* For fetching system memory size */
++#include <linux/delay.h>	/* For ssleep/msleep */
+ 
+ /*
+  * Lock protecting manipulation of the ahd softc list.
+  */
+ spinlock_t ahd_list_spinlock;
+ 
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
+-struct proc_dir_entry proc_scsi_aic79xx = {
+-	PROC_SCSI_AIC79XX, 7, "aic79xx",
+-	S_IFDIR | S_IRUGO | S_IXUGO, 2,
+-	0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL
+-};
+-#endif
+-
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+ /* For dynamic sglist size calculation. */
+ u_int ahd_linux_nseg;
+@@ -415,7 +406,6 @@ uint32_t aic79xx_periodic_otag;
+ /*
+  * Module information and settable options.
+  */
+-#ifdef MODULE
+ static char *aic79xx = NULL;
+ /*
+  * Just in case someone uses commas to separate items on the insmod
+@@ -426,9 +416,8 @@ static char dummy_buffer[60] = "Please d
+ 
+ MODULE_AUTHOR("Maintainer: Justin T. Gibbs <gibbs at scsiguy.com>");
+ MODULE_DESCRIPTION("Adaptec Aic790X U320 SCSI Host Bus Adapter driver");
+-#ifdef MODULE_LICENSE
+ MODULE_LICENSE("Dual BSD/GPL");
+-#endif
++MODULE_VERSION(AIC79XX_DRIVER_VERSION);
+ MODULE_PARM(aic79xx, "s");
+ MODULE_PARM_DESC(aic79xx,
+ "period delimited, options string.\n"
+@@ -463,7 +452,6 @@ MODULE_PARM_DESC(aic79xx,
+ "		Change Read Streaming for Controller's 2 and 3\n"
+ "\n"
+ "	options aic79xx 'aic79xx=rd_strm:{..0xFFF0.0xC0F0}'");
+-#endif
+ 
+ static void ahd_linux_handle_scsi_status(struct ahd_softc *,
+ 					 struct ahd_linux_device *,
+@@ -513,9 +501,6 @@ static void ahd_linux_dv_su(struct ahd_s
+ 			    struct scsi_cmnd *cmd,
+ 			    struct ahd_devinfo *devinfo,
+ 			    struct ahd_linux_target *targ);
+-static __inline int
+-	   ahd_linux_dv_fallback(struct ahd_softc *ahd,
+-				 struct ahd_devinfo *devinfo);
+ static int ahd_linux_fallback(struct ahd_softc *ahd,
+ 			      struct ahd_devinfo *devinfo);
+ static __inline int ahd_linux_dv_fallback(struct ahd_softc *ahd,
+@@ -566,7 +551,7 @@ static __inline void ahd_linux_unmap_scb
+ 
+ static __inline int ahd_linux_map_seg(struct ahd_softc *ahd, struct scb *scb,
+ 		 		      struct ahd_dma_seg *sg,
+-				      bus_addr_t addr, bus_size_t len);
++				      dma_addr_t addr, bus_size_t len);
+ 
+ static __inline void
+ ahd_schedule_completeq(struct ahd_softc *ahd)
+@@ -584,31 +569,20 @@ ahd_schedule_completeq(struct ahd_softc 
+ static __inline void
+ ahd_schedule_runq(struct ahd_softc *ahd)
+ {
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 	tasklet_schedule(&ahd->platform_data->runq_tasklet);
+-#else
+-	/*
+-	 * Tasklets are not available, so run inline.
+-	 */
+-	ahd_runq_tasklet((unsigned long)ahd);
+-#endif
+ }
+ 
+ static __inline
+ void ahd_setup_runq_tasklet(struct ahd_softc *ahd)
+ {
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 	tasklet_init(&ahd->platform_data->runq_tasklet, ahd_runq_tasklet,
+ 		     (unsigned long)ahd);
+-#endif
+ }
+ 
+ static __inline void
+ ahd_teardown_runq_tasklet(struct ahd_softc *ahd)
+ {
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 	tasklet_kill(&ahd->platform_data->runq_tasklet);
+-#endif
+ }
+ 
+ static __inline struct ahd_linux_device*
+@@ -739,7 +713,7 @@ ahd_linux_unmap_scb(struct ahd_softc *ah
+ 
+ static __inline int
+ ahd_linux_map_seg(struct ahd_softc *ahd, struct scb *scb,
+-		  struct ahd_dma_seg *sg, bus_addr_t addr, bus_size_t len)
++		  struct ahd_dma_seg *sg, dma_addr_t addr, bus_size_t len)
+ {
+ 	int	 consumed;
+ 
+@@ -751,7 +725,7 @@ ahd_linux_map_seg(struct ahd_softc *ahd,
+ 	sg->addr = ahd_htole32(addr & 0xFFFFFFFF);
+ 	scb->platform_data->xfer_len += len;
+ 
+-	if (sizeof(bus_addr_t) > 4
++	if (sizeof(dma_addr_t) > 4
+ 	 && (ahd->flags & AHD_39BIT_ADDRESSING) != 0)
+ 		len |= (addr >> 8) & AHD_SG_HIGH_ADDR_MASK;
+ 
+@@ -856,6 +830,7 @@ ahd_linux_detect(Scsi_Host_Template *tem
+ {
+ 	struct	ahd_softc *ahd;
+ 	int     found;
++	int	error = 0;
+ 
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+ 	/*
+@@ -894,11 +869,7 @@ ahd_linux_detect(Scsi_Host_Template *tem
+ "aic79xx: insmod or else it might trash certain memory areas.\n");
+ #endif
+ 
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,0)
+ 	template->proc_name = "aic79xx";
+-#else
+-	template->proc_dir = &proc_scsi_aic79xx;
+-#endif
+ 
+ 	/*
+ 	 * Initialize our softc list lock prior to
+@@ -907,7 +878,9 @@ ahd_linux_detect(Scsi_Host_Template *tem
+ 	ahd_list_lockinit();
+ 
+ #ifdef CONFIG_PCI
+-	ahd_linux_pci_init();
++	error = ahd_linux_pci_init();
++	if (error)
++		return error;
+ #endif
+ 
+ 	/*
+@@ -924,7 +897,7 @@ ahd_linux_detect(Scsi_Host_Template *tem
+ 	spin_lock_irq(&io_request_lock);
+ #endif
+ 	aic79xx_detect_complete++;
+-	return (found);
++	return 0;
+ }
+ 
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+@@ -1565,6 +1538,8 @@ ahd_linux_dev_reset(Scsi_Cmnd *cmd)
+ 
+ 	ahd = *(struct ahd_softc **)cmd->device->host->hostdata;
+ 	recovery_cmd = malloc(sizeof(struct scsi_cmnd), M_DEVBUF, M_WAITOK);
++	if (!recovery_cmd)
++		return (FAILED);
+ 	memset(recovery_cmd, 0, sizeof(struct scsi_cmnd));
+ 	recovery_cmd->device = cmd->device;
+ 	recovery_cmd->scsi_done = ahd_linux_dev_reset_complete;
+@@ -1580,10 +1555,12 @@ ahd_linux_dev_reset(Scsi_Cmnd *cmd)
+ 				   cmd->device->lun, /*alloc*/FALSE);
+ 	if (dev == NULL) {
+ 		ahd_midlayer_entrypoint_unlock(ahd, &s);
++		kfree(recovery_cmd);
+ 		return (FAILED);
+ 	}
+ 	if ((scb = ahd_get_scb(ahd, AHD_NEVER_COL_IDX)) == NULL) {
+ 		ahd_midlayer_entrypoint_unlock(ahd, &s);
++		kfree(recovery_cmd);
+ 		return (FAILED);
+ 	}
+ 	tinfo = ahd_fetch_transinfo(ahd, 'A', ahd->our_id,
+@@ -1699,35 +1676,27 @@ ahd_runq_tasklet(unsigned long data)
+ {
+ 	struct ahd_softc* ahd;
+ 	struct ahd_linux_device *dev;
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 	u_long flags;
+-#endif
+ 
+ 	ahd = (struct ahd_softc *)data;
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 	ahd_lock(ahd, &flags);
+-#endif
+ 	while ((dev = ahd_linux_next_device_to_run(ahd)) != NULL) {
+ 	
+ 		TAILQ_REMOVE(&ahd->platform_data->device_runq, dev, links);
+ 		dev->flags &= ~AHD_DEV_ON_RUN_LIST;
+ 		ahd_linux_check_device_queue(ahd, dev);
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 		/* Yeild to our interrupt handler */
+ 		ahd_unlock(ahd, &flags);
+ 		ahd_lock(ahd, &flags);
+-#endif
+ 	}
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 	ahd_unlock(ahd, &flags);
+-#endif
+ }
+ 
+ /******************************** Bus DMA *************************************/
+ int
+ ahd_dma_tag_create(struct ahd_softc *ahd, bus_dma_tag_t parent,
+ 		   bus_size_t alignment, bus_size_t boundary,
+-		   bus_addr_t lowaddr, bus_addr_t highaddr,
++		   dma_addr_t lowaddr, dma_addr_t highaddr,
+ 		   bus_dma_filter_t *filter, void *filterarg,
+ 		   bus_size_t maxsize, int nsegments,
+ 		   bus_size_t maxsegsz, int flags, bus_dma_tag_t *ret_tag)
+@@ -1764,7 +1733,6 @@ ahd_dmamem_alloc(struct ahd_softc *ahd, 
+ {
+ 	bus_dmamap_t map;
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
+ 	map = malloc(sizeof(*map), M_DEVBUF, M_NOWAIT);
+ 	if (map == NULL)
+ 		return (ENOMEM);
+@@ -1776,28 +1744,20 @@ ahd_dmamem_alloc(struct ahd_softc *ahd, 
+ 	 * our dma mask when doing allocations.
+ 	 */
+ 	if (ahd->dev_softc != NULL)
+-		if (ahd_pci_set_dma_mask(ahd->dev_softc, 0xFFFFFFFF)) {
++		if (pci_set_dma_mask(ahd->dev_softc, 0xFFFFFFFF)) {
+ 			printk(KERN_WARNING "aic79xx: No suitable DMA available.\n");
++			kfree(map);
+ 			return (ENODEV);
+ 		}
+ 	*vaddr = pci_alloc_consistent(ahd->dev_softc,
+ 				      dmat->maxsize, &map->bus_addr);
+ 	if (ahd->dev_softc != NULL)
+-		if (ahd_pci_set_dma_mask(ahd->dev_softc,
++		if (pci_set_dma_mask(ahd->dev_softc,
+ 				     ahd->platform_data->hw_dma_mask)) {
+ 			printk(KERN_WARNING "aic79xx: No suitable DMA available.\n");
++			kfree(map);
+ 			return (ENODEV);
+ 		}
+-#else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) */
+-	/*
+-	 * At least in 2.2.14, malloc is a slab allocator so all
+-	 * allocations are aligned.  We assume for these kernel versions
+-	 * that all allocations will be bellow 4Gig, physically contiguous,
+-	 * and accessible via DMA by the controller.
+-	 */
+-	map = NULL; /* No additional information to store */
+-	*vaddr = malloc(dmat->maxsize, M_DEVBUF, M_NOWAIT);
+-#endif
+ 	if (*vaddr == NULL)
+ 		return (ENOMEM);
+ 	*mapp = map;
+@@ -1808,12 +1768,8 @@ void
+ ahd_dmamem_free(struct ahd_softc *ahd, bus_dma_tag_t dmat,
+ 		void* vaddr, bus_dmamap_t map)
+ {
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
+ 	pci_free_consistent(ahd->dev_softc, dmat->maxsize,
+ 			    vaddr, map->bus_addr);
+-#else
+-	free(vaddr, M_DEVBUF);
+-#endif
+ }
+ 
+ int
+@@ -1827,12 +1783,7 @@ ahd_dmamap_load(struct ahd_softc *ahd, b
+ 	 */
+ 	bus_dma_segment_t stack_sg;
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
+ 	stack_sg.ds_addr = map->bus_addr;
+-#else
+-#define VIRT_TO_BUS(a) (uint32_t)virt_to_bus((void *)(a))
+-	stack_sg.ds_addr = VIRT_TO_BUS(buf);
+-#endif
+ 	stack_sg.ds_len = dmat->maxsize;
+ 	cb(cb_arg, &stack_sg, /*nseg*/1, /*error*/0);
+ 	return (0);
+@@ -2064,9 +2015,7 @@ aic79xx_setup(char *s)
+ 	return 1;
+ }
+ 
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,0)
+ __setup("aic79xx=", aic79xx_setup);
+-#endif
+ 
+ uint32_t aic79xx_verbose;
+ 
+@@ -2109,8 +2058,7 @@ ahd_linux_register_host(struct ahd_softc
+ 		ahd_set_name(ahd, new_name);
+ 	}
+ 	host->unique_id = ahd->unit;
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,4) && \
+-    LINUX_VERSION_CODE  < KERNEL_VERSION(2,5,0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+ 	scsi_set_pci_device(host, ahd->dev_softc);
+ #endif
+ 	ahd_linux_setup_user_rd_strm_settings(ahd);
+@@ -2262,15 +2210,9 @@ ahd_platform_alloc(struct ahd_softc *ahd
+ 	ahd->platform_data->completeq_timer.data = (u_long)ahd;
+ 	ahd->platform_data->completeq_timer.function =
+ 	    (ahd_linux_callback_t *)ahd_linux_thread_run_complete_queue;
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
+ 	init_MUTEX_LOCKED(&ahd->platform_data->eh_sem);
+ 	init_MUTEX_LOCKED(&ahd->platform_data->dv_sem);
+ 	init_MUTEX_LOCKED(&ahd->platform_data->dv_cmd_sem);
+-#else
+-	ahd->platform_data->eh_sem = MUTEX_LOCKED;
+-	ahd->platform_data->dv_sem = MUTEX_LOCKED;
+-	ahd->platform_data->dv_cmd_sem = MUTEX_LOCKED;
+-#endif
+ 	ahd_setup_runq_tasklet(ahd);
+ 	ahd->seltime = (aic79xx_seltime & 0x3) << 4;
+ 	return (0);
+@@ -2325,18 +2267,11 @@ ahd_platform_free(struct ahd_softc *ahd)
+ 			release_region(ahd->bshs[1].ioport, 256);
+ 		if (ahd->tags[0] == BUS_SPACE_MEMIO
+ 		 && ahd->bshs[0].maddr != NULL) {
+-			u_long base_addr;
+-
+-			base_addr = (u_long)ahd->bshs[0].maddr;
+-			base_addr &= PAGE_MASK;
+-			iounmap((void *)base_addr);
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
++			iounmap(ahd->bshs[0].maddr);
+ 			release_mem_region(ahd->platform_data->mem_busaddr,
+ 					   0x1000);
+-#endif
+ 		}
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) && \
+-    LINUX_VERSION_CODE  < KERNEL_VERSION(2,5,0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+     		/*
+ 		 * In 2.4 we detach from the scsi midlayer before the PCI
+ 		 * layer invokes our remove callback.  No per-instance
+@@ -2915,6 +2850,19 @@ out:
+ 	ahd_unlock(ahd, &s);
+ }
+ 
++static __inline int
++ahd_linux_dv_fallback(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
++{
++	u_long s;
++	int retval;
++
++	ahd_lock(ahd, &s);
++	retval = ahd_linux_fallback(ahd, devinfo);
++	ahd_unlock(ahd, &s);
++
++	return (retval);
++}
++
+ static void
+ ahd_linux_dv_transition(struct ahd_softc *ahd, struct scsi_cmnd *cmd,
+ 			struct ahd_devinfo *devinfo,
+@@ -3323,7 +3271,7 @@ ahd_linux_dv_transition(struct ahd_softc
+ 			}
+ 			if (targ->dv_state_retry <= 10) {
+ 				if ((status & (SSQ_DELAY_RANDOM|SSQ_DELAY))!= 0)
+-					scsi_sleep(ahd->our_id*HZ/10);
++					msleep(ahd->our_id*1000/10);
+ 				break;
+ 			}
+ #ifdef AHD_DEBUG
+@@ -3551,19 +3499,6 @@ ahd_linux_dv_su(struct ahd_softc *ahd, s
+ 	cmd->cmnd[4] = le | SSS_START;
+ }
+ 
+-static __inline int
+-ahd_linux_dv_fallback(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
+-{
+-	u_long s;
+-	int retval;
+-
+-	ahd_lock(ahd, &s);
+-	retval = ahd_linux_fallback(ahd, devinfo);
+-	ahd_unlock(ahd, &s);
+-
+-	return (retval);
+-}
+-
+ static int
+ ahd_linux_fallback(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
+ {
+@@ -4126,7 +4061,7 @@ ahd_linux_run_device_queue(struct ahd_so
+ 					  cmd->use_sg, dir);
+ 			scb->platform_data->xfer_len = 0;
+ 			for (sg = scb->sg_list; nseg > 0; nseg--, cur_seg++) {
+-				bus_addr_t addr;
++				dma_addr_t addr;
+ 				bus_size_t len;
+ 
+ 				addr = sg_dma_address(cur_seg);
+@@ -4137,7 +4072,7 @@ ahd_linux_run_device_queue(struct ahd_so
+ 			}
+ 		} else if (cmd->request_bufflen != 0) {
+ 			void *sg;
+-			bus_addr_t addr;
++			dma_addr_t addr;
+ 			int dir;
+ 
+ 			sg = scb->sg_list;
+@@ -4371,7 +4306,7 @@ ahd_send_async(struct ahd_softc *ahd, ch
+ 		WARN_ON(lun != CAM_LUN_WILDCARD);
+ 		scsi_report_device_reset(ahd->platform_data->host,
+ 					 channel - 'A', target);
+-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
++#else
+ 		Scsi_Device *scsi_dev;
+ 
+ 		/*
+@@ -4392,12 +4327,10 @@ ahd_send_async(struct ahd_softc *ahd, ch
+ 		break;
+ 	}
+         case AC_BUS_RESET:
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
+ 		if (ahd->platform_data->host != NULL) {
+ 			scsi_report_bus_reset(ahd->platform_data->host,
+ 					      channel - 'A');
+ 		}
+-#endif
+                 break;
+         default:
+                 panic("ahd_send_async: Unexpected async event");
+@@ -5078,7 +5011,7 @@ static int __init
+ ahd_linux_init(void)
+ {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+-       return (ahd_linux_detect(&aic79xx_driver_template) ? 0 : -ENODEV);
++	return ahd_linux_detect(&aic79xx_driver_template);
+ #else
+ 	scsi_register_module(MODULE_SCSI_HA, &aic79xx_driver_template);
+ 	if (aic79xx_driver_template.present == 0) {
+@@ -5095,7 +5028,6 @@ static void __exit
+ ahd_linux_exit(void)
+ {
+ 	struct ahd_softc *ahd;
+-	u_long l;
+ 
+ 	/*
+ 	 * Shutdown DV threads before going into the SCSI mid-layer.
+@@ -5103,12 +5035,11 @@ ahd_linux_exit(void)
+ 	 * kernel so that waiting for our DV threads to exit leads
+ 	 * to deadlock.
+ 	 */
+-	ahd_list_lock(&l);
+ 	TAILQ_FOREACH(ahd, &ahd_tailq, links) {
+ 
+ 		ahd_linux_kill_dv_thread(ahd);
+ 	}
+-	ahd_list_unlock(&l);
++
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+ 	/*
+ 	 * In 2.4 we have to unregister from the PCI core _after_
+diff -pruN a/drivers/scsi/aic7xxx/aic79xx_osm.h b/drivers/scsi/aic7xxx/aic79xx_osm.h
+--- a/drivers/scsi/aic7xxx/aic79xx_osm.h	2004-08-14 14:37:15.000000000 +0900
++++ b/drivers/scsi/aic7xxx/aic79xx_osm.h	2004-11-02 17:24:09.000000000 +0900
+@@ -53,17 +53,9 @@
+ #include <asm/byteorder.h>
+ #include <asm/io.h>
+ 
+-#ifndef KERNEL_VERSION
+-#define KERNEL_VERSION(x,y,z) (((x)<<16)+((y)<<8)+(z))
+-#endif
+-
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ #include <linux/interrupt.h> /* For tasklet support. */
+ #include <linux/config.h>
+ #include <linux/slab.h>
+-#else
+-#include <linux/malloc.h>
+-#endif
+ 
+ /* Core SCSI definitions */
+ #define AIC_LIB_PREFIX ahd
+@@ -144,11 +136,6 @@ extern Scsi_Host_Template aic79xx_driver
+ 
+ /***************************** Bus Space/DMA **********************************/
+ 
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,2,17)
+-typedef dma_addr_t bus_addr_t;
+-#else
+-typedef uint32_t bus_addr_t;
+-#endif
+ typedef uint32_t bus_size_t;
+ 
+ typedef enum {
+@@ -158,12 +145,12 @@ typedef enum {
+ 
+ typedef union {
+ 	u_long		  ioport;
+-	volatile uint8_t *maddr;
++	volatile uint8_t  *maddr;
+ } bus_space_handle_t;
+ 
+ typedef struct bus_dma_segment
+ {
+-	bus_addr_t	ds_addr;
++	dma_addr_t	ds_addr;
+ 	bus_size_t	ds_len;
+ } bus_dma_segment_t;
+ 
+@@ -177,11 +164,11 @@ typedef struct ahd_linux_dma_tag* bus_dm
+ 
+ struct ahd_linux_dmamap
+ {
+-	bus_addr_t	bus_addr;
++	dma_addr_t	bus_addr;
+ };
+ typedef struct ahd_linux_dmamap* bus_dmamap_t;
+ 
+-typedef int bus_dma_filter_t(void*, bus_addr_t);
++typedef int bus_dma_filter_t(void*, dma_addr_t);
+ typedef void bus_dmamap_callback_t(void *, bus_dma_segment_t *, int, int);
+ 
+ #define BUS_DMA_WAITOK		0x0
+@@ -198,7 +185,7 @@ typedef void bus_dmamap_callback_t(void 
+ 
+ int	ahd_dma_tag_create(struct ahd_softc *, bus_dma_tag_t /*parent*/,
+ 			   bus_size_t /*alignment*/, bus_size_t /*boundary*/,
+-			   bus_addr_t /*lowaddr*/, bus_addr_t /*highaddr*/,
++			   dma_addr_t /*lowaddr*/, dma_addr_t /*highaddr*/,
+ 			   bus_dma_filter_t*/*filter*/, void */*filterarg*/,
+ 			   bus_size_t /*maxsize*/, int /*nsegments*/,
+ 			   bus_size_t /*maxsegsz*/, int /*flags*/,
+@@ -280,11 +267,7 @@ ahd_scb_timer_reset(struct scb *scb, u_i
+ }
+ 
+ /***************************** SMP support ************************************/
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,17)
+ #include <linux/spinlock.h>
+-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
+-#include <linux/smp.h>
+-#endif
+ 
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) || defined(SCSI_HAS_HOST_LOCK))
+ #define AHD_SCSI_HAS_HOST_LOCK 1
+@@ -509,11 +492,8 @@ typedef enum {
+ 
+ struct scb_platform_data {
+ 	struct ahd_linux_device	*dev;
+-	bus_addr_t		 buf_busaddr;
++	dma_addr_t		 buf_busaddr;
+ 	uint32_t		 xfer_len;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
+-	uint32_t		 resid;		/* Transfer residual */
+-#endif
+ 	uint32_t		 sense_resid;	/* Auto-Sense residual */
+ 	ahd_linux_scb_flags	 flags;
+ };
+@@ -543,9 +523,7 @@ struct ahd_platform_data {
+ 	struct ahd_completeq	 completeq;
+ 
+ 	spinlock_t		 spin_lock;
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 	struct tasklet_struct	 runq_tasklet;
+-#endif
+ 	u_int			 qfrozen;
+ 	pid_t			 dv_pid;
+ 	struct timer_list	 completeq_timer;
+@@ -562,7 +540,7 @@ struct ahd_platform_data {
+ 	uint32_t		 irq;		/* IRQ for this adapter */
+ 	uint32_t		 bios_address;
+ 	uint32_t		 mem_busaddr;	/* Mem Base Addr */
+-	bus_addr_t		 hw_dma_mask;
++	dma_addr_t		 hw_dma_mask;
+ 	ahd_linux_softc_flags	 flags;
+ };
+ 
+@@ -859,9 +837,7 @@ ahd_list_unlock(unsigned long *flags)
+ #define PCIXM_STATUS_MAXCRDS	0x1C00	/* Maximum Cumulative Read Size */
+ #define PCIXM_STATUS_RCVDSCEM	0x2000	/* Received a Split Comp w/Error msg */
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ extern struct pci_driver aic79xx_pci_driver;
+-#endif
+ 
+ typedef enum
+ {
+@@ -965,25 +941,6 @@ ahd_flush_device_writes(struct ahd_softc
+ 	ahd_inb(ahd, INTSTAT);
+ }
+ 
+-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,3,0)
+-#define pci_map_sg(pdev, sg_list, nseg, direction) (nseg)
+-#define pci_unmap_sg(pdev, sg_list, nseg, direction)
+-#define sg_dma_address(sg) (VIRT_TO_BUS((sg)->address))
+-#define sg_dma_len(sg) ((sg)->length)
+-#define pci_map_single(pdev, buffer, bufflen, direction) \
+-	(VIRT_TO_BUS(buffer))
+-#define pci_unmap_single(pdev, buffer, buflen, direction)
+-#endif
+-
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,3)
+-#define ahd_pci_set_dma_mask pci_set_dma_mask
+-#else
+-/*
+- * Always "return" 0 for success.
+- */
+-#define ahd_pci_set_dma_mask(dev_softc, mask)	\
+-	(((dev_softc)->dma_mask = mask) && 0)
+-#endif
+ /**************************** Proc FS Support *********************************/
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+ int	ahd_linux_proc_info(char *, char **, off_t, int, int, int);
+@@ -1091,35 +1048,13 @@ u_long ahd_get_transfer_length(struct sc
+ static __inline
+ int ahd_get_transfer_dir(struct scb *scb)
+ {
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,40)
+ 	return (scb->io_ctx->sc_data_direction);
+-#else
+-	if (scb->io_ctx->bufflen == 0)
+-		return (CAM_DIR_NONE);
+-
+-	switch(scb->io_ctx->cmnd[0]) {
+-	case 0x08:  /* READ(6)  */
+-	case 0x28:  /* READ(10) */
+-	case 0xA8:  /* READ(12) */
+-		return (CAM_DIR_IN);
+-        case 0x0A:  /* WRITE(6)  */
+-        case 0x2A:  /* WRITE(10) */
+-        case 0xAA:  /* WRITE(12) */
+-		return (CAM_DIR_OUT);
+-        default:
+-		return (CAM_DIR_NONE);
+-        }
+-#endif
+ }
+ 
+ static __inline
+ void ahd_set_residual(struct scb *scb, u_long resid)
+ {
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
+ 	scb->io_ctx->resid = resid;
+-#else
+-	scb->platform_data->resid = resid;
+-#endif
+ }
+ 
+ static __inline
+@@ -1131,11 +1066,7 @@ void ahd_set_sense_residual(struct scb *
+ static __inline
+ u_long ahd_get_residual(struct scb *scb)
+ {
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
+ 	return (scb->io_ctx->resid);
+-#else
+-	return (scb->platform_data->resid);
+-#endif
+ }
+ 
+ static __inline
+@@ -1212,4 +1143,5 @@ void	ahd_platform_dump_card_state(struct
+ #endif
+ #define bootverbose aic79xx_verbose
+ extern uint32_t aic79xx_verbose;
++
+ #endif /* _AIC79XX_LINUX_H_ */
+diff -pruN a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
+--- a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c	2004-11-02 17:49:59.000000000 +0900
++++ b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c	2004-11-02 17:32:14.000000000 +0900
+@@ -41,12 +41,7 @@
+ 
+ #include "aic79xx_osm.h"
+ #include "aic79xx_inline.h"
+-
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
+-struct pci_device_id
+-{
+-};
+-#endif
++#include "aic79xx_pci.h"
+ 
+ static int	ahd_linux_pci_dev_probe(struct pci_dev *pdev,
+ 					const struct pci_device_id *ent);
+@@ -55,15 +50,33 @@ static int	ahd_linux_pci_reserve_io_regi
+ static int	ahd_linux_pci_reserve_mem_region(struct ahd_softc *ahd,
+ 						 u_long *bus_addr,
+ 						 uint8_t **maddr);
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ static void	ahd_linux_pci_dev_remove(struct pci_dev *pdev);
+ 
+-/* We do our own ID filtering.  So, grab all SCSI storage class devices. */
++/* Define the macro locally since it's different for different class of chips.
++ */
++#define ID(x)            \
++	ID2C(x),         \
++	ID2C(IDIROC(x))
++
+ static struct pci_device_id ahd_linux_pci_id_table[] = {
+-	{
+-		0x9005, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
+-		PCI_CLASS_STORAGE_SCSI << 8, 0xFFFF00, 0
+-	},
++	/* aic7901 based controllers */
++	ID(ID_AHA_29320A),
++	ID(ID_AHA_29320ALP),
++	/* aic7902 based controllers */
++	ID(ID_AHA_29320),
++	ID(ID_AHA_29320B),
++	ID(ID_AHA_29320LP),
++	ID(ID_AHA_39320),
++	ID(ID_AHA_39320_B),
++	ID(ID_AHA_39320A),
++	ID(ID_AHA_39320D),
++	ID(ID_AHA_39320D_HP),
++	ID(ID_AHA_39320D_B),
++	ID(ID_AHA_39320D_B_HP),
++	/* Generic chip probes for devices we don't know exactly. */
++	ID16(ID_AIC7901 & ID_9005_GENERIC_MASK),
++	ID(ID_AIC7901A & ID_DEV_VENDOR_MASK),
++	ID16(ID_AIC7902 & ID_9005_GENERIC_MASK),
+ 	{ 0 }
+ };
+ 
+@@ -92,14 +105,15 @@ ahd_linux_pci_dev_remove(struct pci_dev 
+ 	if (ahd != NULL) {
+ 		u_long s;
+ 
++		TAILQ_REMOVE(&ahd_tailq, ahd, links);
++		ahd_list_unlock(&l);
+ 		ahd_lock(ahd, &s);
+ 		ahd_intr_enable(ahd, FALSE);
+ 		ahd_unlock(ahd, &s);
+ 		ahd_free(ahd);
+-	}
+-	ahd_list_unlock(&l);
++	} else
++		ahd_list_unlock(&l);
+ }
+-#endif /* !LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) */
+ 
+ static int
+ ahd_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+@@ -148,42 +162,39 @@ ahd_linux_pci_dev_probe(struct pci_dev *
+ 	ahd = ahd_alloc(NULL, name);
+ 	if (ahd == NULL)
+ 		return (-ENOMEM);
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 	if (pci_enable_device(pdev)) {
+ 		ahd_free(ahd);
+ 		return (-ENODEV);
+ 	}
+ 	pci_set_master(pdev);
+ 
+-	if (sizeof(bus_addr_t) > 4) {
++	if (sizeof(dma_addr_t) > 4) {
+ 		uint64_t   memsize;
+-		bus_addr_t mask_64bit;
+-		bus_addr_t mask_39bit;
++		dma_addr_t mask_64bit;
++		dma_addr_t mask_39bit;
+ 
+ 		memsize = ahd_linux_get_memsize();
+-		mask_64bit = (bus_addr_t)0xFFFFFFFFFFFFFFFFULL;
+-		mask_39bit = (bus_addr_t)0x7FFFFFFFFFULL;
++		mask_64bit = (dma_addr_t)0xFFFFFFFFFFFFFFFFULL;
++		mask_39bit = (dma_addr_t)0x7FFFFFFFFFULL;
+ 		if (memsize >= 0x8000000000ULL
+-	 	 && ahd_pci_set_dma_mask(pdev, mask_64bit) == 0) {
++	 	 && pci_set_dma_mask(pdev, mask_64bit) == 0) {
+ 			ahd->flags |= AHD_64BIT_ADDRESSING;
+ 			ahd->platform_data->hw_dma_mask = mask_64bit;
+ 		} else if (memsize > 0x80000000
+-			&& ahd_pci_set_dma_mask(pdev, mask_39bit) == 0) {
++			&& pci_set_dma_mask(pdev, mask_39bit) == 0) {
+ 			ahd->flags |= AHD_39BIT_ADDRESSING;
+ 			ahd->platform_data->hw_dma_mask = mask_39bit;
+ 		}
+ 	} else {
+-		ahd_pci_set_dma_mask(pdev, 0xFFFFFFFF);
++		pci_set_dma_mask(pdev, 0xFFFFFFFF);
+ 		ahd->platform_data->hw_dma_mask = 0xFFFFFFFF;
+ 	}
+-#endif
+ 	ahd->dev_softc = pci;
+ 	error = ahd_pci_config(ahd, entry);
+ 	if (error != 0) {
+ 		ahd_free(ahd);
+ 		return (-error);
+ 	}
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 	pci_set_drvdata(pdev, ahd);
+ 	if (aic79xx_detect_complete) {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+@@ -194,38 +205,13 @@ ahd_linux_pci_dev_probe(struct pci_dev *
+ 		return (-ENODEV);
+ #endif
+ 	}
+-#endif
+ 	return (0);
+ }
+ 
+ int
+ ahd_linux_pci_init(void)
+ {
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 	return (pci_module_init(&aic79xx_pci_driver));
+-#else
+-	struct pci_dev *pdev;
+-	u_int class;
+-	int found;
+-
+-	/* If we don't have a PCI bus, we can't find any adapters. */
+-	if (pci_present() == 0)
+-		return (0);
+-
+-	found = 0;
+-	pdev = NULL;
+-	class = PCI_CLASS_STORAGE_SCSI << 8;
+-	while ((pdev = pci_find_class(class, pdev)) != NULL) {
+-		ahd_dev_softc_t pci;
+-		int error;
+-
+-		pci = pdev;
+-		error = ahd_linux_pci_dev_probe(pdev, /*pci_devid*/NULL);
+-		if (error == 0)
+-			found++;
+-	}
+-	return (found);
+-#endif
+ }
+ 
+ void
+@@ -238,7 +224,6 @@ static int
+ ahd_linux_pci_reserve_io_regions(struct ahd_softc *ahd, u_long *base,
+ 				 u_long *base2)
+ {
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
+ 	*base = pci_resource_start(ahd->dev_softc, 0);
+ 	/*
+ 	 * This is really the 3rd bar and should be at index 2,
+@@ -246,28 +231,14 @@ ahd_linux_pci_reserve_io_regions(struct 
+ 	 * bars.
+ 	 */
+ 	*base2 = pci_resource_start(ahd->dev_softc, 3);
+-#else
+-	*base = ahd_pci_read_config(ahd->dev_softc, AHD_PCI_IOADDR0, 4);
+-	*base2 = ahd_pci_read_config(ahd->dev_softc, AHD_PCI_IOADDR1, 4);
+-	*base &= PCI_BASE_ADDRESS_IO_MASK;
+-	*base2 &= PCI_BASE_ADDRESS_IO_MASK;
+-#endif
+ 	if (*base == 0 || *base2 == 0)
+ 		return (ENOMEM);
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
+-	if (check_region(*base, 256) != 0
+-	 || check_region(*base2, 256) != 0)
+-		return (ENOMEM);
+-	request_region(*base, 256, "aic79xx");
+-	request_region(*base2, 256, "aic79xx");
+-#else
+ 	if (request_region(*base, 256, "aic79xx") == 0)
+ 		return (ENOMEM);
+ 	if (request_region(*base2, 256, "aic79xx") == 0) {
+ 		release_region(*base2, 256);
+ 		return (ENOMEM);
+ 	}
+-#endif
+ 	return (0);
+ }
+ 
+@@ -288,29 +259,18 @@ ahd_linux_pci_reserve_mem_region(struct 
+ 		return (ENOMEM);
+ 
+ 	error = 0;
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
+ 	start = pci_resource_start(ahd->dev_softc, 1);
+ 	base_page = start & PAGE_MASK;
+ 	base_offset = start - base_page;
+-#else
+-	start = ahd_pci_read_config(ahd->dev_softc, PCIR_MAPS+4, 4);
+-	base_offset = start & PCI_BASE_ADDRESS_MEM_MASK;
+-	base_page = base_offset & PAGE_MASK;
+-	base_offset -= base_page;
+-#endif
+ 	if (start != 0) {
+ 		*bus_addr = start;
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 		if (request_mem_region(start, 0x1000, "aic79xx") == 0)
+ 			error = ENOMEM;
+-#endif
+ 		if (error == 0) {
+ 			*maddr = ioremap_nocache(base_page, base_offset + 256);
+ 			if (*maddr == NULL) {
+ 				error = ENOMEM;
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 				release_mem_region(start, 0x1000);
+-#endif
+ 			} else
+ 				*maddr += base_offset;
+ 		}
+@@ -324,7 +284,7 @@ ahd_pci_map_registers(struct ahd_softc *
+ {
+ 	uint32_t command;
+ 	u_long	 base;
+-	uint8_t	*maddr;
++	uint8_t	 *maddr;
+ 	int	 error;
+ 
+ 	/*
+@@ -351,11 +311,9 @@ ahd_pci_map_registers(struct ahd_softc *
+ 			       ahd_get_pci_bus(ahd->dev_softc),
+ 			       ahd_get_pci_slot(ahd->dev_softc),
+ 			       ahd_get_pci_function(ahd->dev_softc));
+-			iounmap((void *)((u_long)maddr & PAGE_MASK));
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
++			iounmap(maddr);
+ 			release_mem_region(ahd->platform_data->mem_busaddr,
+ 					   0x1000);
+-#endif
+ 			ahd->bshs[0].maddr = NULL;
+ 			maddr = NULL;
+ 		} else
+@@ -408,38 +366,5 @@ ahd_pci_map_int(struct ahd_softc *ahd)
+ void
+ ahd_power_state_change(struct ahd_softc *ahd, ahd_power_state new_state)
+ {
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 	pci_set_power_state(ahd->dev_softc, new_state);
+-#else
+-	uint32_t cap;
+-	u_int cap_offset;
+-
+-	/*
+-	 * Traverse the capability list looking for
+-	 * the power management capability.
+-	 */
+-	cap = 0;
+-	cap_offset = ahd_pci_read_config(ahd->dev_softc,
+-					 PCIR_CAP_PTR, /*bytes*/1);
+-	while (cap_offset != 0) {
+-
+-		cap = ahd_pci_read_config(ahd->dev_softc,
+-					  cap_offset, /*bytes*/4);
+-		if ((cap & 0xFF) == 1
+-		 && ((cap >> 16) & 0x3) > 0) {
+-			uint32_t pm_control;
+-
+-			pm_control = ahd_pci_read_config(ahd->dev_softc,
+-							 cap_offset + 4,
+-							 /*bytes*/4);
+-			pm_control &= ~0x3;
+-			pm_control |= new_state;
+-			ahd_pci_write_config(ahd->dev_softc,
+-					     cap_offset + 4,
+-					     pm_control, /*bytes*/2);
+-			break;
+-		}
+-		cap_offset = (cap >> 8) & 0xFF;
+-	}
+-#endif 
+ }
+diff -pruN a/drivers/scsi/aic7xxx/aic79xx_pci.c b/drivers/scsi/aic7xxx/aic79xx_pci.c
+--- a/drivers/scsi/aic7xxx/aic79xx_pci.c	2004-11-02 17:49:59.000000000 +0900
++++ b/drivers/scsi/aic7xxx/aic79xx_pci.c	2004-11-02 16:31:10.000000000 +0900
+@@ -51,6 +51,8 @@
+ #include <dev/aic7xxx/aic79xx_inline.h>
+ #endif
+ 
++#include "aic79xx_pci.h"
++
+ static __inline uint64_t
+ ahd_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor)
+ {
+@@ -64,34 +66,12 @@ ahd_compose_id(u_int device, u_int vendo
+ 	return (id);
+ }
+ 
+-#define ID_ALL_MASK			0xFFFFFFFFFFFFFFFFull
+-#define ID_ALL_IROC_MASK		0xFFFFFF7FFFFFFFFFull
+-#define ID_DEV_VENDOR_MASK		0xFFFFFFFF00000000ull
+-#define ID_9005_GENERIC_MASK		0xFFF0FFFF00000000ull
+-#define ID_9005_GENERIC_IROC_MASK	0xFFF0FF7F00000000ull
+-
+-#define ID_AIC7901			0x800F9005FFFF9005ull
+-#define ID_AHA_29320A			0x8000900500609005ull
+-#define ID_AHA_29320ALP			0x8017900500449005ull
+-
+-#define ID_AIC7901A			0x801E9005FFFF9005ull
+-#define ID_AHA_29320			0x8012900500429005ull
+-#define ID_AHA_29320B			0x8013900500439005ull
+-#define ID_AHA_29320LP			0x8014900500449005ull
+-
+-#define ID_AIC7902			0x801F9005FFFF9005ull
+-#define ID_AIC7902_B			0x801D9005FFFF9005ull
+-#define ID_AHA_39320			0x8010900500409005ull
+-#define ID_AHA_39320_B			0x8015900500409005ull
+-#define ID_AHA_39320A			0x8016900500409005ull
+-#define ID_AHA_39320D			0x8011900500419005ull
+-#define ID_AHA_39320D_B			0x801C900500419005ull
+-#define ID_AHA_39320D_HP		0x8011900500AC0E11ull
+-#define ID_AHA_39320D_B_HP		0x801C900500AC0E11ull
+ #define ID_AIC7902_PCI_REV_A4		0x3
+ #define ID_AIC7902_PCI_REV_B0		0x10
+ #define SUBID_HP			0x0E11
+ 
++#define DEVID_9005_HOSTRAID(id) ((id) & 0x80)
++
+ #define DEVID_9005_TYPE(id) ((id) & 0xF)
+ #define		DEVID_9005_TYPE_HBA		0x0	/* Standard Card */
+ #define		DEVID_9005_TYPE_HBA_2EXT	0x1	/* 2 External Ports */
+@@ -134,18 +114,18 @@ struct ahd_pci_identity ahd_pci_ident_ta
+ 		"Adaptec 29320ALP Ultra320 SCSI adapter",
+ 		ahd_aic7901_setup
+ 	},
+-	/* aic7901A based controllers */
++	/* aic7902 based controllers */	
+ 	{
+ 		ID_AHA_29320,
+ 		ID_ALL_MASK,
+ 		"Adaptec 29320 Ultra320 SCSI adapter",
+-		ahd_aic7901A_setup
++		ahd_aic7902_setup
+ 	},
+ 	{
+ 		ID_AHA_29320B,
+ 		ID_ALL_MASK,
+ 		"Adaptec 29320B Ultra320 SCSI adapter",
+-		ahd_aic7901A_setup
++		ahd_aic7902_setup
+ 	},
+ 	{
+ 		ID_AHA_29320LP,
+@@ -153,7 +133,6 @@ struct ahd_pci_identity ahd_pci_ident_ta
+ 		"Adaptec 29320LP Ultra320 SCSI adapter",
+ 		ahd_aic7901A_setup
+ 	},
+-	/* aic7902 based controllers */	
+ 	{
+ 		ID_AHA_39320,
+ 		ID_ALL_MASK,
+@@ -196,22 +175,10 @@ struct ahd_pci_identity ahd_pci_ident_ta
+ 		"Adaptec (HP OEM) 39320D Ultra320 SCSI adapter",
+ 		ahd_aic7902_setup
+ 	},
+-	{
+-		ID_AHA_29320,
+-		ID_ALL_MASK,
+-		"Adaptec 29320 Ultra320 SCSI adapter",
+-		ahd_aic7902_setup
+-	},
+-	{
+-		ID_AHA_29320B,
+-		ID_ALL_MASK,
+-		"Adaptec 29320B Ultra320 SCSI adapter",
+-		ahd_aic7902_setup
+-	},
+ 	/* Generic chip probes for devices we don't know 'exactly' */
+ 	{
+-		ID_AIC7901 & ID_DEV_VENDOR_MASK,
+-		ID_DEV_VENDOR_MASK,
++		ID_AIC7901 & ID_9005_GENERIC_MASK,
++		ID_9005_GENERIC_MASK,
+ 		"Adaptec AIC7901 Ultra320 SCSI adapter",
+ 		ahd_aic7901_setup
+ 	},
+@@ -294,6 +261,12 @@ ahd_find_pci_device(ahd_dev_softc_t pci)
+ 				 subdevice,
+ 				 subvendor);
+ 
++	/*
++	 * Controllers, mask out the IROC/HostRAID bit
++	 */
++	
++	full_id &= ID_ALL_IROC_MASK;
++
+ 	for (i = 0; i < ahd_num_pci_devs; i++) {
+ 		entry = &ahd_pci_ident_table[i];
+ 		if (entry->full_id == (full_id & entry->id_mask)) {
+@@ -452,8 +425,10 @@ ahd_pci_test_register_access(struct ahd_
+ 	 * or read prefetching could be initiated by the
+ 	 * CPU or host bridge.  Our device does not support
+ 	 * either, so look for data corruption and/or flaged
+-	 * PCI errors.
++	 * PCI errors.  First pause without causing another
++	 * chip reset.
+ 	 */
++	hcntrl &= ~CHIPRST;
+ 	ahd_outb(ahd, HCNTRL, hcntrl|PAUSE);
+ 	while (ahd_is_paused(ahd) == 0)
+ 		;
+diff -pruN a/drivers/scsi/aic7xxx/aic79xx_pci.h b/drivers/scsi/aic7xxx/aic79xx_pci.h
+--- a/drivers/scsi/aic7xxx/aic79xx_pci.h	1970-01-01 09:00:00.000000000 +0900
++++ b/drivers/scsi/aic7xxx/aic79xx_pci.h	2004-11-02 16:31:10.000000000 +0900
+@@ -0,0 +1,70 @@
++/*
++ * Adaptec AIC79xx device driver for Linux.
++ *
++ * Copyright (c) 2000-2001 Adaptec Inc.
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions, and the following disclaimer,
++ *    without modification.
++ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
++ *    substantially similar to the "NO WARRANTY" disclaimer below
++ *    ("Disclaimer") and any redistribution must be conditioned upon
++ *    including a substantially similar Disclaimer requirement for further
++ *    binary redistribution.
++ * 3. Neither the names of the above-listed copyright holders nor the names
++ *    of any contributors may be used to endorse or promote products derived
++ *    from this software without specific prior written permission.
++ *
++ * Alternatively, this software may be distributed under the terms of the
++ * GNU General Public License ("GPL") version 2 as published by the Free
++ * Software Foundation.
++ *
++ * NO WARRANTY
++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
++ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
++ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++ * POSSIBILITY OF SUCH DAMAGES.
++ *
++ * $Id$
++ *
++ */
++#ifndef _AIC79XX_PCI_H_
++#define _AIC79XX_PCI_H_
++
++#define ID_ALL_MASK			0xFFFFFFFFFFFFFFFFull
++#define ID_ALL_IROC_MASK		0xFF7FFFFFFFFFFFFFull
++#define ID_DEV_VENDOR_MASK		0xFFFFFFFF00000000ull
++#define ID_9005_GENERIC_MASK		0xFFF0FFFF00000000ull
++#define ID_9005_GENERIC_IROC_MASK	0xFF70FFFF00000000ull
++
++#define ID_AIC7901			0x800F9005FFFF9005ull
++#define ID_AHA_29320A			0x8000900500609005ull
++#define ID_AHA_29320ALP			0x8017900500449005ull
++
++#define ID_AIC7901A			0x801E9005FFFF9005ull
++#define ID_AHA_29320			0x8012900500429005ull
++#define ID_AHA_29320B			0x8013900500439005ull
++#define ID_AHA_29320LP			0x8014900500449005ull
++
++#define ID_AIC7902			0x801F9005FFFF9005ull
++#define ID_AIC7902_B			0x801D9005FFFF9005ull
++#define ID_AHA_39320			0x8010900500409005ull
++#define ID_AHA_39320_B			0x8015900500409005ull
++#define ID_AHA_39320A			0x8016900500409005ull
++#define ID_AHA_39320D			0x8011900500419005ull
++#define ID_AHA_39320D_B			0x801C900500419005ull
++#define ID_AHA_39320D_HP		0x8011900500AC0E11ull
++#define ID_AHA_39320D_B_HP		0x801C900500AC0E11ull
++
++#endif /* _AIC79XX_PCI_H_ */
+diff -pruN a/drivers/scsi/aic7xxx/aic7xxx.h b/drivers/scsi/aic7xxx/aic7xxx.h
+--- a/drivers/scsi/aic7xxx/aic7xxx.h	2004-08-14 14:36:59.000000000 +0900
++++ b/drivers/scsi/aic7xxx/aic7xxx.h	2004-11-02 16:31:10.000000000 +0900
+@@ -521,7 +521,7 @@ struct ahc_dma_seg {
+ 
+ struct sg_map_node {
+ 	bus_dmamap_t		 sg_dmamap;
+-	bus_addr_t		 sg_physaddr;
++	dma_addr_t		 sg_physaddr;
+ 	struct ahc_dma_seg*	 sg_vaddr;
+ 	SLIST_ENTRY(sg_map_node) links;
+ };
+@@ -584,7 +584,7 @@ struct scb {
+ 	struct scb_platform_data *platform_data;
+ 	struct sg_map_node	 *sg_map;
+ 	struct ahc_dma_seg 	 *sg_list;
+-	bus_addr_t		  sg_list_phys;
++	dma_addr_t		  sg_list_phys;
+ 	u_int			  sg_count;/* How full ahc_dma_seg is */
+ };
+ 
+@@ -611,10 +611,10 @@ struct scb_data {
+ 	 */
+ 	bus_dma_tag_t	 hscb_dmat;	/* dmat for our hardware SCB array */
+ 	bus_dmamap_t	 hscb_dmamap;
+-	bus_addr_t	 hscb_busaddr;
++	dma_addr_t	 hscb_busaddr;
+ 	bus_dma_tag_t	 sense_dmat;
+ 	bus_dmamap_t	 sense_dmamap;
+-	bus_addr_t	 sense_busaddr;
++	dma_addr_t	 sense_busaddr;
+ 	bus_dma_tag_t	 sg_dmat;	/* dmat for our sg segments */
+ 	SLIST_HEAD(, sg_map_node) sg_maps;
+ 	uint8_t	numscbs;
+@@ -1069,14 +1069,14 @@ struct ahc_softc {
+ 	bus_dma_tag_t		  parent_dmat;
+ 	bus_dma_tag_t		  shared_data_dmat;
+ 	bus_dmamap_t		  shared_data_dmamap;
+-	bus_addr_t		  shared_data_busaddr;
++	dma_addr_t		  shared_data_busaddr;
+ 
+ 	/*
+ 	 * Bus address of the one byte buffer used to
+ 	 * work-around a DMA bug for chips <= aic7880
+ 	 * in target mode.
+ 	 */
+-	bus_addr_t		  dma_bug_buf;
++	dma_addr_t		  dma_bug_buf;
+ 
+ 	/* Number of enabled target mode device on this card */
+ 	u_int			  enabled_luns;
+diff -pruN a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c
+--- a/drivers/scsi/aic7xxx/aic7xxx_core.c	2004-08-14 14:36:57.000000000 +0900
++++ b/drivers/scsi/aic7xxx/aic7xxx_core.c	2004-11-02 16:31:10.000000000 +0900
+@@ -3973,7 +3973,6 @@ ahc_free(struct ahc_softc *ahc)
+ 	default:
+ 	case 5:
+ 		ahc_shutdown(ahc);
+-		TAILQ_REMOVE(&ahc_tailq, ahc, links);
+ 		/* FALLTHROUGH */
+ 	case 4:
+ 		ahc_dmamap_unload(ahc, ahc->shared_data_dmat,
+@@ -4199,9 +4198,9 @@ ahc_probe_scbs(struct ahc_softc *ahc) {
+ static void
+ ahc_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error) 
+ {
+-	bus_addr_t *baddr;
++	dma_addr_t *baddr;
+ 
+-	baddr = (bus_addr_t *)arg;
++	baddr = (dma_addr_t *)arg;
+ 	*baddr = segs->ds_addr;
+ }
+ 
+@@ -4456,7 +4455,7 @@ ahc_alloc_scbs(struct ahc_softc *ahc)
+ 	struct scb_data *scb_data;
+ 	struct scb *next_scb;
+ 	struct sg_map_node *sg_map;
+-	bus_addr_t physaddr;
++	dma_addr_t physaddr;
+ 	struct ahc_dma_seg *segs;
+ 	int newcount;
+ 	int i;
+@@ -4820,7 +4819,7 @@ ahc_init(struct ahc_softc *ahc)
+ 	if (ahc_dma_tag_create(ahc, ahc->parent_dmat, /*alignment*/1,
+ 			       /*boundary*/BUS_SPACE_MAXADDR_32BIT + 1,
+ 			       /*lowaddr*/ahc->flags & AHC_39BIT_ADDRESSING
+-					? (bus_addr_t)0x7FFFFFFFFFULL
++					? (dma_addr_t)0x7FFFFFFFFFULL
+ 					: BUS_SPACE_MAXADDR_32BIT,
+ 			       /*highaddr*/BUS_SPACE_MAXADDR,
+ 			       /*filter*/NULL, /*filterarg*/NULL,
+diff -pruN a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
+--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c	2004-08-14 14:36:14.000000000 +0900
++++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c	2004-11-02 16:31:10.000000000 +0900
+@@ -129,10 +129,7 @@
+  */
+ #include "aiclib.c"
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
+ #include <linux/init.h>		/* __setup */
+-#endif
+-
+ 
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+ #include "sd.h"			/* For geometry detection */
+@@ -140,6 +137,7 @@
+ 
+ #include <linux/mm.h>		/* For fetching system memory size */
+ #include <linux/blkdev.h>		/* For block_size() */
++#include <linux/delay.h>	/* For ssleep/msleep */
+ 
+ /*
+  * Lock protecting manipulation of the ahc softc list.
+@@ -151,14 +149,6 @@ spinlock_t ahc_list_spinlock;
+ u_int ahc_linux_nseg;
+ #endif
+ 
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
+-struct proc_dir_entry proc_scsi_aic7xxx = {
+-	PROC_SCSI_AIC7XXX, 7, "aic7xxx",
+-	S_IFDIR | S_IRUGO | S_IXUGO, 2,
+-	0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL
+-};
+-#endif
+-
+ /*
+  * Set this to the delay in seconds after SCSI bus reset.
+  * Note, we honor this only for the initial bus reset.
+@@ -436,7 +426,6 @@ uint32_t aic7xxx_periodic_otag;
+ /*
+  * Module information and settable options.
+  */
+-#ifdef MODULE
+ static char *aic7xxx = NULL;
+ /*
+  * Just in case someone uses commas to separate items on the insmod
+@@ -447,9 +436,8 @@ static char dummy_buffer[60] = "Please d
+ 
+ MODULE_AUTHOR("Maintainer: Justin T. Gibbs <gibbs at scsiguy.com>");
+ MODULE_DESCRIPTION("Adaptec Aic77XX/78XX SCSI Host Bus Adapter driver");
+-#ifdef MODULE_LICENSE
+ MODULE_LICENSE("Dual BSD/GPL");
+-#endif
++MODULE_VERSION(AIC7XXX_DRIVER_VERSION);
+ MODULE_PARM(aic7xxx, "s");
+ MODULE_PARM_DESC(aic7xxx,
+ "period delimited, options string.\n"
+@@ -479,7 +467,6 @@ MODULE_PARM_DESC(aic7xxx,
+ "\n"
+ "	options aic7xxx 'aic7xxx=probe_eisa_vl.tag_info:{{}.{.10}}.seltime:1'\n"
+ );
+-#endif
+ 
+ static void ahc_linux_handle_scsi_status(struct ahc_softc *,
+ 					 struct ahc_linux_device *,
+@@ -574,7 +561,7 @@ static __inline void ahc_linux_unmap_scb
+ 
+ static __inline int ahc_linux_map_seg(struct ahc_softc *ahc, struct scb *scb,
+ 		 		      struct ahc_dma_seg *sg,
+-				      bus_addr_t addr, bus_size_t len);
++				      dma_addr_t addr, bus_size_t len);
+ 
+ static __inline void
+ ahc_schedule_completeq(struct ahc_softc *ahc)
+@@ -592,14 +579,7 @@ ahc_schedule_completeq(struct ahc_softc 
+ static __inline void
+ ahc_schedule_runq(struct ahc_softc *ahc)
+ {
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 	tasklet_schedule(&ahc->platform_data->runq_tasklet);
+-#else
+-	/*
+-	 * Tasklets are not available, so run inline.
+-	 */
+-	ahc_runq_tasklet((unsigned long)ahc);
+-#endif
+ }
+ 
+ static __inline struct ahc_linux_device*
+@@ -730,7 +710,7 @@ ahc_linux_unmap_scb(struct ahc_softc *ah
+ 
+ static __inline int
+ ahc_linux_map_seg(struct ahc_softc *ahc, struct scb *scb,
+-		  struct ahc_dma_seg *sg, bus_addr_t addr, bus_size_t len)
++		  struct ahc_dma_seg *sg, dma_addr_t addr, bus_size_t len)
+ {
+ 	int	 consumed;
+ 
+@@ -742,7 +722,7 @@ ahc_linux_map_seg(struct ahc_softc *ahc,
+ 	sg->addr = ahc_htole32(addr & 0xFFFFFFFF);
+ 	scb->platform_data->xfer_len += len;
+ 
+-	if (sizeof(bus_addr_t) > 4
++	if (sizeof(dma_addr_t) > 4
+ 	 && (ahc->flags & AHC_39BIT_ADDRESSING) != 0)
+ 		len |= (addr >> 8) & AHC_SG_HIGH_ADDR_MASK;
+ 
+@@ -879,11 +859,7 @@ ahc_linux_detect(Scsi_Host_Template *tem
+ "aic7xxx: insmod or else it might trash certain memory areas.\n");
+ #endif
+ 
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,0)
+ 	template->proc_name = "aic7xxx";
+-#else
+-	template->proc_dir = &proc_scsi_aic7xxx;
+-#endif
+ 
+ 	/*
+ 	 * Initialize our softc list lock prior to
+@@ -1325,28 +1301,20 @@ ahc_runq_tasklet(unsigned long data)
+ {
+ 	struct ahc_softc* ahc;
+ 	struct ahc_linux_device *dev;
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 	u_long flags;
+-#endif
+ 
+ 	ahc = (struct ahc_softc *)data;
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 	ahc_lock(ahc, &flags);
+-#endif
+ 	while ((dev = ahc_linux_next_device_to_run(ahc)) != NULL) {
+ 	
+ 		TAILQ_REMOVE(&ahc->platform_data->device_runq, dev, links);
+ 		dev->flags &= ~AHC_DEV_ON_RUN_LIST;
+ 		ahc_linux_check_device_queue(ahc, dev);
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 		/* Yeild to our interrupt handler */
+ 		ahc_unlock(ahc, &flags);
+ 		ahc_lock(ahc, &flags);
+-#endif
+ 	}
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 	ahc_unlock(ahc, &flags);
+-#endif
+ }
+ 
+ /******************************** Macros **************************************/
+@@ -1359,7 +1327,7 @@ ahc_runq_tasklet(unsigned long data)
+ int
+ ahc_dma_tag_create(struct ahc_softc *ahc, bus_dma_tag_t parent,
+ 		   bus_size_t alignment, bus_size_t boundary,
+-		   bus_addr_t lowaddr, bus_addr_t highaddr,
++		   dma_addr_t lowaddr, dma_addr_t highaddr,
+ 		   bus_dma_filter_t *filter, void *filterarg,
+ 		   bus_size_t maxsize, int nsegments,
+ 		   bus_size_t maxsegsz, int flags, bus_dma_tag_t *ret_tag)
+@@ -1396,7 +1364,6 @@ ahc_dmamem_alloc(struct ahc_softc *ahc, 
+ {
+ 	bus_dmamap_t map;
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
+ 	map = malloc(sizeof(*map), M_DEVBUF, M_NOWAIT);
+ 	if (map == NULL)
+ 		return (ENOMEM);
+@@ -1408,28 +1375,20 @@ ahc_dmamem_alloc(struct ahc_softc *ahc, 
+ 	 * our dma mask when doing allocations.
+ 	 */
+ 	if (ahc->dev_softc != NULL)
+-		if (ahc_pci_set_dma_mask(ahc->dev_softc, 0xFFFFFFFF)) {
++		if (pci_set_dma_mask(ahc->dev_softc, 0xFFFFFFFF)) {
+ 			printk(KERN_WARNING "aic7xxx: No suitable DMA available.\n");
++			kfree(map);
+ 			return (ENODEV);
+ 		}
+ 	*vaddr = pci_alloc_consistent(ahc->dev_softc,
+ 				      dmat->maxsize, &map->bus_addr);
+ 	if (ahc->dev_softc != NULL)
+-		if (ahc_pci_set_dma_mask(ahc->dev_softc,
++		if (pci_set_dma_mask(ahc->dev_softc,
+ 				     ahc->platform_data->hw_dma_mask)) {
+ 			printk(KERN_WARNING "aic7xxx: No suitable DMA available.\n");
++			kfree(map);
+ 			return (ENODEV);
+ 		}
+-#else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) */
+-	/*
+-	 * At least in 2.2.14, malloc is a slab allocator so all
+-	 * allocations are aligned.  We assume for these kernel versions
+-	 * that all allocations will be bellow 4Gig, physically contiguous,
+-	 * and accessible via DMA by the controller.
+-	 */
+-	map = NULL; /* No additional information to store */
+-	*vaddr = malloc(dmat->maxsize, M_DEVBUF, M_NOWAIT);
+-#endif
+ 	if (*vaddr == NULL)
+ 		return (ENOMEM);
+ 	*mapp = map;
+@@ -1440,12 +1399,8 @@ void
+ ahc_dmamem_free(struct ahc_softc *ahc, bus_dma_tag_t dmat,
+ 		void* vaddr, bus_dmamap_t map)
+ {
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
+ 	pci_free_consistent(ahc->dev_softc, dmat->maxsize,
+ 			    vaddr, map->bus_addr);
+-#else
+-	free(vaddr, M_DEVBUF);
+-#endif
+ }
+ 
+ int
+@@ -1459,12 +1414,7 @@ ahc_dmamap_load(struct ahc_softc *ahc, b
+ 	 */
+ 	bus_dma_segment_t stack_sg;
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
+ 	stack_sg.ds_addr = map->bus_addr;
+-#else
+-#define VIRT_TO_BUS(a) (uint32_t)virt_to_bus((void *)(a))
+-	stack_sg.ds_addr = VIRT_TO_BUS(buf);
+-#endif
+ 	stack_sg.ds_len = dmat->maxsize;
+ 	cb(cb_arg, &stack_sg, /*nseg*/1, /*error*/0);
+ 	return (0);
+@@ -1475,9 +1425,10 @@ ahc_dmamap_destroy(struct ahc_softc *ahc
+ {
+ 	/*
+ 	 * The map may is NULL in our < 2.3.X implementation.
++	 * Now it's 2.6.5, but just in case...
+ 	 */
+-	if (map != NULL)
+-		free(map, M_DEVBUF);
++	BUG_ON(map == NULL);
++	free(map, M_DEVBUF);
+ }
+ 
+ int
+@@ -1693,9 +1644,7 @@ aic7xxx_setup(char *s)
+ 	return 1;
+ }
+ 
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,0)
+ __setup("aic7xxx=", aic7xxx_setup);
+-#endif
+ 
+ uint32_t aic7xxx_verbose;
+ 
+@@ -1738,8 +1687,7 @@ ahc_linux_register_host(struct ahc_softc
+ 		ahc_set_name(ahc, new_name);
+ 	}
+ 	host->unique_id = ahc->unit;
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,4) && \
+-    LINUX_VERSION_CODE  < KERNEL_VERSION(2,5,0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+ 	scsi_set_pci_device(host, ahc->dev_softc);
+ #endif
+ 	ahc_linux_initialize_scsi_bus(ahc);
+@@ -1925,19 +1873,11 @@ ahc_platform_alloc(struct ahc_softc *ahc
+ 	ahc->platform_data->completeq_timer.data = (u_long)ahc;
+ 	ahc->platform_data->completeq_timer.function =
+ 	    (ahc_linux_callback_t *)ahc_linux_thread_run_complete_queue;
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
+ 	init_MUTEX_LOCKED(&ahc->platform_data->eh_sem);
+ 	init_MUTEX_LOCKED(&ahc->platform_data->dv_sem);
+ 	init_MUTEX_LOCKED(&ahc->platform_data->dv_cmd_sem);
+-#else
+-	ahc->platform_data->eh_sem = MUTEX_LOCKED;
+-	ahc->platform_data->dv_sem = MUTEX_LOCKED;
+-	ahc->platform_data->dv_cmd_sem = MUTEX_LOCKED;
+-#endif
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 	tasklet_init(&ahc->platform_data->runq_tasklet, ahc_runq_tasklet,
+ 		     (unsigned long)ahc);
+-#endif
+ 	ahc->seltime = (aic7xxx_seltime & 0x3) << 4;
+ 	ahc->seltime_b = (aic7xxx_seltime & 0x3) << 4;
+ 	if (aic7xxx_pci_parity == 0)
+@@ -1956,9 +1896,7 @@ ahc_platform_free(struct ahc_softc *ahc)
+ 	if (ahc->platform_data != NULL) {
+ 		del_timer_sync(&ahc->platform_data->completeq_timer);
+ 		ahc_linux_kill_dv_thread(ahc);
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 		tasklet_kill(&ahc->platform_data->runq_tasklet);
+-#endif
+ 		if (ahc->platform_data->host != NULL) {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+ 			scsi_remove_host(ahc->platform_data->host);
+@@ -1994,18 +1932,11 @@ ahc_platform_free(struct ahc_softc *ahc)
+ 			release_region(ahc->bsh.ioport, 256);
+ 		if (ahc->tag == BUS_SPACE_MEMIO
+ 		 && ahc->bsh.maddr != NULL) {
+-			u_long base_addr;
+-
+-			base_addr = (u_long)ahc->bsh.maddr;
+-			base_addr &= PAGE_MASK;
+-			iounmap((void *)base_addr);
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
++			iounmap(ahc->bsh.maddr);
+ 			release_mem_region(ahc->platform_data->mem_busaddr,
+ 					   0x1000);
+-#endif
+ 		}
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) && \
+-    LINUX_VERSION_CODE  < KERNEL_VERSION(2,5,0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+ 		/*
+ 		 * In 2.4 we detach from the scsi midlayer before the PCI
+ 		 * layer invokes our remove callback.  No per-instance
+@@ -2985,7 +2916,7 @@ ahc_linux_dv_transition(struct ahc_softc
+ 			}
+ 			if (targ->dv_state_retry <= 10) {
+ 				if ((status & (SSQ_DELAY_RANDOM|SSQ_DELAY))!= 0)
+-					scsi_sleep(ahc->our_id*HZ/10);
++					msleep(ahc->our_id*1000/10);
+ 				break;
+ 			}
+ #ifdef AHC_DEBUG
+@@ -3751,7 +3682,7 @@ ahc_linux_run_device_queue(struct ahc_so
+ 			 * a transfer crosses a 32bit page.
+ 			 */ 
+ 			while (cur_seg < end_seg) {
+-				bus_addr_t addr;
++				dma_addr_t addr;
+ 				bus_size_t len;
+ 				int consumed;
+ 
+@@ -3780,7 +3711,7 @@ ahc_linux_run_device_queue(struct ahc_so
+ 			scb->hscb->datacnt = scb->sg_list->len;
+ 		} else if (cmd->request_bufflen != 0) {
+ 			struct	 ahc_dma_seg *sg;
+-			bus_addr_t addr;
++			dma_addr_t addr;
+ 
+ 			sg = scb->sg_list;
+ 			addr = pci_map_single(ahc->dev_softc,
+@@ -4064,7 +3995,7 @@ ahc_send_async(struct ahc_softc *ahc, ch
+ 		WARN_ON(lun != CAM_LUN_WILDCARD);
+ 		scsi_report_device_reset(ahc->platform_data->host,
+ 					 channel - 'A', target);
+-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
++#else
+ 		Scsi_Device *scsi_dev;
+ 
+ 		/*
+@@ -4085,12 +4016,10 @@ ahc_send_async(struct ahc_softc *ahc, ch
+ 		break;
+ 	}
+         case AC_BUS_RESET:
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
+ 		if (ahc->platform_data->host != NULL) {
+ 			scsi_report_bus_reset(ahc->platform_data->host,
+ 					      channel - 'A');
+ 		}
+-#endif
+                 break;
+         default:
+                 panic("ahc_send_async: Unexpected async event");
+@@ -5100,7 +5029,6 @@ static void
+ ahc_linux_exit(void)
+ {
+ 	struct ahc_softc *ahc;
+-	u_long l;
+ 
+ 	/*
+ 	 * Shutdown DV threads before going into the SCSI mid-layer.
+@@ -5108,12 +5036,10 @@ ahc_linux_exit(void)
+ 	 * kernel so that waiting for our DV threads to exit leads
+ 	 * to deadlock.
+ 	 */
+-	ahc_list_lock(&l);
+ 	TAILQ_FOREACH(ahc, &ahc_tailq, links) {
+ 
+ 		ahc_linux_kill_dv_thread(ahc);
+ 	}
+-	ahc_list_unlock(&l);
+ 
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+ 	/*
+diff -pruN a/drivers/scsi/aic7xxx/aic7xxx_osm.h b/drivers/scsi/aic7xxx/aic7xxx_osm.h
+--- a/drivers/scsi/aic7xxx/aic7xxx_osm.h	2004-08-14 14:36:48.000000000 +0900
++++ b/drivers/scsi/aic7xxx/aic7xxx_osm.h	2004-11-02 17:33:05.000000000 +0900
+@@ -70,17 +70,9 @@
+ #include <asm/byteorder.h>
+ #include <asm/io.h>
+ 
+-#ifndef KERNEL_VERSION
+-#define KERNEL_VERSION(x,y,z) (((x)<<16)+((y)<<8)+(z))
+-#endif
+-
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ #include <linux/interrupt.h> /* For tasklet support. */
+ #include <linux/config.h>
+ #include <linux/slab.h>
+-#else
+-#include <linux/malloc.h>
+-#endif
+ 
+ /* Core SCSI definitions */
+ #define AIC_LIB_PREFIX ahc
+@@ -156,11 +148,6 @@ extern Scsi_Host_Template aic7xxx_driver
+ 
+ /***************************** Bus Space/DMA **********************************/
+ 
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,2,17)
+-typedef dma_addr_t bus_addr_t;
+-#else
+-typedef uint32_t bus_addr_t;
+-#endif
+ typedef uint32_t bus_size_t;
+ 
+ typedef enum {
+@@ -175,7 +162,7 @@ typedef union {
+ 
+ typedef struct bus_dma_segment
+ {
+-	bus_addr_t	ds_addr;
++	dma_addr_t	ds_addr;
+ 	bus_size_t	ds_len;
+ } bus_dma_segment_t;
+ 
+@@ -189,11 +176,11 @@ typedef struct ahc_linux_dma_tag* bus_dm
+ 
+ struct ahc_linux_dmamap
+ {
+-	bus_addr_t	bus_addr;
++	dma_addr_t	bus_addr;
+ };
+ typedef struct ahc_linux_dmamap* bus_dmamap_t;
+ 
+-typedef int bus_dma_filter_t(void*, bus_addr_t);
++typedef int bus_dma_filter_t(void*, dma_addr_t);
+ typedef void bus_dmamap_callback_t(void *, bus_dma_segment_t *, int, int);
+ 
+ #define BUS_DMA_WAITOK		0x0
+@@ -210,7 +197,7 @@ typedef void bus_dmamap_callback_t(void 
+ 
+ int	ahc_dma_tag_create(struct ahc_softc *, bus_dma_tag_t /*parent*/,
+ 			   bus_size_t /*alignment*/, bus_size_t /*boundary*/,
+-			   bus_addr_t /*lowaddr*/, bus_addr_t /*highaddr*/,
++			   dma_addr_t /*lowaddr*/, dma_addr_t /*highaddr*/,
+ 			   bus_dma_filter_t*/*filter*/, void */*filterarg*/,
+ 			   bus_size_t /*maxsize*/, int /*nsegments*/,
+ 			   bus_size_t /*maxsegsz*/, int /*flags*/,
+@@ -292,11 +279,7 @@ ahc_scb_timer_reset(struct scb *scb, u_i
+ }
+ 
+ /***************************** SMP support ************************************/
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,17)
+ #include <linux/spinlock.h>
+-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
+-#include <linux/smp.h>
+-#endif
+ 
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) || defined(SCSI_HAS_HOST_LOCK))
+ #define AHC_SCSI_HAS_HOST_LOCK 1
+@@ -515,11 +498,8 @@ typedef enum {
+ 
+ struct scb_platform_data {
+ 	struct ahc_linux_device	*dev;
+-	bus_addr_t		 buf_busaddr;
++	dma_addr_t		 buf_busaddr;
+ 	uint32_t		 xfer_len;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
+-	uint32_t		 resid;		/* Transfer residual */
+-#endif
+ 	uint32_t		 sense_resid;	/* Auto-Sense residual */
+ 	ahc_linux_scb_flags	 flags;
+ };
+@@ -549,9 +529,7 @@ struct ahc_platform_data {
+ 	struct ahc_completeq	 completeq;
+ 
+ 	spinlock_t		 spin_lock;
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 	struct tasklet_struct	 runq_tasklet;
+-#endif
+ 	u_int			 qfrozen;
+ 	pid_t			 dv_pid;
+ 	struct timer_list	 completeq_timer;
+@@ -567,7 +545,7 @@ struct ahc_platform_data {
+ 	uint32_t		 irq;		/* IRQ for this adapter */
+ 	uint32_t		 bios_address;
+ 	uint32_t		 mem_busaddr;	/* Mem Base Addr */
+-	bus_addr_t		 hw_dma_mask;
++	dma_addr_t		 hw_dma_mask;
+ 	ahc_linux_softc_flags	 flags;
+ };
+ 
+@@ -819,9 +797,7 @@ ahc_list_unlock(unsigned long *flags)
+ #define PCIR_SUBVEND_0	0x2c
+ #define PCIR_SUBDEV_0	0x2e
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ extern struct pci_driver aic7xxx_pci_driver;
+-#endif
+ 
+ typedef enum
+ {
+@@ -954,25 +930,6 @@ ahc_flush_device_writes(struct ahc_softc
+ 	ahc_inb(ahc, INTSTAT);
+ }
+ 
+-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,3,0)
+-#define pci_map_sg(pdev, sg_list, nseg, direction) (nseg)
+-#define pci_unmap_sg(pdev, sg_list, nseg, direction)
+-#define sg_dma_address(sg) (VIRT_TO_BUS((sg)->address))
+-#define sg_dma_len(sg) ((sg)->length)
+-#define pci_map_single(pdev, buffer, bufflen, direction) \
+-	(VIRT_TO_BUS(buffer))
+-#define pci_unmap_single(pdev, buffer, buflen, direction)
+-#endif
+-
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,3)
+-#define ahc_pci_set_dma_mask pci_set_dma_mask
+-#else
+-/*
+- * Always "return" 0 for success.
+- */
+-#define ahc_pci_set_dma_mask(dev_softc, mask)  			\
+-	(((dev_softc)->dma_mask = mask) && 0)
+-#endif
+ /**************************** Proc FS Support *********************************/
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+ int	ahc_linux_proc_info(char *, char **, off_t, int, int, int);
+@@ -1080,35 +1037,13 @@ u_long ahc_get_transfer_length(struct sc
+ static __inline
+ int ahc_get_transfer_dir(struct scb *scb)
+ {
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,40)
+ 	return (scb->io_ctx->sc_data_direction);
+-#else
+-	if (scb->io_ctx->bufflen == 0)
+-		return (CAM_DIR_NONE);
+-
+-	switch(scb->io_ctx->cmnd[0]) {
+-	case 0x08:  /* READ(6)  */
+-	case 0x28:  /* READ(10) */
+-	case 0xA8:  /* READ(12) */
+-		return (CAM_DIR_IN);
+-        case 0x0A:  /* WRITE(6)  */
+-        case 0x2A:  /* WRITE(10) */
+-        case 0xAA:  /* WRITE(12) */
+-		return (CAM_DIR_OUT);
+-        default:
+-		return (CAM_DIR_NONE);
+-        }
+-#endif
+ }
+ 
+ static __inline
+ void ahc_set_residual(struct scb *scb, u_long resid)
+ {
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
+ 	scb->io_ctx->resid = resid;
+-#else
+-	scb->platform_data->resid = resid;
+-#endif
+ }
+ 
+ static __inline
+@@ -1120,11 +1055,7 @@ void ahc_set_sense_residual(struct scb *
+ static __inline
+ u_long ahc_get_residual(struct scb *scb)
+ {
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
+ 	return (scb->io_ctx->resid);
+-#else
+-	return (scb->platform_data->resid);
+-#endif
+ }
+ 
+ static __inline
+diff -pruN a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
+--- a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c	2004-11-02 17:49:59.000000000 +0900
++++ b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c	2004-11-02 17:36:09.000000000 +0900
+@@ -40,6 +40,7 @@
+  */
+ 
+ #include "aic7xxx_osm.h"
++#include "aic7xxx_pci.h"
+ 
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
+ struct pci_device_id
+@@ -57,16 +58,80 @@ static int	ahc_linux_pci_reserve_mem_reg
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ static void	ahc_linux_pci_dev_remove(struct pci_dev *pdev);
+ 
+-/* We do our own ID filtering.  So, grab all SCSI storage class devices. */
++/* Define the macro locally since it's different for different class of chips.
++*/
++#define ID(x)	ID_C(x, PCI_CLASS_STORAGE_SCSI)
++
+ static struct pci_device_id ahc_linux_pci_id_table[] = {
+-	{
+-		0x9004, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
+-		PCI_CLASS_STORAGE_SCSI << 8, 0xFFFF00, 0
+-	},
+-	{
+-		0x9005, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
+-		PCI_CLASS_STORAGE_SCSI << 8, 0xFFFF00, 0
+-	},
++	/* aic7850 based controllers */
++	ID(ID_AHA_2902_04_10_15_20C_30C),
++	/* aic7860 based controllers */
++	ID(ID_AHA_2930CU),
++	ID(ID_AHA_1480A & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_2940AU_0 & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_2940AU_CN & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_2930C_VAR & ID_DEV_VENDOR_MASK),
++	/* aic7870 based controllers */
++	ID(ID_AHA_2940),
++	ID(ID_AHA_3940),
++	ID(ID_AHA_398X),
++	ID(ID_AHA_2944),
++	ID(ID_AHA_3944),
++	ID(ID_AHA_4944),
++	/* aic7880 based controllers */
++	ID(ID_AHA_2940U & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_3940U & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_2944U & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_3944U & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_398XU & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_4944U & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_2930U & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_2940U_PRO & ID_DEV_VENDOR_MASK),
++	ID(ID_AHA_2940U_CN & ID_DEV_VENDOR_MASK),
++	/* aic7890 based controllers */
++	ID(ID_AHA_2930U2),
++	ID(ID_AHA_2940U2B),
++	ID(ID_AHA_2940U2_OEM),
++	ID(ID_AHA_2940U2),
++	ID(ID_AHA_2950U2B),
++	ID16(ID_AIC7890_ARO & ID_AIC7895_ARO_MASK),
++	ID(ID_AAA_131U2),
++	/* aic7890 based controllers */
++	ID(ID_AHA_29160),
++	ID(ID_AHA_29160_CPQ),
++	ID(ID_AHA_29160N),
++	ID(ID_AHA_29160C),
++	ID(ID_AHA_29160B),
++	ID(ID_AHA_19160B),
++	ID(ID_AIC7892_ARO),
++	/* aic7892 based controllers */
++	ID(ID_AHA_2940U_DUAL),
++	ID(ID_AHA_3940AU),
++	ID(ID_AHA_3944AU),
++	ID(ID_AIC7895_ARO),
++	ID(ID_AHA_3950U2B_0),
++	ID(ID_AHA_3950U2B_1),
++	ID(ID_AHA_3950U2D_0),
++	ID(ID_AHA_3950U2D_1),
++	ID(ID_AIC7896_ARO),
++	/* aic7899 based controllers */
++	ID(ID_AHA_3960D),
++	ID(ID_AHA_3960D_CPQ),
++	ID(ID_AIC7899_ARO),
++	/* Generic chip probes for devices we don't know exactly. */
++	ID(ID_AIC7850 & ID_DEV_VENDOR_MASK),
++	ID(ID_AIC7855 & ID_DEV_VENDOR_MASK),
++	ID(ID_AIC7859 & ID_DEV_VENDOR_MASK),
++	ID(ID_AIC7860 & ID_DEV_VENDOR_MASK),
++	ID(ID_AIC7870 & ID_DEV_VENDOR_MASK),
++	ID(ID_AIC7880 & ID_DEV_VENDOR_MASK),
++ 	ID16(ID_AIC7890 & ID_9005_GENERIC_MASK),
++ 	ID16(ID_AIC7892 & ID_9005_GENERIC_MASK),
++	ID(ID_AIC7895 & ID_DEV_VENDOR_MASK),
++	ID16(ID_AIC7896 & ID_9005_GENERIC_MASK),
++	ID16(ID_AIC7899 & ID_9005_GENERIC_MASK),
++	ID(ID_AIC7810 & ID_DEV_VENDOR_MASK),
++	ID(ID_AIC7815 & ID_DEV_VENDOR_MASK),
+ 	{ 0 }
+ };
+ 
+@@ -95,12 +160,14 @@ ahc_linux_pci_dev_remove(struct pci_dev 
+ 	if (ahc != NULL) {
+ 		u_long s;
+ 
++		TAILQ_REMOVE(&ahc_tailq, ahc, links);
++		ahc_list_unlock(&l);
+ 		ahc_lock(ahc, &s);
+ 		ahc_intr_enable(ahc, FALSE);
+ 		ahc_unlock(ahc, &s);
+ 		ahc_free(ahc);
+-	}
+-	ahc_list_unlock(&l);
++	} else
++		ahc_list_unlock(&l);
+ }
+ #endif /* !LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) */
+ 
+@@ -108,7 +175,7 @@ static int
+ ahc_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ {
+ 	char		 buf[80];
+-	bus_addr_t	 mask_39bit;
++	dma_addr_t	 mask_39bit;
+ 	struct		 ahc_softc *ahc;
+ 	ahc_dev_softc_t	 pci;
+ 	struct		 ahc_pci_identity *entry;
+@@ -159,14 +226,14 @@ ahc_linux_pci_dev_probe(struct pci_dev *
+ 	}
+ 	pci_set_master(pdev);
+ 
+-	mask_39bit = (bus_addr_t)0x7FFFFFFFFFULL;
+-	if (sizeof(bus_addr_t) > 4
++	mask_39bit = 0x7FFFFFFFFFULL;
++	if (sizeof(dma_addr_t) > 4
+ 	 && ahc_linux_get_memsize() > 0x80000000
+-	 && ahc_pci_set_dma_mask(pdev, mask_39bit) == 0) {
++	 && pci_set_dma_mask(pdev, mask_39bit) == 0) {
+ 		ahc->flags |= AHC_39BIT_ADDRESSING;
+ 		ahc->platform_data->hw_dma_mask = mask_39bit;
+ 	} else {
+-		if (ahc_pci_set_dma_mask(pdev, 0xFFFFFFFF)) {
++		if (pci_set_dma_mask(pdev, 0xFFFFFFFF)) {
+ 			printk(KERN_WARNING "aic7xxx: No suitable DMA available.\n");
+                 	return (-ENODEV);
+ 		}
+@@ -262,21 +329,10 @@ ahc_linux_pci_reserve_mem_region(struct 
+ 				 uint8_t **maddr)
+ {
+ 	u_long	start;
+-	u_long	base_page;
+-	u_long	base_offset;
+ 	int	error;
+ 
+ 	error = 0;
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
+ 	start = pci_resource_start(ahc->dev_softc, 1);
+-	base_page = start & PAGE_MASK;
+-	base_offset = start - base_page;
+-#else
+-	start = ahc_pci_read_config(ahc->dev_softc, PCIR_MAPS+4, 4);
+-	base_offset = start & PCI_BASE_ADDRESS_MEM_MASK;
+-	base_page = base_offset & PAGE_MASK;
+-	base_offset -= base_page;
+-#endif
+ 	if (start != 0) {
+ 		*bus_addr = start;
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+@@ -284,14 +340,13 @@ ahc_linux_pci_reserve_mem_region(struct 
+ 			error = ENOMEM;
+ #endif
+ 		if (error == 0) {
+-			*maddr = ioremap_nocache(base_page, base_offset + 256);
++			*maddr = ioremap_nocache(start, 256);
+ 			if (*maddr == NULL) {
+ 				error = ENOMEM;
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 				release_mem_region(start, 0x1000);
+ #endif
+-			} else
+-				*maddr += base_offset;
++			}
+ 		}
+ 	} else
+ 		error = ENOMEM;
+@@ -332,7 +387,7 @@ ahc_pci_map_registers(struct ahc_softc *
+ 			       ahc_get_pci_bus(ahc->dev_softc),
+ 			       ahc_get_pci_slot(ahc->dev_softc),
+ 			       ahc_get_pci_function(ahc->dev_softc));
+-			iounmap((void *)((u_long)maddr & PAGE_MASK));
++			iounmap(maddr);
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ 			release_mem_region(ahc->platform_data->mem_busaddr,
+ 					   0x1000);
+diff -pruN a/drivers/scsi/aic7xxx/aic7xxx_pci.c b/drivers/scsi/aic7xxx/aic7xxx_pci.c
+--- a/drivers/scsi/aic7xxx/aic7xxx_pci.c	2004-11-02 17:49:59.000000000 +0900
++++ b/drivers/scsi/aic7xxx/aic7xxx_pci.c	2004-11-02 16:31:10.000000000 +0900
+@@ -54,8 +54,7 @@
+ #include <dev/aic7xxx/aic7xxx_93cx6.h>
+ #endif
+ 
+-#define AHC_PCI_IOADDR	PCIR_MAPS	/* I/O Address */
+-#define AHC_PCI_MEMADDR	(PCIR_MAPS + 4)	/* Mem I/O Address */
++#include "aic7xxx_pci.h"
+ 
+ static __inline uint64_t
+ ahc_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor)
+@@ -70,84 +69,8 @@ ahc_compose_id(u_int device, u_int vendo
+ 	return (id);
+ }
+ 
+-#define ID_ALL_MASK			0xFFFFFFFFFFFFFFFFull
+-#define ID_DEV_VENDOR_MASK		0xFFFFFFFF00000000ull
+-#define ID_9005_GENERIC_MASK		0xFFF0FFFF00000000ull
+-#define ID_9005_SISL_MASK		0x000FFFFF00000000ull
+-#define ID_9005_SISL_ID			0x0005900500000000ull
+-#define ID_AIC7850			0x5078900400000000ull
+-#define ID_AHA_2902_04_10_15_20C_30C	0x5078900478509004ull
+-#define ID_AIC7855			0x5578900400000000ull
+-#define ID_AIC7859			0x3860900400000000ull
+-#define ID_AHA_2930CU			0x3860900438699004ull
+-#define ID_AIC7860			0x6078900400000000ull
+-#define ID_AIC7860C			0x6078900478609004ull
+-#define ID_AHA_1480A			0x6075900400000000ull
+-#define ID_AHA_2940AU_0			0x6178900400000000ull
+-#define ID_AHA_2940AU_1			0x6178900478619004ull
+-#define ID_AHA_2940AU_CN		0x2178900478219004ull
+-#define ID_AHA_2930C_VAR		0x6038900438689004ull
+-
+-#define ID_AIC7870			0x7078900400000000ull
+-#define ID_AHA_2940			0x7178900400000000ull
+-#define ID_AHA_3940			0x7278900400000000ull
+-#define ID_AHA_398X			0x7378900400000000ull
+-#define ID_AHA_2944			0x7478900400000000ull
+-#define ID_AHA_3944			0x7578900400000000ull
+-#define ID_AHA_4944			0x7678900400000000ull
+-
+-#define ID_AIC7880			0x8078900400000000ull
+-#define ID_AIC7880_B			0x8078900478809004ull
+-#define ID_AHA_2940U			0x8178900400000000ull
+-#define ID_AHA_3940U			0x8278900400000000ull
+-#define ID_AHA_2944U			0x8478900400000000ull
+-#define ID_AHA_3944U			0x8578900400000000ull
+-#define ID_AHA_398XU			0x8378900400000000ull
+-#define ID_AHA_4944U			0x8678900400000000ull
+-#define ID_AHA_2940UB			0x8178900478819004ull
+-#define ID_AHA_2930U			0x8878900478889004ull
+-#define ID_AHA_2940U_PRO		0x8778900478879004ull
+-#define ID_AHA_2940U_CN			0x0078900478009004ull
+-
+-#define ID_AIC7895			0x7895900478959004ull
+-#define ID_AIC7895_ARO			0x7890900478939004ull
+-#define ID_AIC7895_ARO_MASK		0xFFF0FFFFFFFFFFFFull
+-#define ID_AHA_2940U_DUAL		0x7895900478919004ull
+-#define ID_AHA_3940AU			0x7895900478929004ull
+-#define ID_AHA_3944AU			0x7895900478949004ull
+-
+-#define ID_AIC7890			0x001F9005000F9005ull
+-#define ID_AIC7890_ARO			0x00139005000F9005ull
+-#define ID_AAA_131U2			0x0013900500039005ull
+-#define ID_AHA_2930U2			0x0011900501819005ull
+-#define ID_AHA_2940U2B			0x00109005A1009005ull
+-#define ID_AHA_2940U2_OEM		0x0010900521809005ull
+-#define ID_AHA_2940U2			0x00109005A1809005ull
+-#define ID_AHA_2950U2B			0x00109005E1009005ull
+-
+-#define ID_AIC7892			0x008F9005FFFF9005ull
+-#define ID_AIC7892_ARO			0x00839005FFFF9005ull
+-#define ID_AHA_29160			0x00809005E2A09005ull
+-#define ID_AHA_29160_CPQ		0x00809005E2A00E11ull
+-#define ID_AHA_29160N			0x0080900562A09005ull
+-#define ID_AHA_29160C			0x0080900562209005ull
+-#define ID_AHA_29160B			0x00809005E2209005ull
+-#define ID_AHA_19160B			0x0081900562A19005ull
+-
+-#define ID_AIC7896			0x005F9005FFFF9005ull
+-#define ID_AIC7896_ARO			0x00539005FFFF9005ull
+-#define ID_AHA_3950U2B_0		0x00509005FFFF9005ull
+-#define ID_AHA_3950U2B_1		0x00509005F5009005ull
+-#define ID_AHA_3950U2D_0		0x00519005FFFF9005ull
+-#define ID_AHA_3950U2D_1		0x00519005B5009005ull
+-
+-#define ID_AIC7899			0x00CF9005FFFF9005ull
+-#define ID_AIC7899_ARO			0x00C39005FFFF9005ull
+-#define ID_AHA_3960D			0x00C09005F6209005ull
+-#define ID_AHA_3960D_CPQ		0x00C09005F6200E11ull
+-
+-#define ID_AIC7810			0x1078900400000000ull
+-#define ID_AIC7815			0x7815900400000000ull
++#define AHC_PCI_IOADDR	PCIR_MAPS	/* I/O Address */
++#define AHC_PCI_MEMADDR	(PCIR_MAPS + 4)	/* Mem I/O Address */
+ 
+ #define DEVID_9005_TYPE(id) ((id) & 0xF)
+ #define		DEVID_9005_TYPE_HBA		0x0	/* Standard Card */
+@@ -1284,8 +1207,10 @@ ahc_pci_test_register_access(struct ahc_
+ 	 * or read prefetching could be initiated by the
+ 	 * CPU or host bridge.  Our device does not support
+ 	 * either, so look for data corruption and/or flagged
+-	 * PCI errors.
++	 * PCI errors.  First pause without causing another
++	 * chip reset.
+ 	 */
++	hcntrl &= ~CHIPRST;
+ 	ahc_outb(ahc, HCNTRL, hcntrl|PAUSE);
+ 	while (ahc_is_paused(ahc) == 0)
+ 		;
+diff -pruN a/drivers/scsi/aic7xxx/aic7xxx_pci.h b/drivers/scsi/aic7xxx/aic7xxx_pci.h
+--- a/drivers/scsi/aic7xxx/aic7xxx_pci.h	1970-01-01 09:00:00.000000000 +0900
++++ b/drivers/scsi/aic7xxx/aic7xxx_pci.h	2004-11-02 16:31:10.000000000 +0900
+@@ -0,0 +1,124 @@
++/*
++ * Adaptec AIC7xxx device driver for Linux.
++ *
++ * Copyright (c) 2000-2001 Adaptec Inc.
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions, and the following disclaimer,
++ *    without modification.
++ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
++ *    substantially similar to the "NO WARRANTY" disclaimer below
++ *    ("Disclaimer") and any redistribution must be conditioned upon
++ *    including a substantially similar Disclaimer requirement for further
++ *    binary redistribution.
++ * 3. Neither the names of the above-listed copyright holders nor the names
++ *    of any contributors may be used to endorse or promote products derived
++ *    from this software without specific prior written permission.
++ *
++ * Alternatively, this software may be distributed under the terms of the
++ * GNU General Public License ("GPL") version 2 as published by the Free
++ * Software Foundation.
++ *
++ * NO WARRANTY
++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
++ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
++ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++ * POSSIBILITY OF SUCH DAMAGES.
++ *
++ * $Id$
++ *
++ */
++#ifndef _AIC7XXX_PCI_H_
++#define _AIC7XXX_PCI_H_
++
++#define ID_ALL_MASK			0xFFFFFFFFFFFFFFFFull
++#define ID_DEV_VENDOR_MASK		0xFFFFFFFF00000000ull
++#define ID_9005_GENERIC_MASK		0xFFF0FFFF00000000ull
++#define ID_9005_SISL_MASK		0x000FFFFF00000000ull
++#define ID_9005_SISL_ID			0x0005900500000000ull
++#define ID_AIC7850			0x5078900400000000ull
++#define ID_AHA_2902_04_10_15_20C_30C	0x5078900478509004ull
++#define ID_AIC7855			0x5578900400000000ull
++#define ID_AIC7859			0x3860900400000000ull
++#define ID_AHA_2930CU			0x3860900438699004ull
++#define ID_AIC7860			0x6078900400000000ull
++#define ID_AIC7860C			0x6078900478609004ull
++#define ID_AHA_1480A			0x6075900400000000ull
++#define ID_AHA_2940AU_0			0x6178900400000000ull
++#define ID_AHA_2940AU_1			0x6178900478619004ull
++#define ID_AHA_2940AU_CN		0x2178900478219004ull
++#define ID_AHA_2930C_VAR		0x6038900438689004ull
++
++#define ID_AIC7870			0x7078900400000000ull
++#define ID_AHA_2940			0x7178900400000000ull
++#define ID_AHA_3940			0x7278900400000000ull
++#define ID_AHA_398X			0x7378900400000000ull
++#define ID_AHA_2944			0x7478900400000000ull
++#define ID_AHA_3944			0x7578900400000000ull
++#define ID_AHA_4944			0x7678900400000000ull
++
++#define ID_AIC7880			0x8078900400000000ull
++#define ID_AIC7880_B			0x8078900478809004ull
++#define ID_AHA_2940U			0x8178900400000000ull
++#define ID_AHA_3940U			0x8278900400000000ull
++#define ID_AHA_2944U			0x8478900400000000ull
++#define ID_AHA_3944U			0x8578900400000000ull
++#define ID_AHA_398XU			0x8378900400000000ull
++#define ID_AHA_4944U			0x8678900400000000ull
++#define ID_AHA_2940UB			0x8178900478819004ull
++#define ID_AHA_2930U			0x8878900478889004ull
++#define ID_AHA_2940U_PRO		0x8778900478879004ull
++#define ID_AHA_2940U_CN			0x0078900478009004ull
++
++#define ID_AIC7895			0x7895900478959004ull
++#define ID_AIC7895_ARO			0x7890900478939004ull
++#define ID_AIC7895_ARO_MASK		0xFFF0FFFFFFFFFFFFull
++#define ID_AHA_2940U_DUAL		0x7895900478919004ull
++#define ID_AHA_3940AU			0x7895900478929004ull
++#define ID_AHA_3944AU			0x7895900478949004ull
++
++#define ID_AIC7890			0x001F9005000F9005ull
++#define ID_AIC7890_ARO			0x00139005000F9005ull
++#define ID_AAA_131U2			0x0013900500039005ull
++#define ID_AHA_2930U2			0x0011900501819005ull
++#define ID_AHA_2940U2B			0x00109005A1009005ull
++#define ID_AHA_2940U2_OEM		0x0010900521809005ull
++#define ID_AHA_2940U2			0x00109005A1809005ull
++#define ID_AHA_2950U2B			0x00109005E1009005ull
++
++#define ID_AIC7892			0x008F9005FFFF9005ull
++#define ID_AIC7892_ARO			0x00839005FFFF9005ull
++#define ID_AHA_29160			0x00809005E2A09005ull
++#define ID_AHA_29160_CPQ		0x00809005E2A00E11ull
++#define ID_AHA_29160N			0x0080900562A09005ull
++#define ID_AHA_29160C			0x0080900562209005ull
++#define ID_AHA_29160B			0x00809005E2209005ull
++#define ID_AHA_19160B			0x0081900562A19005ull
++
++#define ID_AIC7896			0x005F9005FFFF9005ull
++#define ID_AIC7896_ARO			0x00539005FFFF9005ull
++#define ID_AHA_3950U2B_0		0x00509005FFFF9005ull
++#define ID_AHA_3950U2B_1		0x00509005F5009005ull
++#define ID_AHA_3950U2D_0		0x00519005FFFF9005ull
++#define ID_AHA_3950U2D_1		0x00519005B5009005ull
++
++#define ID_AIC7899			0x00CF9005FFFF9005ull
++#define ID_AIC7899_ARO			0x00C39005FFFF9005ull
++#define ID_AHA_3960D			0x00C09005F6209005ull
++#define ID_AHA_3960D_CPQ		0x00C09005F6200E11ull
++
++#define ID_AIC7810			0x1078900400000000ull
++#define ID_AIC7815			0x7815900400000000ull
++
++#endif /* _AIC7XXX_PCI_H_ */
+diff -pruN a/drivers/scsi/aic7xxx/aiclib.h b/drivers/scsi/aic7xxx/aiclib.h
+--- a/drivers/scsi/aic7xxx/aiclib.h	2004-08-14 14:36:14.000000000 +0900
++++ b/drivers/scsi/aic7xxx/aiclib.h	2004-11-02 16:31:10.000000000 +0900
+@@ -1043,4 +1043,43 @@ scsi_4btoul(uint8_t *bytes)
+ 	return (rv);
+ }
+ 
++/* Macros for generating the elements of the PCI ID tables. */
++
++#define GETID(v, s) (unsigned)(((v) >> (s)) & 0xFFFF ?: PCI_ANY_ID)
++
++#define ID_C(x, c)						\
++{								\
++	GETID(x,32), GETID(x,48), GETID(x,0), GETID(x,16),	\
++	(c) << 8, 0xFFFF00, 0					\
++}
++
++#define ID2C(x)                          \
++	ID_C(x, PCI_CLASS_STORAGE_SCSI), \
++	ID_C(x, PCI_CLASS_STORAGE_RAID)
++
++#define IDIROC(x)  ((x) | ~ID_ALL_IROC_MASK)
++
++/* Generate IDs for all 16 possibilites.
++ * The argument has already masked out
++ * the 4 least significant bits of the device id.
++ * (e.g., mask: ID_9005_GENERIC_MASK).
++ */
++#define ID16(x)                          \
++	ID(x),                           \
++	ID((x) | 0x0001000000000000ull), \
++	ID((x) | 0x0002000000000000ull), \
++	ID((x) | 0x0003000000000000ull), \
++	ID((x) | 0x0004000000000000ull), \
++	ID((x) | 0x0005000000000000ull), \
++	ID((x) | 0x0006000000000000ull), \
++	ID((x) | 0x0007000000000000ull), \
++	ID((x) | 0x0008000000000000ull), \
++	ID((x) | 0x0009000000000000ull), \
++	ID((x) | 0x000A000000000000ull), \
++	ID((x) | 0x000B000000000000ull), \
++	ID((x) | 0x000C000000000000ull), \
++	ID((x) | 0x000D000000000000ull), \
++	ID((x) | 0x000E000000000000ull), \
++	ID((x) | 0x000F000000000000ull)
++
+ #endif /*_AICLIB_H */
+diff -pruN a/drivers/scsi/aic7xxx/cam.h b/drivers/scsi/aic7xxx/cam.h
+--- a/drivers/scsi/aic7xxx/cam.h	2004-08-14 14:36:58.000000000 +0900
++++ b/drivers/scsi/aic7xxx/cam.h	2004-11-02 16:31:10.000000000 +0900
+@@ -85,12 +85,6 @@ typedef enum {
+ 	CAM_STATUS_MASK		= 0x3F
+ } cam_status;
+ 
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
+-#define	SCSI_DATA_READ	1
+-#define	SCSI_DATA_WRITE 2
+-#define SCSI_DATA_NONE  3
+-#endif
+-
+ /*
+  * Definitions for the asynchronous callback CCB fields.
+  */

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/alpha-epoch-comment.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/alpha-epoch-comment.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/alpha-epoch-comment.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,22 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: fix comment about epochs in arch/alpha/kernel/time.c
+## DP: Patch author: unknown
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- kernel-source-2.6.6/arch/alpha/kernel/time.c	2004-04-05 19:49:22.000000000 +1000
++++ kernel-source-2.6.6-1/arch/alpha/kernel/time.c	2004-04-05 20:54:15.000000000 +1000
+@@ -366,7 +366,7 @@
+ 		BCD_TO_BIN(year);
+ 	}
+ 
+-	/* PC-like is standard; used for year < 20 || year >= 70 */
++	/* PC-like is standard; used for year >= 70 */
+ 	epoch = 1900;
+ 	if (year < 20)
+ 		epoch = 2000;

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/alpha-termbits.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/alpha-termbits.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/alpha-termbits.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,22 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: add CIBAUD/CMSPAR in include/asm-alpha/termbits.h
+## DP: Patch author: unknown
+## DP: Upstream status: not submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- kernel-source-2.6.6/include/asm-alpha/termbits.h	2004-03-11 13:55:35.000000000 +1100
++++ kernel-source-2.6.6-1/include/asm-alpha/termbits.h	2004-03-12 22:03:04.000000000 +1100
+@@ -134,6 +134,8 @@
+ #define B3000000  00034
+ #define B3500000  00035
+ #define B4000000  00036
++#define CIBAUD	  002003600000	/* input baud rate (not used) */
++#define CMSPAR	  010000000000		/* mark or space (stick) parity */
+ 
+ #define CSIZE	00001400
+ #define   CS5	00000000

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/alsa-module-load-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/alsa-module-load-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/alsa-module-load-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,50 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [ALSA]  suppress auto-loading of modules in module_init().
+## DP: Patch author: Takashi Iwai <tiwai at suse.de>
+## DP: Upstream status: currently in -mm tree, not yet in linus'.
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/09/06 20:18:03+02:00 perex at suse.cz 
+#   [ALSA]  suppress auto-loading of modules in module_init().
+#   
+#   ALSA sequencer
+#   The auto-loading of sequencer modules is suppressed in module_init().
+#   The recent module-init-tools may cause blocking.
+#   
+#   Signed-off-by: Takashi Iwai <tiwai at suse.de>
+# 
+# sound/core/seq/seq_clientmgr.c
+#   2004/09/01 14:25:27+02:00 perex at suse.cz +4 -1
+#   [ALSA]  suppress auto-loading of modules in module_init().
+#   
+#   D:2004/09/01 20:25:27
+#   C:ALSA sequencer
+#   F:core/seq/seq_clientmgr.c:1.34->1.35 
+#   L:The auto-loading of sequencer modules is suppressed in module_init().
+#   L:The recent module-init-tools may cause blocking.
+#   Signed-off-by: Takashi Iwai <tiwai at suse.de>
+# 
+diff -Nru a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
+--- a/sound/core/seq/seq_clientmgr.c	2004-09-21 21:03:33 -07:00
++++ b/sound/core/seq/seq_clientmgr.c	2004-09-21 21:03:33 -07:00
+@@ -156,7 +156,10 @@
+ 					card_requested[card] = 1;
+ 					snd_request_card(card);
+ 				}
+-				snd_seq_device_load_drivers();
++				/* FIXME: may cause blocking when called from
++				 * module_init(), so disable this feature
++				 */
++				/* snd_seq_device_load_drivers(); */
+ 			}
+ 		}
+ 		spin_lock_irqsave(&clients_lock, flags);
+

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aout-loader-fixes.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aout-loader-fixes.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/aout-loader-fixes.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,69 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [PATCH] a.out: error check on set_brk
+## DP: Patch author: Chris Wright <chrisw at osdl.org>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/11/16 17:39:02-08:00 chrisw at osdl.org 
+#   [PATCH] a.out: error check on set_brk
+#   
+#   It's possible for do_brk() to fail during set_brk() when exec'ing and
+#   a.out.  This was noted with Florian's a.out binary and overcommit set to
+#   0. 
+#   
+#   Capture this error and terminate properly.
+#   
+#   Signed-off-by: Chris Wright <chrisw at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# fs/binfmt_aout.c
+#   2004/11/11 22:28:58-08:00 chrisw at osdl.org +14 -5
+#   a.out: error check on set_brk
+# 
+diff -Nru a/fs/binfmt_aout.c b/fs/binfmt_aout.c
+--- a/fs/binfmt_aout.c	2004-11-21 11:38:03 -08:00
++++ b/fs/binfmt_aout.c	2004-11-21 11:38:03 -08:00
+@@ -43,13 +43,18 @@
+ 	.min_coredump	= PAGE_SIZE
+ };
+ 
+-static void set_brk(unsigned long start, unsigned long end)
++#define BAD_ADDR(x)	((unsigned long)(x) >= TASK_SIZE)
++
++static int set_brk(unsigned long start, unsigned long end)
+ {
+ 	start = PAGE_ALIGN(start);
+ 	end = PAGE_ALIGN(end);
+-	if (end <= start)
+-		return;
+-	do_brk(start, end - start);
++	if (end > start) {
++		unsigned long addr = do_brk(start, end - start);
++		if (BAD_ADDR(addr))
++			return addr;
++	}
++	return 0;
+ }
+ 
+ /*
+@@ -413,7 +418,11 @@
+ beyond_if:
+ 	set_binfmt(&aout_format);
+ 
+-	set_brk(current->mm->start_brk, current->mm->brk);
++	retval = set_brk(current->mm->start_brk, current->mm->brk);
++	if (retval < 0) {
++		send_sig(SIGKILL, current, 0);
++		return retval;
++	}
+ 
+ 	retval = setup_arg_pages(bprm, EXSTACK_DEFAULT);
+ 	if (retval < 0) { 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/arch-x86_64-signal-bug.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/arch-x86_64-signal-bug.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/arch-x86_64-signal-bug.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,62 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: x86_64: fix syscall/signal restart bug
+## DP: Patch author: Andi Kleen <ak at suse.de>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/12/20 16:06:46-08:00 ak at suse.de 
+#   [PATCH] x86_64: fix syscall/signal restart bug
+#   
+#   Fix a pretty bad bug that caused sometimes signals on x86-64
+#   to be restarted like system calls. This corrupted the RIP and
+#   in general caused undesirable effects.
+#   
+#   The problem happens because orig_rax is unsigned on x86-64,
+#   but it originally was signed when the signal code was written.
+#   And the if (orig_rax >= 0) ended up always true.
+#   And gcc didn't warn about this, because the warning is only in 
+#   -Wextra. 
+#   
+#   In 2.4 we still had a cast for it, but somehow it got dropped
+#   in 2.5.
+#   
+#   Credit goes to John Slice for tracking it down and Erich Boleyn
+#   for the original fix. All blame to me. I fixed it at another
+#   place too.
+#   
+#   Signed-off-by: Andi Kleen <ak at suse.de>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# arch/x86_64/kernel/signal.c
+#   2004/12/20 16:06:38-08:00 ak at suse.de +2 -2
+#   x86_64: fix syscall/signal restart bug
+# 
+diff -Nru a/arch/x86_64/kernel/signal.c b/arch/x86_64/kernel/signal.c
+--- a/arch/x86_64/kernel/signal.c	2004-12-23 20:53:43 -08:00
++++ b/arch/x86_64/kernel/signal.c	2004-12-23 20:53:44 -08:00
+@@ -357,7 +357,7 @@
+ #endif
+ 
+ 	/* Are we from a system call? */
+-	if (regs->orig_rax >= 0) {
++	if ((long)regs->orig_rax >= 0) {
+ 		/* If so, check system call restarting.. */
+ 		switch (regs->rax) {
+ 		        case -ERESTART_RESTARTBLOCK:
+@@ -442,7 +442,7 @@
+ 
+  no_signal:
+ 	/* Did we come from a system call? */
+-	if (regs->orig_rax >= 0) {
++	if ((long)regs->orig_rax >= 0) {
+ 		/* Restart the system call - no handlers present */
+ 		long res = regs->rax;
+ 		if (res == -ERESTARTNOHAND ||

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/arch-x86_64-sys32_ni-overflow.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/arch-x86_64-sys32_ni-overflow.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/arch-x86_64-sys32_ni-overflow.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,70 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Buffer overrun in arch/x86_64/sys_ia32.c:sys32_ni_syscall()
+## DP: Patch author: Jeremy Fitzhardinge <jeremy at goop.org>, Chris Wright <chrisw at osdl.org>
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/12/01 17:08:01-08:00 jeremy at goop.org 
+#   [PATCH] Buffer overrun in arch/x86_64/sys_ia32.c:sys32_ni_syscall()
+#   
+#   With Chris Wright <chrisw at osdl.org>
+#   
+#   struct task_struct.comm is defined to be 16 chars, but
+#   arch/x86_64/sys_ia32.c:sys32_ni_syscall() and sys32_vm86_warning() copy it
+#   into a static 8 byte buffer, which will surely cause problems.  This patch
+#   makes lastcomm[] the right size, and makes sure it can't be overrun.  Since
+#   the code also goes to the effort of getting a local copy of current in "me",
+#   we may as well use it for printing the message.
+#   
+#   Signed-off-by: Chris Wright <chrisw at osdl.org>
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# arch/x86_64/ia32/sys_ia32.c
+#   2004/12/01 00:13:46-08:00 jeremy at goop.org +9 -8
+#   Buffer overrun in arch/x86_64/sys_ia32.c:sys32_ni_syscall()
+# 
+diff -Nru a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c
+--- a/arch/x86_64/ia32/sys_ia32.c	2004-12-06 08:23:41 -08:00
++++ b/arch/x86_64/ia32/sys_ia32.c	2004-12-06 08:23:41 -08:00
+@@ -525,11 +525,12 @@
+ int sys32_ni_syscall(int call)
+ { 
+ 	struct task_struct *me = current;
+-	static char lastcomm[8];
+-	if (strcmp(lastcomm, me->comm)) {
+-	printk(KERN_INFO "IA32 syscall %d from %s not implemented\n", call,
+-	       current->comm);
+-		strcpy(lastcomm, me->comm); 
++	static char lastcomm[sizeof(me->comm)];
++
++	if (strncmp(lastcomm, me->comm, sizeof(lastcomm))) {
++		printk(KERN_INFO "IA32 syscall %d from %s not implemented\n",
++		       call, me->comm);
++		strncpy(lastcomm, me->comm, sizeof(lastcomm));
+ 	} 
+ 	return -ENOSYS;	       
+ } 
+@@ -1125,11 +1126,11 @@
+ long sys32_vm86_warning(void)
+ { 
+ 	struct task_struct *me = current;
+-	static char lastcomm[8];
+-	if (strcmp(lastcomm, me->comm)) {
++	static char lastcomm[sizeof(me->comm)];
++	if (strncmp(lastcomm, me->comm, sizeof(lastcomm))) {
+ 		printk(KERN_INFO "%s: vm86 mode not supported on 64 bit kernel\n",
+ 		       me->comm);
+-		strcpy(lastcomm, me->comm); 
++		strncpy(lastcomm, me->comm, sizeof(lastcomm));
+ 	} 
+ 	return -ENOSYS;
+ } 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/arch-x86_64-sys32_quotactl-overflow.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/arch-x86_64-sys32_quotactl-overflow.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/arch-x86_64-sys32_quotactl-overflow.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,28 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Buffer overrun in x86_64's sys32_quotactl()
+## DP: Patch author: Andres Salomon <dilinger at voxel.net>
+## DP: Upstream status: unsubmitted; sys32_quotactl is removed post-2.6.9.
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- a/arch/x86_64/ia32/sys_ia32.c	2004-12-16 23:01:03.000000000 -0500
++++ b/arch/x86_64/ia32/sys_ia32.c	2004-12-16 23:03:54.000000000 -0500
+@@ -1329,11 +1329,11 @@
+ long sys32_quotactl(void)
+ { 
+ 	struct task_struct *me = current;
+-	static char lastcomm[8];
+-	if (strcmp(lastcomm, me->comm)) {
++	static char lastcomm[sizeof(me->comm)];
++	if (strncmp(lastcomm, me->comm, sizeof(me->comm))) {
+ 		printk(KERN_INFO "%s: 32bit quotactl not supported on 64 bit kernel\n",
+ 		       me->comm);
+-		strcpy(lastcomm, me->comm); 
++		strncpy(lastcomm, me->comm, sizeof(me->comm)); 
+ 	} 
+ 	return -ENOSYS;
+ } 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ata_piix-combinde-mode-fix-2.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ata_piix-combinde-mode-fix-2.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ata_piix-combinde-mode-fix-2.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,171 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: libata: PCI IDE legacy mode fix
+## DP: Patch author: Bartlomiej Zolnierkiewicz
+## DP: Upstream status: included
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: bzolnier (BitKeeper)
+# cset: 1.1988.91.1 (2.6) key=416b214bV7CwIRgRqoomLi6qTfcGmw
+# inclusion: upstream
+# descrition: [PATCH] libata: PCI IDE legacy mode fix
+# revision date: Mon, 08 Nov 2004 16:12:47 +0900
+#
+# rset: ChangeSet|1.1988.89.2..1.1988.91.1
+# rset: drivers/scsi/libata-core.c|1.100..1.101
+# rset: include/linux/libata.h|1.55..1.56
+# rset: drivers/scsi/ata_piix.c|1.31..1.32
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/11 20:11:55-04:00 bzolnier at elka.pw.edu.pl 
+#   [PATCH] libata: PCI IDE legacy mode fix
+#   
+#   In PCI IDE legacy mode ap->port_no is incorrectly set to zero for
+#   the second port.  Fix it by adding ->hard_port_no to struct ata_probe_ent
+#   and struct ata_port (per Jeff's suggestion) and teaching ata_piix.c
+#   to use it instead of ->port_no.
+#   
+#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at gmail.com>
+# 
+# include/linux/libata.h
+#   2004/10/11 15:52:22-04:00 bzolnier at elka.pw.edu.pl +2 -0
+#   PCI IDE legacy mode fix
+# 
+# drivers/scsi/libata-core.c
+#   2004/10/11 15:52:22-04:00 bzolnier at elka.pw.edu.pl +8 -0
+#   PCI IDE legacy mode fix
+# 
+# drivers/scsi/ata_piix.c
+#   2004/10/11 15:52:22-04:00 bzolnier at elka.pw.edu.pl +10 -10
+#   PCI IDE legacy mode fix
+# 
+diff -Nru a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c
+--- a/drivers/scsi/ata_piix.c	2004-11-08 16:12:47 +09:00
++++ b/drivers/scsi/ata_piix.c	2004-11-08 16:12:47 +09:00
+@@ -268,7 +268,7 @@
+ 		goto cbl40;
+ 
+ 	/* check BIOS cable detect results */
+-	mask = ap->port_no == 0 ? PIIX_80C_PRI : PIIX_80C_SEC;
++	mask = ap->hard_port_no == 0 ? PIIX_80C_PRI : PIIX_80C_SEC;
+ 	pci_read_config_byte(pdev, PIIX_IOCFG, &tmp);
+ 	if ((tmp & mask) == 0)
+ 		goto cbl40;
+@@ -294,7 +294,7 @@
+ static void piix_pata_phy_reset(struct ata_port *ap)
+ {
+ 	if (!pci_test_config_bits(ap->host_set->pdev,
+-				  &piix_enable_bits[ap->port_no])) {
++				  &piix_enable_bits[ap->hard_port_no])) {
+ 		ata_port_disable(ap);
+ 		printk(KERN_INFO "ata%u: port disabled. ignoring.\n", ap->id);
+ 		return;
+@@ -327,8 +327,8 @@
+ 	int orig_mask, mask, i;
+ 	u8 pcs;
+ 
+-	mask = (PIIX_PORT_PRESENT << ap->port_no) |
+-	       (PIIX_PORT_ENABLED << ap->port_no);
++	mask = (PIIX_PORT_PRESENT << ap->hard_port_no) |
++	       (PIIX_PORT_ENABLED << ap->hard_port_no);
+ 
+ 	pci_read_config_byte(pdev, ICH5_PCS, &pcs);
+ 	orig_mask = (int) pcs & 0xff;
+@@ -345,7 +345,7 @@
+ 		mask = (PIIX_PORT_PRESENT << i) | (PIIX_PORT_ENABLED << i);
+ 
+ 		if ((orig_mask & mask) == mask)
+-			if (combined || (i == ap->port_no))
++			if (combined || (i == ap->hard_port_no))
+ 				return 1;
+ 	}
+ 
+@@ -373,7 +373,7 @@
+ {
+ 	struct pci_dev *dev	= ap->host_set->pdev;
+ 	unsigned int is_slave	= (adev->flags & ATA_DFLAG_MASTER) ? 0 : 1;
+-	unsigned int master_port= ap->port_no ? 0x42 : 0x40;
++	unsigned int master_port= ap->hard_port_no ? 0x42 : 0x40;
+ 	unsigned int slave_port	= 0x44;
+ 	u16 master_data;
+ 	u8 slave_data;
+@@ -412,10 +412,10 @@
+ 		/* enable PPE, IE and TIME */
+ 		master_data |= 0x0070;
+ 		pci_read_config_byte(dev, slave_port, &slave_data);
+-		slave_data &= (ap->port_no ? 0x0f : 0xf0);
++		slave_data &= (ap->hard_port_no ? 0x0f : 0xf0);
+ 		slave_data |=
+ 			(timings[pio][0] << 2) |
+-			(timings[pio][1] << (ap->port_no ? 4 : 0));
++			(timings[pio][1] << (ap->hard_port_no ? 4 : 0));
+ 	} else {
+ 		master_data &= 0xccf8;
+ 		/* enable PPE, IE and TIME */
+@@ -445,9 +445,9 @@
+ {
+ 	unsigned int udma	= adev->dma_mode; /* FIXME: MWDMA too */
+ 	struct pci_dev *dev	= ap->host_set->pdev;
+-	u8 maslave		= ap->port_no ? 0x42 : 0x40;
++	u8 maslave		= ap->hard_port_no ? 0x42 : 0x40;
+ 	u8 speed		= udma;
+-	unsigned int drive_dn	= (ap->port_no ? 2 : 0) + adev->devno;
++	unsigned int drive_dn	= (ap->hard_port_no ? 2 : 0) + adev->devno;
+ 	int a_speed		= 3 << (drive_dn * 4);
+ 	int u_flag		= 1 << drive_dn;
+ 	int v_flag		= 0x01 << drive_dn;
+diff -Nru a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
+--- a/drivers/scsi/libata-core.c	2004-11-08 16:12:47 +09:00
++++ b/drivers/scsi/libata-core.c	2004-11-08 16:12:47 +09:00
+@@ -3032,6 +3032,8 @@
+ 	ap->ctl = ATA_DEVCTL_OBS;
+ 	ap->host_set = host_set;
+ 	ap->port_no = port_no;
++	ap->hard_port_no =
++		ent->legacy_mode ? ent->hard_port_no : port_no;
+ 	ap->pio_mask = ent->pio_mask;
+ 	ap->mwdma_mask = ent->mwdma_mask;
+ 	ap->udma_mask = ent->udma_mask;
+@@ -3163,6 +3163,8 @@
+ 		probe_ent->port[0].ctl_addr = 0x3f6;
+ 		probe_ent->n_ports = 1;
+ 		probe_ent->irq = 14;
++		probe_ent->hard_port_no = 0;
++		probe_ent->legacy_mode = 1;
+ 		ata_std_ports(&probe_ent->port[0]);
+ 
+ 		probe_ent2->port[0].cmd_addr = 0x170;
+@@ -3171,6 +3173,8 @@
+ 		probe_ent2->port[0].bmdma_addr = pci_resource_start(pdev, 4)+8;
+ 		probe_ent2->n_ports = 1;
+ 		probe_ent2->irq = 15;
++		probe_ent->hard_port_no = 1;
++		probe_ent->legacy_mode = 1;
+ 		ata_std_ports(&probe_ent2->port[0]);
+ 
+ 		probe_ent2->sht = port1->sht;
+diff -Nru a/include/linux/libata.h b/include/linux/libata.h
+--- a/include/linux/libata.h	2004-11-08 16:12:47 +09:00
++++ b/include/linux/libata.h	2004-11-08 16:12:47 +09:00
+@@ -189,6 +189,7 @@
+ 	Scsi_Host_Template	*sht;
+ 	struct ata_ioports	port[ATA_MAX_PORTS];
+ 	unsigned int		n_ports;
++	unsigned int		hard_port_no;
+ 	unsigned int		pio_mask;
+ 	unsigned int		mwdma_mask;
+ 	unsigned int		udma_mask;
+@@ -273,6 +274,7 @@
+ 	unsigned long		flags;	/* ATA_FLAG_xxx */
+ 	unsigned int		id;	/* unique id req'd by scsi midlyr */
+ 	unsigned int		port_no; /* unique port #; from zero */
++	unsigned int		hard_port_no;	/* hardware port #; from zero */
+ 
+ 	struct ata_prd		*prd;	 /* our SG list */
+ 	dma_addr_t		prd_dma; /* and its DMA mapping */

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ata_piix-combinde-mode-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ata_piix-combinde-mode-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ata_piix-combinde-mode-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,40 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix ata_piix detection for combined mode (#270194)
+## DP: Patch author: Stuart Hayes <Stuart_Hayes at dell.com>
+## DP: Upstream status: submitted (according to original author)
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- kernel-source-2.6.8-orig/drivers/scsi/ata_piix.c	2004-08-14 07:36:57.000000000 +0200
++++ kernel-source-2.6.8/drivers/scsi/ata_piix.c	2004-09-18 14:54:19.574912216 +0200
+@@ -272,8 +272,25 @@
+ 
+ static void piix_pata_phy_reset(struct ata_port *ap)
+ {
++	unsigned int controller;
++
++	/*
++	 * In combined legacy mode, port number is not the same as
++	 * primary/secondary controller.
++	 */
++	switch (ap->ioaddr.cmd_addr) {
++	case 0x1f0:
++		controller = 0;
++		break;
++	case 0x170:
++		controller = 1;
++		break;
++	default:
++		controller = ap->port_no;
++ 	}
++
+ 	if (!pci_test_config_bits(ap->host_set->pdev,
+-				  &piix_enable_bits[ap->port_no])) {
++				  &piix_enable_bits[controller])) {
+ 		ata_port_disable(ap);
+ 		printk(KERN_INFO "ata%u: port disabled. ignoring.\n", ap->id);
+ 		return;

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/binfmt-huge-vma-dos.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/binfmt-huge-vma-dos.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/binfmt-huge-vma-dos.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,53 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: setup_arg_pages can insert overlapping vma (CAN-2004-1074)
+## DP: Patch author: Chris Wright <chrisw at osdl.org>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/11/16 17:38:48-08:00 chrisw at osdl.org 
+#   [PATCH] setup_arg_pages can insert overlapping vma
+#   
+#   Florian Heinz built an a.out binary that could map bss from 0x0 to
+#   0xc0000000, and setup_arg_pages() would be unhappt in insert_vma_struct
+#   because the arg pages overlapped.  This just checks before inserting,
+#   and bails out if it would overlap.
+#   
+#   Signed-off-by: Chris Wright <chrisw at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# fs/exec.c
+#   2004/11/11 19:24:54-08:00 chrisw at osdl.org +7 -0
+#   setup_arg_pages can insert overlapping vma
+# 
+diff -Nru a/fs/exec.c b/fs/exec.c
+--- a/fs/exec.c	2004-12-15 23:40:47 -08:00
++++ b/fs/exec.c	2004-12-15 23:40:47 -08:00
+@@ -413,6 +413,7 @@
+ 
+ 	down_write(&mm->mmap_sem);
+ 	{
++		struct vm_area_struct *vma;
+ 		mpnt->vm_mm = mm;
+ #ifdef CONFIG_STACK_GROWSUP
+ 		mpnt->vm_start = stack_base;
+@@ -433,6 +434,12 @@
+ 			mpnt->vm_flags = VM_STACK_FLAGS;
+ 		mpnt->vm_flags |= mm->def_flags;
+ 		mpnt->vm_page_prot = protection_map[mpnt->vm_flags & 0x7];
++		vma = find_vma(mm, mpnt->vm_start);
++		if (vma) {
++			up_write(&mm->mmap_sem);
++			kmem_cache_free(vm_area_cachep, mpnt);
++			return -ENOMEM;
++		}
+ 		insert_vm_struct(mm, mpnt);
+ 		mm->stack_vm = mm->total_vm = vma_pages(mpnt);
+ 	}

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/binfmt-huge-vma-dos2.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/binfmt-huge-vma-dos2.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/binfmt-huge-vma-dos2.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,268 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: ia64/x86_64/s390 overlapping vma fix (CAN-2004-1074)
+## DP: Patch author: Zou Nan hai <Nanhai.zou at intel.com>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/11/25 16:00:28-08:00 nanhai.zou at intel.com 
+#   [PATCH] ia64/x86_64/s390 overlapping vma fix
+#   
+#   IA64 is also vulnerable to the huge-vma-in-executable bug in 64 bit elf
+#   support, it just insert a vma of zero page without checking overlap, so user
+#   can construct a elf with section begin from 0x0 to trigger this BUGON().
+#   
+#   However, I think it's safe to check overlap before we actually insert a vma
+#   into vma list.  And I also feel check vma overlap everywhere is unnecessary,
+#   because invert_vm_struct will check it again, so the check is duplicated.
+#   It's better to have invert_vm_struct return a value then let caller check if
+#   it successes.  Here is a patch against 2.6.10.rc2-mm3 I have tested it on
+#   i386, x86_64 and ia64 machines.
+#   
+#   Signed-off-by: Tony Luck <tony.luck at intel.com>
+#   Signed-off-by: Zou Nan hai <Nanhai.zou at intel.com>
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# arch/ia64/ia32/binfmt_elf32.c
+#   2004/11/24 22:42:43-08:00 nanhai.zou at intel.com +21 -5
+#   ia64/x86_64/s390 overlapping vma fix
+# 
+# arch/ia64/mm/init.c
+#   2004/11/24 22:42:43-08:00 nanhai.zou at intel.com +14 -2
+#   ia64/x86_64/s390 overlapping vma fix
+# 
+# arch/s390/kernel/compat_exec.c
+#   2004/11/24 22:42:43-08:00 nanhai.zou at intel.com +6 -2
+#   ia64/x86_64/s390 overlapping vma fix
+# 
+# arch/x86_64/ia32/ia32_binfmt.c
+#   2004/11/24 22:42:43-08:00 nanhai.zou at intel.com +6 -2
+#   ia64/x86_64/s390 overlapping vma fix
+# 
+# fs/exec.c
+#   2004/11/24 22:42:43-08:00 nanhai.zou at intel.com +3 -6
+#   ia64/x86_64/s390 overlapping vma fix
+# 
+# include/linux/mm.h
+#   2004/11/24 22:42:43-08:00 nanhai.zou at intel.com +1 -1
+#   ia64/x86_64/s390 overlapping vma fix
+# 
+# mm/mmap.c
+#   2004/11/24 22:42:43-08:00 nanhai.zou at intel.com +3 -2
+#   ia64/x86_64/s390 overlapping vma fix
+# 
+# Modified by Andres Salomon to apply to debian's 2.6.8 kernel.
+#
+diff -Nru a/arch/ia64/ia32/binfmt_elf32.c b/arch/ia64/ia32/binfmt_elf32.c
+--- a/arch/ia64/ia32/binfmt_elf32.c	2004-12-15 23:41:30 -08:00
++++ b/arch/ia64/ia32/binfmt_elf32.c	2004-12-15 23:41:30 -08:00
+@@ -100,7 +100,11 @@
+ 		vma->vm_ops = &ia32_shared_page_vm_ops;
+ 		down_write(&current->mm->mmap_sem);
+ 		{
+-			insert_vm_struct(current->mm, vma);
++			if (insert_vm_struct(current->mm, vma)) {
++				kmem_cache_free(vm_area_cachep, vma);
++				up_write(&current->mm->mmap_sem);
++				return;
++			}
+ 		}
+ 		up_write(&current->mm->mmap_sem);
+ 	}
+@@ -142,7 +150,11 @@
+ 		vma->vm_flags = VM_READ|VM_WRITE|VM_MAYREAD|VM_MAYWRITE;
+ 		down_write(&current->mm->mmap_sem);
+ 		{
+-			insert_vm_struct(current->mm, vma);
++			if (insert_vm_struct(current->mm, vma)) {
++				kmem_cache_free(vm_area_cachep, vma);
++				up_write(&current->mm->mmap_sem);
++				return;
++			}
+ 		}
+ 		up_write(&current->mm->mmap_sem);
+ 	}
+@@ -190,7 +202,7 @@
+ 	unsigned long stack_base;
+ 	struct vm_area_struct *mpnt;
+ 	struct mm_struct *mm = current->mm;
+-	int i;
++	int i, ret;
+ 
+ 	stack_base = IA32_STACK_TOP - MAX_ARG_PAGES*PAGE_SIZE;
+ 	mm->arg_start = bprm->p + stack_base;
+@@ -225,7 +237,11 @@
+ 			mpnt->vm_flags = VM_STACK_FLAGS;
+ 		mpnt->vm_page_prot = (mpnt->vm_flags & VM_EXEC)?
+ 					PAGE_COPY_EXEC: PAGE_COPY;
+-		insert_vm_struct(current->mm, mpnt);
++		if ((ret = insert_vm_struct(current->mm, mpnt))) {
++			up_write(&current->mm->mmap_sem);
++			kmem_cache_free(vm_area_cachep, mpnt);
++			return ret;
++		}
+ 		current->mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
+ 	}
+ 
+diff -Nru a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
+--- a/arch/ia64/mm/init.c	2004-12-15 23:41:30 -08:00
++++ b/arch/ia64/mm/init.c	2004-12-15 23:41:30 -08:00
+@@ -131,7 +131,13 @@
+ 		vma->vm_end = vma->vm_start + PAGE_SIZE;
+ 		vma->vm_page_prot = protection_map[VM_DATA_DEFAULT_FLAGS & 0x7];
+ 		vma->vm_flags = VM_DATA_DEFAULT_FLAGS | VM_GROWSUP;
+-		insert_vm_struct(current->mm, vma);
++		down_write(&current->mm->mmap_sem);
++		if (insert_vm_struct(current->mm, vma)) {
++			up_write(&current->mm->mmap_sem);
++			kmem_cache_free(vm_area_cachep, vma);
++			return;
++		}
++		up_write(&current->mm->mmap_sem);
+ 	}
+ 
+ 	/* map NaT-page at address zero to speed up speculative dereferencing of NULL: */
+@@ -143,7 +149,13 @@
+ 			vma->vm_end = PAGE_SIZE;
+ 			vma->vm_page_prot = __pgprot(pgprot_val(PAGE_READONLY) | _PAGE_MA_NAT);
+ 			vma->vm_flags = VM_READ | VM_MAYREAD | VM_IO | VM_RESERVED;
+-			insert_vm_struct(current->mm, vma);
++			down_write(&current->mm->mmap_sem);
++			if (insert_vm_struct(current->mm, vma)) {
++				up_write(&current->mm->mmap_sem);
++				kmem_cache_free(vm_area_cachep, vma);
++				return;
++			}
++			up_write(&current->mm->mmap_sem);
+ 		}
+ 	}
+ }
+diff -Nru a/arch/s390/kernel/compat_exec.c b/arch/s390/kernel/compat_exec.c
+--- a/arch/s390/kernel/compat_exec.c	2004-12-15 23:41:30 -08:00
++++ b/arch/s390/kernel/compat_exec.c	2004-12-15 23:41:30 -08:00
+@@ -39,7 +39,7 @@
+ 	unsigned long stack_base;
+ 	struct vm_area_struct *mpnt;
+ 	struct mm_struct *mm = current->mm;
+-	int i;
++	int i, ret;
+ 
+ 	stack_base = STACK_TOP - MAX_ARG_PAGES*PAGE_SIZE;
+ 	mm->arg_start = bprm->p + stack_base;
+@@ -68,7 +68,11 @@
+ 		/* executable stack setting would be applied here */
+ 		mpnt->vm_page_prot = PAGE_COPY;
+ 		mpnt->vm_flags = VM_STACK_FLAGS;
+-		insert_vm_struct(mm, mpnt);
++		if ((ret = insert_vm_struct(mm, mpnt))) {
++			up_write(&mm->mmap_sem);
++			kmem_cache_free(vm_area_cachep, mpnt);
++			return ret;
++		}
+ 		mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
+ 	} 
+ 
+diff -Nru a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c
+--- a/arch/x86_64/ia32/ia32_binfmt.c	2004-12-15 23:41:30 -08:00
++++ b/arch/x86_64/ia32/ia32_binfmt.c	2004-12-15 23:41:30 -08:00
+@@ -334,7 +334,7 @@
+ 	unsigned long stack_base;
+ 	struct vm_area_struct *mpnt;
+ 	struct mm_struct *mm = current->mm;
+-	int i;
++	int i, ret;
+ 
+ 	stack_base = IA32_STACK_TOP - MAX_ARG_PAGES * PAGE_SIZE;
+ 	mm->arg_start = bprm->p + stack_base;
+@@ -368,7 +368,11 @@
+ 			mpnt->vm_flags = VM_STACK_FLAGS;
+  		mpnt->vm_page_prot = (mpnt->vm_flags & VM_EXEC) ? 
+  			PAGE_COPY_EXEC : PAGE_COPY;
+-		insert_vm_struct(mm, mpnt);
++		if ((ret = insert_vm_struct(mm, mpnt))) {
++			up_write(&mm->mmap_sem);
++			kmem_cache_free(vm_area_cachep, mpnt);
++			return ret;
++		}
+ 		mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
+ 	} 
+ 
+diff -Nru a/fs/exec.c b/fs/exec.c
+--- a/fs/exec.c	2004-12-15 23:41:30 -08:00
++++ b/fs/exec.c	2004-12-15 23:41:30 -08:00
+@@ -342,7 +342,7 @@
+ 	unsigned long stack_base;
+ 	struct vm_area_struct *mpnt;
+ 	struct mm_struct *mm = current->mm;
+-	int i;
++	int i, ret;
+ 	long arg_size;
+ 
+ #ifdef CONFIG_STACK_GROWSUP
+@@ -413,7 +413,6 @@
+ 
+ 	down_write(&mm->mmap_sem);
+ 	{
+-		struct vm_area_struct *vma;
+ 		mpnt->vm_mm = mm;
+ #ifdef CONFIG_STACK_GROWSUP
+ 		mpnt->vm_start = stack_base;
+@@ -434,13 +433,11 @@
+ 			mpnt->vm_flags = VM_STACK_FLAGS;
+ 		mpnt->vm_flags |= mm->def_flags;
+ 		mpnt->vm_page_prot = protection_map[mpnt->vm_flags & 0x7];
+-		vma = find_vma(mm, mpnt->vm_start);
+-		if (vma) {
++		if ((ret = insert_vm_struct(mm, mpnt))) {
+ 			up_write(&mm->mmap_sem);
+ 			kmem_cache_free(vm_area_cachep, mpnt);
+-			return -ENOMEM;
++			return ret;
+ 		}
+-		insert_vm_struct(mm, mpnt);
+ 		mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
+ 	}
+ 
+diff -Nru a/include/linux/mm.h b/include/linux/mm.h
+--- a/include/linux/mm.h	2004-12-15 23:41:30 -08:00
++++ b/include/linux/mm.h	2004-12-15 23:41:30 -08:00
+@@ -675,7 +675,7 @@
+ extern struct anon_vma *find_mergeable_anon_vma(struct vm_area_struct *);
+ extern int split_vma(struct mm_struct *,
+ 	struct vm_area_struct *, unsigned long addr, int new_below);
+-extern void insert_vm_struct(struct mm_struct *, struct vm_area_struct *);
++extern int insert_vm_struct(struct mm_struct *, struct vm_area_struct *);
+ extern void __vma_link_rb(struct mm_struct *, struct vm_area_struct *,
+ 	struct rb_node **, struct rb_node *);
+ extern struct vm_area_struct *copy_vma(struct vm_area_struct **,
+diff -Nru a/mm/mmap.c b/mm/mmap.c
+--- a/mm/mmap.c	2004-12-15 23:41:30 -08:00
++++ b/mm/mmap.c	2004-12-15 23:41:30 -08:00
+@@ -1871,7 +1871,7 @@
+  * and into the inode's i_mmap tree.  If vm_file is non-NULL
+  * then i_mmap_lock is taken here.
+  */
+-void insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma)
++int insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma)
+ {
+ 	struct vm_area_struct * __vma, * prev;
+ 	struct rb_node ** rb_link, * rb_parent;
+@@ -1894,8 +1894,9 @@
+ 	}
+ 	__vma = find_vma_prepare(mm,vma->vm_start,&prev,&rb_link,&rb_parent);
+ 	if (__vma && __vma->vm_start < vma->vm_end)
+-		BUG();
++		return -ENOMEM;
+ 	vma_link(mm, vma, prev, rb_link, rb_parent);
++	return 0;
+ }
+ 
+ /*

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/bio_uncopy_user-memleak-2.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/bio_uncopy_user-memleak-2.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/bio_uncopy_user-memleak-2.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,95 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix big memory leak in bio_uncopy_user (SG_IO)
+## DP: Patch author: Kurt Garloff <garloff at suse.de>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/08/24 11:42:34-07:00 garloff at suse.de 
+#   [PATCH] fix bio_uncopy_user() mem leak
+#   
+#     When using bounce buffers for SG_IO commands with unaligned buffers in
+#     blk_rq_map_user(), we should free the pages from blk_rq_unmap_user() which
+#     calls bio_uncopy_user() for the non-BIO_USER_MAPPED case.  That function
+#     failed to free the pages for write requests.
+#   
+#     So we leaked pages and you machine would go OOM.  Rebooting helped ;-)
+#   
+#     This bug was triggered by writing audio CDs (but not on data CDs), as the
+#     audio frames are not aligned well (2352 bytes), so the user pages don't just
+#     get mapped.
+#   
+#     Bug was reported by Mathias Homan and debugged by Chris Mason + me.  (Jens
+#     is away.)
+#   
+#   From: Chris Mason <mason at suse.com>
+#   
+#     Fix the leak for real
+#   
+#   Signed-off-by: Kurt Garloff <garloff at suse.de>
+#   
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# fs/bio.c
+#   2004/08/24 02:09:01-07:00 garloff at suse.de +11 -12
+#   fix bio_uncopy_user() mem leak
+# 
+diff -Nru a/fs/bio.c b/fs/bio.c
+--- a/fs/bio.c	2004-08-25 11:58:23 +02:00
++++ b/fs/bio.c	2004-08-25 11:58:23 +02:00
+@@ -388,20 +388,17 @@
+ 	struct bio_vec *bvec;
+ 	int i, ret = 0;
+ 
+-	if (bio_data_dir(bio) == READ) {
+-		char *uaddr = bio->bi_private;
++	char *uaddr = bio->bi_private;
+ 
+-		__bio_for_each_segment(bvec, bio, i, 0) {
+-			char *addr = page_address(bvec->bv_page);
+-
+-			if (!ret && copy_to_user(uaddr, addr, bvec->bv_len))
+-				ret = -EFAULT;
++	__bio_for_each_segment(bvec, bio, i, 0) {
++		char *addr = page_address(bvec->bv_page);
++		if (bio_data_dir(bio) == READ && !ret &&
++		    copy_to_user(uaddr, addr, bvec->bv_len))
++			ret = -EFAULT;
+ 
+-			__free_page(bvec->bv_page);
+-			uaddr += bvec->bv_len;
+-		}
++		__free_page(bvec->bv_page);
++		uaddr += bvec->bv_len;
+ 	}
+-
+ 	bio_put(bio);
+ 	return ret;
+ }
+@@ -457,6 +454,7 @@
+ 	 */
+ 	if (!ret) {
+ 		if (!write_to_vm) {
++			unsigned long p = uaddr;
+ 			bio->bi_rw |= (1 << BIO_RW);
+ 			/*
+ 	 		 * for a write, copy in data to kernel pages
+@@ -465,8 +463,9 @@
+ 			bio_for_each_segment(bvec, bio, i) {
+ 				char *addr = page_address(bvec->bv_page);
+ 
+-				if (copy_from_user(addr, (char *) uaddr, bvec->bv_len))
++				if (copy_from_user(addr, (char *) p, bvec->bv_len))
+ 					goto cleanup;
++				p += bvec->bv_len;
+ 			}
+ 		}
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/bio_uncopy_user-memleak.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/bio_uncopy_user-memleak.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/bio_uncopy_user-memleak.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,44 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix big memory leak in bio_uncopy_user (SG_IO)
+## DP: Patch author: Kurt Garloff <garloff at suse.de>
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- linux/fs/bio.c.orig	2004-08-14 07:37:15.000000000 +0200
++++ linux/fs/bio.c	2004-08-17 17:41:52.022012902 +0200
+@@ -388,20 +388,17 @@ int bio_uncopy_user(struct bio *bio)
+ 	struct bio_vec *bvec;
+ 	int i, ret = 0;
+ 
+-	if (bio_data_dir(bio) == READ) {
+-		char *uaddr = bio->bi_private;
+-
+-		__bio_for_each_segment(bvec, bio, i, 0) {
+-			char *addr = page_address(bvec->bv_page);
+-
+-			if (!ret && copy_to_user(uaddr, addr, bvec->bv_len))
+-				ret = -EFAULT;
++	char *uaddr = bio->bi_private;
++	
++	__bio_for_each_segment(bvec, bio, i, 0) {
++		char *addr = page_address(bvec->bv_page);
++		if (bio_data_dir(bio) == READ && !ret && 
++		    copy_to_user(uaddr, addr, bvec->bv_len))
++			ret = -EFAULT;
+ 
+-			__free_page(bvec->bv_page);
+-			uaddr += bvec->bv_len;
+-		}
++		__free_page(bvec->bv_page);
++		uaddr += bvec->bv_len;
+ 	}
+-
+ 	bio_put(bio);
+ 	return ret;
+ }
+

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/capi-freeing-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/capi-freeing-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/capi-freeing-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,186 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: CAPI skb freeing fix
+## DP: Patch author: Carsten Paeth, Armin Schindler
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/08/27 14:55:01-07:00 armin at melware.de 
+#   [PATCH] 2.6 ISDN CAPI: low-level drivers skb free fix
+#   
+#   CAPI skb freeing fix. On sending, the hardware/low-level
+#   driver may free a skb on no error only. The application/core
+#   side must take care otherwise.
+#   
+#   Author: Carsten Paeth, Armin Schindler
+# 
+# drivers/isdn/capi/capidrv.c
+#   2004/08/27 12:27:24-07:00 armin at melware.de +2 -1
+#   2.6 ISDN CAPI: low-level drivers skb free fix
+# 
+# drivers/isdn/hardware/avm/b1.c
+#   2004/08/27 12:51:03-07:00 armin at melware.de +3 -5
+#   2.6 ISDN CAPI: low-level drivers skb free fix
+# 
+# drivers/isdn/hardware/avm/b1dma.c
+#   2004/08/27 12:51:03-07:00 armin at melware.de +0 -2
+#   2.6 ISDN CAPI: low-level drivers skb free fix
+# 
+# drivers/isdn/hardware/avm/c4.c
+#   2004/08/27 12:51:03-07:00 armin at melware.de +0 -2
+#   2.6 ISDN CAPI: low-level drivers skb free fix
+# 
+# drivers/isdn/hardware/avm/t1isa.c
+#   2004/08/27 12:51:03-07:00 armin at melware.de +3 -4
+#   2.6 ISDN CAPI: low-level drivers skb free fix
+# 
+# drivers/isdn/hardware/eicon/capifunc.c
+#   2004/08/27 12:57:40-07:00 armin at melware.de +3 -2
+#   2.6 ISDN CAPI: low-level drivers skb free fix
+# 
+diff -Nru a/drivers/isdn/capi/capidrv.c b/drivers/isdn/capi/capidrv.c
+--- a/drivers/isdn/capi/capidrv.c	2004-08-30 14:50:12 -07:00
++++ b/drivers/isdn/capi/capidrv.c	2004-08-30 14:50:12 -07:00
+@@ -512,7 +512,8 @@
+ 	len = CAPIMSG_LEN(cmsg->buf);
+ 	skb = alloc_skb(len, GFP_ATOMIC);
+ 	memcpy(skb_put(skb, len), cmsg->buf, len);
+-	capi20_put_message(&global.ap, skb);
++	if (capi20_put_message(&global.ap, skb) != CAPI_NOERROR)
++		kfree_skb(skb);
+ }
+ 
+ /* -------- state machine -------------------------------------------- */
+diff -Nru a/drivers/isdn/hardware/avm/b1.c b/drivers/isdn/hardware/avm/b1.c
+--- a/drivers/isdn/hardware/avm/b1.c	2004-08-30 14:50:12 -07:00
++++ b/drivers/isdn/hardware/avm/b1.c	2004-08-30 14:50:13 -07:00
+@@ -389,7 +389,7 @@
+ 					     CAPIMSG_NCCI(skb->data),
+ 					     CAPIMSG_MSGID(skb->data));
+ 		if (retval != CAPI_NOERROR) 
+-			goto out;
++			return retval;
+ 
+ 		dlen = CAPIMSG_DATALEN(skb->data);
+ 
+@@ -399,16 +399,14 @@
+ 		b1_put_slice(port, skb->data + len, dlen);
+ 		spin_unlock_irqrestore(&card->lock, flags);
+ 	} else {
+-		retval = CAPI_NOERROR;
+-
+ 	 	spin_lock_irqsave(&card->lock, flags);
+ 		b1_put_byte(port, SEND_MESSAGE);
+ 		b1_put_slice(port, skb->data, len);
+ 		spin_unlock_irqrestore(&card->lock, flags);
+ 	}
+- out:
++
+ 	dev_kfree_skb_any(skb);
+-	return retval;
++	return CAPI_NOERROR;
+ }
+ 
+ /* ------------------------------------------------------------- */
+diff -Nru a/drivers/isdn/hardware/avm/b1dma.c b/drivers/isdn/hardware/avm/b1dma.c
+--- a/drivers/isdn/hardware/avm/b1dma.c	2004-08-30 14:50:12 -07:00
++++ b/drivers/isdn/hardware/avm/b1dma.c	2004-08-30 14:50:12 -07:00
+@@ -839,8 +839,6 @@
+ 	}
+ 	if (retval == CAPI_NOERROR) 
+ 		b1dma_queue_tx(card, skb);
+-	else
+-		dev_kfree_skb_any(skb);
+ 
+ 	return retval;
+ }
+diff -Nru a/drivers/isdn/hardware/avm/c4.c b/drivers/isdn/hardware/avm/c4.c
+--- a/drivers/isdn/hardware/avm/c4.c	2004-08-30 14:50:12 -07:00
++++ b/drivers/isdn/hardware/avm/c4.c	2004-08-30 14:50:12 -07:00
+@@ -1029,8 +1029,6 @@
+ 		spin_lock_irqsave(&card->lock, flags);
+ 		c4_dispatch_tx(card);
+ 		spin_unlock_irqrestore(&card->lock, flags);
+-	} else {
+-		dev_kfree_skb_any(skb);
+ 	}
+ 	return retval;
+ }
+diff -Nru a/drivers/isdn/hardware/avm/t1isa.c b/drivers/isdn/hardware/avm/t1isa.c
+--- a/drivers/isdn/hardware/avm/t1isa.c	2004-08-30 14:50:12 -07:00
++++ b/drivers/isdn/hardware/avm/t1isa.c	2004-08-30 14:50:12 -07:00
+@@ -472,7 +472,7 @@
+ 					     CAPIMSG_NCCI(skb->data),
+ 					     CAPIMSG_MSGID(skb->data));
+ 		if (retval != CAPI_NOERROR) 
+-			goto out;
++			return retval;
+ 
+ 		dlen = CAPIMSG_DATALEN(skb->data);
+ 
+@@ -482,16 +482,15 @@
+ 		t1_put_slice(port, skb->data + len, dlen);
+ 		spin_unlock_irqrestore(&card->lock, flags);
+ 	} else {
+-		retval = CAPI_NOERROR;
+ 
+ 		spin_lock_irqsave(&card->lock, flags);
+ 		b1_put_byte(port, SEND_MESSAGE);
+ 		t1_put_slice(port, skb->data, len);
+ 		spin_unlock_irqrestore(&card->lock, flags);
+ 	}
+- out:
++
+ 	dev_kfree_skb_any(skb);
+-	return retval;
++	return CAPI_NOERROR;
+ }
+ /* ------------------------------------------------------------- */
+ 
+diff -Nru a/drivers/isdn/hardware/eicon/capifunc.c b/drivers/isdn/hardware/eicon/capifunc.c
+--- a/drivers/isdn/hardware/eicon/capifunc.c	2004-08-30 14:50:12 -07:00
++++ b/drivers/isdn/hardware/eicon/capifunc.c	2004-08-30 14:50:12 -07:00
+@@ -1,4 +1,4 @@
+-/* $Id: capifunc.c,v 1.61.4.2 2004/05/05 16:09:25 armin Exp $
++/* $Id: capifunc.c,v 1.61.4.5 2004/08/27 20:10:12 armin Exp $
+  *
+  * ISDN interface module for Eicon active cards DIVA.
+  * CAPI Interface common functions
+@@ -998,7 +998,8 @@
+ 
+       write_end:
+ 	diva_os_leave_spin_lock(&api_lock, &old_irql, "send message");
+-	diva_os_free_message_buffer(dmb);
++	if (retval == CAPI_NOERROR)
++		diva_os_free_message_buffer(dmb);
+ 	return retval;
+ }
+ 
+
+-- System Information:
+Debian Release: 3.1
+  APT prefers testing
+  APT policy: (100, 'testing'), (1, 'experimental')
+Architecture: i386 (i686)
+Kernel: Linux 2.6.8-1-686
+Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8
+
+Versions of packages kernel-image-2.6.8-1-686 depends on:
+ii  coreutils [fileutils]         5.2.1-2    The GNU core utilities
+ii  fileutils                     5.2.1-2    The GNU file management utilities 
+ii  initrd-tools                  0.1.73     tools to create initrd image for p
+ii  module-init-tools             3.1-pre5-6 tools for managing Linux kernel mo
+
+-- no debconf information
+
+
+-- 
+To UNSUBSCRIBE, email to debian-kernel-REQUEST at lists.debian.org
+with a subject of "unsubscribe". Trouble? Contact listmaster at lists.debian.org

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/cciss-update.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/cciss-update.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/cciss-update.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,404 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Update CCISS driver
+## DP: Patch author: Mike Miller <mike.miller at hp.com>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/08/23 13:09:03-07:00 bunk at fs.tum.de 
+#   [PATCH] cciss /proc dependency fix
+#   
+#   cciss uses /proc to hook into the SCSI subsystem.  If you do not build
+#   /proc support into your kernel then you should also disable tape support in
+#   the driver. 
+#   
+#   Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# drivers/block/Kconfig
+#   2004/08/23 01:15:29-07:00 bunk at fs.tum.de +1 -1
+#   cciss /proc dependency fix
+# 
+# ChangeSet
+#   2004/08/23 13:08:51-07:00 mike.miller at hp.com 
+#   [PATCH] cciss update 8 maintainers update for HP
+#   
+#   This patch updates the maintainers list for HP drivers.
+#   
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# MAINTAINERS
+#   2004/08/23 01:15:28-07:00 mike.miller at hp.com +5 -5
+#   cciss update 8 maintainers update for HP
+# 
+# ChangeSet
+#   2004/08/23 13:08:39-07:00 mike.miller at hp.com 
+#   [PATCH] cciss: read_ahead bumped to 1024
+#   
+#   This patch changes our read_ahead to 1024.  This has been shown to increase
+#   performance.
+#   
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# drivers/block/cciss.c
+#   2004/08/23 01:15:28-07:00 mike.miller at hp.com +1 -1
+#   cciss: read_ahead bumped to 1024
+# 
+# ChangeSet
+#   2004/08/23 13:08:30-07:00 mike.miller at hp.com 
+#   [PATCH] cciss: pdev->intr fix
+#   
+#   This patch fixes our usage of pdev->intr.  We were truncating it to an unchar.
+#    We were also reading it before calling pci_enable_device.  This patch fixes
+#   both of those.  Thanks to Bjorn Helgaas for the patch.
+#   
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# drivers/block/cciss.h
+#   2004/08/23 01:15:28-07:00 mike.miller at hp.com +1 -1
+#   cciss: pdev->intr fix
+# 
+# drivers/block/cciss.c
+#   2004/08/23 01:15:28-07:00 mike.miller at hp.com +2 -3
+#   cciss: pdev->intr fix
+# 
+# ChangeSet
+#   2004/08/23 13:08:19-07:00 mikem at beardog.cca.cpqcorp.net 
+#   [PATCH] cciss: V100 PCI ID fix again
+#   
+#   Somehow I managed to get the wrong PCI ID in pci_ids.h.  3210 is the
+#   correct PCI ID, 3211 is the subsystem ID.
+#   
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# include/linux/pci_ids.h
+#   2004/08/23 01:15:28-07:00 mikem at beardog.cca.cpqcorp.net +1 -1
+#   cciss: V100 PCI ID fix again
+# 
+# ChangeSet
+#   2004/08/23 13:08:07-07:00 mike.miller at hp.com 
+#   [PATCH] cciss: id change for V100 controller
+#   
+#   This patch fixes the vendor ID for our cciss based SATA controller due out
+#   later this year and adds the new PCI ID to pci_ids.h.
+#   
+#   Also changes DRIVER_NAME to HP CCISS.
+#   
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# include/linux/pci_ids.h
+#   2004/08/23 01:15:28-07:00 mike.miller at hp.com +1 -0
+#   cciss: id change for V100 controller
+# 
+# drivers/block/cciss.c
+#   2004/08/23 01:15:28-07:00 mike.miller at hp.com +3 -3
+#   cciss: id change for V100 controller
+# 
+# ChangeSet
+#   2004/08/23 13:07:56-07:00 mike.miller at hp.com 
+#   [PATCH] cciss: cylinder calculation fix
+#   
+#   This patch fixes our cylinder calculations.  Without his fix the number of
+#   cylinders maxes out at 65535.
+#   
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# drivers/block/cciss.c
+#   2004/08/23 01:15:27-07:00 mike.miller at hp.com +6 -0
+#   cciss: cylinder calculation fix
+# 
+# ChangeSet
+#   2004/08/23 13:07:44-07:00 mike.miller at hp.com 
+#   [PATCH] cciss: /proc fixes
+#   
+#   This patch fixes our output in /proc to display the logical volume sizes and
+#   RAID levels correctly.  Without this patch RAID level will always be 0 and
+#   size may be displayed as 0GB.
+#   
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# drivers/block/cciss.c
+#   2004/08/23 01:15:27-07:00 mike.miller at hp.com +8 -18
+#   cciss: /proc fixes
+# 
+# ChangeSet
+#   2004/08/23 13:07:33-07:00 mike.miller at hp.com 
+#   [PATCH] cciss: zero out buffer in passthru ioctls for HP utilities
+#   
+#   This patch addresses a problem with our utilities.  We must zero out the
+#   buffer before copying their data into it to prevent bogus info when switching
+#   between SCSI & SATA or SAS drives.
+#   
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# drivers/block/cciss.c
+#   2004/08/23 01:15:27-07:00 mike.miller at hp.com +4 -0
+#   cciss: zero out buffer in passthru ioctls for HP utilities
+# 
+# ChangeSet
+#   2004/08/23 13:07:21-07:00 mike.miller at hp.com 
+#   [PATCH] cciss: fixes to 32/64-bit conversions
+#   
+#   This patch fixes our usage of copy_to_user.  We were passing in the size of
+#   the address rather than the size of the struct.
+#   
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# drivers/block/cciss.c
+#   2004/08/23 01:15:27-07:00 mike.miller at hp.com +2 -2
+#   cciss: fixes to 32/64-bit conversions
+# 
+diff -Nru a/MAINTAINERS b/MAINTAINERS
+--- a/MAINTAINERS	2004-08-25 12:16:15 +02:00
++++ b/MAINTAINERS	2004-08-25 12:16:15 +02:00
+@@ -910,18 +910,18 @@
+ S:	Maintained
+ 
+ HEWLETT-PACKARD FIBRE CHANNEL 64-bit/66MHz PCI non-intelligent HBA
+-P:	Chase Maupin
+-M:	chase.maupin at hp.com
++P:	Chirag Kantharia
++M:	chirag.kantharia at hp.com
+ L:	iss_storagedev at hp.com
+ S:	Maintained
+  
+ HEWLETT-PACKARD SMART2 RAID DRIVER
+-P:	Francis Wiran
+-M:	francis.wiran at hp.com
++P:	Chirag Kantharia
++M:	chirag.kantharia at hp.com
+ L:	iss_storagedev at hp.com
+ S:	Maintained
+  
+-HEWLETT-PACKARD SMART CISS RAID DRIVER 
++HEWLETT-PACKARD SMART CISS RAID DRIVER (cciss)
+ P:	Mike Miller
+ M:	mike.miller at hp.com
+ L:	iss_storagedev at hp.com
+diff -Nru a/drivers/block/Kconfig b/drivers/block/Kconfig
+--- a/drivers/block/Kconfig	2004-08-25 12:16:15 +02:00
++++ b/drivers/block/Kconfig	2004-08-25 12:16:15 +02:00
+@@ -166,7 +166,7 @@
+ 
+ config CISS_SCSI_TAPE
+ 	bool "SCSI tape drive support for Smart Array 5xxx"
+-	depends on BLK_CPQ_CISS_DA && SCSI
++	depends on BLK_CPQ_CISS_DA && SCSI && PROC_FS
+ 	help
+ 	  When enabled (Y), this option allows SCSI tape drives and SCSI medium
+ 	  changers (tape robots) to be accessed via a Compaq 5xxx array 
+diff -Nru a/drivers/block/cciss.c b/drivers/block/cciss.c
+--- a/drivers/block/cciss.c	2004-08-25 12:16:15 +02:00
++++ b/drivers/block/cciss.c	2004-08-25 12:16:15 +02:00
+@@ -46,14 +46,14 @@
+ #include <linux/completion.h>
+ 
+ #define CCISS_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin))
+-#define DRIVER_NAME "Compaq CISS Driver (v 2.6.2)"
++#define DRIVER_NAME "HP CISS Driver (v 2.6.2)"
+ #define DRIVER_VERSION CCISS_DRIVER_VERSION(2,6,2)
+ 
+ /* Embedded module documentation macros - see modules.h */
+ MODULE_AUTHOR("Hewlett-Packard Company");
+ MODULE_DESCRIPTION("Driver for HP Controller SA5xxx SA6xxx version 2.6.2");
+ MODULE_SUPPORTED_DEVICE("HP SA5i SA5i+ SA532 SA5300 SA5312 SA641 SA642 SA6400"
+-			" SA6i");
++			" SA6i V100");
+ MODULE_LICENSE("GPL");
+ 
+ #include "cciss_cmd.h"
+@@ -82,7 +82,7 @@
+ 		0x0E11, 0x4091, 0, 0, 0},
+ 	{ PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSC,
+ 		0x0E11, 0x409E, 0, 0, 0},
+-	{ PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSC,
++	{ PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISS,
+ 		0x103C, 0x3211, 0, 0, 0},
+ 	{0,}
+ };
+@@ -115,7 +115,7 @@
+ /*define how many times we will try a command because of bus resets */
+ #define MAX_CMD_RETRIES 3
+ 
+-#define READ_AHEAD 	 256
++#define READ_AHEAD 	 1024
+ #define NR_CMDS		 384 /* #commands that can be outstanding */
+ #define MAX_CTLR 8
+ 
+@@ -192,10 +192,10 @@
+ /*
+  * Report information about this controller.
+  */
+-#define ENG_GIG 1048576000
++#define ENG_GIG 1000000000
+ #define ENG_GIG_FACTOR (ENG_GIG/512)
+ #define RAID_UNKNOWN 6
+-static const char *raid_label[] = {"0","4","1(0+1)","5","5+1","ADG",
++static const char *raid_label[] = {"0","4","1(1+0)","5","5+1","ADG",
+ 	                                   "UNKNOWN"};
+ 
+ static struct proc_dir_entry *proc_cciss;
+@@ -209,7 +209,7 @@
+         ctlr_info_t *h = (ctlr_info_t*)data;
+         drive_info_struct *drv;
+ 	unsigned long flags;
+-	unsigned int vol_sz, vol_sz_frac;
++        sector_t vol_sz, vol_sz_frac;
+ 
+         ctlr = h->ctlr;
+ 
+@@ -246,32 +246,21 @@
+         pos += size; len += size;
+ 	cciss_proc_tape_report(ctlr, buffer, &pos, &len);
+ 	for(i=0; i<=h->highest_lun; i++) {
+-		sector_t tmp;
+ 
+                 drv = &h->drv[i];
+ 		if (drv->block_size == 0)
+ 			continue;
+-		vol_sz = drv->nr_blocks;
+-		sector_div(vol_sz, ENG_GIG_FACTOR);
+-
+-		/*
+-		 * Awkwardly do this:
+-		 * vol_sz_frac =
+-		 *     (drv->nr_blocks%ENG_GIG_FACTOR)*100/ENG_GIG_FACTOR;
+-		 */
+-		tmp = drv->nr_blocks;
+-		vol_sz_frac = sector_div(tmp, ENG_GIG_FACTOR);
+-
+-		/* Now, vol_sz_frac = (drv->nr_blocks%ENG_GIG_FACTOR) */
+ 
++		vol_sz = drv->nr_blocks;
++		vol_sz_frac = sector_div(vol_sz, ENG_GIG_FACTOR);
+ 		vol_sz_frac *= 100;
+ 		sector_div(vol_sz_frac, ENG_GIG_FACTOR);
+ 
+ 		if (drv->raid_level > 5)
+ 			drv->raid_level = RAID_UNKNOWN;
+ 		size = sprintf(buffer+len, "cciss/c%dd%d:"
+-				"\t%4d.%02dGB\tRAID %s\n",
+-				ctlr, i, vol_sz,vol_sz_frac,
++				"\t%4u.%02uGB\tRAID %s\n",
++				ctlr, i, (int)vol_sz, (int)vol_sz_frac,
+ 				raid_label[drv->raid_level]);
+                 pos += size; len += size;
+         }
+@@ -578,7 +567,7 @@
+ 	err = sys_ioctl(fd, CCISS_PASSTHRU, (unsigned long) p);
+ 	if (err)
+ 		return err;
+-	err |= copy_in_user(&arg32->error_info, &p->error_info, sizeof(&arg32->error_info));
++	err |= copy_in_user(&arg32->error_info, &p->error_info, sizeof(arg32->error_info));
+ 	if (err)
+ 		return -EFAULT;
+ 	return err;
+@@ -610,7 +599,7 @@
+ 	err = sys_ioctl(fd, CCISS_BIG_PASSTHRU, (unsigned long) p);
+ 	if (err)
+ 		return err;
+-	err |= copy_in_user(&arg32->error_info, &p->error_info, sizeof(&arg32->error_info));
++	err |= copy_in_user(&arg32->error_info, &p->error_info, sizeof(arg32->error_info));
+ 	if (err)
+ 		return -EFAULT;
+ 	return err;
+@@ -866,6 +855,8 @@
+ 				kfree(buff);
+ 				return -EFAULT;
+ 			}
++		} else {
++			memset(buff, 0, iocommand.buf_size);
+ 		}
+ 		if ((c = cmd_alloc(host , 0)) == NULL)
+ 		{
+@@ -1012,6 +1003,8 @@
+ 				copy_from_user(buff[sg_used], data_ptr, sz)) {
+ 					status = -ENOMEM;
+ 					goto cleanup1;			
++			} else {
++				memset(buff[sg_used], 0, sz);
+ 			}
+ 			left -= sz;
+ 			data_ptr += sz;
+@@ -1477,12 +1470,19 @@
+ 			drv->sectors = 32; // Sectors per track
+ 			drv->cylinders = total_size / 255 / 32;
+ 		} else {
++			unsigned int t;
++
+ 			drv->block_size = block_size;
+ 			drv->nr_blocks = total_size;
+ 			drv->heads = inq_buff->data_byte[6];
+ 			drv->sectors = inq_buff->data_byte[7];
+ 			drv->cylinders = (inq_buff->data_byte[4] & 0xff) << 8;
+ 			drv->cylinders += inq_buff->data_byte[5];
++			drv->raid_level = inq_buff->data_byte[8];
++			t = drv->heads * drv->sectors;
++			if (t > 1) {
++				drv->cylinders = total_size/t;
++			}
+ 		}
+ 	} else { /* Get geometry failed */
+ 		printk(KERN_WARNING "cciss: reading geometry failed, "
+@@ -2300,7 +2300,6 @@
+ static int cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev)
+ {
+ 	ushort subsystem_vendor_id, subsystem_device_id, command;
+-	unchar irq = pdev->irq;
+ 	__u32 board_id, scratchpad = 0;
+ 	__u64 cfg_offset;
+ 	__u32 cfg_base_addr;
+@@ -2359,11 +2358,11 @@
+ 
+ #ifdef CCISS_DEBUG
+ 	printk("command = %x\n", command);
+-	printk("irq = %x\n", irq);
++	printk("irq = %x\n", pdev->irq);
+ 	printk("board_id = %x\n", board_id);
+ #endif /* CCISS_DEBUG */ 
+ 
+-	c->intr = irq;
++	c->intr = pdev->irq;
+ 
+ 	/*
+ 	 * Memory base addr is first addr , the second points to the config
+diff -Nru a/drivers/block/cciss.h b/drivers/block/cciss.h
+--- a/drivers/block/cciss.h	2004-08-25 12:16:15 +02:00
++++ b/drivers/block/cciss.h	2004-08-25 12:16:15 +02:00
+@@ -48,7 +48,7 @@
+ 	unsigned long io_mem_addr;
+ 	unsigned long io_mem_length;
+ 	CfgTable_struct *cfgtable;
+-	int	intr;
++	unsigned int intr;
+ 	int	interrupts_enabled;
+ 	int 	max_commands;
+ 	int	commands_outstanding;
+diff -Nru a/include/linux/pci_ids.h b/include/linux/pci_ids.h
+--- a/include/linux/pci_ids.h	2004-08-25 12:16:15 +02:00
++++ b/include/linux/pci_ids.h	2004-08-25 12:16:15 +02:00
+@@ -675,6 +675,7 @@
+ #define PCI_DEVICE_ID_HP_SX1000_IOC	0x127c
+ #define PCI_DEVICE_ID_HP_DIVA_EVEREST	0x1282
+ #define PCI_DEVICE_ID_HP_DIVA_AUX	0x1290
++#define PCI_DEVICE_ID_HP_CISS		0x3210
+ 
+ #define PCI_VENDOR_ID_PCTECH		0x1042
+ #define PCI_DEVICE_ID_PCTECH_RZ1000	0x1000

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/changelog.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/changelog.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/changelog.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,25694 @@
+--- /dev/null	2004-08-24 05:40:03.000000000 +0000
++++ a/ChangeLog	2004-08-27 06:13:42.000000000 +0000
+@@ -0,0 +1,25691 @@
++
++Summary of changes from v2.6.7 to v2.6.8
++============================================
++
++<len.brown at intel.com>
++	Kconfig typo fix from Jochen Voss
++
++<len.brown at intel.com>
++	[ACPI] PCI IRQ update (Bjorn Helgaas)
++	http://bugme.osdl.org/show_bug.cgi?id=2574
++	
++	mp_parse_prt() and iosapic_parse_prt() used to allocate all
++	IRQs, whether devices needed them or not.  Some devices
++	failed because the this method enabled unused PCI Interrupt
++	Link Devices, which disrupted active link devices.
++	
++	Now the PRT knowledge is pulled out of the arch
++	code and the IRQ allocation and IO-APIC programming
++	is done by pci_enable_device().
++	This is also a step toward allowing the addition
++	of new root bridges and PRTs at run-time.
++	
++	The architecture supplies
++	
++	 unsigned int
++	 acpi_register_gsi(u32 gsi, int edge_level, int active_high_low)
++	
++	which is called by acpi_pci_irq_enable().  ACPI supplies
++	all the information from the PRT, and the arch sets up
++	the routing and returns the IRQ it allocated.
++
++<rl at hellgate.ch>
++	[PATCH] Nuke HAS_IP_COPYSUM for net drivers
++	
++	Entirely untested, but Obviously Correct(TM). HAS_IP_COPYSUM has been
++	utterly meaningless for a long time.
++
++<herbert at gondor.apana.org.au>
++	[NETDRV #1] Ifdef builtin-only probe in ISA/MCA drivers
++	
++	Here is the bit which conditionalises the
++	builtin-only probe functions.
++
++<herbert at gondor.apana.org.au>
++	[NETDRV #2] Use driver-specific name for resources
++	
++	Here is the next part which uses a driver-specific name instead of
++	dev->name for resource allocations prior to netdev registration.
++	It also changes printks that are in direct response to errors in
++	resource allocations.
++
++<hch at lst.de>
++	[PATCH] move scsi debugging helpers and give them sane names
++	
++	 - give the constants.c prettyprinting helpers proper scsi_ prefixed
++	   names (and keep compat versions for 2.6.x)
++	 - move them to include/scsi/scsi_dbg.h so now really only legacy stuff
++	   is left in drivers/scsi/scsi.h
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<jejb at mulgrave.(none)>
++	SCSI: slave_detach -> slave_destory comment fix
++	
++	From: 	Guennadi Liakhovetski <g.liakhovetski at gmx.de>
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<jejb at mulgrave.(none)>
++	Convert tmcscsim to new probing interfaces
++	
++	From: 	Guennadi Liakhovetski <g.liakhovetski at gmx.de>
++	
++	Update the driver to use the new pci, scsi and
++	module interfaces.
++	
++	Modified with feedback from hch
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<brking at us.ibm.com>
++	[PATCH] ipr scsi busy io hang
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<brking at us.ibm.com>
++	[PATCH] ipr duplicate ioa reset fix
++	
++	This patch closes a window where if a device had a cancel all
++	outstanding as a result of a check condition and the adapter
++	was reset for some reason, a request sense would still be issued,
++	which would end up timing out and issuing an additional adapter
++	reset. It could also result in a leak of command blocks, depending
++	on when it timed out.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<brking at us.ibm.com>
++	[PATCH] ipr driver version 2.0.8
++	
++	Bump driver version
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<davej at redhat.com>
++	[PATCH] USB / SCSI multi-card reader whitelist updates.
++	
++	For more info see Red Hat bugzilla entries #85851 and #124048
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<jejb at mulgrave.(none)>
++	MPT Fusion driver 3.01.07 update
++	
++	From: "Moore, Eric Dean" <Emoore at lsil.com>
++	
++	Clean up backword compatibility with 2.4 kernel and older. Patch
++	provided by Christoph Hellwig<hch at lst.de,hch at infradead.org>
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<michaelc at cs.wisc.edu>
++	[PATCH] SCSI: remove extra queue unplug calls
++	
++	blk_insert_request will do the right thing and either unplug the queue or
++	call the request_fn, so users of scsi_do_req do not need to call
++	generic_unplug_device themselves. The attached patch just removes that
++	call from scsi_lib.c and the sg driver after they do a scsi_do_req.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<lcapitulino at prefeitura.sp.gov.br>
++	[PATCH] qla1280.c warning fix.
++	
++	drivers/scsi/qla1280.c:3124: warning: `qla1280_64bit_start_scsi' defined but not used
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<akpm at osdl.org>
++	[PATCH] Stop megaraid trashing other i960 based devices
++	
++	From: Alan Cox <alan at redhat.com>
++	
++	In 2.4 the megaraid driver was careful to avoid stepping on wrong devices.
++	Specifically the megaraid3 series devices used an intel pci ID (8086:1960)
++	which is the generic i960 identifier not their own.
++	
++	The code to do this in 2.4 worked for almost all cases, but even that code has
++	mysteriously vanished in 2.6 meaning the megaraid driver trashes stuff like
++	promise i2o cards and compaq management cards.
++	
++	The following patch puts back the 2.4 stuff + one additional check so that the
++	driver isn't quite as rude as it was before.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<davej at redhat.com>
++	[PATCH] SCSI: more whitelist updates for usb card readers
++	
++	ATech 9-in-1 card reader.
++	Cbox 3 5 1/2 bay with 6in1 card reader
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<davej at redhat.com>
++	[PATCH] SCSI: Correct BELKIN card reader whitelist entry.
++	
++	Should be FORCELUN not SPARSELUN ?
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<g.liakhovetski at gmx.de>
++	[PATCH] tmscsim: Update version after "new API"
++	
++	The "API-update" patch, just approved by Christoph deserves a new version.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<g.liakhovetski at gmx.de>
++	[PATCH] tmscsim: remove DeviceCnt
++	
++	On Wed, 26 May 2004, Christoph Hellwig wrote:
++	> On Sun, May 23, 2004 at 11:19:58PM +0200, Guennadi Liakhovetski wrote:
++	> >
++	> > Whereas, DCBCnt is incremented on slave_alloc, decremented on
++	> > slave_destroy and used in a couple more places. So, is it safe to assume
++	> > that DeviceCnt is redundant and remove it in a next patch?... Then it
++	> > might be already safe to move scan_devices as you suggest?
++	>
++	> Looks like a way to go.  I'm not sure what scan_device is supposed to
++	> do as I already wrote, but from looking at when it's set/cleared I'm
++	> pretty sure it tries to indicate whethere we're currently scanning for
++	> devices.  And useing slave_alloc/slave_configure is a much safer way to
++	> find that out then guessing from the commands sent.
++	
++	So, here's the first one - remove DeviceCnt.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<akpm at osdl.org>
++	[PATCH] unchecked kmalloc in sr_audio_ioctl()
++	
++	From: "Luiz Fernando N. Capitulino" <lcapitulino at prefeitura.sp.gov.br>
++	
++	
++	Signed-off-by:  Andrew Morton <akpm at osdl.org>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<g.liakhovetski at gmx.de>
++	[PATCH] tmscsim: convert to slave_...
++	
++	On Wed, 26 May 2004, Christoph Hellwig wrote:
++	> Looks like a way to go.  I'm not sure what scan_device is supposed to
++	> do as I already wrote, but from looking at when it's set/cleared I'm
++	> pretty sure it tries to indicate whethere we're currently scanning for
++	> devices.  And useing slave_alloc/slave_configure is a much safer way to
++	> find that out then guessing from the commands sent.
++	
++	Attached is a patch, that moves scan_device to
++	slave_alloc/_configure/_destroy, as you suggested (to be precise, as I
++	understood your suggestion:-))
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<brking at us.ibm.com>
++	[PATCH] ipr operational timeout oops
++	
++	This patch fixes an oops that can occur if an adapter times
++	out coming operational.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<Markus.Lidel at shadowconnect.com>
++	[PATCH] get I2O working with Adaptec's zero channel
++	
++	this patch now gets the mentioned controllers working with the I2O
++	subsystem. It tested on two different system with ASR-2005S and
++	ASR-2010S and reported as working.
++	
++	It's also tested on i686 and x86_64 with already working I2O controllers
++	without a problem.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<akpm at osdl.org>
++	[PATCH] remove calls of obsolete scsi APIs in i2o_scsi
++	
++	From: Markus Lidel <Markus.Lidel at shadowconnect.com>
++	
++	Here is a patch from Christoph Hellwig, which removes calls of the obsolete
++	scsi API in i2o_scsi.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<rl at hellgate.ch>
++	[PATCH] Nuke HAS_IP_COPYSUM
++	
++	HAS_IP_COPYSUM has been utterly meaningless for a long time.
++	
++	Signed-off-by: Roger Luethi <rl at hellgate.ch>
++
++<rl at hellgate.ch>
++	[PATCH] Nuke CanHaveMII and related code
++	
++	All Rhines can have a MII.
++	
++	Signed-off-by: Roger Luethi <rl at hellgate.ch>
++
++<rl at hellgate.ch>
++	[PATCH] Nuke HasESIPhy and related code
++	
++	This has been dead code forever.
++	
++	Signed-off-by: Roger Luethi <rl at hellgate.ch>
++
++<rl at hellgate.ch>
++	[PATCH] Nuke default_port, references to if_port, medialock
++	
++	As is, code doesn't do anything useful.
++	
++	Signed-off-by: Roger Luethi <rl at hellgate.ch>
++
++<rl at hellgate.ch>
++	[PATCH] Nuke all pci_flags
++	
++	All this code together can be replaced with a single #ifdef USE_MMIO.
++	
++	Signed-off-by: Roger Luethi <rl at hellgate.ch>
++
++<rl at hellgate.ch>
++	[PATCH] Return codes for rhine_init_one
++	
++	Use return codes in rhine_init_one instead of -ENODEV for all errors.
++	
++	Signed-off-by: Roger Luethi <rl at hellgate.ch>
++
++<rl at hellgate.ch>
++	[PATCH] Rewrite special-casing
++	
++	Use PCI revision to determine special cases. One bit field replaces a
++	bunch of data structures holding special case information.
++	
++	Replace chip_id, drv_flags in rhine_private with quirks
++	
++	Remove enum rhine_chips, struct rhine_chip_info (and array),
++	enum chip_capability_flags
++	
++	Add enum rhine_revs, enum rhine_quirks (some values in preparation for
++	subsequent changes)
++	
++	wait_for_reset() and enable_mmio() now use quirks instead of chip_id
++	
++	Remove model names from ident strings for now.
++	
++	Signed-off-by: Roger Luethi <rl at hellgate.ch>
++
++<rl at hellgate.ch>
++	[PATCH] Add rhine_power_init(): get power regs into sane state
++	
++	Add rhine_power_init(): get power regs into sane state.
++	Move the respective code out of rhine_init_one. Add code for
++	two additional patterns (Rhine III).
++	
++	Signed-off-by: Roger Luethi <rl at hellgate.ch>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: unusual_devs.h update
++	
++	On Mon, 3 May 2004, zcat wrote:
++	
++	> I am trying to get my camera going as a webcam (concord EyeQ Duo in PC
++	> mode, not HDD mode) with the 2.6.4 kernel using the se401 driver
++	> (compiled in).. It logged the following message, which doesn't mean much
++	> to me so I have no idea if it's useful information or not;
++	>
++	> May  3 21:08:11 mrsnorris kernel: usb 1-1: new full speed USB device
++	> using address 2
++	> May  3 21:08:16 mrsnorris kernel: usb 1-1: control timeout on ep0out
++	> May  3 21:08:16 mrsnorris kernel: usb-storage: This device
++	> (0595,4343,0100 S 00 P 00) has an unneeded Protocol entry in unusual_devs.h
++	> May  3 21:08:16 mrsnorris kernel:    Please send a copy of this message
++	> to <linux-usb-devel at lists.sourceforge.net>
++	
++	This fixes the "unneeded Protocol entry" message.  We never solved the
++	control timeout problem.
++	
++	Alan Stern
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Fix disconnect bug in dummy_hcd
++	
++	Greg:
++	
++	This patch fixes a bug in disconnect handling for the dummy_hcd driver.
++	After a disconnect the driver would still accept URBs for endpoint 0,
++	leading to an oops.  It also improves the ad-hoc technique used by the
++	driver to track its gadget's struct usb_device and fixes the way
++	port-power changes are handled.  Please apply.
++	
++	Alan Stern
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<numlock at freesurf.ch>
++	[PATCH] Add support for ISD-300 controller
++	
++	This patch adds support in unusual_devs.h for the ISD-300 USB controller
++	used in CD-ROM enclosures.
++	
++	With it, since 2.6.0 it allowed me to move gigabytes of data and worked
++	without a hitch.
++	
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: pxa/rndis device descriptor
++	
++	This fixes a problem that all pxa2xx_udc g_ether devices
++	would run into.  They'd give the wrong descriptors, like:
++	
++	> --------msg1- usbview ----------
++	> Device Descriptor: bcdUSB:             0x0200
++	> bDeviceClass:         0xFF
++	> bDeviceSubClass:      0x00
++	> bDeviceProtocol:      0x00
++	> bMaxPacketSize0:      0x10 (16)
++	
++	Windows doesn't like RNDIS-supporting devices to point
++	out that they're really vendor-specific.  So this patch
++	makes sure they don't.
++	
++	Signed-off-by: David Brownell <dbrownelL at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: usb retry cleanups
++	
++	This patch stops changing the reported fault mode in cases where retries of
++	GET_DESCRIPTOR fail because the device just doesn't have such a descriptor.
++	Plus, it stops printing messages when retrying.
++	
++	It also reduces the number of retries; the first retry seems to resolve most
++	of these firmware problems.
++	
++	Signed-Off-By:  David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<oliver at neukum.org>
++	[PATCH] USB: proper evaluation of the union descriptor for CDC ACM
++	
++	this changes acm_probe() to using the proper union descriptor.
++	It contains the workaround David suggested. Please apply.
++	
++	  - fix probing to use cdc union descriptor
++	
++	Signed-off-by: Oliver Neukum <oliver at neukum.name>
++	Signed-off-by: Vojtech Pavlik <vojtech at suse.cz>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<oliver at neukum.org>
++	[PATCH] USB: error handling of open of acm driver
++	
++	this adds error handling to the open method of the cdc acm driver.
++	The change set is relative to my last patch rewriting probe.
++	  - add error handling to open method
++	
++	
++	Signed-off-by: Oliver Neukum <oliver at neukum.name>
++	Signed-off-by: Vojtech Pavlik <vojtech at suse.cz>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<oliver at neukum.org>
++	[PATCH] USB: fix racy access to urb->status in cdc acm driver
++	
++	Hi,
++	
++	fix access to urb->status by introduction of an explicit flag
++	for finished data transfer.
++	  - fix racy access to urb->status
++	
++	Signed-off-by: Oliver Neukum <oliver at neukum.name>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<oliver at neukum.org>
++	[PATCH] USB: fix race between disconnect and write of acm driver
++	
++	acm uses a workqueue to defer part of a write operation.
++	In case of disconnect this work must be waited for.
++	  - fix race between write and disconnect
++	
++	Signed-off-by: Oliver Neukum <oliver at neukum.name>
++	Signed-off-by: Vojtech Pavlik <vojtech at suse.cz>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Minor cleanups for hub driver
++	
++	Greg:
++	
++	This patch takes care of some small miscellaneous items in hub.c:
++	
++		Move the definition of CONFIG to the right place;
++	
++		Print the proper value for submission status in the error log;
++	
++		Remove an unused list of all hubs;
++	
++		Remove some unneeded braces;
++	
++		Kill an accidentally-resurrected comment.
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Move usb_new_device() et al. into hub.c
++	
++	This patch moves usb_new_device(), usb_disconnect(), usb_choose_address(),
++	and usb_release_address() from usb.c to hub.c.  As a side benefit,
++	choose_address() and release_address() can now become static.  The other
++	two can't, because they have to be exported for use by HCD's when
++	registering/unregistering root hubs.
++	
++	Some other features of the patch:
++	
++		The usb_snddefctrl() and usb_rcvdefctrl() macros have been
++		removed, since only one of them was used and only in one spot.
++	
++		The comment about configuration choice needing to interact with
++		hub power budgeting has been moved in accordance with David's
++		wish.  usb_new_device() checks to make sure a configuration
++		could be chosen and logs a warning if no choice was made.
++	
++		Following Linus's preference, the #ifdef preprocessor stuff has
++		been removed from around the calls the show_string routine.  It
++		is now defined as a non-inline routine when debugging is enabled
++		and as an inline no-op otherwise (the compiler will optimize
++		away the useless tests).
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<mochel at digitalimplant.org>
++	[Driver Model] Consolidate attribute definition macros
++	
++	- Create __ATTR(), __ATTR_RO(), and __ATTR_NULL macros to help define 
++	  attributes in a neat, short-hand form. 
++	
++	- Apply these macros to the attribute definition in include/linux/device.h
++	
++	- Note: These can be used to more cleanly define attributes in your own
++	  code. e.g: 
++	
++		static struct device_attribute attrs[] = {
++			__ATTR_RO(foo),
++			__ATTR_RO(bar),
++			__ATTR(baz,0666,baz_show,baz_store),
++			__ATTR_NULL,
++		};
++	
++	  ...etc. 
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<p.lavarre at ieee.org>
++	[PATCH] ata_check_bmdma
++	
++	Move hand-coded BMDMA status check into separate function.
++
++<len.brown at intel.com>
++	[ACPI] fix !CONFIG_PCI build (Bjorn Helgaas)
++
++<mochel at digitalimplant.org>
++	[Driver Model] Fix up silly scsi usage of DEVICE_ATTR() macros. 
++	
++	- Hey, just because the macro incorrectly included a ';' doesn't mean
++	  one shouldn't add one on their own.. (Or at least be consistent.)
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<greg at kroah.com>
++	Add basic sysfs support for raw devices
++	
++	This is needed by people who use udev and want raw devices.
++	SuSE is shipping with this patch.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<mochel at digitalimplant.org>
++	[sysfs] Add attr_name() macro
++	
++	- Returns the name of an embedded attribute in a higher-level 
++	  attribute.
++
++<mochel at digitalimplant.org>
++	[Driver Model] Add default attributes for classes class devices.
++	
++	- add struct class::class_attrs, which is designed to point to an 
++	  array of class_attributes that are added when the class is registered
++	  and removed when the class is unregistered. 
++	  This allows for more consolidated and cleaner definition of and
++	  management of attributes.
++	
++	- Add struct class::class_dev_attrs to do something similarly for 
++	  class devices. Each class device that is registered with the class
++	  gets that set of attributes added for them, and subsequently removed
++	  when the device is unregistered.
++	
++	Each array depends on a terminating attribute with a NULL name. Hint:
++	use the new __ATTR_NULL macro to terminate it.
++
++<greg at kroah.com>
++	Driver Model: More cleanup of silly scsi use of the *ATTR macros...
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<greg at kroah.com>
++	Driver Model: Cleanup the i2c driver silly use of the *ATTR macros which just broke
++	
++	 
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<greg at kroah.com>
++	Cset exclude: vojtech at suse.cz|ChangeSet|20040602201956|45549
++	
++	Oops, this broke device removal pretty badly :(
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<hannal at us.ibm.com>
++	[PATCH] Add class support to cpuid.c
++	
++	This patch adds class support to arch/i386/kernel/cpuid.c. This enables udev
++	support. I have tested on a 2-way SMP system and on a 2-way built as UP.
++	Here are the results for the SMP:
++	
++	[hlinder at w-hlinder2 hlinder]$ tree /sys/class/cpuid
++	/sys/class/cpuid
++	|-- cpu0
++	|   `-- dev
++	`-- cpu1
++	    `-- dev
++	
++	2 directories, 2 files
++	[hlinder at w-hlinder2 hlinder]$ more /sys/class/cpuid/cpu0/dev
++	203:0
++	[hlinder at w-hlinder2 hlinder]$ more /sys/class/cpuid/cpu1/dev
++	203:1
++	[hlinder at w-hlinder2 hlinder]$
++	
++	And for the UP:
++	
++	[root at w-hlinder2 root]# tree /sys/class/cpuid
++	/sys/class/cpuid
++	`-- cpu0
++	    `-- dev
++	
++	1 directory, 1 file
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: 2.6-BK usb (printing) broken
++	
++	On Sat, 29 May 2004, Jens Axboe wrote:
++	
++	> > > Both 2.6.7-rc1 and BK current spit out a bunch of:
++	> > >
++	> > > drivers/usb/class/usblp.c: usblp1: nonzero read/write bulk status received: -2
++	> > > drivers/usb/class/usblp.c: usblp1: error -2 reading from printer
++	> > > drivers/usb/class/usblp.c: usblp1: error -115 reading from printer
++	> > > drivers/usb/class/usblp.c: usblp1: error -115 reading from printer
++	> > > ...
++	> > >
++	> > > (about ~80 of that last line) but work for me.
++	
++	> Sorry wasn't quite clear - the above messages are with 2.6.7-rc1 and
++	> current bk with your patch backed out. Current bk with the patch reports
++	> only the timeouts I originally listed.
++	
++	Okay, I feel better.
++	
++	It looks like those errors you see are caused by a bug in the usblp
++	driver.  The patch below ought to help.
++
++<scott at concord.org>
++	[PATCH] USB: kyocera 7135 patch
++	
++	Here is a patch based on 2.6.7-rc2 that makes the Kyocera 7135 work.
++	The Kyocera appears to have the same setup as the Trio.  Its endpoints
++	are laid out like this:
++	
++	> >>>type                  address
++	> >>>usb bulk out:         0x01
++	> >>>usb interrupt in:     0x82
++	> >>>usb bulk out:         0x03
++	> >>>usb bulk in:          0x84
++	The last two are the ones used for the syncing communication.
++	
++	So the patch adds the ids for the kyocera and makes the treo_attach
++	function handle the kyocera too.  I also changed the comment; it appears
++	there was an error in the original comment about the treo:
++	
++	Joe Nardelli wrote:
++	> Actually, the comment isn't quite right for Treos either (oops).  It
++	> should read:
++	>
++	> ...
++	> 1st bulk in endpoint to communicate with the 2nd bulk out endpoint
++	> ...
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<mochel at digitalimplant.org>
++	[Driver Model] Add default attributes for struct bus_type.
++	
++	- Similar to default attributes for struct class, this is an array
++	  of attributes, terminated with an attribute with a NULL name, that
++	  are added when the bus is registered, and removed when the bus is 
++	  unregistered. 
++
++<greg at kroah.com>
++	USB: remove "devfs" message from kernel log for usb-serial driver
++	
++	No one uses devfs on 2.6 :)
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<mochel at digitalimplant.org>
++	[Driver Model] Add default device attributes to struct bus_type.
++	
++	- Add struct bus_type::dev_attrs, which is an array of device 
++	  attributes that are added to each device as they are registered.
++	
++	 - Also make sure that we don't hang when removing bus attributes
++	   if adding one failed.. 
++
++<aradford at amcc.com>
++	[PATCH] 1/2 3ware 9000 SATA-RAID driver v2.26.00.009
++	
++	Here is an updated version v2.26.00.009 of the 3ware 9000 SATA-RAID driver.
++	
++	Changes in this release:
++	   - Convert driver to pci_driver format.
++	   - Remove proc interface, add sysfs attributes.
++	   - Return SCSI_MLQUEUE_HOST_BUSY when card status is busy.
++	
++	Future versions may include:
++	   - PAE fix
++	   - 80 column wrap fixes
++	   - Remove more prototypes by re-ordering functions.
++	   - sysfs queue depth adjustment instead of module_param
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<aradford at amcc.com>
++	[PATCH] 2/2 3ware 9000 SATA-RAID driver v2.26.00.009
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<len.brown at intel.com>
++	[ACPI] acpi=force overrides blacklist pci=noacpi or acpi=noirq (Andi Kleen)
++
++<hch at lst.de>
++	[PATCH] fix dpt_i2o compilation for alpha and sparc
++	
++	This patch has been floating around for ages, got reminded of it again
++	when looking at the debian kernel package.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<g.liakhovetski at gmx.de>
++	[PATCH] tmscsim: Store pDCB in device->hostdata
++	
++	On Sun, 23 May 2004, Christoph Hellwig wrote:
++	> The other thing is that most calls to dc390_findDCB could probably be
++	> replaced with stroing the pDCB in scsi_device->hostdata on slave_alloc,
++	> but that could aswell be done in an incremental patch.
++	
++	Done in the attached patch. Tested as usual and a bit harder.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<hch at lst.de>
++	[PATCH] remove sleep_on_timeout usage in megaraid
++	
++	megaraid does sleep_on_timeout on a stack waitq - use msleep instead.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<hch at lst.de>
++	[PATCH] handle NO_SENSE in sd
++	
++	Original patch from
++	http://marc.theaimsgroup.com/?l=linux-scsi&m=107428662718579&w=2
++	reworked to according to James' suggestion to handle NO_SENSE the same
++	as RECOVERED_ERROR.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<hch at lst.de>
++	[PATCH] fix check_region usage in eata_pio
++	
++	I'd love to rework the init sequence a bit more, but without beeing able
++	to actually test the driver I'd rather stick to the bulletproof fix.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<hch at lst.de>
++	[PATCH] fix sym53c416 check_region usage
++	
++	again, the init code could use some bigger rework, but let's stick to
++	the minimal fix until we have some testers.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<hch at lst.de>
++	[PATCH] remove obsolete API usage from dpt_i2o
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<James.Bottomley at steeleye.com>
++	[PATCH] Advansys: Add basic highmem/DMA support
++	
++	On Wed, 2004-05-19 at 05:38, Herbert Xu wrote:
++	> This is a resend of my patch that adds basic support for highmem
++	> on i386 to the advansys driver.  It has been tested in
++	> http://bugs.debian.org/245238.
++	>
++	> The maintainer email address listed in the MAINTAINERS file bounced
++	> so someone else will need to look at this.
++	
++	I converted your patch to use the DMA-API.  This will be necessary to
++	use the EISA advansys boards---Of course, EISA won't work properly until
++	the entire driver is converted to the driverfs probing API, sigh, but
++	I'll get around to that eventually.
++	
++	OK, and I couldn't resist getting rid of the stupid in_isr locking on
++	the done function.
++	
++	Converted from original patch by Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<rddunlap at osdl.org>
++	[PATCH] fix check_region usage in eata_pio
++	
++	Based on "eata_generic.h", this SCSI controller has 9 bytes of IO
++	space, not 8, so update request_region(), release_region(), and
++	n_io_port to use 9 instead of 8.
++	
++	diffstat:=
++	 drivers/scsi/eata_pio.c |   16 ++++++++--------
++	 1 files changed, 8 insertions(+), 8 deletions(-)
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<hch at lst.de>
++	[PATCH] scsi_dev_flags must be __initdata, not __init
++	
++	__init is only for functions
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<akpm at osdl.org>
++	[PATCH] Lost 2.4 change for BusLogic info
++	
++	From: Alan Cox <alan at redhat.com>
++	
++	I think it might be a good thing if this was fixed to match 2.4
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<akpm at osdl.org>
++	[PATCH] scsi_transport_spi.c build fix
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<arjanv at redhat.com>
++	[PATCH] SCSI: replace deprecated hosts.h file
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<akpm at osdl.org>
++	[PATCH] 3ware 9000 driver update
++	
++	From: "Adam Radford" <aradford at amcc.com>
++	
++	This patch updates the 3w-9xxx driver in 2.6.7-rc2-mm1 to v2.26.02.000 to
++	cleanup several things pointed out by Chris Hellwig / Jeff Garzik.
++	
++	Changes in this release:
++	  - Use descriptive defines for phase numbers.
++	  - Remove un-needed casts for TW_Command_Full
++	  - Rework eh_reset(), eh_abort() spinlocks.
++	  - Remove all mdelays, replace w/ schedule_timeout().
++	  - Remove MODULE_PARAM cmds_per_lun, add sysfs device attribute 'queue_depth'.
++	  - Remove twa_slave_configure().
++	  - Remove twa_info().
++	  - Remove all bitfields from structures, add bitmask macros.
++	  - Remove twa_setup_irq() wrapper, call directly.
++	  - Remove un-needed prototypes.
++	  - Propogate return value of pci_enable_device(), pci_set_dma_mask(), ioremap().
++	  - Use pci_request/free_regions().
++	  - Add missing call to pci_disable_device() on probe failure.
++	  - Unregister character ioctl interface in twa_remove().
++	  - Make some excessively lengthy lines < 80 columns.
++	  - Use pci_module_init() instead of pci_register_driver().
++	  - Remove bogus TW_IN_INTR check, fix twa_interrupt() spinlock.
++	  - Rev driver branch to .02 to denote kernel version.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<akpm at osdl.org>
++	[PATCH] 3ware 9000 schedule_timeout fix
++	
++	From: "Adam Radford" <aradford at amcc.com>
++	
++	This small patch fixes the broken schedule_timeout() usage in the 3w-9xxx
++	driver, and replaces the calls with msleep().
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<hch at lst.de>
++	[PATCH] missing forward declarations in scsi_eh.h
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<hch at lst.de>
++	[PATCH] update 53c700 to avoid obsolete headers
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<hch at lst.de>
++	[PATCH] kill dead compat code in advansys
++	
++	I actually wanted to fix up the check_region usage there but got lost
++	in the mess.  Let's start by kicking out the 2.2 compat and using scsi
++	layer constants instead of their own redefinitions first.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<jejb at mulgrave.(none)>
++	sg update to 20040516
++	
++	From: Douglas Gilbert <dougg at torque.net>
++	
++	Here are some further refinements to this patch with help
++	from Pat Mansfield:
++	     - replace vmalloc() with kmalloc(,GFP_KERNEL)
++	     - bump max sg devices from 8192 to 32768
++	
++	Tested to 16k devices (and 8k devices on a box with 512MB
++	ram), Patch is against lk 2.6.6 (or 2.6.6-bk1).
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<greg at kroah.com>
++	Driver Model: And even more cleanup of silly scsi use of the *ATTR macros...
++	  
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<greg at kroah.com>
++	PCI: convert to using dev_attrs for all PCI devices.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<vojtech at suse.cz>
++	[PATCH] I2C i2c-piix: Don't treat ServerWorks servers as Laptops
++	
++	I'm sending you this little obvious patch which should enable i2c-piix
++	to work on IBM servers with ServerWorks chipsets. It still will treat
++	any IBM/Intel machine as a laptop and refuse to work, but it's better
++	than before.
++	
++	
++	  i2c: Treat only IBM machines with Intel chipsets as IBM laptops.
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<khali at linux-fr.org>
++	[PATCH] I2C: update I2C IDs
++	
++	> > Greg, should I send a patch to you with these?
++	>
++	> Sure, if it's needed.
++	
++	Just noticed that I never sent the promised patch. Here it is. I also
++	added a few other IDs, since we have them in our (2.4) i2c CVS
++	repository. Having them in 2.6 as well will at least prevent collisions.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<Frank.A.Uepping at t-online.de>
++	[PATCH] Driver Core: fix struct device::release issue
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++	
++	
++	On Saturday 27 March 2004 02:14, Greg KH wrote:
++	> On Sat, Mar 06, 2004 at 12:47:24PM +0100, Frank A. Uepping wrote:
++	> > Hi,
++	> > if device_add fails (e.g. bus_add_device returns an error) then the release
++	> > method will be called for the device. Is this a bug or a feature?
++	>
++	> Are you sure this will happen?  device_initialize() gets a reference
++	> that is still present after device_add() fails, right?  So release()
++	> will not get called.
++	At the label PMError, kobject_unregister is called, which decrements the
++	recount by 2, which will result in calling release at label Done (put_device).
++	
++	kobject_unregister should be superseded by kobject_del.
++	Here is a patch:
++
++<dlsy at snoqualmie.dp.intel.com>
++	[PATCH] Fixes for hot-plug drivers (updated)
++	
++	Here is the updated patch (against 2.6.7-rc1) for the shpchp and pciehp
++	drivers that fixes the following issues:
++	- proper LED status when latch is open or card is not present while the
++	  user tries to power up the slot; (reported by D. Keck)
++	- check if kmalloc() return NULL before proceeding in acpi_get__hpp();
++	  (provided by L. Capitulino)
++	- add up(&ctrl->crit_sect) before return in error cases in several
++	  places;
++	- proper handling of resources when there are other onboard devices
++	  behind the p2p bridge that has the hot-plug capabaility;
++	- need to check negotiated link width in check_lnk_status();
++	- cleanup board_added() in pciehp
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<spitalnik at penguin.cz>
++	[PATCH] USB: pegasus driver and ATEN device support
++	
++	I have created a patch to add support for ATEN device in pegasus usb driver.
++	I've sent the patch to the maintainer stated in pegasus.h but after several
++	weeks I didn't recieve a response, so I'm sending it to you now. The patch
++	should apply cleanly on 2.6.6, but it doesn't apply cleanly on todays -bk as
++	there was some patch adding some other device. One thing I'm not 100% sure
++	are the flags specified to PEGASUS_DEV, what means HAS_HOME_PNA?
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<jnardelli at infosciences.com>
++	[PATCH] USB: fix Memory leak in visor.c and ftdi_sio.c
++	
++	Signed-off-by: Joe Nardelli <jnardelli at infosciences.com>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Code cleanup for the UHCI driver
++	
++	This patch makes some simple cleanups in the UHCI driver:
++	
++		It introduces msecs_to_jiffies() conversions and uses msleep().
++	
++		It wakes up threads waiting for an endpoint to be disabled
++		in the oddball case where interrupts aren't working.  (This
++		should have been in a previous patch but I missed it.)
++	
++		It disables PCI interrupt generation whenever the controller
++		is reset and enables it when the controller is started.  This
++		may possibly solve some people's problems with suspend/resume.
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Debounce all connect change events
++	
++	This patch makes the hub driver debounce all connection changes.  Right
++	now the driver only does so if the status happens to be CONNECTED at one
++	particular instant.  However, the whole point of debouncing is that the
++	connection is subject to transient interruptions until it has stabilized;
++	hence deciding whether to debounce based on a single initial test defeats
++	the entire purpose.
++	
++	There are some additional smaller changes that go along with the major
++	one:
++	
++		Comments added to hub_port_connect_change() detailing the
++		conditions under which it will be called.
++	
++		Don't clear the port's connect-changed feature if it wasn't
++		set.
++	
++		Skip debouncing if there wasn't a physical connection change
++		but only a logical port-enable change (or a firmware-download-
++		induced device morph -- not yet implemented).
++	
++		Clear all the hub status change indicators in hub_events()
++		before handling a connect change.  This will reduce syslog
++		clutter from status change bits that remain set while khubd
++		is busy taking care of a new device.
++	
++	The patch includes no changes to the debounce routine itself.  Please
++	apply.
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Superficial improvements to hub_port_debounce()
++	
++	Since my previous suggestions for changes to hub_port_debounce()
++	encountered so much resistance, this patch makes some fairly superficial
++	improvements to the code while leaving the logic of the algorithm almost
++	completely intact.  The only behavioral change is that it actually
++	requests the port status at the start, rather than assuming the status is
++	not CONNECTED.  Changes include:
++	
++		Vastly improved comments that are now unambiguous and accurately
++		descriptive of the code.
++	
++		Local variables changed to more sensible names.  The stability
++		period is now reported in milliseconds rather than a meaningless
++		poll count.
++	
++		The sleep interval is moved from the start of the loop to the
++		end, so that the first time through we read the port status
++		immediately.
++	
++		If the connection has not stabilized after the total timeout
++		expires, -ETIMEDOUT is returned rather than whatever the
++		current connect status happens to be.
++	
++		If the connection does stabilize then the port status is returned
++		so that hub_port_connect_change() will have an up-to-date value
++		for the status rather than relying on the pre-debounce value.
++	
++	The changes I wanted to make but other people were worried about are
++	included as comments.  A later (small) patch will uncomment them for
++	testing.
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Genuine changes to hub_port_debounce()
++	
++	This patch includes the algorithmic changes I would like to see in
++	hub_port_debounce().  They are:
++	
++		Increase the total timeout period from 400 ms to 1500 ms.
++	
++		Check the port's connect-changed status during the polling
++		loop.
++	
++		Return as soon as the connection has been stable for the
++		required time, even if it has been stably _dis_-connected.
++		(The current code waits for the full timeout period if there
++		isn't a connection.)
++	
++	In previous emails I have responded to all the concerns raised by others
++	about these changes, and I can't imagine how they could cause any trouble.
++	
++		Increasing the total timeout won't affect people with properly
++		functioning hardware.  Their connections will quickly stabilize
++		and the routine will return just as before.  People with flaky
++		hardware that takes a long time to settle down will now be able
++		to use their devices.
++	
++		Checking the connect-changed status during the polling loop will
++		make the test more conservative.  The code will be able to
++		detect transient disconnections that it would have missed
++		before, and it won't return until the connection really _is_
++		stable.  Furthermore, this makes the test compliant with the
++		USB specification, which requires the stability timer to be
++		restarted whenever a connection change occurs.
++	
++		Returning early for disconnections is a simple optimization.
++		It's more important now that the total timeout length is 1.5
++		seconds rather than 0.4 seconds.
++	
++	I urge you to apply this patch and for people to try it out.  If there do
++	turn out to be problems... the patch is very small, well-contained, and
++	easy to revert.
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] Make the scsi error handler bus settle delay a per template option
++	
++	On 1 Jun 2004, James Bottomley wrote:
++	> On Tue, 2004-06-01 at 15:29, Alan Stern wrote:
++	> > In addition, the settle-time delays would have to be removed from the
++	> > error handler -- which means adding it to all the low-level drivers.  Is
++	> > that doable?
++	>
++	> Well, for 2.6, I think that a simple flag indicating that the driver
++	> will implement it's own timeout should suffice rather than altering
++	> every LLD...
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<corbet at lwn.net>
++	[PATCH] Module section offsets in /sys/module
++	
++	So here I am trying to write about how one can apply gdb to a running
++	kernel, and I'd like to tell people how to debug loadable modules.  Only
++	with the 2.6 module loader, there's no way to find out where the various
++	sections in the module image ended up, so you can't do much.  This patch
++	attempts to fix that by adding a "sections" subdirectory to every module's
++	entry in /sys/module; each attribute in that directory associates a
++	beginning address with the section name.  Those attributes can be used by a
++	a simple script to generate an add-symbol-file command for gdb, something
++	like:
++	
++	#!/bin/bash
++	#
++	# gdbline module image
++	#
++	# Outputs an add-symbol-file line suitable for pasting into gdb to examine
++	# a loaded module.
++	#
++	cd /sys/module/$1/sections
++	echo -n add-symbol-file $2 `/bin/cat .text`
++	
++	for section in .[a-z]* *; do
++	    if [ $section != ".text" ]; then
++		echo  " \\"
++		echo -n "	-s" $section `/bin/cat $section`
++	    fi
++	done
++	echo
++	
++	Currently, this feature is absent if CONFIG_KALLSYMS is not set.  I do
++	wonder if CONFIG_DEBUG_INFO might not be a better choice, now that I think
++	about it.  Section names are unmunged, so "ls -a" is needed to see most of
++	them.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<greg at kroah.com>
++	Driver core: finally add a MAINTAINERS entry for it.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<davej at redhat.com>
++	[AGPGART] Kconfig Typo fix
++	From: Tuncer M zayamut Ayaz
++	Signed-off-by: Dave Jones <davej at redhat.com>
++
++<greg at kroah.com>
++	USB: make usb devices remove their sysfs files when disconnected.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<alex.williamson at hp.com>
++	[PATCH] ia64: delete McKinley A-stepping code
++	
++	The patch below removes the config option and one bit of code for
++	McKinley A0/A1 CPU workarounds.  These CPUs were never used in
++	production, and IIRC this workaround really only affected X11.
++	
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<Siegfried.Hildebrand at FernUni-Hagen.de>
++	[PATCH] Re: Problems with cyberjack usb-serial-module since kernel 2.6.2
++	
++	> Send me a patch to back those changes out to fix your device and I'll
++	> apply it.  If the author is around to realize this, that should wake
++	> them up :)
++	
++	Ok, here you are! :)
++	Attached is a patch for linux-2.6.7-rc2. (though the patch hasn't changed
++	since -rc1)
++	
++	Again a short description:
++	(the patch removes most of the changes done in linux-2.6.2)
++	1. Removed the local buffer of cyberjack_write, because something goes wrong
++	upon a write-request bigger than the buffer. Without this, a write-request
++	stalls with error -3.
++	2. Removed some usb_clear_halt() lines. Without this, the device doesn't even
++	open and returns -7.
++	
++	It works for my cyberjack pinpad USB card reader on
++	- nforce2 chipset
++	- VIA KM266 chipset
++	- AMD Irongate chipset
++	
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<mdharm-usb at one-eyed-alien.net>
++	[PATCH] USB Storage: GetMaxLUN tightening
++	
++	This patch started life from Alan Stern as as274, and has been heavily
++	modified.  It narrows the case where a clear_halt() is issued after a
++	failed GetMaxLUN command to only a STALL case.
++	
++	Since the only legimate responses to a GetMaxLUN are STALL or data,
++	anything else is now considered a fatal error and we give up on the device.
++	
++	
++	Signed-off-by: Matthew Dharm <mdharm-usb at one-eyed-alien.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<kaie at kuix.de>
++	[PATCH] USB: enable pwc usb camera driver
++	
++	The attached patch enables the pwc driver included with kernel 2.6.7-rc2
++	
++	It also removes the warnings during compilation.
++	However, note that I blindly duplicated the release approach used by
++	other usb camera drivers, replacing the current no-op.
++	
++	The driver works for me with a Logitech QuickCam Notebook Pro and
++	GnomeMeeting.
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Fix logic in usb_get_descriptor()
++	
++	This patch fixes a simple logic error in usb_get_descriptor().  It also
++	takes the opportunity to make the subroutine a little easier to read.
++	Please apply.
++	
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<arun.sharma at intel.com>
++	[PATCH] ia64: fix ia32 virtual memory leaks due to partial-page mappings
++	
++	Certain IA-32 applications which do mmap/munmaps which are not
++	PAGE_SIZE aligned could see temporary (recovered at process exit time)
++	memory leaks, because the kernel didn't have enough data to decide if
++	the complete page could be unmapped. This patch adds a new data
++	structure called the "partial page list" which helps the kernel keep
++	track of precisely which 4k pages are in use by the IA-32 application.
++	
++	Armed with this data, the kernel can make better decisions at munmap
++	and mprotect time. No significant performance degradation was observed
++	in the workloads we tested and in some cases, the performance actually
++	improved!  This is possibly due to the reduced length of the vma list.
++	
++	Signed-off-by: Arun Sharma <arun.sharma at intel.com>
++	Signed-off-by: Gordon Jin <gordon.jin at intel.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<baldrick at free.fr>
++	[PATCH] USB devio.c: deadlock fix
++	
++	proc_resetdevice is called with dev->serialize held.
++	usb_reset_device takes dev->serialize and then calls
++	__usb_reset_device.  To avoid deadlock, proc_resetdevice
++	should call __usb_reset_device directly.
++	
++	Signed-off-by: Duncan Sands <baldrick at free.fr>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Check port reset return code
++	
++	This patch adds checking for the SET-FEATURE request that actually does a
++	port reset.  Without the check, the hub driver just assumes that the port
++	reset command actually was transferred okay.
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Fix resource leakage in the hub driver
++	
++	The hub driver is very careless about returning resources when an error
++	occurs while installing a new device.  This patch attempts to put some
++	order back into the situation.  Details:
++	
++		Since usb_new_device() allocates neither the device structure
++		nor the device address, it shouldn't release either one.
++	
++		Because usb_new_device() no longer releases the device structure,
++		usb_register_root_hub() doesn't need to take an extra reference
++		to it.
++	
++		Since the device address selection and TT setup code is used
++		only for new devices, not ones being reset, move that code from
++		hub_port_init() to hub_port_connect_change().  By the same token,
++		hub_port_init() doesn't have to release the device address or
++		the device structure.
++	
++		Just to make things look better, move the failure code in
++		hub_port_init() to the end of the routine.  And when disabling
++		endpoint 0, disable both the IN and OUT parts of the endpoint.
++	
++		In hub_port_connect_change(), make all the failure paths
++		execute the same code so that resources are always released.
++		These resources comprise: the pointer from the parent to the
++		new child device, the HCD state for ep0, the device's address,
++		and the device structure itself -- in short, everything that's
++		set up before calling usb_new_device().
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: unusual_devs.h update
++	
++	Given the problems that Dan Scholnik has reported, we should combine the
++	unusual_devs.h entries for the Casio QV cameras into one.  The new
++	NEED_OVERRIDE flag will prevent complaints about unnecessary overrides,
++	and Dan says the same subclass and protocol values should work for all the
++	cameras.  If they don't we'll hear about it soon enough!
++	
++	
++	On Tue, 1 Jun 2004, Dan Scholnik wrote:
++	> On Tue, 2004-06-01 at 14:14, Alan Stern wrote:
++	> > On Tue, 1 Jun 2004, Dan Scholnik wrote:
++	> >
++	> > > Up until the 2.6 kernels, there was one entry for all the QV cameras
++	> > > with both US_SC_8070 and US_PR_CB that I think seemed to work fine for
++	> > > everyone.  As far as I know the only problem was all the folks emailing
++	> > > the log entry stating that the Casio entry wasn't needed.  So, you could
++	> > > revert back to that, or revert back to the 2.6.3ish version (pre-as190)
++	> > > that had the overrides just for product IDs 1001-9009.  I'm not really
++	> > > an expert on Casio's cameras, I'm afraid, just the one model I own which
++	> > > is 4-5 years old now.
++	> > >
++	> > > I'll be happy to prepare a patch any way you choose to go.
++	> >
++	> > How does this work for you?
++	> >
++	> > Alan Stern
++	>
++	> Works fine for me; that's I think exactly how it was from the beginning
++	> until 2.6 and the later 2.4 kernels when all the changes were made.
++	> Just cross your fingers that it doesn't somehow break newer Casios, as
++	> it would seem every camera they ever made falls under that entry.
++	
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: rndis (1/4) update OID support
++	
++	NDIS devices have a generic attribute get/set API where the attributes
++	are identified by 32 bit "OIDs".  This fixes some problems with the OIDs
++	supported by the original RNDIS patch:
++	
++	  - It included OIDs not found in the RNDIS spec.  These have been
++	    removed.  As a rule, these weren't exported in the "OIDs I support"
++	    list, and only a couple wouldn't fail those accesses, so this mostly
++	    changes what debug printk appears.
++	
++	  - OIDs used for optional 802.3 statistics were partially supported.
++	    They're all in the OID list now, but the support is #ifdeffed out.
++	    (Those statistics were mostly just made up, anyway!)
++	
++	  - "Required" OIDs for suspend, resume, and wakeup support weren't
++	    listed.  Their messages are now defined, but support is #ifdeffed
++	    out.  Seems the docs aren't entirely accurate, and Windows can
++	    behave reasonably without them.  (This area needs help from someone
++	    who knows MS-Windows power management.)
++	
++	There are also a few minor cleanups, more reasonable default volume level
++	for debug messages (never at KERN_INFO, keepalives only if VERBOSE), and
++	dumping of all bytes of some undocumented messages Windows XP has been
++	seen emitting shortly before the host suspended itself.
++	
++	Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: rndis (2/4) fix memory leaks
++	
++	Tao Huang wrote:
++	> I'm writing udc driver for S3C2410. I found RNDIS almost not call my
++	> driver's free_request and free_buffer. So after run my driver about 3
++	> hours the system will out of memory.
++	>
++	> This patch will fix the memory leak.
++	>
++	> There will still have memory leak when driver unload, but I don't known
++	> where is the proper place to fix it.
++	> 1) rndis.c should free resp_queue when it unload
++	> 2) ether.c should free tx_reqs and rx_reqs when it unload (as
++	> eth_reset_config)
++	
++	Thanks ... this is a nice patch to have.
++	
++	
++	From:          Tao Huang <huangt at star-net.cn>
++	Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: rndis (4/4) start documenting spec variances
++	
++	This partially reverts one of the changes in an earlier patch,
++	starting to document where Microsoft's spec is lying.  Needed
++	to interop with Windows ME.
++	
++	
++	The Windows ME implementation of RNDIS relies on a message that
++	Microsoft's specification says isn't used.  Restore this (removed
++	in earlier cleanup), and start collecting comments specifically
++	on where MSFT violates its own specifications.
++	
++	Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<kaos at sgi.com>
++	[PATCH] ia64: Rename SN "modules" variable to "sn_modules".
++	
++	SN code has a "modules" variable that conflicts with a variable of the
++	same name in kernel/module.c.  This conflict breaks lcrash for ia64.
++	Rename "modules" to "sn_modules".
++	
++	Signed-off-by: Keith Owens <kaos at sgi.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<davej at redhat.com>
++	[AGPGART] Don't waffle about unsupported serverworks chipsets if they don't do AGP.
++	From: Matt Domsch
++	Signed-off-by: Dave Jones <davej at redhat.com>
++
++<daniel.ritz at gmx.ch>
++	[PATCH] PCI: fix irq routing on acer travelmate 360 laptop
++	
++	Fixes interrupt routing on acer travelmate 360 notebooks.  it looks like
++	the bios assigned the wrong pirq value for the cardbus bridge.  just
++	assigning irq 10 to all devices with pirq 0x63 would break second usb port.
++	pirq 0x68 seems to be right one for cardbus.
++	
++	Signed-off-by: Daniel Ritz <daniel.ritz at gmx.ch>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<mhoffman at lightlink.com>
++	[PATCH] I2C: add alternate VCORE calculations for w83627thf and w83637hf
++	
++	This patch adds support for the alternate in0/VCORE calculation which is
++	available for 2 of 4 chips this driver supports.  It also fixes a minor
++	bug in the standard voltage input calculation.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<jmunsin at iki.fi>
++	[PATCH] I2C: drivers/i2c/chips/it87.c cleanup patch
++	
++	Attached is a cleanup patch for the it87 sensor driver, against
++	2.6.7-rc2. Jean Delvare has reviewed it.
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: usb root hubs can set power budgets
++	
++	This adds hub_set_power_budget(), mostly so that HCDs for low
++	powered ports (cell phone, PDA, etc) can more easily report their
++	true power budgets.  It's not always 500mA per root hub port; this
++	makes dummy_hcd report the minimum, 8mA.
++	
++	Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: usb suspend/resume work better on net2280
++	
++	This makes net2280 behave more correctly with respect to
++	usb suspend and resume processing.
++	
++	So for example gadget zero autoresume testing works.
++	
++	Signed-off-by:	David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: rndis (3/4) Big Endian support for gadget RNDIS
++	
++	Add byteswapping.  Original version partially worked on PPC with Net2280,
++	this version applies to the latest RNDIS code but hasn't been retested on
++	big-endian.  Ping should be working in at least one one direction.
++	
++	Also added a handful of other things from my BK:  track suspend/resume
++	(to eventually implement wake-on-lan), give a better rndis error
++	message, and add missing declarations for PM-related OIDs (usage is
++	#ifdeffed out by previous patch).
++	
++	    From:	   Jon Neal <jon at ballardtech.com>
++	    Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>
++	    Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] lh7a404 USB host against 2.6.7-rc2
++	
++	Support for the Sharp LH7A404 OHCI, another non-PCI implementation.
++	This uses a platform_device and a workaround for a register read
++	problem.
++	
++	Signed-off-by: Marc Singer <elf at buici.com>
++	Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Initialize endpoint autoconfig in g_file_storage
++	
++	This one-line patch corrects a simple problem in the g_file_storage
++	driver.  It neglected to initialize the endpoint-autoconfiguration library
++	before using it.  Please apply.
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<hannal at us.ibm.com>
++	[PATCH] Add cpu hotplug support to cpuid.c
++	
++	Here is the patch that uses a cpu hotplug callback, to allow dynamic support
++	of cpu id for classes in sysfs.
++	
++	This patch applies on top of the one I sent out earlier that Greg included.
++	I do not have access to hardware that supports cpu hotswapping (virtually or not)
++	so have not been able to test that aspect of the patch. However, the original
++	functionality of listing static cpu's still works.
++	
++	Please consider for testing or inclusion.
++	
++	Signed-off-by: Hanna Linder <hannal at us.ibm.com>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<rmk at arm.linux.org.uk>
++	[PATCH] Add platform_get_resource()
++	
++	This patch adds management of platform device resources to the
++	device model, allowing drivers to lookup resources, IRQs and DMA
++	numbers in the platform device resource array.  We also add a
++	couple of functions which allow platform devices and their resources
++	to be registered.
++	
++	Signed-off-by: Russell King <rmk at arm.linux.org.uk>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<greg at kroah.com>
++	cpuid: fix hotplug cpu remove bug for class device.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<akpm at osdl.org>
++	[PATCH] I2C: w83627hf.c build fix
++	
++	with gcc-2.95:
++	
++	drivers/i2c/chips/w83627hf.c:482: parse error before `static'
++	drivers/i2c/chips/w83627hf.c:502: parse error before `static'
++	drivers/i2c/chips/w83627hf.c: In function `show_regs_fan_1':
++	drivers/i2c/chips/w83627hf.c:541: warning: implicit declaration of function `show_fan'
++	drivers/i2c/chips/w83627hf.c: In function `w83627hf_detect':
++	drivers/i2c/chips/w83627hf.c:1074: `dev_attr_in0_min' undeclared (first use in this function)
++	drivers/i2c/chips/w83627hf.c:1074: (Each undeclared identifier is reported only once
++	drivers/i2c/chips/w83627hf.c:1074: for each function it appears in.)
++	drivers/i2c/chips/w83627hf.c: At top level:
++	drivers/i2c/chips/w83627hf.c:428: warning: `show_regs_in_min0' defined but not used
++	drivers/i2c/chips/w83627hf.c:441: warning: `store_regs_in_min0' defined but not used
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<oliver at neukum.org>
++	[PATCH] USB: add printer reset ioctl
++	
++	  - add soft reset ioctl
++	
++	Signed-off-by: Oliver Neukum <oliver at neukum.name>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Fix bus-list root-hub race
++	
++	There are a few places where the code enumerates through all the USB
++	devices on all the buses, starting with each bus's root hub and working
++	down.  However a bus does not always have a root hub, and the code does
++	not check that the root_hub pointer is non-NULL.  This patch fixes the
++	problem, using the usb_bus_list_lock semaphore to synchronize access when
++	root hubs are added or removed.
++	
++	In addition it seemed like a good idea to minimize the time that a
++	non-fully-configured root hub is accessible through the bus's pointer.  So
++	this patch delays setting the pointer and holds usb_bus_list_lock while
++	configuring a root hub.
++	
++	It turned out that a bunch of things needed to be changed for all this to
++	work:
++	
++		Check for NULL root_hub pointer in usb_device_read() and
++		usb_find_device().
++	
++		Pass the root-hub device as a separate argument to
++		hcd_register_root().
++	
++		Make usb_register_root_hub() acquire the usb_bus_list_lock and
++		set the bus->root_hub pointer.
++	
++		For consistency's sake, move the place where the children[]
++		pointer to a non-root-hub device gets stored as close as possible
++		to where usb_new_device() is called.
++	
++		Make usb_disconnect() acquire the usb_bus_list_lock when removing
++		a root hub.
++	
++		Change usb_hcd_pci_remove() and the non-PCI host drivers so that
++		they call usb_disconnect() with a pointer to the bus's root_hub
++		pointer, not a pointer to a temporary variable.
++	
++		Change all the host controller drivers not to store the root_hub
++		pointer in the bus structure but instead to pass it as a new
++		argument to hcd_register_root().
++	
++	I made some attempt to update the hc_sl811 driver along with the rest, but
++	it's pretty clear that driver won't work in the current framework.  Among
++	other things, it never reads the root hub's device descriptor.  To what
++	extent is the driver really supported?
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Minor tidying up of hub driver
++	
++	After my last few changesets there were a few small items that needed to
++	be tidied up.
++	
++		Update kerneldoc to reflect the actual operation of
++		usb_disconnect() and usb_new_device().  The new locking
++		requirements are listed too, though they aren't all
++		implemented yet.
++	
++		Fulfill the new locking requirement in hcd_panic().
++	
++		Remove unneeded local variables to conserve stack space in
++		usb_disconnect(), which calls itself recursively.
++	
++		In hub_port_connect_change(), store the parent's children[]
++		pointer as late as possible and don't lock the new device until
++		then (that's when it becomes globally accessible).  This will
++		minimize the time that the not-fully-configured device structure
++		is visible to other parts of the kernel.
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Update root-hub code for the ohci-lh7a404 driver
++	
++	On Wed, 9 Jun 2004, David Brownell wrote:
++	
++	> Needs an update for ohci-lh7a404.c too ...
++	
++	I didn't even know this driver existed!  Where did usb/host/* come from?
++	
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<greg at kroah.com>
++	USB: crap, I misapplied a patch with the wrong level
++	
++	This gets rid of usb/host and puts the file in the proper drivers/usb/host
++	directory.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<wesolows at foobazco.org>
++	[SPARC32]: Regenerate defconfig
++
++<wesolows at foobazco.org>
++	[SPARC32]: Move non-PCI DMA definitions out of pgtable.h
++	
++	This also avoids a cyclic header inclusion problem with dma-mapping.h
++	and linux/mm.h triggered by the recent change to standard DMA definitions.
++
++<wesolows at foobazco.org>
++	[SPARC32]: Continue to avoid the use of __builtin_trap for BUG()
++	
++	gcc 3.3.3 continues to ICE on the BUG_ON() in mm/fremap.c.
++
++<wesolows at foobazco.org>
++	[SPARC32]: Fix CONFIG_SUN4 build
++
++<dtor_core at ameritech.net>
++	[PATCH] Driver Core: Suppress platform device suffixes
++	
++	Do not add numeric suffix to platform device name if device id is set to
++	-1. This can be used when there can be only one instance of a device
++	(like i8042).
++	
++	Signed-off-by: Dmitry Torokhov <dtor at mail.ru>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<dtor_core at ameritech.net>
++	[PATCH] Driver Core: Whitespace fixes
++	
++	Whitespace and formatting changes (a,b,c -> a, b, c) in drivers/base
++	
++	Signed-off-by: Dmitry Torokhov <dtor at mail.ru>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<greg at kroah.com>
++	Driver Core: more whitespace fixups
++	
++	This catches the files I had to do by hand as Dmitry's patch differed from my tree.
++	
++	Signed-off-by: Dmitry Torokhov <dtor at mail.ru>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<rtjohnso at eecs.berkeley.edu>
++	[PATCH] PATCH: 2.6.7-rc3 drivers/usb/core/devio.c: user/kernel pointer bugs
++	
++	Since ctrl is copied in from userspace, ctrl.data cannot safely be
++	dereferenced.  Let me know if you have any questions or if I've made
++	a mistake.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<greg at kroah.com>
++	USB: sparse cleanups for the whole driver/usb/* tree.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<greg at kroah.com>
++	USB: fix up dumb int_user_arg variable name as pointed out by Al Viro.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<greg at kroah.com>
++	I2C: sparse cleanups for drivers/i2c/*
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<Robert.Picco at hp.com>
++	[PATCH] ia64: mark non-existent NUMA-nodes as offline
++	
++	I found a problem with HP NUMA configuration in 2.6.7-rc3-mm1.  The
++	node_online_map is incorrect because of actions taken by
++	reassign_cpu_only_nodes in arch/ia64/mm/discontig.c.  The mm1 patch
++	which changes the mempolicy for the init_task uses this invalid
++	node_online_map and eventually uses a non-existent node's zonelist
++	when calling __alloc_pages.
++	
++	The patch below takes care of this issue.  It puts the non-existent
++	nodes offline.
++	
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<kenneth.w.chen at intel.com>
++	[PATCH] ia64: fix race in fsys_bubble_down to avoid fp-register corruption
++	
++	The fast system-call fall-back-path has a race: it reads PSR, modifies
++	some bits, then writes back the new PSR.  Unfortunately, the contents
++	of PSR may change between reading and writing it.  For example, an
++	interrupt could occur which could trigger a context-switch.  The
++	context-switch might in turn flush the floating-point-high (FPH)
++	partition to memory, clear PSR.MFH, and set PSR.DFH.  To prevent this
++	race, the patch below turns off PSR.I before reading PSR.
++	
++	This fixes a floating-point corruption problem that was observed on a
++	system with a libc which has the fast system-call support enabled.
++	
++	The performance impact is minimal (on the order of a handful of cycles).
++	
++	Signed-off-by: Kevin Tian <kevin.tian at intel.com>
++	Signed-off-by: Ken Chen <kenneth.w.chen at intel.com>
++	Signed-off-by: Asit Mallick <asit.k.mallick at intel.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<akpm at osdl.org>
++	[PATCH] fealnx-mac-address-and-other-issues.patch
++	
++	(resend - I need to get this out of my tree my one means or another..)
++	
++	
++	From: "SuD (Alex)" <sud at latinsud.com>
++	
++	I recently was given a surecom 10/100 ethernet card and found that i could
++	not change Mac address for it as other driver/devices allow.  I tried to
++	implement the missing feature and noticed that the device is quite peculiar
++	(or either my system is broken), when trying to fill mac address registers
++	(no matter whether io_ops is set): - If I write a byte (writeb) to an even
++	i/o address it seems like actually a word was written (the next byte is set
++	to 0).  - If I write a byte to an odd i/o address my pc gets bad freezed.
++	
++	That made think of writing 16bit words (writew) for the memory address, as
++	opposed to what most driver examples do.  It works for me (I hope i set the
++	lines at the right place in device_open function after the device is
++	reset).  I hope the code is clean enough and does not mess with byte
++	ordering.  This is the patch (this time against 2.6.5):
++	
++	(akpm: Is this right on big-endian?)
++
++<margitsw at t-online.de>
++	[PATCH] prism54: Kernel compatibility
++	
++	2004-03-20      Margit Schubert-While <margitsw at t-online.de>
++	
++	* isl_38xx.[ch], isl_ioctl.c, islpci_dev.[ch], islpci_eth.c
++	  islpci_hotplug.c, islpci_mgt.[ch], oid_mgt.c, prismcompat.h:
++	  Adopt new prism54 kernel compatibility.
++	  Remove remaining kernel version ifdefs.
++
++<shemminger at osdl.org>
++	[PATCH] fix oops from acenic ethtool
++	
++	Fix the following OOPS that happens when doing ifup on FC-2
++	with 2.6.7 in acenic and a security hole due to missing capable(NET_ADMIN),
++	by replacing private ethtool handling with ethtool_ops.
++	
++	(Yes, Jes because of DEV_ETHTOOL_OPS define it will still work
++	on ancient kernels.)
++
++<jgarzik at pobox.com>
++	[netdrvr acenic] remove unneeded ifdefs
++
++<margitsw at t-online.de>
++	[PATCH] prism54: Fix endian patch
++	
++	* Split out patch islpci_eth.c :
++	* Fix endian problem (bug 74/75 related)
++
++<rmk at arm.linux.org.uk>
++	[PATCH] add ARM smc91x driver
++
++<bunk at fs.tum.de>
++	[PATCH] add NAPI help texts
++	
++	NAPI seems to be so self-explaining that no help texts are needed. ;-)
++	
++	I combined the two help texts that were at NAPI options, and added them
++	to all NAPI options.
++
++<margitsw at t-online.de>
++	[PATCH] prism54: Fix bugs 74/75
++	
++	2004-03-22      Aurelien Alleaume <slts at free.fr>
++	
++	        * oid_mgt.c, isl_ioctl.c : Minor bugfixes : #74 and #75.
++
++<margitsw at t-online.de>
++	[PATCH] prism54: Fix bugs 39/73
++	
++	2004-04-07      Margit Schubert-While <margitsw at t-online.de>
++	
++	        * Bugs 39 and 73
++
++<margitsw at t-online.de>
++	[PATCH] prism54: Fix bug 77, strengthened oid txn
++	
++	2004-04-09      Aurelien Alleaume <slts at free.fr>
++	
++	* oid_mgt.c, isl_ioctl.c : Cleanups. Bug #77. Minor stuffs.
++	
++	* islpci_mgt.c (islpci_mgt_transaction) : enforce serialization
++	  in oid transaction. lindent.sh.
++	
++	* islpci_mgt.c (islpci_mgt_transaction) : Strengthened oid transaction.
++
++<margitsw at t-online.de>
++	[PATCH] prism54: Don't allow mib reads while unconfigured
++	
++	004-04-17      Aurelien Alleaume <slts at free.fr>
++	
++	        * oid_mgt.c, isl_ioctl.c : Cleanup. Prevented real oid reading
++	        before the card is configured with mib values (might be
++	        related to
++	        bug #53).
++
++<margitsw at t-online.de>
++	[PATCH] prism54: Add likely/unlikely, KO wds completely
++	
++	* islpci_mgt.h : Change init_wds definition
++	
++	* islpci_eth.c : Do some likely/unlikely
++
++<margitsw at t-online.de>
++	[PATCH] prism54: Align skb patch
++	
++	* islpci_eth.c, islpci_dev.c : Align skb->data unconditonally after
++	  allocation. This would appear to improve RX rate
++
++<margitsw at t-online.de>
++	[PATCH] prism54: Reduce module verbosity
++	
++	2004-05-01      Margit Schubert-While <margitsw at t-online.de>
++	
++	 * Reduce module verbosity
++
++<margitsw at t-online.de>
++	[PATCH] prism54: Fix channel stats, bump version to 1.2
++	
++	2004-05-20      Aurelien Alleaume <slts at free.fr>
++	
++	* islpci_eth.c : use dev_kfree_skb_irq instead of dev_kfree_skb where needed.
++	
++	* isl_ioctl.c : report channel instead of frequency in scan.
++	
++	* islpci_hotplug.c : bump version to 1.2
++
++<margitsw at t-online.de>
++	[PATCH] prism54: Fix typo
++	
++	2004-05-29  Margit Schubert-While <margitsw at t-online.de>
++	
++	* isl_ioctl.c : Fix typo
++
++<margitsw at t-online.de>
++	[PATCH] prism54: White space and indentation
++	
++	2004-05-29  Margit Schubert-While <margitsw at t-online.de>
++	
++	* White space and indentation patch
++
++<kaos at sgi.com>
++	[PATCH] ia64: Remove warnings when unwind debug is turned on
++	
++	Turning on UNW_DEBUG generates warnings for incorrect number of
++	parameters for formats and several cases of "suggest explicit braces to
++	avoid ambiguous `else'", because UNW_DPRINT contains an if statement.
++	
++	Signed-off-by: Keith Owens <kaos at sgi.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<davidm at tiger.hpl.hp.com>
++	ia64: Update defconfig
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Mark devices as NOTATTACHED as soon as possible
++	
++	This patch implements something we've been lacking for a long time: a way
++	to mark devices as USB_STATE_NOTATTACHED as soon as we know that they're
++	gone.  The usb_device->state member is no longer protected by the
++	->serialize semaphore; instead there's a new private spinlock.  Usbcore
++	routines should no longer set ->state directly; instead they should use
++	the new utility routine usb_set_device_state().  There are protections
++	against changing states while devices are being added or removed.
++	
++		Change assignments to udev->state into calls of
++		usb_set_device_state().
++	
++		Add new private device_state_lock to the hub driver, along
++		with usb_set_device_state() and recursively_mark_NOTATTACHED().
++	
++		Acquire the new spinlock while adding or removing children[]
++		pointers.
++	
++		When disabling a port that has a child device, mark the child
++		as NOTATTACHED.
++	
++	You mentioned once having tried to do something like this and running into
++	trouble.  Take a good look and let me know if you see any difficulties
++	here.
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<thoffman at arnor.net>
++	[PATCH] USB: ATI Remote driver update
++	
++	Here are some contributed improvements for the ATI remote driver.
++	
++	I submitted the driver and it was accepted several months ago.
++	Since then a few people have sent me patches and suggestions.
++	
++	This patch adds two things:
++	
++	(1) support for the "Lola" X10 remote, sent to me by
++	    Seth Cohn <sethcohn (at) yahoo.com>
++	
++	(2) key autorepeat support, sent to me by
++	    Vincent Vanackere <vanackere (at) lif.univ-mrs.fr>
++	
++	The key autorepeat support has been tested by me, but the Lola support
++	has not, as I don't have the hardware.
++	
++	Thanks to Seth and Vincent, with my apologies for taking so long to
++	forward their improvements along.
++	
++	
++	Signed-off-by: Torrey Hoffman <thoffman at arnor.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: usbtest just uses module_param()
++	
++	This prevents some warnings during modprobe.
++	
++	Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: usbnet shouldn't oops on cdc error path
++	
++	If the string descriptor fetch works, no problem.  Else
++	make the disconnect() logic -- newly called because of
++	"recent" changes to interface claiming logic -- use its
++	fast cleanup path, since we're still not fully set up yet.
++	
++	Should resolve OSDL bugid 2714; please merge.
++	
++	Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: retry string fetches on ZLPs not just STALLs
++	
++	This matches the behavior for other descriptor fetches.
++	
++	Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: usb on big endian, ehci needs a byteswap
++	
++	Adds a missing byteswap that would affect interrupt transfers
++	with EHCI on big-endian platforms, like Rick's MIPS-4km uClinux.
++	Needed for external hubs, and then likely for mice, keyboards,
++	and so on.
++	
++	 From:          Rick Sewill <rsewill at cableone.net>
++	 Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>
++	 Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<bjorn.helgaas at hp.com>
++	[PATCH] PCI: clarify pci.txt wrt IRQ allocation
++	
++	I think we should make it explicit that PCI IRQs shouldn't be relied
++	upon until after pci_enable_device().  This patch:
++	
++	    ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.7-rc3/2.6.7-rc3-mm1/broken-out/bk-acpi.patch
++	
++	does PCI interrupt routing (based on ACPI _PRT) and IRQ allocation
++	at pci_enable_device()-time.
++	
++	(To avoid breaking things in 2.6, the above patch still allocates
++	all PCI IRQs in pci_acpi_init(), before any drivers are initialized.
++	But that shouldn't be needed by correct drivers, and I'd like to
++	remove it in 2.7.)
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<lxiep at us.ibm.com>
++	[PATCH] PCI Hotplug: rpaphp.patch -- multi-function devices not handled correctly
++	
++	I made changes to rpaphp code, so it can handle multi-fuction
++	devices correctly. The problem is that the pci_dev field of slot struct
++	can only record one pci_dev of  the devices of a multi-fuction card.  I
++	changed pci_dev (a single pci_dev type pointer) to pci_funcs( a list of
++	pci_dev type pointers). I  rewrote some of the config/unconfig code to
++	support  the slot struct change.
++	
++	Along with above changes,  I added LDRSLOT(logical I/O slot) support.
++	We need LDRSLOT support for DLPAR I/O.  A card in a LDRSLOT can't be
++	physically removed, but can be logically removed  from one partiton and
++	reassinged to another partition.
++	
++	I also merged rpaphp changes from ames tree.
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<hannal at us.ibm.com>
++	[PATCH] Driver Model: Add class support to msr.c
++	
++	This patch enables class support in arch/i386/kernel/msr.c. Very simliar
++	to cpuid (with the fixes Zwane/Greg made, thanks).
++	
++	[root at w-hlinder2 root]# tree /sys/class/msr
++	/sys/class/msr
++	| -- msr0
++	|   `-- dev
++	`-- msr1
++	    `-- dev
++	
++	2 directories, 2 files
++	
++	Thanks to Randy Dunlap for pointing out the unnecessary tabs. Fixed.
++	
++	Signed-off-by Hanna Linder <hannal at us.ibm.com>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<linux at kodeaffe.de>
++	[PATCH] sysfs: fs/sysfs/inode.c: modify parents ctime and mtime on creation
++	
++	When a node is added to sysfs (e.g. a device plugged in via USB), the
++	filesystem fails to make this change visible in the parent directory's
++	ctime/mtime. This is in contrast to removing a device, because in that
++	case, sysfs makes use of the function simple_unlink from fs/libfs.c which
++	takes care of that. Instead of using simple_link from fs/libfs.c on
++	creation, sysfs implements its own mechanism. This patch hooks into the
++	function sysfs_create and sets the ctime and the mtime of the parent to
++	CURRENT_TIME.
++	
++	Signed-off-by: Sebastian Henschel <linux at kodeaffe.de>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<acme at toy.kerneljanitors.org>
++	[NET] first bits of net/core/stream.c
++	
++	Move tcp sk_wmem_queued related functions to net/core/stream.c, will be
++	used by other SOCK_STREAM protocols, starting with LLC.
++	
++	Also move the tcp_charge_skb to sock.h, for the same reasons.
++	
++	Signed-off-by: Arnaldo Carvalho de Melo <acme at conectiva.com.br>
++
++<greg at kroah.com>
++	I2C: sparse cleanups again, based on comments from lkml
++	
++	This is more like the original code.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<mdharm-usb at one-eyed-alien.net>
++	[PATCH] USB Storage: INQUIRY fixup, mode-sense options, Genesys devices
++	
++	This patch does a few things (all in the same section of code).  It started
++	life as patches as226b, as280, and as275.  Later it was merged into as226e
++	and I added significantly to it.
++	
++	
++	First, this patch introduces a new config option to allow people to enable
++	write-protect detection for their USB devices.  With some luck, we've
++	finally got it right and can eventually remove this option in favor of
++	enabling this behavior all the time.
++	
++	Next, we change how we force some flags on -- it turns out that there are
++	some 'generic' entries in the SCSI devinfo which was overriding us when we
++	didn't want it.
++	
++	Finally, we add a safety check to the workaround for GeneSys Logic devices
++	-- if the max_sectors parameter has already been turned down, we won't turn
++	it up.
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<mdharm-usb at one-eyed-alien.net>
++	[PATCH] USB Storage: Fix race when removing the SCSI host
++	
++	This patch fixes a race is disconnecting a usb-storage device that occurs
++	with the SCSI layer.  It's primarily reproducable via adding delays into
++	various disconnect and reset processing paths, but has also been
++	encountered in the field.
++	
++	This patch started life as as281b, and was modified by me only to patch
++	properly against current kernels.
++	
++	The main features of the patch are:
++	
++		Store the host pointer at the start of the control thread
++		rather than trying to get it from srb->device; after the host
++		is removed the SCSI device structure may no longer exist.
++	
++		Keep dev_semaphore locked during the entire time the control
++		thread or reset handlers are using the us_data structure.
++	
++		Reorder the items in dissociate_dev() and release_resources()
++		so that things are released in the opposite order from the way
++		they were acquired originally.  Don't bother to increment and
++		decrement the usb_device's reference count; it's unnecessary.
++	
++		In disconnect(), first set the DISCONNECTING flag so that no
++		more I/O will take place and no more requests will be accepted.
++		Next, cut short the current command and wait for it to finish.
++		Then call scsi_remove_host().  The SCSI core guarantees that
++		when scsi_remove_host() returns, the host will not be in error
++		recovery and all outstanding commands will have been cancelled.
++	
++		Remove some old useless left-over code that was #if'ed out.
++	
++		Use a wait_queue for the 6-second delay during device resets
++		so that we can be woken up in the middle if a disconnect occurs.
++	
++	The key point here is that after scsi_remove_host(), everything is idle as
++	far as the SCSI midlayer is concerned.  But if there was a command in
++	progress at the time, the midlayer will abort it without telling us or
++	waiting for it to complete.  Hence we have to wait for the control thread
++	to be idle before we can try to kill it.  This should happen quickly,
++	since all I/O attempted by the thread will fail immediately.
++	
++	Signed-off-by: Matthew Dharm <mdharm-usb at one-eyed-alien.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Fix bug in TT initialization introduced by earlier
++	
++	This patch repairs a bug introduced by an earlier patch: The TT
++	initialization code was moved to _after_ the TT's first use.  The patch
++	simply puts the code back the way it used to be.
++	
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<mhoffman at lightlink.com>
++	[PATCH] I2C: add alternate VCORE calculations for w83627thf and w83637hf
++	
++	Pick a VRM (for VID interpretation) based on the VRM & OVT config,
++	if available.  Props to Jean Delvare <khali at linux-fr.org> for the
++	idea & code fragment.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<rl at hellgate.ch>
++	[PATCH] PCI: Fix PME bits in pci.txt
++	
++	Signed-off-by: Roger Luethi <rl at hellgate.ch>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<rl at hellgate.ch>
++	[PATCH] PCI: Fix off-by-one in pci_enable_wake
++	
++	Fix off-by-one in pci_enable_wake.
++	Bit field location determined by mask, not value.
++	
++	Signed-off-by: Roger Luethi <rl at hellgate.ch>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<shaggy at austin.ibm.com>
++	JFS: Don't allow reading beyond the inode map's EOF
++	
++	If we try to read inodes that are beyond the size of the inode map,
++	__read_metapages would read unitialized pages into the inode map's
++	address space.  If the inode map is later grown in order to allocate
++	more inodes, the page is initialized and written under a different
++	address space.  Having the stale page in the page cache prevents the
++	properly initialized page from being read, and results in errors.
++	
++	This problem can be provoked by an nfs client trying to read an inode
++	that does not exist.
++	
++	Signed-off-by: Dave Kleikamp <shaggy at austin.ibm.com>
++
++<jgarzik at pobox.com>
++	[libata] don't probe from workqueue
++	
++	Since we want the probe phase to call other workqueues, this is
++	required to eliminate future deadlocks.
++	
++	Other methods would include starting a single-shot thread just for
++	probing, but overall, using a separate thread for probing is pointless
++	since we are already in process context when we probe.
++	
++	So, we simply call ata_bus_probe directly.
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Remove private khubd semaphore
++	
++	This patch removes the private semaphore used by the hub driver, and uses
++	the regular "serialize" semaphore instead.  This will satisfy the general
++	locking requirements for adding and removing devices attached to the hub.
++	The only tricky aspect is that now the hub event handler must take a
++	reference to the hub device while waiting to acquire the semaphore, in
++	case the hub is disconnected during the wait.
++	
++	The patch also replaces a few occurrences of spin_lock_irqsave() in
++	regions where interrupts are known to be enabled with spin_lock_irq().
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<johnpol at 2ka.mipt.ru>
++	[PATCH] Typo in ethtool code in acenic driver
++	
++	In 10mbps detection code.
++
++<a.othieno at bluewin.ch>
++	[PATCH] Kill stale references to Documentation/networking/8139too.txt
++	
++	Documentation/networking/8139too.txt was removed with this ChangeSet:
++	
++	  ChangeSet at 1.1371.153.2  2004-01-10 15:34:47-05:00  jgarzik at redhat.com
++	  [netdrvr] remove Documentation/networking/8139too.txt
++	
++	  All sections of the document are woefully outdated.
++	
++	
++	However, `grep' still reveals these references to it:
++	
++	drivers/net/8139too.c:90:		See 8139too.txt for more details.
++	drivers/net/Kconfig:1539:	  <file:Documentation/networking/8139too.txt> as well as the
++	Documentation/networking/00-INDEX:7:8139too.txt
++	
++	Signed-off-by: Arthur Othieno <a.othieno at bluewin.ch>
++
++<akpm at osdl.org>
++	[PATCH] prism94 build fix
++	
++	init_wds is being instantiated in both isl_ioctl.c and islpci_eth.c, causing
++	linkage errors.
++	
++	drivers/net/wireless/prism54/islpci_mgt.o(.rodata+0x198): In function `islpci_mgmt_rx_fill':
++	/usr/src/25/drivers/net/wireless/prism54/islpci_mgt.c:154: multiple definition of `init_wds'
++	drivers/net/wireless/prism54/islpci_eth.o(.rodata+0x1c8):/usr/src/25/include/linux/skbuff.h:815: first defined here
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++
++<jgarzik at pobox.com>
++	[libata] PCI IDE DMA code shuffling
++	
++	PCI IDE DMA standard (or "bmdma") helper routines ata_bmdma_stop,
++	ata_bmdma_ack_irq, and ata_bmdma_status are added to linux/libata.h,
++	and used in libata-core.
++	
++	There is a minor behavior change, such that, the Alt Status register
++	is read before acknowledging the bmdma interrupt.  This should be ok,
++	and furthermore there will be more significant behavior changes
++	in this area coming soon.
++
++<jgarzik at pobox.com>
++	[libata] PCI IDE command-end/irq-acknowledge cleanup
++	
++	Restruct default irq handler (used for many PCI IDE-like SATA
++	controllers) to obtain device status and acknowledge interrupts
++	a bit differently.
++	
++	In an attempt to better attack the "ich5 screaming interrupt" problem,
++	acknowledge and clear the device's INTRQ by reading the Status register
++	_before_ ack'ing the controller's irq status.  This is a deviation
++	from how the Linux IDE driver acknowledges interrupts, but it may
++	be the best method, since the ICH5 appears to continue to assert
++	the interrupt bit in the BMDMA until the device INTRQ line is cleared.
++	
++	Of course, SATA has no INTRQ line per se, so ICH5 essentially has
++	new interrupt behavior not seen before in the PCI IDE world, while
++	pretending that it's compatible with PCI IDE.  Sigh.
++	
++	This change affects all SATA controllers (for which there are libata
++	drivers) except for sata_promise and sata_sx4.
++
++<jgarzik at pobox.com>
++	[libata] ->qc_prep hook
++	
++	Rename ->fill_sg hook to ->qc_prep, and call it unconditionally
++	(as opposed to ->fill_sg, which was called only when the
++	flag ATA_QCFLAG_SG was set).
++
++<aia21 at cantab.net>
++	NTFS: sparse fix: void function with return (value)
++	
++	Sparse:
++	=======
++	  CHECK   fs/ntfs/attrib.c
++	fs/ntfs/malloc.h:57:15: warning: return expression in void function
++	[repeated several times]
++	
++	From: Mika Kukkonen <mika at osdl.org>
++	Signed-off-by: Randy Dunlap <rddunlap at osdl.org>
++	Signed-off-by: Anton Altaparmakov <aia21 at cantab.net>
++
++<aia21 at cantab.net>
++	NTFS: - Add new element itype.index.collation_rule to the ntfs inode
++	        structure and set it appropriately in ntfs_read_locked_inode().
++	      - Implement a new inode type "index" to allow efficient access to the
++	        indices found in various system files and adapt inode handling
++	        accordingly (fs/ntfs/inode.[hc]).  An index inode is essentially an
++	        attribute inode (NInoAttr() is true) with an attribute type of
++	        AT_INDEX_ALLOCATION.  As such, it is no longer allowed to call
++	        ntfs_attr_iget() with an attribute type of AT_INDEX_ALLOCATION as
++	        there would be no way to distinguish between normal attribute inodes
++	        and index inodes.  The function to obtain an index inode is
++	        ntfs_index_iget() and it uses the helper function
++	        ntfs_read_locked_index_inode().  Note, we do not overload
++	        ntfs_attr_iget() as indices consist of multiple attributes so using
++	        ntfs_attr_iget() to obtain an index inode would be confusing.
++	
++	Signed-off-by: Anton Altaparmakov <aia21 at cantab.net>
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Add clock API
++	
++	Since peripheral clocks are be derived in SoC or even platform
++	specific ways, we need a way to keep this information out of the
++	drivers.  AMBA Primecells are defined in terms of functional units
++	where clocks are derived from external sources, and it is up to the
++	SoC designer to determine where to derive those clocks from.
++	
++	Therefore, we provide a very basic API which allows platforms to
++	provide this information in a generic manner to their peripherals.
++	This framework also allows peripherals to shut down unused clock
++	sources when they're not in use.
++
++<aia21 at cantab.net>
++	NTFS: Ensure that there is no overflow when doing page->index <<
++	      PAGE_CACHE_SHIFT by casting page->index to s64 in fs/ntfs/aops.c.
++	
++	Signed-off-by: Anton Altaparmakov <aia21 at cantab.net>
++
++<icampbell at com.rmk.(none)>
++	[ARM PATCH] 1926/3:  PXAFB cleanups and fixes
++	
++	Patch from Ian Campbell
++	
++	Sorry, 1926/2 was missing a brace. Fixed here.
++	
++	Previous commentry:
++	I have corrected the grayscale conversion to correctly use the upper
++	byte rather than the lower one. As requested I have also left the
++	actual grayscale conversion where it was this time and just dealt with
++	the palette differences in pxafb_setpalettereg.
++	
++	fb_alloc_cmap is only called when bits_per_pixel is < 16, otherwise
++	any existing cmap is freed.
++	
++	I also fixed up all the spaces and brackets issues (not just the one
++	you raised previously) this introduces some noise in the patch, if
++	you'd like the two patches separately please ask.
++
++<elf at com.rmk.(none)>
++	[ARM PATCH] 1928/1: lh7a40x #7 Changes to memory model to support contiguous SDRAM
++	
++	Patch from Marc Singer
++	
++	[if's replaced by ifdef's.]
++	
++	While the BLOB boot loader doesn't support it, there are two others,
++	UBOOT and Logic's LOLO, that will initialize the SDRAM controller such
++	that the memory appears as a contiguous region.  This layout to be
++	required for WinCE and, thus, is the default for these loaders.  The
++	memory organization had been optimized for discontiguous blocks.  Now,
++	it supports a default mode that is compatible with all of the
++	bootloaders as well as options to optimize for either contiguous or
++	discontiguous models.
++	
++	Withing, there is also a slight change to the way that the DEBUG_LL
++	macros select the UART address.  Now it uses immediate constants
++	exclusively.
++	
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] pxafb doesn't need to include asm/mach-types.h
++
++<hch at lst.de>
++	[PATCH] clean up SCSI_TIMEOUT usage
++	
++	 - qlogicfc.c abuses SCSI_TIEMOUT although it's not part of the scsi
++	   core, give it it's own ISP_TIMEOUT define
++	 - avoid redefining timeouts #ifdef DEBUG, that's a cause for heisenbugs
++	   just waiting to happen
++	 - now SCSI_TIMEOUT is private to scsi_scan.c, move it there
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<hch at lst.de>
++	[PATCH] avoid obsolete scsi APIs in eata_pio
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<g.liakhovetski at gmx.de>
++	[PATCH] tmscsim: 64-bit cleanup
++	
++	> Although, I think, there's still a glitch there (modified if's order).
++	> I'll send a new version, if the approach is approved in principle.
++	
++	Ok, attached is version 3:-) It also fixes a definite (although, perhaps,
++	harmless) bug in scsiiom.c. And removes a redundant assignment in
++	tmscsim.c.
++	
++	Signed-off-by: Guennadi Liakhovetski <g.liakhovetski at gmx.de>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<akpm at osdl.org>
++	[PATCH] drivers/scsi/megaraid.c: user/kernel pointer bugs
++	
++	From: "Robert T. Johnson" <rtjohnso at eecs.berkeley.edu>
++	
++	Since arg is a user pointer, so are uioc_mimd and uiocp, and hence umc is a
++	user pointer.  Thus reading umc->xferaddr requires dereferencing a user
++	pointer, which isn't safe.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<bunk at fs.tum.de>
++	[PATCH] modular scsi/mca_53c9x doesn't work
++	
++	On Mon, Jun 14, 2004 at 08:22:15PM +0100, Christoph Hellwig wrote:
++	> On Mon, Jun 14, 2004 at 08:52:56PM +0200, Adrian Bunk wrote:
++	> > The issue described in the mail forwarded below is still present in
++	> > 2.6.7-rc3-mm2 (but not specific to -mm).
++	> >
++	> > I'd suggest the following workaround:
++	>
++	> Please add the exports instead.  It'll affect all the other 53C9X-based
++	> drivers aswell.
++	
++	This sounds like a better solution.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<rddunlap at osdl.org>
++	[PATCH] Comment out an unused function in drivers/scsi/wd7000.c
++	
++	Eliminate unused function wd7000_abort() in wd7000 driver.
++	
++	  CC [M]  drivers/scsi/wd7000.o
++	drivers/scsi/wd7000.c:1612: warning: `wd7000_abort' defined but not used
++	
++	As the author states in his comment, this is "unfinished business" ;-)
++	
++	
++	From: Mika Kukkonen <mika at osdl.org>
++	Signed-off-by: Randy Dunlap <rddunlap at osdl.org>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<jejb at mulgrave.(none)>
++	Fix endless loop in SCSI SPI transport class
++	
++	If the driver doesn't update the peroid, we go
++	around forever.  The fix is to keep our old period
++	unless the driver returns a greater one.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<eranian at hpl.hp.com>
++	[PATCH] ia64: fix info in /proc/pal/*/bus_info
++	
++	This patch fixes to minor bugs:
++	 - corrected descriptions for bit 52 and 53 of the /proc/pal/CPU*/bus_info
++	   entry; they were swapped
++	 - corrected a typo for bit 55 of the /proc/pal/CPU*/bus_info entry
++	
++	Signed-off-by: Stephane Eranian <eranian at hpl.hp.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<dsaxena at omelas.(none)>
++	[ARM] Timer cleanup
++	
++	Signed-off-by: Deepak Saxena <dsaxena at plexity.net>
++
++<dsaxena at omelas.(none)>
++	[ARM] Remove bogus gettimeoffset ptr from machine_desc struct.
++	
++	This was accidently added during the timer code cleanup.
++	
++	Signed-off-by: Deepak Saxena <dsaxena at plexity.net>
++
++<dsaxena at omelas.(none)>
++	[ARM] Delete include/asm-arm/arch-nexuspci/time.h
++	
++	Signed-off-by: Deepak Saxena <dsaxena at plexity.net>
++
++<dsaxena at omelas.(none)>
++	[ARM] Delete include/asm-arm/arch-iop3xx/time.h
++	
++	Signed-off-by: Deepak Saxena <dsaxena at plexity.net>
++
++<dsaxena at omelas.(none)>
++	[ARM] Delete include/asm-arm/arch-ixp4xx/time.h
++	
++	Signed-off-by: Deepak Saxena <dsaxena at plexity.net>
++
++<dsaxena at omelas.(none)>
++	[ARM] Delete include/asm-arm/arch-versatile/time.h
++	
++	Signed-off-by: Deepak Saxena <dsaxena at plexity.net>
++
++<dsaxena at omelas.(none)>
++	[ARM] Add include/asm-arm/mach/time.h for shared timer definitions
++	
++	Signed-off-by: Deepak Saxena <dsaxena at plexity.net>
++
++<ahu at ds9a.nl>
++	[NET]: Update some sysctl documentation.
++	
++	I ran the following (crappy) script:
++	 ...
++	In /proc/sys/ and found a host of undocumented sysctls. This patch documents
++	a number of them, and at least mentions the rest as 'TODO'. Please verify my
++	code-inspired documentation before applying!
++	
++	Signed-off-by: Bert Hubert <ahu at ds9a.nl>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<acme at toy.kerneljanitors.org>
++	[ECONET] kill some trivial warnings
++	
++	Signed-off-by: Arnaldo Carvalho de Melo <acme at conectiva.com.br>
++
++<hadi at znyx.com>
++	[NET]: Add tc extensions infrastructure.
++	
++	Signed-off-by: Jamal Hadi Salim <hadi at znyx.com>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<jmorris at redhat.com>
++	[SELINUX]: Fix sock_orphan race.
++	
++	The patch below fixes a race between sock_orphan() and
++	selinux_socket_sock_rcv_skb() which can lead to a null pointer deref oops
++	under heavy load.  The sk_callback_lock is used in the patch to 
++	synchronize access to the incoming socket's inode security state.
++	
++	This patch has been under test in the Fedora kernel for over a month 
++	without incident.
++	
++	Author: Stephen Smalley <sds at epoch.ncsc.mil>
++	Signed-off-by: James Morris <jmorris at redhat.com>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<yoshfuji at linux-ipv6.org>
++	[IPV6]: UDPv6 checksum.
++	
++	We always need to check UDPv6 checksum because it is mandatory.
++	
++	Author: Yoshifuji Hideaki <yoshfuji at linux-ipv6.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[TCP]: Tweak some default sysctl values.
++	
++	tcp_default_win_scale: 7
++	tcp_vegas_cong_avoid: 1
++	tcp_moderate_rcvbuf: 1
++	tcp_bic: 1
++
++<shemminger at osdl.org>
++	[ATM]: Include compiler.h in atm.h
++
++<anton at samba.org>
++	[NET]: Allow IP header alignment to be overriden.
++	
++	Author: Anton Blanchard <anton at samba.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<jmorris at redhat.com>
++	[SELINUX]: Fine-grained Netlink support - SELinux headers
++	
++	This patch regenerates the SELinux module headers to reflect new class
++	and access vectors definitions.  The size of the diff is misleading;
++	much of it is simply a change in the ordering of the automatically
++	generated definitions. The corresponding generation script has been
++	changed to ensure a stable order in the future.
++	
++	Author: Stephen Smalley <sds at epoch.ncsc.mil>
++	Signed-off-by:  Stephen Smalley <sds at epoch.ncsc.mil>
++	Signed-off-by:  James Morris <jmorris at redhat.com>
++	Signed-off-by:  David S. Miller <davem at redhat.com>
++
++<jmorris at redhat.com>
++	[SELINUX]: Fine-grained Netlink support - move security_netlink_send() hook.
++	
++	This patch moves the security_netlink_send() LSM hook after the user copy,
++	so that LSM modules can safely examine skb payload content.  For SELinux,
++	we need to look at the Netlink message type.
++	
++	Signed-off-by: James Morris <jmorris at redhat.com>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<jmorris at redhat.com>
++	[SELINUX]: Fine-grained Netlink support - add sk to netlink_send hook
++	
++	Modifies the LSM netlink_send() hook so that it takes a struct sock
++	parameter.  SELinux will use this parameter to lookup the class of socket,
++	which was assigned during socket security initialization.
++	
++	Signed-off-by: James Morris <jmorris at redhat.com>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<jmorris at redhat.com>
++	[SELINUX]: Fine-grained Netlink support - SELinux changes
++	
++	This patch contains SELinux changes which add support for extended Netlink
++	socket classes and the associated permissions nlmsg_read and nlmsg_write.
++	
++	Signed-off-by: James Morris <jmorris at redhat.com>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<jejb at mulgrave.(none)>
++	SCSI: fix uninitialised variable warning
++	
++	Spotted By: Andrew Morton <akpm at osdl.org>
++	
++	drivers/scsi/scsi_transport_spi.c: In function `spi_dv_retrain':
++	drivers/scsi/scsi_transport_spi.c:393: warning: `period' might be used uninitialized in this function
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<davej at redhat.com>
++	[AGPGART] Re-add VIA VP3 support.
++	
++	The refactoring of the PCI IDs supported by the VIA driver dropped
++	this one.
++	
++	Spotted-by: Carsten Rietzschel
++	Signed-off-by: Dave Jones <davej at redhat.com>
++
++<jejb at mulgrave.(none)>
++	scsi_debug: num_parts, ptype and (re-)scans
++	
++	From: 	Douglas Gilbert <dougg at torque.net>
++	
++	Changes in version 1.73:
++	  - 'num_parts' parameter to specify 0 to 4 partitions
++	  - 'ptype' to specify (or change via sysfs) SCSI
++	    peripheral device type
++	  - support ability to increase the number of targets
++	    and/or luns then re-scan a scsi_debug host
++	  - remove redundant trailing spaces
++	
++	The new facilties are described at:
++	http://www.torque.net/sg/sdebug26.html
++	A tarball of driver (version 1.73) is also there.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++	(conflict resolution)
++
++<davej at redhat.com>
++	[AGPGART] Delete trailing whitespace in generic routines.
++	
++	Bump copyright dates whilst we're there.
++	
++	Signed-off-by: Dave Jones <davej at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[NET]: Clear dev refs in dst->child.
++	
++	This is a resend of an earlier patch to dst_dev_event.  I've changed
++	it slightly by moving the input/output assignment into dst_ifdown.
++	
++	To recap, this patch drops lingering IPsec references to a device that
++	is being unregistered.  The child processing in the GC is too late
++	since it never runs until the reference on the dst hits zero which
++	could take a long time for things like TCP connections.
++	
++	The reason I've left the input/output assignment outside the loop is
++	because they aren't really necessary for the IPsec dst's, and if
++	it were in the loop then we'll have to do the same child processing
++	in ___dst_free as well.
++	
++	I've tested this with an ESP/IPCOMP tunnel and I can confirm that it
++	does fix the problem.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davej at redhat.com>
++	[AGPGART] If we can't do AGP x8 in v3 mode, just drop back to x4.
++	
++	This should stop people seeing crazy stuff like agpgart
++	trying to set itself to x0 mode when it sees a x8 bridge and a x4 card.
++	
++	Signed-off-by: Dave Jones <davej at redhat.com>
++
++<davej at redhat.com>
++	[AGPGART] Show the untampered arguments in debug printk
++	
++	agp_v3_parse_one() does some changes to these args by the time we
++	get to the printk. It'll be useful to know what they started at.
++	
++	Signed-off-by: Dave Jones <davej at redhat.com>
++
++<dwmw2 at shinybook.infradead.org>
++	PPC: Make Motorola CPM2 I/O core support more generic.
++	It's used on more than one CPU.
++
++<dlstevens at us.ibm.com>
++	[IPV4]: Fix interface selection in multicast sockops.
++
++<dwmw2 at shinybook.infradead.org>
++	PPC: Move CPM2 common core routines to arch/ppc/syslib/
++
++<davej at redhat.com>
++	[AGPGART] Improved AGPx8 handling.
++	
++	If something fails, we should now explain what happened,
++	before we fall back to AGPx4 gracefully.
++	
++	Signed-off-by: Dave Jones <davej at redhat.com>
++
++<davej at redhat.com>
++	[AGPGART] Extra debugging info just in case.
++	
++	Signed-off-by: Dave Jones <davej at redhat.com>
++
++<davej at redhat.com>
++	[AGPGART] Remove typo from comment
++	
++	Signed-off-by: Dave Jones <davej at redhat.com>
++
++<dada1 at cosmosbay.com>
++	[NET]: Tidy somaxconn sysctl doc.
++
++<dwmw2 at shinybook.infradead.org>
++	PPC: Add support for ADS8272 board.
++	
++	From Kumar Gala <kumar.gala at motorola.com>
++
++<davem at nuts.davemloft.net>
++	[TG3]: Always do 4gb tx dma test, and fix the test.
++	
++	Based upon a patch from Sun.
++
++<davem at nuts.davemloft.net>
++	[TCP]: No vegas by default just yet.
++
++<stevef at stevef95.austin.ibm.com>
++	fix throttle to limit number of requests to 50 on wire to server at one time.
++	
++	Signed-off-by: Steve French (sfrench at us.ibm.com)
++
++<alan at redhat.com>
++	[PATCH] add new via-velocity gigabit ethernet driver
++	
++	Contributed by VIA, cleaned up by Alan.
++
++<dwmw2 at shinybook.infradead.org>
++	UART driver for Motorola CPM/CPM2 I/O core on 8xx/8xxx chips.
++
++<dwmw2 at shinybook.infradead.org>
++	Remove old MPC82xx (CPM2) uart driver
++
++<dwmw2 at shinybook.infradead.org>
++	PPC SBC82xx: Move RTC to 0xd0000000 to make room for PCI I/O stuff.
++
++<dwmw2 at shinybook.infradead.org>
++	PCI host bridge support for Motorola MPC826x
++
++<dwmw2 at shinybook.infradead.org>
++	Add support for i8259 IRQ controller on WindRiver PowerQUICC II
++
++<kaos at sgi.com>
++	[PATCH] ia64: Support SN platform specific error features
++	
++	The SN prom supports fine grained error handling features, the OS needs
++	to tell the prom if the OS expects to use these platform specific
++	features.
++	
++	Signed-off-by: Keith Owens <kaos at sgi.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<jbarnes at engr.sgi.com>
++	[PATCH] ia64: update sn2_defconfig
++	
++	Small patch to update the sn2_defconfig file.  I just did a 'make oldconfig' 
++	with the current sn2_defconfig and removed 8250 support.
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<jgarzik at pobox.com>
++	[IDE] Introduce SATA enable/disable config option
++	
++	This config option is introduced to help reduce user confusion,
++	and eliminate conflicts between the IDE driver (which is often
++	built into user kernels) and the new libata SATA driver.
++
++<achew at nvidia.com>
++	[libata] Add NVIDIA SATA driver
++
++<jgarzik at pobox.com>
++	[libata] put nvidia in Kconfig, in alphabetical order
++
++<davidm at tiger.hpl.hp.com>
++	ia64: Fix ia32 partial-page-list code to compile cleanly in more configs.
++	
++
++<davidm at tiger.hpl.hp.com>
++	ia64: Nuke two warnings in mca.c that showed in the simulator configuration.
++
++<stevef at smfhome1.smfdom>
++	Fix /proc/fs/cifs/Stats to handle larger return data, and correct Kconfig reference to /proc/fs/cifs/Stats
++	
++	Signed-off-by: Steve French (sfrench at us.ibm.com)
++
++<jgarzik at pobox.com>
++	[libata/IDE nvidia] shuffle pci ids
++	
++	* Mark conflicting PCI ids with CONFIG_BLK_DEV_IDE_SATA
++	* Move not-yet-released PCI ids to libata sata_nv driver
++
++<len.brown at intel.com>
++	[ACPI] *** Warning: "acpi_register_gsi" [drivers/serial/8250_acpi.ko] undefined!
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++
++<len.brown at intel.com>
++	[ACPI] mp_find_ioapic() oops from mp_register_gsi() on device resume
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++
++<len.brown at intel.com>
++	[ACPI] delete "__init" from x86_64 version of mp_find_ioapic() 
++	Signed-off-by: Arnd Bergmann <arnd at arndb.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.or
++
++<len.brown at intel.com>
++	[ACPI] Fix a lockup which Sid Boyce <sboyce at blueyonder.co.uk>
++	discovered with IOAPIC disabled.
++	
++	The problem was that drivers/serial/8250_acpi.c found COM1 in the ACPI
++	namespace and called acpi_register_gsi() to set up its IRQ.  ACPI tells us
++	that the COM1 IRQ is edge triggered, active high, but acpi_register_gsi()
++	was ignoring the edge_level argument, so it blindly set the COM1 IRQ to be
++	level-triggered.
++	
++	Signed-off-by: Bjorn Helgaas <bjorn.helgaas at hp.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org
++
++<dwmw2 at shinybook.infradead.org>
++	Change new Motorola copyright notices and email addresses to Freescale.
++	
++	Requested by Kumar Gala <kumar.gala@{motorola,freescale}.com>
++
++<dwmw2 at shinybook.infradead.org>
++	Workaround for MPC826x PCI erratum #9.
++
++<stevef at stevef95.austin.ibm.com>
++	fix typo in cifs kernel config option title
++	
++	Signed-off-by: Steve French (sfrench at us.ibm.com)
++
++<shemminger at osdl.org>
++	[SPARSE]: Get rid of warning in irtty_ioctl().
++	
++	Don't really need verify_area because result of copy_to_user is checked.
++	Add annotation to get rid of sparse warnings.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: Jean Tourrilhes <jt at bougret.hpl.hp.com>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[SPARSE]: Add annotations to sock_filter.h
++	
++	Since sock_fprog is argument in ioctl, the filter pointer needs
++	to be annotated.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<akpm at osdl.org>
++	[BRIDGE]: Fix bridge sysfs improprely initialized kobject.
++	
++	The bridge sysfs interface introduced around 2.6.7-rc1 created a bad
++	entry in /sys because it didn't initialise the name member of the kobject.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[SPARSE]: Annotate csum_and_copy_to_user().
++
++<shemminger at osdl.org>
++	[SPARSE]: Get rid of warning in bridge ethtool ioctl.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[SPARSE]: Fix another net warning.
++	
++	Get rid of warning from assignment in conditional.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	Cset exclude: kuznet at ms2.inr.ac.ru|ChangeSet|20040616204246|05149
++
++<davem at nuts.davemloft.net>
++	[NET]: In unregister_netdevice(), do synchronize_net() before final dev_put().
++	
++	This way we make sure that all destination cache updates
++	to remove references to this device are seen by entire
++	system before final destruction of the device.
++
++<len.brown at intel.com>
++	[ACPI] PCI bus numbering workaround for ServerWorks
++	from David Shaohua Li
++	http://bugzilla.kernel.org/show_bug.cgi?id=1662
++
++<jmorris at redhat.com>
++	[IPV6]: Fix OOPS in fragmentation.
++	
++	Incorrect SKB pointer is passed to output() callback
++	in ip6_fragment().
++	
++	Work done by James Morris and Yoshifuji Hideaki.
++	
++	Signed-off-by: James Morris <jmorris at redhat.com>
++	Signed-off-by: Yoshifuji Hideaki <yoshfuji at linux-ipv6.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<dsaxena at plexity.net>
++	[ARM] Consolidate various ARM timer fns. into single timer_tick() call.
++	
++	Signed-off-by: Deepak Saxena <dsaxena at plexity.net>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Only process ports with change events pending
++	
++	This patch adds a bit-array to the hub driver's private data structure,
++	used for storing the contents of the hub's interrupt status message.  That
++	message indicates which ports have events pending (and whether the hub
++	itself has events pending).  By only polling the status of the ports
++	listed in the bit-array we can save a fair amount of overhead in hub
++	communication.
++	
++	(The #error test added to hub.h is a little awkward, but it's purely
++	precautionary -- it won't matter until someone decides to support hubs
++	with more than 31 ports!)
++	
++	Also included in the patch, since this seemed the perfect opportunity for
++	it, is Byron's suggestion for handling hub events in the order in which
++	they were received.
++	
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<sean at mess.org>
++	[PATCH] USB: PhidgetServo driver fixes
++	
++	Here is a patch for the phidgetservo driver -- it was using memory after
++	kfree(), and using driver_info is much nicer. :)
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] proper bios handoff in ehci-hcd
++	
++	Stuart Hayes here at Dell has identified this or/and mix-up in the
++	ehci-hcd driver.  Because of this, ehci-hcd is not properly released by
++	BIOSes supporting full 2.0 and port behavior can then become erratic.
++	
++	(Code predates general availability of such BIOS firmware.  This version
++	of the patch also fixes minor linewrap issues.)
++	
++	 From:          Gary Lerhaupt <Gary_Lerhaupt at Dell.com>
++	 Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>
++	 Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: add support for Buffalo LUA-U2-KTX
++	
++	Add support for Buffalo's LUA-U2-KTX, which is a AX8817X based usb
++	ethernet adapter.  I just added the USB id and it worked like a dream.
++	
++	From:          Neil Bortnak <neil at bortnak.com>
++	Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<mdharm-usb at one-eyed-alien.net>
++	[PATCH] USB Storage: Lexar Jumpshot CF reader
++	
++	This patch is required to fix up the jumpshot driver, and to supress
++	the 'unneeded entry' message for another device which uses the same
++	VID/PID/rev for multiple different versions of the device.
++	
++	Alan Stern cooked this patch up, originally.
++	
++	Signed-off-by: Matthew Dharm <mdharm-usb at one-eyed-alien.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB Storage: unusual_devs.h update
++	
++	On Thu, 17 Jun 2004, Daniel Nouri wrote:
++	> I get this message when inserting my USB MMC card reader:
++	>
++	> usb 3-1: new full speed USB device using address 4
++	> usb.agent[5388]:      usb-storage: already loaded
++	> usb-storage: This device (04e6,0006,0205 S 01 P 01) has an unneeded Protocol entry in unusual_devs.h
++	> Please send a copy of this message to <linux-usb-devel at lists.sourceforge.net>
++	
++	Thanks for letting us know.  This patch will eliminate that log message.
++	
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Fix endian bug in g_file_storage
++	
++	This patch fixes a couple of places in g_file_storage where I forgot to
++	use proper byte-swapping.
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<davidm at tiger.hpl.hp.com>
++	ia64: Squish compiler-warning in perfmon.c when compiling for UP.
++
++<dsaxena at plexity.net>
++	[ARM] Remove ADIFCC machine type
++	
++	The code is completely out of date, I am no longer maintaining it, 
++	and nobdy has volunteered to do so; therefore, I am killing it.
++	
++	Signed-off-by: Deepak Saxena <dsaxena at plexity.net>
++
++<davidm at tiger.hpl.hp.com>
++	ia64: Squish some more hazards & warnings for UP compile.
++
++<davidm at tiger.hpl.hp.com>
++	ia64: Fix build-problem when CONFIG_IA32 is not enabled.
++	
++	Without this fix, you'll get unresolved references to
++	sys_rt_sigaction().
++
++<pfg at sgi.com>
++	[PATCH] ia64: fix SN2 interrupt rerouting
++	
++	Signed-off-by: Patrick Gefre <pfg at sgi.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<tony.luck at intel.com>
++	[PATCH] ia64: switching between CPEI & CPEP
++	
++	A couple of months ago Hidetoshi Seto from Fujitsu proposed
++	a patch to provide similar switching between interrupt mode
++	and polling mode for corrected platform events (CPE) as we
++	have for processor events (CMC) [with the obvious difference
++	that not all platforms support an interrupt for CPE].
++	
++	I dusted it off and made a couple of very minor cleanups (which
++	Seto-san checked out last night on his test setup and confirmed
++	still passes).
++	
++	Signed-off-by: Tony Luck <tony.luck at intel.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<nathans at sgi.com>
++	[XFS] No longer hold the BKL for the entire ioctl operation,
++	its not needed here.
++	
++	SGI Modid: xfs-linux:xfs-kern:173032a
++	Signed-off-by: nathans at sgi.com
++
++<nathans at sgi.com>
++	[XFS] Remove a couple of redundant NULL parent inode pointer checks.
++	
++	SGI Modid: xfs-linux:xfs-kern:173033a
++	Signed-off-by: nathans at sgi.com
++
++<nathans at sgi.com>
++	[XFS] Fix xfs_lowbit64, it mishandled zero in the high bits.
++	Cleanup a couple of other ffs users, since ffs(0) is apparently
++	undefined on some architectures.
++	
++	SGI Modid: xfs-linux:xfs-kern:173034a
++	Signed-off-by: nathans at sgi.com
++
++<nathans at sgi.com>
++	[XFS] sparse: fix uses of macros before their definitions, etc.
++	
++	SGI Modid: xfs-linux:xfs-kern:173194a
++	Signed-off-by: nathans at sgi.com
++
++<roehrich at sgi.com>
++	[XFS] Change things to use new version of xfs_dm_init/xfs_dm_exit
++	
++	SGI Modid: xfs-linux:xfs-kern:173206a
++	Signed-off-by: nathans at sgi.com
++
++<roehrich at sgi.com>
++	[XFS] Fix non-dmapi build
++	
++	SGI Modid: xfs-linux:xfs-kern:173222a
++	Signed-off-by: nathans at sgi.com
++
++<nathans at sgi.com>
++	[XFS] Ensure buffers that map to unwritten extents are only submitted
++	when properly setup.
++	
++	SGI Modid: xfs-linux:xfs-kern:173555a
++	Signed-off-by: nathans at sgi.com
++
++<nathans at sgi.com>
++	[XFS] Sanitise the ACL initialisation macros.
++	
++	SGI Modid: xfs-linux:xfs-kern:173559a
++	Signed-off-by: nathans at sgi.com
++
++<nathans at sgi.com>
++	[XFS] Remove unused MAC macros, never needed on Linux.
++	
++	SGI Modid: xfs-linux:xfs-kern:173561a
++	Signed-off-by: nathans at sgi.com
++
++<nathans at sgi.com>
++	[XFS] Remove the one remaining, broken use of XFS_WRITEIO_LOG and
++	sanitize direct IO map blocks call.
++	
++	SGI Modid: xfs-linux:xfs-kern:173562a
++	Signed-off-by: nathans at sgi.com
++
++<nathans at sgi.com>
++	[XFS] Fix flags argument to xfs_incore call on attr removal.
++	
++	SGI Modid: xfs-linux:xfs-kern:173563a
++	Signed-off-by: nathans at sgi.com
++
++<nathans at sgi.com>
++	[XFS] Fix a race condition in the undo-delayed-write buffer routine.
++	
++	SGI Modid: xfs-linux:xfs-kern:173564a
++	Signed-off-by: nathans at sgi.com
++
++<nathans at sgi.com>
++	[XFS] Fix up memory allocators to be more resilient.
++	
++	SGI Modid: xfs-linux:xfs-kern:173571a
++	Signed-off-by: nathans at sgi.com
++
++<len.brown at intel.com>
++	[ACPI] fix passive cooling mode indicator (Luming Yu)
++	http://bugzilla.kernel.org/show_bug.cgi?id=1770
++
++<len.brown at intel.com>
++	[ACPI] avoid spurious interrupts on VIA
++	http://bugzilla.kernel.org/show_bug.cgi?id=2243
++
++<cattelan at sgi.com>
++	[XFS] Fix for NFS+XFS data corruption problem.
++	See http://oss.sgi.com/bugzilla/show_bug.cgi?id=198 for full details.
++	
++	SGI Modid: xfs-linux:xfs-kern:173598a
++	Signed-off-by: nathans at sgi.com
++
++<stevef at smfhome1.smfdom>
++	Fix typo in name of CIFS Kconfig option and add rename stats
++
++<paulus at samba.org>
++	[PATCH] ppc64: Implement CONFIG_PREEMPT
++	
++	This implements CONFIG_PREEMPT for ppc64.  Aside from the entry.S
++	changes to check the _TIF_NEED_RESCHED bit when returning from an
++	exception, there are various changes to make the ppc64-specific code
++	preempt-safe, mostly adding preempt_enable/disable or get_cpu/put_cpu
++	calls where needed.  I have been using this on my desktop G5 for the
++	last week without problems.
++	
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulus at samba.org>
++	[PATCH] ppc64: Optimize exception/syscall entry/exit
++	
++	This rewrites the PPC64 exception entry/exit routines to make them
++	smaller and faster.
++	
++	In particular we no longer save all of the registers for the common
++	exceptions - system calls, hardware interrupts and decrementer (timer)
++	interrupts - only the volatile registers.  The other registers are saved
++	and restored (if used) by the C functions we call.  This involved
++	changing the registers we use in early exception processing from r20-r23
++	to r9-r12, which ended up changing quite a lot of code in head.S. 
++	Overall this gives us about a 20% reduction in null syscall time. 
++	
++	Some system calls need all the registers (e.g.  fork/clone/vfork and
++	[rt_]sigsuspend).  For these the syscall dispatch code calls a stub that
++	saves the nonvolatile registers before calling the real handler.
++	
++	This also implements the force_successful_syscall_return() thing for
++	ppc64.
++	
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<nathans at sgi.com>
++	[XFS] Fix up highmem build and error handling on inode shrink register.
++	
++	SGI Modid: xfs-linux:xfs-kern:173764a
++	Signed-off-by: nathans at sgi.com
++
++<rth at twiddle.net>
++	[PATCH] alpha: fix discontigmem+initrd build
++	
++	From: Ivan Kokshaysky <ink at jurassic.park.msu.ru>
++	
++	Compilation fails due to incorrect usage of NODE_DATA().
++	
++	Reported by hpa.
++
++<len.brown at intel.com>
++	[ACPI] handle SCI override to nth IOAPIC
++	http://bugzilla.kernel.org/show_bug.cgi?id=2835
++
++<yoshfuji at linux-ipv6.org>
++	[IPV6] make several functions static in ip6_tunnel that should be.
++
++<yoshfuji at linux-ipv6.org>
++	[IPV6] XFRM: add missing xfrm6_policy_check().
++
++<yoshfuji at linux-ipv6.org>
++	[IPV6] XFRM: support (uncompressed) tunnel mode ipcomp6 using xfrm6_tunnel infrastructure.
++
++<yoshfuji at linux-ipv6.org>
++	[XFRM] fix dependency issues for CONFIG_IPV6=m.
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Add support code for ARM hardware vector floating point
++	
++	This cset adds the code to handle the hardware vector floating point
++	unit found on some ARM926 and later CPUs.  The hardware provides
++	an implementation for the common cases, and bounces exceptions for
++	other cases, which have to be handled in software, and signalling
++	SIGFPE as appropriate.
++
++<hugh at veritas.com>
++	[PATCH] mm: flush TLB when clearing young
++	
++	Traditionally we've not flushed TLB after clearing the young/referenced bit,
++	it has seemed just a waste of time.  Russell King points out that on some
++	architectures, with the move from 2.4 mm sweeping to 2.6 rmap, this may be a
++	serious omission: very frequently referenced pages never re-marked young, and
++	the worst choices made for unmapping.
++	
++	So, replace ptep_test_and_clear_young by ptep_clear_flush_young throughout
++	rmap.c.  Originally I'd imagined making some kind of TLB gather optimization,
++	but don't see what now: whether worth it rather depends on how common
++	cross-cpu flushes are, and whether global or not.
++	
++	ppc and ppc64 have already found this issue, and worked around it by arranging
++	TLB flush from their ptep_test_and_clear_young: with the aid of pgtable rmap
++	pointers.  I'm hoping ptep_clear_flush_young will allow ppc and ppc64 to
++	remove that special code, but won't change them myself.
++	
++	It's worth noting that it is Andrea's anon_vma rmap which makes the vma
++	available for ptep_clear_flush_young in page_referenced_one: anonmm and
++	pte_chains would both need an additional find_vma for that.
++	
++	Signed-off-by: Hugh Dickins <hugh at veritas.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<hugh at veritas.com>
++	[PATCH] mm: pretest pte_young and pte_dirty
++	
++	Test for pte_young before going to the costlier atomic test_and_clear, as
++	asm-generic does.  Test for pte_dirty before going to the costlier atomic
++	test_and_clear, as asm-generic does (I said before that I would not do so for
++	pte_dirty, but was missing the point: there is nothing atomic about deciding
++	to do nothing).  But I've not touched the rather different ppc and ppc64.
++	
++	Signed-off-by: Hugh Dickins <hugh at veritas.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kumar.gala at freescale.com>
++	[PATCH] ppc32: support for e500 and 85xx
++	
++	Here is both a GNU style and BK patch for adding support for the e500 core and
++	85xx platform to 2.6.  This is pretty much a direct port from 2.4 with a bit
++	of cleanup around the edges.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mikpe at csd.uu.se>
++	[PATCH] ppc32 irq.c cpumask fix
++	
++	2.6.7-rc3-mm1 changed cpumask_t from ulong to a struct, causing
++	compile-time errors in arch/ppc/kernel/irq.c.
++	
++	Proposed fix below. Tested on a G3.
++	
++	Signed-off-by: Mikael Pettersson <mikpe at csd.uu.se>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<olh at suse.de>
++	[PATCH] ppc64: avoid multiline /proc/cmdline content on iSeries
++	
++	/proc/cmdline is filled via an OS400 call iSeries_init().  It scans the
++	returned data from the end, instead of the beginning.  This leads to
++	multiple lines in /proc/cmdline
++	
++	Just scan from the beginning and stop at the first newline.  This patch
++	changes also the /proc/iSeries/mf/*/cmdline interface to do the same as the
++	initial setup.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mporter at kernel.crashing.org>
++	[PATCH] Add PPC4xx MAINTAINERS entry, merge CREDITS from 2.4
++	
++	Add myself as the PPC4xx maintainer. Merge CREDITS entry from 2.4
++	
++	Signed-off-by: Matt Porter <mporter at kernel.crashing.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<yoav.zach at intel.com>
++	[PATCH] Handle non-readable binfmt_misc executables
++	
++	<background>
++	
++	I work in a group that works on enabling the IA-32 Execution Layer
++	(http://www.intel.com/pressroom/archive/releases/20040113comp.htm) on Linux.
++	In a few words - this is a dynamic translator for IA-32 binaries on IPF
++	platform.  Following David Mosberger's advice - we use the binfmt_misc
++	mechanism for the invocation of the translator whenever the user tries to
++	exec an IA-32 binary.
++	
++	The EL is meant to help in the migration path from IA-32 to IPF.  From our
++	beta customers we learnt that at first stage - they tend to keep their
++	environment mostly intact, using the legacy IA-32 binaries.
++	
++	Such an environment has, naturally, setuid and non-readable binaries.  It
++	will be useless to ask the administrator to change the settings of such an
++	environment - some of them are very complex, and the administrators are
++	reluctant to make any changes in a system that already proved itself to be
++	robust and secure.  So, our target with these patches is not to enhance the
++	support for scripts but rather to allow a translator to be integrated into a
++	working environment that is not (and should not be) aware to the fact it's
++	being emulated.
++	
++	As I said before - it is practically hopeless to expect an administrator of
++	such a system to change it so that it will suit the current behavior of
++	binfmt_misc.  But, even if we could do that,
++	
++	I'm not sure it would be a good idea - these changes are likely to be less
++	secure than the suggested patches -
++	
++	- In order to execute non-readable binaries the binary will have to be made
++	  readable, which is obviously less secure than allowing only a trusted
++	  translator to read it
++	
++	- There will be no way for the translator to calculate the accurate
++	  AT_SECURE value for the translated process.  This might end up with the
++	  translated process running in a non-secured mode when it actually needs to
++	  be secured.
++	
++	</background>
++	
++	
++	I prepared a patch that solves a couple of problems that interpreters have
++	when invoked via binfmt_misc.  currently -
++	
++	1) such interpreters cannot open non-readable binaries
++	
++	2) the processes will have their credentials and security attributes
++	   calculated according to interpreter permissions and not those of the
++	   original binary
++	
++	the proposed patch solves these problems by -
++	
++	1) opening the binary on behalf of the interpreter and passing its fd
++	   instead of the path as argv[1] to the interpreter
++	
++	2) calling prepare_binprm with the file struct of the binary and not the
++	   one of the interpreter
++	
++	The new functionality is enabled by adding a special flag to the registration
++	string.  If this flag is not added then old behavior is not changed.
++	
++	A preliminary version of this patch was sent to the list on 9/1/2003 with the
++	title "[PATCH]: non-readable binaries - binfmt_misc 2.6.0-test4".  This new
++	version fixes the concerns that were raised by the patch, except of calling
++	unshare_files() before allocating a new fd.  this is because this feature did
++	not enter 2.6 yet.
++	
++	
++	Arun Sharma <arun.sharma at intel.com> says:
++	
++	We were going through an internal review of this patch:
++	
++	http://marc.theaimsgroup.com/?l=linux-kernel&m=107424598901720&w=2
++	
++	which is in your tree already.  I'm not sure if this line of code got
++	sufficient review.
++	
++	+               /* call prepare_binprm before switching to interpreter's file
++	+                * so that all security calculation will be done according to
++	+                * binary and not interpreter */
++	+               retval = prepare_binprm(bprm);
++	
++	The case that concerns me is: unprivileged interpreter and a privileged
++	binary.  One can use binfmt_misc to execute untrusted code (interpreter) with
++	elevated privileges.  One could argue that all binfmt_misc interpreters are
++	trusted, because only root can register them.  But that's a change from the
++	traditional behavior of binfmt_misc (and binfmt_script).
++	
++	
++	(Update):
++	
++	Arun pointed out that calculating the process credentials according to the
++	binary that needs to be translated is a bit risky, since it requires the
++	administrator to pay extra attention not to register an interpreter which is
++	not intended to run with root credentials.
++	
++	After discussing this issue with him, I would like to propose a modified
++	patch: The old patch did 2 things - 1) open the binary for reading and 2)
++	calculate the credentials according to the binary.
++	
++	I removed the riskier part of changing the credentials calculation, so the
++	revised patch only opens the binary for reading.  It also includes few words
++	of warning in the description of the 'open-binary' feature in
++	binfmt_misc.txt, and makes the function entry_status print the flags in use.
++	
++	As for the 'credentials' part of the patch, I will prepare a separate patch
++	for it and send it again to the LKML, describe the problem and ask for people
++	comments.
++	
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<jejb at mulgrave.(none)>
++	Enable clustering in the 53c700 driver
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<yoav.zach at intel.com>
++	[PATCH] binfmt_misc: improve calculation of interpreter's credentials
++	
++	This patch allows for misc binaries to run with credentials and security
++	token that are calculated according to the binaries, and not according to the
++	interpreter, which is the legacy behavior of binfmt_misc.
++	
++	The way it is done is by calling prepare_binprm, which is where these
++	attributes are calculated, before switching the 'file' field in the bprm from
++	the binary to the interpreter.
++	
++	This feature should be used with care, since the interpreter will have root
++	permissions when running a setuid binary owned by root.
++	
++	Please note -
++	
++	- Only root can register an interpreter with binfmt_misc.  The feature is
++	  documented and the administrator is advised to handle it with care
++	
++	- The new feature is enabled only with a special flag in the registration
++	  string.  When this flag is not specified the current behavior of
++	  binfmt_misc is kept
++	
++	- This is the only 'right' way for an interpreter to know the correct
++	  AT_SECURE value for the interpreted binary
++	
++	
++	From: Chris Wright <chrisw at osdl.org>
++	
++	  This patchset looks OK, except for one problem.  It installs the fd (which
++	  could've been unreadable) without unsharing the ->files.  So someone can use
++	  this to read unreadable yet executable files.  Here's a patch which fixes
++	  that up.  I added one bit that's commented out because I'm not positive if a
++	  final steal_locks() is needed.
++	
++	  I did a fair amount of rearranging to simplify the error conditions
++	  relative to the fd_install(), and unshare_files().
++	
++	From: Chris Wright <chrisw at osdl.org>
++	
++	  I found that the intel patchset (and mine as well) leaked i_writecount on
++	  the original executed file.  In addition, I verified that the steal_locks()
++	  bit is indeed needed.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rmk at arm.linux.org.uk>
++	[PATCH] Clean up asm/pgalloc.h include
++	
++	This patch cleans up needless includes of asm/pgalloc.h from the fs/
++	kernel/ and mm/ subtrees.  Compile tested on multiple ARM platforms, and
++	x86, this patch appears safe.
++	
++	This patch is part of a larger patch aiming towards getting the include of
++	asm/pgtable.h out of linux/mm.h, so that asm/pgtable.h can sanely get at
++	things like mm_struct and friends.
++	
++	I suggest testing in -mm for a while to ensure there aren't any hidden arch
++	issues.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rmk at arm.linux.org.uk>
++	[PATCH] Clean up asm/pgalloc.h include
++	
++	This patch cleans up needless includes of asm/pgalloc.h from the drivers/
++	subtree.  drivers/char/mem.c has been compile tested; the others have not,
++	since they are for non-x86 and non-ARM architectures.
++	
++	This patch is part of a larger patch aiming towards getting the include of
++	asm/pgtable.h out of linux/mm.h, so that asm/pgtable.h can sanely get at
++	things like mm_struct and friends.
++	
++	I suggest testing in -mm for a while to ensure there aren't any hidden arch
++	issues.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rmk at arm.linux.org.uk>
++	[PATCH] Clean up asm/pgalloc.h include 3
++	
++	This patch cleans up needless includes of asm/pgalloc.h from the arch/i386/
++	subtree.  Compile tested on x86_pc SMP.
++	
++	[I also tried VISWS + SMP without PM doesn't build in smpboot.c,
++	 though I don't believe its caused by this patch.  With PM, fails
++	 to link complaining maxcpus is undefined.  Therefore, I presume
++	 VISWS + SMP is an invalid configuration.]
++	
++	This patch is part of a larger patch aiming towards getting the include of
++	asm/pgtable.h out of linux/mm.h, so that asm/pgtable.h can sanely get at
++	things like mm_struct and friends.
++	
++	I suggest testing in -mm for a while to ensure there aren't any hidden arch
++	issues.
++	
++	The outstanding list of files for other architectures can be found
++	at http://www.arm.linux.org.uk/misc/pgalloc.txt
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] ppc64: uninline __pte_free_tlb()
++	
++	The pgalloc.h changes broke ppc64:
++	
++	In file included from include/asm-generic/tlb.h:18,
++	                 from include/asm/tlb.h:24,
++	                 from arch/ppc64/mm/hash_utils.c:48:
++	include/asm/pgalloc.h: In function `__pte_free_tlb':
++	include/asm/pgalloc.h:110: dereferencing pointer to incomplete type
++	include/asm/pgalloc.h:111: dereferencing pointer to incomplete type
++	
++	Uninlining __pte_free_tlb() fixes that.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mason at suse.com>
++	[PATCH] reiserfs: block allocator optimizations
++	
++	From: <mason at suse.com>
++	From: <jeffm at suse.com>
++	
++	The current reiserfs allocator pretty much allocates things sequentially
++	from the start of the disk, it works very nicely for desktop loads but
++	once you've got more then one proc doing io data files can fragment badly.
++	
++	One obvious solution is something like ext2's bitmap groups, which puts
++	file data into different areas of the disk based on which subdirectory
++	they are in.  The problem with bitmap groups is that if you've got a
++	group of subdirectories their contents will be spread out all over the
++	disk, leading to lots of seeks during a sequential read.
++	
++	This allocator patch uses the packing locality to determine which bitmap
++	group to allocate from, but when you create a file it looks in the bitmaps
++	to see how 'full' that packing locality already is.  If it hasn't been
++	heavily used yet, the packing locality is inherited from the parent
++	directory putting files in new subdirs close to the parent subdir,
++	otherwise it is the inode number of the parent directory putting new
++	files far away from the parent subdir.
++	
++	The end result is fewer bitmap groups for the same working set.  For
++	example, one test data set created by 20 procs running in parallel has
++	6822 subdirs.  And with vanilla reiserfs that would mean 6822
++	packing localities.  This patch turns that into 26 packing localities.
++	
++	This makes sequential reads of big directory trees more efficient, but
++	it also makes the btree more efficient in general.  Things end up sorted
++	better because groups of subdirs end up with similar keys in the btree,
++	instead of being spread out all over.
++	
++	The bitmap grouping code tries to use the start of each bitmap group
++	for metadata, and offsets the data slightly.  The data and metadata
++	are still close together, but not completely intermixed like they are
++	in the default allocator.  The end result is that leaf nodes tend to be
++	close to each other, making metadata readahead more effective.
++	
++	The old block allocator had the ability to enforce a minimum
++	allocation size, but did not use it.  It now tries to do a pass looking
++	for larger allocation chunks before falling back to the old behaviour
++	of taking any blocks it can find.
++	
++	The patch changes the defaults to:
++	
++	mount -o alloc=skip_busy:dirid_groups:packing_groups
++	
++	You can get back the old behaviour with mount -o alloc=skip_busy
++	
++	mount -o alloc=dirid_groups will turn on the bitmap groups
++	mount -o alloc=packing_groups turns on the packing locality reduction code
++	mount -o alloc=skip_busy:dirid_groups turns on both dirid_groups and
++	skip_busy
++	
++	Finally the patch adds a mount -o alloc=oid_groups, which puts files into
++	bitmap groups based on a hash of their objectid.  This would be used for
++	databases or other situations where you have a limited number of very
++	large files.
++	
++	This command will tell you how many packing localities are actually in
++	use:
++	
++	debugreiserfs -d /dev/xxx | grep '^|.*SD' | sed 's/^.....//' | awk '{print $1}' | sort -u | wc -l
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mason at suse.com>
++	[PATCH] reiserfs: block allocator should not inherit "packing locality 1"
++	
++	reiserfsck --rebuild-tree expects the only key with a packing locality of 1 to
++	be for the root directory (key [1 2]).  The new block allocator inherited that
++	packing locality down to subdirectories, which triggers failures in reiserfsck
++	--rebuild-tree
++	
++	reiserfsck in readonly check mode doesn't complain about this, thanks to Jeff
++	Mahoney for finding it.
++	
++	The fix is to never inherit packing locality #1
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mason at suse.com>
++	[PATCH] reiserfs: remove debugging warning from block allocator
++	
++	Remove debugging warning from the reiserfs block allocator code
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mason at suse.com>
++	[PATCH] reiserfs: btree readahead
++	
++	Walking the btree can trigger a number of single block synchronous reads.
++	This patch does btree readahead during operations that are likely to be long
++	and sequential.  So far, that only includes directory reads and truncates, but
++	it can make both much faster.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mason at suse.com>
++	[PATCH] reiserfs data logging support
++	
++	Add data=journal support for reiserfs
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<alan at redhat.com>
++	[PATCH] PATCH: Further aacraid work
++	
++	I've been going through Mark's changes with a fine toothcomb and this merges
++	most of them. Its tested on 64bit SMP hardware and seems to be fine. There
++	are a couple of Mark's changes I've left out for now but there isnt really
++	an easy way to break down the changes further.
++	
++	This fixes a whole host of problems including random hangs under high load
++	
++	Signed-off-by: Alan Cox <alan at redhat.com>
++	        
++	Original contribution under GPL from Adaptec, updates checking by Red Hat
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<minyard at acm.org>
++	[PATCH] Fixes for idr code
++	
++	* On a 32-bit architecture, the idr code will cease to work if you add
++	  more than 2^20 entries.  You will not be able to find many of the
++	  entries.  The problem is that the IDR code uses 5-bit chunks of the
++	  number and the lower portion used by IDR is 24 bits, so you have one bit
++	  that leaks over into the comparisons that should not be there.  The
++	  solution is to mask off that bit before doing IDR processing.  This
++	  actually causes the POSIX timer code to crash if you create that many
++	  timers.  I have included an idr_test.tar.gz file that demonstrates this
++	  with and without the fix, in case you need more evidence :).
++	
++	* When the IDR fills up, it returns -1.  However, there was no way to
++	  check for this condition.  This patch adds the ability to check for the
++	  idr being full and fixes all the users.  It also fixes a problem in
++	  fs/super.c where the idr code wasn't checking for -1.
++	
++	* There was a race condition creating POSIX timers.  The timer was added
++	  to a task struct for another process then the data for the timer was
++	  filled out.  The other task could use/destroy time timer as soon as it is
++	  in the task's queue and the lock is released.  This moves settup up the
++	  timer data to before the timer is enqueued or (for some data) into the
++	  lock.
++	
++	* Change things so that the caller doesn't need to run idr_full() to find
++	  out the reason for an idr_get_new() failure.
++	
++	  Just return -ENOSPC if the tree was full, or -EAGAIN if the caller needs
++	  to re-run idr_pre_get() and try again.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] idr: remove counter bits from id's
++	
++	idr_get_new() currently returns an incrementing counter in the top 8 bits of
++	the counter.  Which means that most users have to mask it off again, and we
++	only have a 24-bit range.
++	
++	So remove that counter.  Also:
++	
++	- Remove the BITS_PER_INT define due to namespace collision risk.
++	
++	- Make MAX_ID_SHIFT 31, so counters have a 0 to 2G-1 range.
++	
++	- Why is MAX_ID_SHIFT using sizeof(int) and not sizeof(long)?  If it's for
++	  consistency across 32- and 64-bit machines, why not just make it "31"?
++	
++	- Does this still hold true with the counter removed?
++	
++	/* We can only use half the bits in the top level because there are
++	   only four possible bits in the top level (5 bits * 4 levels = 25
++	   bits, but you only use 24 bits in the id). */
++	
++	  If not, what needs to change?
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<minyard at acm.org>
++	[PATCH] IDR fixups
++	
++	There were definately some problems in there.  I've made some changes and
++	tested with a lot of bounds.  I don't have a machine with enough memory to
++	fill it up (it would take ~16GB on a 64-bit machine), but I use the "above"
++	code to simulate a lot of situations.
++	
++	The problems were:
++	
++	    * IDR_FULL was not the right value
++	    * idr_get_new_above() was not defined in the headers or documented.
++	    * idr_alloc() bug-ed if there was a race and not enough memory was
++	      allocated.  It should have returned NULL.
++	    * id will overflow when you go past the end.
++	    * There was a "(id >= (1 << (layers*IDR_BITS)))" comparison, but at
++	      the top layer it would overflow the id and be zero.
++	    * The allocation should return ENOSPC for an "above" value with
++	      nothing above it, but it returned EAGAIN.
++	
++	I have not tested on 64-bits (as I don't have a 64-bit machine).
++	
++	I've included the files, a diff from the previous version, and my test
++	programs.
++	
++	For the test programs, idr_test <size> will just attempt to allocate 
++	<size> elements, check them, free them, and check them again.
++	
++	idr_test2 <size> <incr> will allocate <size> element with <incr> between
++	them.
++	
++	idr_test3 just tests some bounds and tries all values with just a few in
++	the idr.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] i2c fixups for idr API change
++	
++	Fix up the i2c code which uses the IDR library.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<chrisw at osdl.org>
++	[PATCH] RLIM: add rlimit entry for controlling queued signals
++	
++	The following patches introduce per user rlimits for both queued signals and
++	POSIX message queues.  The changes touch all the arches resource.h files as
++	well as init_task.c to get the rlimit defaults setup.
++	
++	Both require caching the user_struct to avoid problems with setuid().
++	
++	The signal changes makes some small changes to send_signal() to pass along the
++	task being signalled to get proper accounting for signals initiated in
++	interrupt.  Thanks to Marcelo for getting this one going.
++	
++	
++	This patch:
++	
++	Add an rlimit entry to control the maximum number of pending signals a user
++	may have.  This is essentially just the resource.h changes.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<chrisw at osdl.org>
++	[PATCH] RLIM: add sigpending field to user_struct
++	
++	Add sigpending field to user_struct, and make sure it's properly initialized.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<chrisw at osdl.org>
++	[PATCH] RLIM: add simple get_uid() helper
++	
++	Add simple helper function to grab a reference to a user_struct.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<chrisw at osdl.org>
++	[PATCH] RLIM: add rlimit entry for POSIX mqueue allocation
++	
++	Add an rlimit entry to control the maximum number of bytes a user can allocate
++	to a POSIX mqueue.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<chrisw at osdl.org>
++	[PATCH] RLIM: add mq_bytes to user_struct
++	
++	Add mq_bytes field to user_struct, and make sure it's properly initialized.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<chrisw at osdl.org>
++	[PATCH] RLIM: add mq_attr_ok() helper
++	
++	Add helper function mq_attr_ok() to do mq_attr sanity checking, and do some
++	extra overlow checking.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<chrisw at osdl.org>
++	[PATCH] RLIM: enforce rlimits for POSIX mqueue allocation
++	
++	Add a user_struct to the mq_inode_info structure.  Charge the maximum number
++	of bytes that could be allocated to a mqueue to the user who creates the
++	mqueue.  This is checked against the per user rlimit.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<chrisw at osdl.org>
++	[PATCH] RLIM: adjust default mqueue sizes
++	
++	Lower default sizes for POSIX mqueue allocation now that rlimits are in place.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<Robert.Picco at hp.com>
++	[PATCH] HPET driver
++	
++	The driver supports the High Precision Event Timer.  The driver has adopted
++	a similar API to the Real Time Clock driver.  It can support any number of
++	HPET devices and the maximum number of timers per HPET device.  For further
++	information look at the documentation in the patch.
++	
++	Thanks to Venki at Intel for testing the driver on X86 hardware with HPET.
++	
++	HPET documentation is available at http://www.intel.com/design/chipsets/datashts/252516.htm
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<James.Bottomley at steeleye.com>
++	[PATCH] SCSI Flexible timout intfrastructure
++	
++	The object of this infrastructure is to give HBAs early warning that
++	error handling is about to happen and also provide them with the
++	opportunity to do something about it.
++	
++	It introduces the extra template callback:
++	
++	eh_timed_out()
++	
++	which scsi_times_out() will call if it is populated to notify the LLD
++	that an outstanding command took a timeout.
++	
++	There are three possible returns:
++	
++	EH_HANDLED:	I've fixed the problem, please complete the command for me
++	(as soon as the timer fires, scsi_done will do nothing, so the timer
++	itself will call a special version of scsi_done that doesn't check the
++	timer).
++	
++	EH_NOT_HANDLED:	Invoke error recovery as normal
++	
++	EH_RESET_TIMER:	The command will complete, reset the timer to its
++	original value and start it ticking again.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++	Based on work by Christoph Hellwig and Luben Tuikov
++
++<rddunlap at osdl.org>
++	[PATCH] Remove PC9800 support
++	
++	PC9800 sub-arch is incomplete, hackish (at least in IDE), maintainers don't
++	reply to emails and haven't touched it in awhile.  Can't even config it to
++	try to build it without other patches to the kernel tree.
++	
++	bk-rm-script:
++	
++	#! /bin/sh
++	bk rm -r ./arch/i386/mach-pc9800
++	bk rm -r ./arch/i386/boot98
++	bk rm ./drivers/char/lp_old98.c
++	bk rm ./drivers/serial/serial98.c
++	bk rm ./drivers/scsi/scsi_pc98.c
++	bk rm ./drivers/scsi/pc980155.c
++	bk rm ./drivers/scsi/pc980155.h
++	bk rm ./drivers/block/floppy98.c
++	bk rm ./drivers/input/keyboard/98kbd.c
++	bk rm ./drivers/input/serio/98kbd-io.c
++	bk rm ./drivers/input/misc/98spkr.c
++	bk rm ./drivers/input/mouse/98busmouse.c
++	bk rm ./drivers/ide/legacy/pc9800.c
++	bk rm ./drivers/ide/legacy/hd98.c
++	bk rm -r ./include/asm-i386/mach-pc9800
++	bk rm ./include/asm-i386/pc9800_sca.h
++	bk rm ./include/asm-i386/pc9800.h
++	bk rm ./fs/partitions/nec98.c
++	bk rm ./fs/partitions/nec98.h
++	bk rm ./sound/isa/cs423x/pc98.c
++	bk rm ./sound/isa/cs423x/pc9801_118_magic.h
++	bk rm ./sound/isa/cs423x/sound_pc9800.h
++	
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bunk at fs.tum.de>
++	[PATCH] more PC9800 removal
++	
++	Removes more PC9800 code.
++	
++	Requires:
++	
++	  bk rm drivers/char/upd4990a.c
++	  bk rm drivers/net/ne2k_cbus.c
++	  bk rm drivers/net/ne2k_cbus.h
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rene.herman at keyaccess.nl>
++	[PATCH] pc9800: merge std_resources.c back into setup.c
++	
++	std_resources.{c,h} was only split off due to pc9800 wanting to override it.
++	With it gone, it might as well be merged back in.  Doesn't change any code.
++	It was compiled and booted.
++	
++	This time this also actually doesn't break compilation of any of the
++	subarches.  That's to say, any further.  I guess it might have been my .config
++	(my regular PC config, with just the subarch switched through menuconfig) or
++	O=, but only ELAN actually compiled.  Voyager and VISWS bombed out at the
++	final link and NUMAQ much sooner (with "physnode_map undeclared" during
++	compilation of numaq.c).
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<tytso at mit.edu>
++	[PATCH] Ext3: Retry allocation after transaction commit (v2)
++	
++	Here is a reworked version of my patch to ext3 to retry certain filesystem
++	operations after an ENOSPC error.  The ext3_should_retry_alloc() function will
++	not wait on the currently running transaction if there is a currently active
++	handle; hence this should avoid deadlocks in the Lustre use case.  The patch
++	is versus BK-recent.
++	
++	I've also included a simple, reliable test case which demonstrates the problem
++	this patch is intended to fix.  (Note that BK-recent is not sufficient to
++	address this test case, and waiting on the commiting transaction in
++	ext3_new_block is also not sufficient.  Been there, tried that, didn't work.
++	We need to do the full-bore retry from the top level.  The
++	ext3_should_retry_alloc() will only wait on the committing transaction if
++	there is an active handle; hence Lustre will probably also need to use
++	ext3_should_retry_alloc() if it wants to reliably avoid this particular
++	problem.)
++	
++	#!/bin/sh
++	#
++	#
++	TEST_DIR=/tmp
++	IMAGE=$TEST_DIR/retry.img
++	MNTPT=$TEST_DIR/retry.mnt
++	TEST_SRC=/usr/projects/e2fsprogs/e2fsprogs/build
++	MKE2FS_OPTS=""
++	IMAGE_SIZE=8192
++	
++	umount $MNTPT
++	dd if=/dev/zero of=$IMAGE bs=4k count=$IMAGE_SIZE
++	mke2fs -j -F $MKE2FS_OPTS $IMAGE 
++	
++	function test_log ()
++	{
++		echo $*
++		logger -p local4.notice $*
++	}
++	
++	mkdir -p $MNTPT
++	mount -o loop -t ext3 $IMAGE $MNTPT
++	test_log Retry test: BEGIN
++	for i in `seq 1 3`
++	do
++		test_log "Retry test: Loop $i"
++		echo 2 > /proc/sys/fs/jbd-debug
++		while ! mkdir -p $MNTPT/foo/bar
++		do
++			test_log "Retry test: mkdir failed"
++			sleep 1
++		done
++		echo 0 > /proc/sys/fs/jbd-debug
++		cp -r $TEST_SRC $MNTPT/foo/bar 2> /dev/null
++		rm -rf $MNTPT/*
++	done
++	umount $MNTPT
++	test_log "Retry test: END"
++	
++	
++	akpm at osdl.org
++	
++	  Rework the code to make it a formal JBD API entry point.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<hpa at zytor.com>
++	[PATCH] Use first-fit for pty allocation
++	
++	(With Andrew Morton).
++	
++	The current dynamic pty allocation scheme has a few problems:
++	
++	- pty numbers grow to be very large, causing wtmp file bloat.
++	
++	- Seems to break libc5 and some old applications
++	
++	So change it to do first-fit.  An IDR tree is used to provide a
++	logarithmic-time search.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rene.herman at keyaccess.nl>
++	[PATCH] small tweaks to standard resource stuff
++	
++	Various small tweaks. Compiled and booted.
++	
++	1. add IORESOURCE_BUSY | IORESOURCE_MEM also for the kernel code and
++	     data resources. I don't believe this actually matters one bit, but
++	     they're hooked into a BUSY/MEM parent ("System RAM") and marking
++	     them busy seems to make sense.
++	
++	2. delete the .start = 1M default for the kernel code resource. This
++	     isn't actually a change; it's set to virt_to_phys(_text) in
++	     setup_arch() overriding any default anyways.
++	
++	3. s/vram_resource/video_ram_resource/. Lines up much nicer with
++	     video_rom_resource...
++	
++	4. s/checksum/romchecksum/. setup.c is a fairly large file, and
++	     "checksum" pollutes the namespace.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rene.herman at keyaccess.nl>
++	[PATCH] same small resource tweaks, x86_64 version
++	
++	The same small tweaks for x86_64.  Just to keep the two in sync.  One
++	additional wrinkle: vram_resource was exported to e820.c, which didn't
++	actually use it.  Undo that.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<tol at stacken.kth.se>
++	[PATCH] getgroups16() fix
++	
++	sys_getgroups16 (or rather groups16_to_user()) returns large gids
++	truncated.  Needs to be fixed, one way or another.  Don't know why the
++	other similar casts are still there.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<herbert at gondor.apana.org.au>
++	[PATCH] Check return status of register calls in i82365
++	
++	i82365 calls driver_register and platform_device_register without checking
++	their return values.  This patch fixes that.
++	
++	It also runs platform_device_register() prior to isa_probe() so we don't have
++	to undo ise_probe()'s effects if platform_device_register() ends up failing.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] invalidate_inodes2(): mark pages not uptodate
++	
++	Andrea Arcangeli <andrea at suse.de> points out that invalidate_inode_pages2() is
++	supposed to mark mapped-into-pagetable pages as not uptodate so that next time
++	someone faults the page in we will go get a new version from backing store.
++	
++	The callers are the direct-io code and the NFS "something changed on the
++	server" code.  In both these cases we do need to go and re-read the page.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<nickpiggin at yahoo.com.au>
++	[PATCH] Fix read() vs truncate race
++	
++	do_generic_mapping_read()
++	{
++		isize1 = i_size_read();
++		...
++		readpage
++		copy_to_user up to isize1;
++	}
++	
++	readpage()
++	{
++		isize2 = i_size_read();
++		...
++		read blocks
++		...
++		zero-fill all blocks past isize2
++	}
++	
++	If a second thread runs truncate and shrinks i_size, so isize1 and isize2 are
++	different, the read can return up to a page of zero-fill that shouldn't really
++	exist.
++	
++	The trick is to read isize1 after doing the readpage.  I realised this is the
++	right way to do it without having to change the readpage API.
++	
++	The patch should not cost any cycles when reading from pagecache.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pavel at ucw.cz>
++	[PATCH] io_apic.c code consolidation
++	
++	This cleans up io_apic.c a bit -- I do not really like 4 copies of same
++	code.
++	
++	Ingo said:
++	
++	   yeah, agreed - i checked & test it, it's ok.  I made a small
++	   modification (see the patch below) to uninline the __modify_IO_APIC_irq()
++	   function - shaving 0.5K off the kernel's size.
++	
++	Signed-off-by: Ingo Molnar <mingo at elte.hu>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mingo at elte.hu>
++	[PATCH] x86: remove APIC_LOCKUP_DEBUG
++	
++	the patch below gets rid of APIC_LOCKUP_DEBUG.  It has been in the kernel
++	for more than 3 years and the message was only reported once during that
++	period of time - and even in that case it was a side-effect of a really bad
++	crash.  The lockup workaround works, the debugging code can be moved out.
++	
++	Signed-off-by: Ingo Molnar <mingo at elte.hu>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mingo at elte.hu>
++	[PATCH] x86: remove io_apic_sync
++	
++	The patch below gets rid of io_apic_sync().
++	
++	io_apic_sync() was introduced in 2.1.104 and it was originally done for
++	masking and unmasking as well.  Later the unmasking use got removed but the
++	masking use lingered around.  I dont think it was ever justified to do it
++	and clearly since the lack of io_apic_sync() didnt break some of the other
++	writes we do to the IO-APIC registers, it must be unnecessary in the
++	masking case too.
++	
++	Signed-off-by: Ingo Molnar <mingo at elte.hu>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<willy at debian.org>
++	[PATCH] ahc1542 !CONFIG_MCA build fix
++	
++	The old 1542 scsi driver is both ISA and MCA.  The MCA portions are disabled
++	when !CONFIG_MCA through the typical wrapper scheme (a la pci.h and
++	!CONFIG_PCI).  However...  the driver unconditionally includes linux/mca.h
++	which in turn unconditionally includes asm/mca.h.
++	
++	This breaks drivers on platforms with ISA but not MCA, like alpha.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<joris at eljakim.nl>
++	[PATCH] Validate PM-Timer rate at boot time
++	
++	Add a check to the PM-Timer initialization code.  It validates the PM-Timer
++	rate against PIT channel 2 and rejects the PM-Timer if its rate is not
++	withing 5% of the expected number.
++	
++	Rationale:
++	
++	The PMTMR timers of certain (older) mainboards are running at invalid
++	rates, often much faster than the rate expected by the PM-Timer code.  This
++	causes the system clock to run much too fast.  See also
++	http://bugme.osdl.org/show_bug.cgi?id=2375
++	
++	Possible workarounds are disabling the PM-Timer in the kernel config or
++	disabling the PM-Timer at boot time through the "clock=tsc" parameter.
++	However, we believe it is more user friendly to automatically validate the
++	PM-Timer rate at boot time before using it as the system time source.
++	
++	Tested by me (with broken timer) and John Stultz (with good timer) and
++	believed to be ok.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bwindle at fint.org>
++	[PATCH] fix 3c59x.c to allow 3c905c 100bT-FD
++	
++	Fix the 3c905C 10/100 transceiver initialisation woes.
++	
++	(This was reverted from 2.6.7-rcX, but the bug reporter said the failure
++	turned out to be unrepeatable).
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<alan at redhat.com>
++	[PATCH] make the 3c59x/3c90x driver somewhat more reliable
++	
++	The existing driver violates basic PCI rules in several places making it
++	unusable for basic things like DHCP in Fedora Core.  This patch removes all
++	the situations I can find where it writes to the device while in D3 state
++	and breaks stuff.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<tim at physik3.uni-rostock.de>
++	[PATCH] BSD accounting format rework
++	
++	BSD accounting format rework:
++	
++	Use all explicit and implicit padding in struct acct to
++	
++	 - correctly report 32 bit uid/gid,
++	 - correctly report jobs (e.g., daemons) running longer than 497 days,
++	 - increase the precision of ac_etime from 2^-13 to 2^-20
++	   (i.e., from ~6 hours to ~1 min. after a year)
++	 - store the current AHZ value.
++	 - allow cross-platform processing of the accounting file
++	   (limited for m68k which has a different size struct acct).
++	 - introduce versioning for smooth transition to incompatible formats in
++	   the future. Currently the following version numbers are defined:
++	     0: old format (until 2.6.7) with 16 bit uid/gid
++	     1: extended variant (binary compatible to v0 on M68K)
++	     2: extended variant (binary compatible to v0 on everything except M68K)
++	     3: a new binary incompatible format (64 bytes)
++	     4: new binary incompatible format (128 bytes).
++	        layout of its first 64 bytes is the same as for v3.
++	     5: marks second half of new binary incompatible format (128 bytes)
++	        (layout is not yet defined)
++	
++	All this is accomplished without breaking binary compatibility.  32 bit
++	uid/gid support is compatible with the patch previously floating around and
++	used e.g.  by Red Hat.
++	
++	This patch also introduces a config option for a new, binary incompatible
++	"version 3" format that
++	
++	 - is uniform across and properly aligned on all platforms
++	 - stores pid and ppid
++	 - uses AHZ==100 on all platforms (allows to report longer times)
++	
++	Much of the compatibility glue goes away when v1/v2 support is removed from
++	the kernel.  Such a patch is at
++	
++	  http://www.physik3.uni-rostock.de/tim/kernel/2.7/acct-cleanup-04.patch
++	
++	and might be applied in the 2.7 timeframe.
++	
++	The new v3 format is source compatible with current GNU acct tools (6.3.5).
++	However, current GNU acct tools can be compiled for only one format.  As there
++	is no way to pass the kernel configuration to userspace, with my patch it will
++	still only support the old v2 format.  Only if v1/v2 support is removed from
++	the kernel, recompiling GNU acct tools will yield v3 support.
++	
++	A preliminary take at the corresponding work on cross-platform userspace tools
++	(GNU acct package) is at
++	
++	  http://www.physik3.uni-rostock.de/tim/kernel/utils/acct/
++	
++	This version of the package is able to read any of the v0/v2/v3 formats,
++	regardless of byte-order (untested), even within the same file.
++	Cross-platform compatibility with m68k (v1 format) is not yet implemented, but
++	native use on m68k should work (untested).  pid and ppid are currently only
++	shown by the dump-acct utility.
++	
++	Thanks to Arthur Corliss, Albert Cahalan and Ragnar Kjørstad for their
++	comments, and to Albert Cahalan for the u64->IEEE float conversion code.
++	
++	Signed-off-by: Tim Schmielau <tim at physik3.uni-rostock.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paul at serice.net>
++	[PATCH] iso9660: fix handling of inodes beyond 4GB
++	
++	This is my fourth attempt to patch the isofs code.  It is similar to the last
++	posting except this one implements the NFS get_parent() method which has
++	always been missing.
++	
++	The original problem I set out to addresses is that the current iso9660 file
++	system cannot reach inodes located beyond the 4GB barrier.  This is caused by
++	using the inode number as the byte offset of the inode data.  Being 32-bits
++	wide, the inode number is unable to reach inode data that does not reside on
++	the first 4GB of the file system.
++	
++	This causes real problems with "growisofs"
++	
++	      http://fy.chalmers.se/~appro/linux/DVD+RW/#isofs4gb
++	
++	and my pet project "shunt"
++	
++	      http://www.serice.net/shunt/
++	
++	This patch switches the isofs code from iget() to iget5_locked() which allows
++	extra data to be passed into isofs_read_inode() so that inode data anywhere on
++	the disk can be reached.
++	
++	The inode number scheme was also changed.  Continuing to use the byte offset
++	would have resulted in non-unique inodes in many common situations, but
++	because the inode number no longer plays any role in reading the meta-data off
++	the disk, I was free to set the inode number to some unique characteristic of
++	the file.  I have chosen to use the block offset which is also 32-bits wide.
++	
++	Lastly, the pre-patch code uses the default export_operations to handle
++	accessing the file system through NFS.  The problem with this is that the
++	default NFS operations assume that iget() works which is no longer the case
++	because of the necessity of switching to iget5_locked().  So, I had to
++	implement the NFS operations too.  As a bonus, I went ahead and implemented
++	the NFS get_parent() method which has always been missing.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paul at serice.net>
++	[PATCH] iso9660: NFS fix
++	
++	Make all inode numbers unique for images less than 128GB in size.  Required
++	for knfsd.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<jeremy at sgi.com>
++	[PATCH] SCSI whitelist changes
++	
++	The BLIST_REPORTLUN2 blacklist item has exactly the behavior that
++	the MYLEX DACARMRB (and SGI TP9100, which is really a 2Gb upgrade
++	to the DACARMRB) need.
++	
++	These devices use a PQ of 1 instead of 3 for unconfigured luns,
++	which means that every RAID has 32 luns, many or most of which
++	are just phantoms.
++	
++	However, it does support Report Luns, and it returns the correct
++	data.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<thomas at winischhofer.net>
++	[PATCH] sisfb update 1.7.10
++	
++	attached is an update for the sisfb driver to version 1.7.10.
++	
++	This update includes
++	
++	- fixes for pure 64bit and 32/64bit mixed systems (add ioctl conversion;
++	  fix variable sizes, etc; REQUIRED for current X.org/XFree86 on 64bit
++	  systems, even if pure 64bit),
++	
++	- fixes for 301C video bridge, (scales TV output correctly now)
++	
++	- fixes for 1600x1200 and 1400x1050 LCD panels,
++	
++	- many fixes for 661/741/760 (amongst others, proper LFB support for the
++	  760 and corrections for SiS' new BIOS data layout; would lead to display
++	  corruption with old driver)
++	
++	- add support for many modes for LCD which were unsupported previously,
++	
++	- add support for HiVision and YPbPr HDTV
++	
++	- "vga=" statement now honoured properly (sisfb will set the same mode as
++	  the kernel did by default)
++	
++	- use LCD native resolution mode if no mode is given
++	
++	- a major clean up of main driver code,
++	
++	- radical removal of duplicate (or nearly duplicate) code,
++	
++	- switched to 2.6 module_param macros,
++	
++	- enhanced communication with the X driver,
++	
++	- added eventual POSTing of SiS300/305 card for non-x86 archs,
++	
++	- added ability to relocate the image on the TV screen using a userland
++	  tool,
++	
++	- added Documentation/fb/sisfb.txt (why the heck was this missing?!)
++	
++	- small fix for SiS DRM driver (match 32/64bit fixes mentioned above)
++	  (cast the data passed to sis_free as u32)
++	
++	- make driver re-entrant by avoiding static structures and variables.
++	
++	As usual, heavily tested.  The mode switching code is even lab-tested by
++	SiS (although 100% written by me).  Please apply asap (especially since
++	64bit systems were not properly supported previously; as mentioned, current
++	X.org/XFree86 needs this update for proper communication with the
++	framebuffer driver on 64bit systems.  X crashes on such systems with the
++	old driver).
++	
++	Signed-off-by: Thomas Winischhofer <thomas at winischhofer.net>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bogdan.costescu at iwr.uni-heidelberg.de>
++	[PATCH] 3c59x: support for ATI Radeon 9100 IGP
++	
++	The following patch adds support for the 3Com networking core found in the
++	ATI Radeon 9100 IGP southbridge used on boards like Asus P4R800-VM.
++	
++	The main point of this patch is using HAS_MII instead of HAS_NWAY for the
++	definition of the board.  All the previous trials since the end of last
++	year used HAS_NWAY which disables the Tx part of the transceiver; using
++	HAS_NWAY was the way all 3Com Cyclone and Tornado chips worked, as they had
++	the transceiver integrated.  The ATI solution has an external transceiver
++	and I had to physically see the different chip on the board (the board was
++	provided by ATI) to finally understand that it needs the HAS_MII
++	definition...  I'm still waiting for some docs from ATI to clarify if this
++	is the correct way of handling this chip and if there are any differences
++	w.r.t EEPROM handling, but as it appears to work and was also confirmed by
++	other testers, I don't want to keep owners of such boards away from their
++	networks :-)
++	
++	The textual identification was a bit hard to decide; it's called
++	"3c920B-EMB-WNM" in the Windows .INF file that Asus provides for their
++	boards.  As this name was already used for PCI ID 9210, I added the
++	paranthesis which specifies where this chip is found.
++	
++	The Scyld driver defines FEATURE_TORNADO to include HAS_NWAY.  This board
++	would then probably need to not be defined with FEATURE_TORNADO, but the
++	same as in this patch.
++	
++	I would like to publicly thank Tyson Vickers for both ideas and patience
++	during the last few weeks.  He managed to get the driver working by
++	randomly setting driver parameters :-) But then he contacted me and worked
++	with me towards the solution.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<agk at redhat.com>
++	[PATCH] dm-io: device-mapper i/o library for kcopyd
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<agk at redhat.com>
++	[PATCH] Device-mapper: kcopyd
++	
++	Add kcopyd - a daemon for copying regions of block devices around in an
++	efficient manner.  Multiple destinations can be specified for a copy.
++	Designed to perform well both with many small chunks or few large chunks.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kevcorry at us.ibm.com>
++	[PATCH] dm: kcopyd: remove superfluous INIT_LIST_HEADs
++	
++	Remove superfluous kcopyd INIT_LIST_HEAD.
++	
++	From: Alasdair Kergon <agk at redhat.com>
++	Signed-off-by: Kevin Corry <kevcorry at us.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kevcorry at us.ibm.com>
++	[PATCH] dm: kcopyd: No need to lock pages
++	
++	No need to lock kcopyd pages.
++	
++	From: Alasdair Kergon <agk at redhat.com>
++	Signed-off-by: Kevin Corry <kevcorry at us.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kevcorry at us.ibm.com>
++	[PATCH] kcopyd commentary
++	
++	We're also working on some general documentation which will go in
++	Documentation/device-mapper and will include more detailed information
++	about the core driver and the other sub-modules.  We'll try to submit those
++	patches in the near future.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<agk at redhat.com>
++	[PATCH] Device-mapper: snapshots
++	
++	Add snapshot target
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kevcorry at us.ibm.com>
++	[PATCH] dm: Fix error cleanup in dm_create_persistent()
++	
++	dm-exception-store.c: Fix error cleanup in dm_create_persistent().
++	This was originally found by chrisw during code review.
++	
++	From: Dave Olien <dmo at osdl.org>
++	Signed-off-by: Kevin Corry <kevcorry at us.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<agk at redhat.com>
++	[PATCH] Device-mapper: mirroring
++	
++	Add mirror target.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<agk at redhat.com>
++	[PATCH] Device-mapper: dm-zero
++	
++	Add dm-zero target
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kevcorry at us.ibm.com>
++	[PATCH] dm: dm-zero version
++	
++	Add missing dm-zero version number.
++	
++	From: Alasdair Kergon <agk at redhat.com>
++	Signed-off-by: Kevin Corry <kevcorry at us.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<christophe at saout.de>
++	[PATCH] Device-mapper: dm-zero flushing fix
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kevcorry at us.ibm.com>
++	[PATCH] dm: Documentation
++	
++	Device-Mapper documentation.
++	
++	Signed-off-by: Kevin Corry <kevcorry at us.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kevcorry at us.ibm.com>
++	[PATCH] dm: Create/destroy kcopyd on demand.
++	
++	Create/destroy kcopyd on demand.
++	
++	This changes kcopyd to initialize its mempool and workqueue only when a
++	client specifically needs to use it.
++	
++	Signed-off-by: Kevin Corry <kevcorry at us.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kevcorry at us.ibm.com>
++	[PATCH] dm: Use structure assignments instead of memcpy
++	
++	Use structure assignments instead of memcpy's.
++	[Suggested by akpm during kcopyd review.]
++	
++	Signed-off-by: Kevin Corry <kevcorry at us.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kevcorry at us.ibm.com>
++	[PATCH] dm: dm-io: Error handling
++	
++	dm-io: Proper error handling when someone is trying to read from multiple
++	regions.
++	
++	Signed-off-by: Kevin Corry <kevcorry at us.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kevcorry at us.ibm.com>
++	[PATCH] dm: dm-raid1.c: Make delayed_bios a bio_list
++	
++	dm-raid1.c: Make struct region::delayed_bios a bio_list instead of a bio*.
++	This will ensure the queued bios are kept in the proper order.
++	
++	Signed-off-by: Kevin Corry <kevcorry at us.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kevcorry at us.ibm.com>
++	[PATCH] dm: dm-raid1.c: Use list_for_each_entry_safe
++	
++	dm-raid1.c: In rh_exit(), use list_for_each_entry_safe instead of
++	list_for_each_safe.
++	
++	Signed-off-by: Kevin Corry <kevcorry at us.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<tom.l.nguyen at intel.com>
++	[PATCH] msi TARGET_CPUS fix
++	
++	Somehow the change in TARGET_CPUS generated this error in UP environment.
++	Patch below will fix it.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wli at holomorphy.com>
++	[PATCH] x86_64 numa cpumask build fix
++	
++	arch/x86_64/mm/numa.c: In function `numa_initmem_init':
++	arch/x86_64/mm/numa.c:185: error: incompatible types in assignment
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] i386 uninline some bitops
++	
++	Uninline the non-leaf bit search functions.  Saves 9 kbytes from my vmlinux.
++	
++	And gratuitously s/__inline__/inline/
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wli at holomorphy.com>
++	[PATCH] APIC enumeration fixes
++	
++	The following patch appears sound according to an audit to ensure that all
++	of the codepaths where it was introduced were called after the APIC
++	fixmappings were set up.
++	
++	This patch introduces get_physical_broadcast(), which checks the version ID
++	of the local APIC to determine whether it's a serial APIC or xAPIC, and
++	returns the correct physical broadcast ID.  It replaces all uses of
++	APIC_BROADCAST_ID and IO_APIC_MAX_ID with this in order to ensure.  It also
++	changes the checks during MP table parsing so the APIC ID is checked in
++	tandem with the version number.
++	
++	I'm holding out for some kind of testing to get an idea of whether this
++	covers the cases or introduces regressions, or whatever.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wli at holomorphy.com>
++	[PATCH] apic: fix kicking of non-present cpus
++	
++	The following patch repairs kicking of non-present cpus by making
++	cpu_present_to_apicid() bounds-check its argument.  It also corrects the
++	same issue on NUMA-Q by correctly passing the generated artificial APIC ID
++	instead of the raw value discovered in the MP table.
++	
++	A miscellaneous compilefix for CONFIG_ACPI_BOOT is also included for
++	completeness.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wli at holomorphy.com>
++	[PATCH] apic: remove marking of non-present physids in phys_cpu_present_map
++	
++	Marking invalid APIC ID's in phys_cpu_present_map was intended to generate
++	"collisions" between APIC ID's in order to assist the ordinary bounds
++	checking against the broadcast physical APIC ID.  However, this is bounds
++	checked everywhere it's necessary, and it's also not even possible to
++	properly bounds-check everywhere.  So this patch removes that marking of
++	non-present physical APIC ID's.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wli at holomorphy.com>
++	[PATCH] apic: make mach_default compile again
++	
++	While sweeping the APIC code two points were missed.  The first is getting
++	the definition of BAD_APICID available to
++	include/asm-i386/mach-default/mach_apic.h by #including the right header,
++	and the second is UP local APIC without UP IO-APIC linking in
++	get_broadcast_physid().
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<ak at suse.de>
++	[PATCH] Use numa policy API for boot time policy
++	
++	Suggested by Manfred Spraul.
++	
++	__get_free_pages had a hack to do node interleaving allocation at boot
++	time.  This patch sets an interleave process policy using the NUMA API for
++	init and the idle threads instead.  Before entering the user space init the
++	policy is reset to default again.  Result is the same.
++	
++	Advantage is less code and removing of a check from a fast path.
++	
++	Removes more code than it adds.
++	
++	I verified that the memory distribution after boot is roughly the same.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<torque at ukrpost.net>
++	[PATCH] memory allocation checks in eth1394_update()
++	
++	Adds memory allocation checks in eth1394_update().
++	
++	Signed-off-by: Yury Umanets <torque at ukrpost.net>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<torque at ukrpost.net>
++	[PATCH] memory allocation checks in mtdblock_open()
++	
++	Fixes memory allocation check in mtdblock_open()
++	
++	Signed-off-by: Yury Umanets <torque at ukrpost.net>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<umka at namesys.com>
++	[PATCH] memory allocation checks in cs46xx_dsp_proc_register_scb_desc()
++	
++	Adds memory allocation checks in cs46xx_dsp_proc_register_scb_desc()
++	
++	Signed-off-by: Yury Umanets <torque at ukrpost.net>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<ashok.raj at intel.com>
++	[PATCH] don't create cpu/online sysfs file
++	
++	This file provides ability for caller of register_cpu() to either create a
++	control file, or not.  This can be handy if a particular platform decides
++	that certain CPU's are not removable.  Hence would like to not create a
++	control file.
++	
++	Signed-off-by: Dave Hansen <haveblue at us.ibm.com>
++	Signed-off-by: Ashok Raj <ashok.raj at intel.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<tvignaud at mandrakesoft.com>
++	[PATCH] checksatck.pl fixes
++	
++	- "\<" and "\>" can be safely replaced with "<" and ">"
++	
++	- "$var =~ /^string$/" is better written "$var eq 'string'"
++	
++	- $i is better written without the double quotes
++	
++	- it's not safe to use for without "my"ing the iteration variable
++	
++	- "print foreach @array" is better written "print @array"
++	
++	- declare variables
++	
++	- ".*" is useless at the end of a regexp
++	
++	- "$a[@a] = $foo" is a rather obfuscated syntax for "push @a, $foo"...
++	  let's not opencoding language basic operators...
++	
++	- ignoring return value from a regexp is very bad: this can results in
++	  working on previous value of $1, $2, ...
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<arun.sharma at intel.com>
++	[PATCH] sys_getdents64 needs compat wrapper
++	
++	Due to different structure alignment rules in the ABI between ia32 and
++	ia64, certain members of the dirent structure are not guaranteed to be 8
++	byte aligned on ia64.  This requires a compat wrapper around these 32 bit
++	system calls.  Other architectures may or may not have the problem,
++	depending on the alignment rules.
++	
++	This was observed by running /emul/ia32-linux/bin/ls on 2.6.6 which produces
++	kernel mode unaligned faults.
++	
++	Original patch by: Arnd Bergmann <arnd at arndb.de>
++	Signed-off-by: Gordon Jin <gordon.jin at intel.com>
++	Signed-off-by: Arun Sharma <arun.sharma at intel.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<andrea at suse.de>
++	[PATCH] remap_file_pages() speedup
++	
++	Avoid taking down_write(mmap_sem) unless we really need it.
++	
++	Seems that the only reason we're taking it for writing is to protect
++	vma->vm_flags.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mikem at beardog.cca.cpqcorp.net>
++	[PATCH] cciss ioctl32 update
++	
++	This patch provides a conversion routine for 32-bit user space apps that
++	call into a 64-bit kernel on x86_64 architectures.  This is required for
++	the HP Array Configuration utility and the HP management agents.  Without
++	this patch the apps will not function.
++	
++	The 2 ioctls affected are the cciss pass thru ioctls.  Caveat: it spits out
++	2 warnings during compilation.  I've tried everything I can think of to
++	clean them up, but...  If anyone has any helpful suggestions I'm all ears.
++	
++	Code by Stephen Cameron
++	Tested by Stephen Cameron & Mike Miller
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<axboe at suse.de>
++	[PATCH] fix cdrom mt rainier probe
++	
++	Mt rainier probe must be deferred to media load time, since it requires a
++	valid media (the drive may present a different capability based on what
++	media is loaded).  This fixes that for ide-cd and sr.
++	
++	Signed-Off-By: Jens Axboe <axboe at suse.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<axboe at suse.de>
++	[PATCH] blk: move threshold unplugging
++	
++	The 'unplug on queued exceeding unplug threshold' logic only works for file
++	system requests currently, since it's in __make_request().  Move it where
++	it belongs, in elv_add_request().  This way it works for queued block sg
++	requests as well.
++	
++	Signed-Off-By: Jens Axboe <axboe at suse.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pavel at ucw.cz>
++	[PATCH] Fix memory leak in swsusp
++	
++	This fixes 2 memory leaks in swsusp: during relocating pagedir, eaten pages
++	were not properly freed in error path and even regular freeing path was
++	freeing one page too little.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<herbert at gondor.apana.org.au>
++	[PATCH] omdisk memory leak fix
++	
++	Fix a couple of memory leaks in the pmdisk driver.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<herbert at gondor.apana.org.au>
++	[PATCH] remove unnecessary memsets from swsusp and pmdisk
++	
++	Here's the patch that removes the memset calls from both pmdisk and swsusp.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<herbert at gondor.apana.org.au>
++	[PATCH] swsusp: remove copy_pagedir
++	
++	It can be replaced by a simple memcpy.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<vandrove at vc.cvut.cz>
++	[PATCH] Decrease stack usage in ncpfs's ioctl
++	
++	It decreases stack consumption in one of ncpfs's paths from 3000 to 2200
++	bytes (and stack portion in ncpfs ioctl code from 1336 to 452 bytes).
++	
++	- some code used large structure (with embeded 256 bytes for filename)
++	  while it never passed filename around.  Use something smaller in
++	  ncp_conn_logged_in.  Decrease 616 => 300.
++	
++	- gcc-3.3 is very bad when it comes to parallel blocks in ioctl.  Split
++	  some branches from large switch to separate functions.  ncp_ioctl now
++	  uses 152 bytes of stack (instead of 720) and biggest child 64.
++	
++	Signed-off-by: Petr Vandrovec <vandrove at vc.cvut.cz>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] Make update_one_process() static
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rtjohnso at eecs.berkeley.edu>
++	[PATCH] drivers/char/ipmi/ipmi_devintf.c: user/kernel pointer typo
++	
++	Judging from context, I think there's a misplaced "&" in this code that can
++	cause stack overflows and other nasty problems.  Perhaps it's left over
++	from when msgdata was an array instead of a pointer?
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<davidel at xmailserver.org>
++	[PATCH] epoll: replace the file lookup hash with rbtrees
++	
++	The epoll allocation for the fd lookup hash used to allocate up to 1MB
++	(depending on the "hint" size passed to epoll_create()) with
++	__get_free_pages(0), and this might lead to a "malicious" user to do
++	something like:
++	
++	    for (i = 0; i < 1024; i++)
++	        epoll_create(BIG-NUM);
++	
++	You can replace "malicious user" with IBM-ltp test suite, and the meaning
++	does not change.  The above code might exhaust memory badly, even before
++	the file creation limit is topped.  Also, the allocation was independent
++	from the number of fds pushed into the epoll fd hash.  Using an rb-tree
++	ther will be not pre-allocation of the hash, and the size of the memory
++	used will be proportional to the number of fds pushed into the epoll fd.
++	The patch also removes 100 lines of code, that is never a bad thing ;)
++	
++	Signed-off-by: Davide Libenzi <davidel at xmailserver.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<egmont at uhulinux.hu>
++	[PATCH] Shift+PgUp if nr of scrolled lines is < 4
++	
++	Using the vga console driver, if the number of the lines scrolled out is
++	less than four, then Shift+PageUp doesn't work.
++	
++	The bug is closely related to the 'margin' feature of scrolling, which
++	means that if less than four lines should remain unvisible in the direction
++	we are scrolling to, then we scroll a little bit more just to see those few
++	lines.  Kind of two small magnets at the borders of the buffer.
++	
++	This bug was also reported with maybe a less clear description by Stepan
++	Koltsov (cc'ed just for fun) back in 2001 and he got no answer.  I found it
++	at http://seclists.org/lists/linux-kernel/2001/Nov/0080.html
++	
++	His patch simply disables margin support and hence everythings becomes
++	okay, but you lose a nice feature.
++	
++	Here's a patch that retains margin support and fixes the bug.  Works for
++	me, tested for a week.  No guarantee.  As I don't fully understand the code
++	(see also my previous mail) I'm not 100% sure that I'm doing the right
++	thing, so I'd prefer if someone would take a closer look at it.
++	
++	At least 2.4 and 2.6 are affected, maybe older ones too.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rddunlap at osdl.org>
++	[PATCH] istallion printk fix
++	
++	istallion: Remove duplicate "%d" in printk();
++	
++	Signed-off-by: Randy Dunlap <rddunlap at osdl.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wli at holomorphy.com>
++	[PATCH] lower priority of "too many keys" msg in atkbd.c
++	
++	From: "Jon Thackray" <jgt at pobox.com>
++	
++	 * Lowered priority of "too many keys" message in drivers/input/keyboard/atkbd.c
++	This fixes Debian BTS #239036.
++	http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=239036
++	
++	
++	The keyboard under 2.6.4 seems to be behaving strangely, reporting unknown
++	key codes and too many keys pressed, even when no keys have been pressed.
++	The keyboard is connected via an 8 way KVM switch, but was working quite
++	acceptably under 2.4.25 with no such messages.  Trying 2.6.3 is not an
++	option as it doesn't support the hardware properly, as previously reported.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wli at holomorphy.com>
++	[PATCH] unregister driver if probing fails in sb_card.c
++	
++	 * Unregister driver if probing fails in sound/oss/sb_card.c
++	This fixes Debian BTS #218845.
++	http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=218845
++	
++		From: Robin Gerard <robin.jag at free.fr>
++		To: submit at bugs.debian.org
++		Subject: no sound with kernel-image-2.6.0-test9-1-386
++		Message-ID: <20031103004939.GA2071 at mauritius>
++	
++	I downlaoded the kernel-image-2.6.0-test9-1-386_2.6.0-test9-1_i386.deb
++	and I installed it successfully. Everything works fine, except the sound.
++	(I run also the kernel-image-2.4.20 and the sound is ok with this kernel)
++	My sound card is a sb.
++	
++	First I launched modconf but no module was displayed.
++	
++	I did: modprobe sb
++	and I got:
++	
++	sb: Init: Done
++	sb: Init: Starting Probe...
++	kobject_register failed for OSS SndBlstr (-17)
++	Call Trace:
++	[<c0191cda>] kobject_register+0x3a/0x40
++	[<c01d9bcc>] bus_add_driver+0x30/0x64
++	[<c01d9e51>] driver_register+0x2d/0x34
++	[<c011a24a>] preempt_schedule+0x2a/0x48
++	[<c01b6f84>] pnp_register_driver+0x28/0x58
++	[<c01b6c5e>] pnp_register_card_driver+0x5e/0x98
++	[<c488f063>] sb_init+0x63/0xb5 [sb]
++	[<c0130bf4>] sys_init_module+0xe8/0x1f0
++	[<c010b577>] syscall_call+0x7/0xb
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wli at holomorphy.com>
++	[PATCH] fix duplicate environment variables passed to init
++	
++	 * Fixed argument processing bug in init/main.c (Eric Delaunay)
++	This fixes Debian BTS #58566.
++	http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=58566
++	
++		From: Eric Delaunay <delaunay at lix.polytechnique.fr>
++		Message-Id: <200002201918.UAA02327 at jazz.pontchartrain.fr>
++		Subject: pb in handling parameters on kernel command line
++		To: submit at bugs.debian.org (debian bug tracking system)
++	
++	Hello, I found some bugs in kernel command line parser.  AFAIK, they are not
++	Debian nor sparc specific but I'm not subscribed to linux-kernel mailing list
++	and since I'm involved with boot-floppies (mainly for sparc), I think I'm right
++	to report it here.  Feel free to forward it upstream (I checked the latest
++	2.3.46 sources and it seems these bugs are still there).
++	
++	These bugs are not release critical.  The latter just not gives the user a
++	chance to overwrite TERM env var at boot time.  It could be just
++	inconvenient for serial console boot, and in this case, our busybox' init is
++	already enforcing TERM=vt102.
++	Nevertheless if it could not be fixed before the release, I could even write a
++	workaround in busybox' init (it's just a matter of rewriting getenv()).
++	
++	At last, it does not affect sysvinit package because serial console tty is
++	controlled by a getty process which is reading terminal settings on its command
++	line (take a look in inittab for T0 entries, if any).
++	
++	Ok, here is my modest contribution to kernel hacking.  I don't know much about
++	kernel internals but it seems that argument parsing is a bit broken.
++	
++	One trivial patch for command line like "init=/bin/sh console=prom" where
++	console=prom is replaced by lot of spaces in previous call to setup_arch() on
++	sparc, therefore the line parsed by parse_options() is really
++	"init=/bin/sh            " and a lot of null args are pushed into argv_init.
++	
++	The other patch is for command line like "TERM=vt100" where both default & user
++	TERM entries are pushed into the env array.
++	Taking a look into /proc/1/environ, it shows up:
++	HOME=/
++	TERM=linux
++	TERM=vt100
++	
++	It appears that ash (maybe other shells too) is giving the latter entry but
++	glibc getenv() is giving the former.  It is therefore impossible to get entry
++	from the user in a C program like busybox' init (used in Debian boot-floppies).
++	
++	I guess getenv() is not written to support duplicate entries, therefore the
++	kernel should avoid such construct.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wli at holomorphy.com>
++	[PATCH] fix handling of '/' embedded in filenames in isofs
++	
++	 * Fix slashes in broken Acorn ISO9660 images in fs/isofs/dir.c (Darren Salt)
++	This fixes Debian BTS #141660.
++	http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=141660
++	
++		From: Darren Salt <linux at youmustbejoking.demon.co.uk>
++		Message-ID: <4B238BA09A%linux at youmustbejoking.demon.co.uk>
++		To: submit at bugs.debian.org
++		Subject: Handle '/' in filenames in broken ISO9660 images
++	
++	[Also applicable to 2.2.x]
++	
++	There has been for some time a problem with certain CD-ROMs whose images
++	were generated using a particular tool on Acorn RISC OS.  The problem is
++	that in certain catalogue entries, the extension separator character '/'
++	(RISC OS uses '.' and '/' the other way round) was not replaced with '.';
++	thus Linux cannot properly parse this without this patch, thinking that it
++	is a directory separator.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wli at holomorphy.com>
++	[PATCH] fix isofs ignoring noexec and mode mount options
++	
++	 * Removed period check for executables in fs/isofs/inode.c
++	This fixes Debian BTS #162190
++	http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=162190
++	
++		From: Jan Gregor <gregor_jan at seznam.cz>
++		To: Debian Bug Tracking System <submit at bugs.debian.org>
++		Subject: kernel-source-2.4.18: kernel ignores noexec and mode option in cdrom case
++		Message-ID: <20020924162129.A328 at pisidlo>
++	
++	In /etc/fstab i have following line:
++	/dev/cdrom      /cdrom          iso9660  gid=100,noauto,ro,noexec,mode=0444,user      0       0
++	
++	I found on one CD that some files have exec bit set. From brief view
++	those files has no extension (filename.ext).
++	
++	My drive is asus-1610a (ATAPI writer) connected throught scsi-emulation.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<alex at clusterfs.com>
++	[PATCH] ext3: htree readdir fix
++	
++	I've observed that ext3_htree_fill_tree() doesn't ignore empty records
++	(de->inode == 0).  test case is very simple: turn htree on, create several
++	hundreds of files, remove them and look at strace ls:
++	
++	[root at victim tests]# ls -a /test/1
++	.  ..
++	
++	[root at victim tests]# strace ls /test/1/
++	....
++	getdents64(3, /* 18 entries */, 4096)   = 432
++	getdents64(3, /* 0 entries */, 4096)    = 0
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<neilb at cse.unsw.edu.au>
++	[PATCH] Fix raid1 read_balancing code.
++	
++	The meaning of mddev->in_sync changed subtly a while ago, and raid1 wasn't
++	changed to match.  This results in raid1 read_balancing not working
++	properly.  This patch corrects the relevant test.
++	
++	Signed-off-by: Neil Brown <neilb at cse.unsw.edu.au>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<linux at dominikbrodowski.de>
++	[PATCH] mull'ify multiplication with HZ in __const_udelay()
++	
++	John Stultz mentioned on lkml ( http://lkml.org/lkml/2004/6/5/15 ) that
++	calls to udelay() don't delay long enough, causing trouble e.g.  in the USB
++	subsystem.  The following patches address this issue.
++	
++	Move the multiplication of (loops_per_jiffy * xloops) with HZ into the
++	"mull" asm operation.  This increases the accuracy of the delay functions
++	largely:
++	
++	n usec delay on a system with loops_per_jiffy = 1500000 :
++	
++	  n 	   before	  after
++	  1	 1000 ticks	 1499 ticks
++	 10	14000 ticks	14999 ticks
++	
++	n usec delay on a system with loops_per_jiffy = 100000 : 
++	
++	 n 	   before	  after
++	  1	    0 ticks	   99 ticks
++	 10	    0 ticks	  999 ticks
++	100	 9000 ticks	 9999 ticks
++	
++	As noted by Kurt Garloff, it's necessary to adjust for large
++	loops_per_jiffies, as the multiplication of it with HZ fails for 4GHz or
++	larger.  So, John Stultz suggested multiplying xloops with 4 first, and
++	multiplying with (HZ/4).
++	
++	Signed-off-by: Dominik Brodowski <linux at brodo.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<linux at dominikbrodowski.de>
++	[PATCH] round up  in __udelay()
++	
++	Round up in __udelay(): 2**32 / 100000 is 4294.97, so it's more intuitive
++	to round up, and it causes more predictable results:
++	
++	n usec delay on a 1500000 BogoMIPS system:
++	
++	  n 	   before	  -mull		after
++	  1	 1000 ticks	 1499 ticks	 1500 ticks
++	 10	14000 ticks	14999 ticks	15000 ticks
++	
++	n usec delay on a 100000 BogoMIPS system: 
++	
++	 n 	   before	  -mull		after
++	  1	    0 ticks	   99 ticks	  100 ticks
++	 10	    0 ticks	  999 ticks	 1000 ticks
++	100	 9000 ticks	 9999 ticks	10000 ticks
++	
++	While it can be argued that some time is also spent in the delay functions,
++	it's better to spend _at least_ the specified time sleeping, in my humble
++	opinion.  And the overhead of a specific ->delay() implementation should be
++	substracted in the specific ->delay() implementation.
++	
++	Signed-off-by: Dominik Brodowski <linux at brodo.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<linux at dominikbrodowski.de>
++	[PATCH] add 1 in __const_udelay()
++	
++	The "mull" instruction in __const_udelay() cuts off the lower 32 bits --
++	so, it is "rounding down".  This is both an issue for small ndelay()s for
++	_all_ values for loops_per_jiffy and for certain {n,u}delay()s for many
++	loops_per_jiffy values.
++	
++	Assuming
++	
++	LPJ = 1501115
++	
++	udelay(87)
++	
++	results in
++	
++	130597 loops to be spent.
++	
++	However, 1000 * 130597 / 1501115 is 86.999997 us, so we're actually
++	_rounding down_.  1000 * 130598 / 1501115 is 87.000662841, which would be
++	the technically correct thing to do.  Of course, for the TSC case this
++	won't matter as the maths take some time, so the actual delay is
++	
++	1000 * __udelay(x) / lpj + __OVERHEAD(x)
++	
++	Anybody worried about both the additional overhead and the fact that the
++	overhead takes some time to run should add a check
++	
++	        if (unlikely(xloops < OVERHEAD))
++	                return;
++	        xloops -= OVERHEAD;
++	
++	to the delay() routines in arch/i386/kernel/timers/*.c and determine
++	what the OVERHEAD is.
++	
++	Signed-off-by: Dominik Brodowski <linux at brodo.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<jmorris at redhat.com>
++	[PATCH] Add security_file_permission() to AIO paths.
++	
++	Currently, there are no LSM hooks in the AIO codepaths, which means that
++	LSM based access controls are not revalidated upon AIO read and write
++	operations.  The patch below adds the security_file_permission() LSM hook
++	prior to the VFS aio_read()/aio_write() calls.
++	
++	Signed-off-by: James Morris <jmorris at redhat.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<marcelo.tosatti at cyclades.com>
++	[PATCH] update Marcelo CREDITS info
++	
++	Update my CREDITS information.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<jmorris at redhat.com>
++	[PATCH] Fix sock_orphan race.
++	
++	The patch below fixes a race between sock_orphan() and
++	selinux_socket_sock_rcv_skb() which can lead to a null pointer deref oops
++	under heavy load.  The sk_callback_lock is used in the patch to synchronize
++	access to the incoming socket's inode security state.
++	
++	This patch has been under test in the Fedora kernel for over a month
++	without incident.
++	
++	Author:  Stephen Smalley <sds at epoch.ncsc.mil>
++	Signed-off-by: James Morris <jmorris at redhat.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<hch at lst.de>
++	[PATCH] fix standalone inclusion of asm-i386/dma-mapping.h
++	
++	Without this a usb-storage patch I sent fails on x86 because dma-mapping.h
++	uses struct device and various VM stuff without proper includes.  It's fine
++	on ppc at least.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<schwidefsky at de.ibm.com>
++	[PATCH] s390: lost dirty bits
++	
++	The SetPageUptodate function is called for pages that are already up to
++	date.  The arch_set_page_uptodate function of s390 may not clear the dirty
++	bit in that case otherwise a dirty bit which is set between the start of an
++	i/o for a writeback and a following call to SetPageUptodate is lost.
++	
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<daniel at osdl.org>
++	[PATCH] handle partial DIO write
++	
++	The fsx-linux hole fill failure problem was caused by
++	generic_file_aio_write_nolock() not handling the partial DIO write
++	correctly.  Here's a patch lets DIO do the partial write, and the fallback
++	to buffered is done (correctly) for what is left.  This fixes the hole
++	filling without retrying the entire i/o.  This patch also applies to
++	2.6.7-rc3 with some offset.
++	
++	I tested this (on ext3) with
++	fsx-linux -l 500000 -r 4096 -t 4096 -w 4096 -Z -N 10000 junk  -R -W
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<eger at havoc.gtf.org>
++	[PATCH] fb accel capabilities
++	
++	Baseline patch to make framebuffer/fbcon interaction more sane by basing the
++	fbcon heuristics on capabilities advertized by underlying framebuffer via the
++	fb_info.flags field.
++	
++	This patch updates fbcon, fb.h, and skeletonfb.c.  It does *not* yet update
++	the drivers themselves.  They should compile and work, but their hinting is
++	not correct yet, meaning most fb drivers will be slow until I set the flags to
++	the right hinting driver-by-driver
++	
++	Signed-off-by: David Eger <eger at havoc.gtf.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<eger at havoc.gtf.org>
++	[PATCH] fbcon: prefer pan when available
++	
++	Improve heuristics to favor panning over copyarea() thanks to pseudocode
++	from Antonino Daplas <adaplas at hotpop.com>
++	
++	Signed-off-by: David Eger <eger at havoc.gtf.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<adaplas at hotpop.com>
++	[PATCH] Updates to rivafb driver
++	
++	The patch updates rivafb to the following:
++	
++	1.  Fixed cursor corruption and simplified cursor code.
++	
++	2.  Maximized var->yres_virtual on initial mode setting.  Scrolling,
++	   therefore, defaults to y-panning which is significantly faster.
++	
++	3.  Restricted var->xres_virtual and var->yres_virtual to 0x7fff
++	   (hardware limitation?).  Otherwise, var->yres_virtual > 0x7fff + panning
++	   will hang the GPU.
++	
++	4.  Added I2C/DDC support.  This feature enables independent mode setup
++	   to rivafb.  'stty rows n cols n' should now work correctly.  This is a
++	   configurable option.
++	
++	5. Various/minor fixes to drawing code.
++	
++	Signed-off-by: Antonino Daplas <adaplas at pol.net>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<adaplas at hotpop.com>
++	[PATCH] More updates to rivafb driver
++	
++	1.  pass info->monspecs.modedb and info->monspecs.modedb_len to
++	   fb_find_mode() instead of NULL, 0 since its contents are specific to the
++	   attached display.  Anyway, if info->monspecs.modedb == NULL,
++	   fb_find_mode() will use the default database.
++	
++	2.  Added best fit algo to fb_find_mode().
++	
++	3.  Use snprintf instead of sprintf.
++	
++	Signed-off-by: Antonino Daplas <adaplas at pol.net>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<lethal at Linux-SH.ORG>
++	[PATCH] asiliantfb init fix
++	
++	asiliantfb seems to have only been partially merged (the fbmem.c bits in
++	particular seem to have been missed entirely).  This adds them back in,
++	though they do seem to be present in the fbdev tree, at least they were the
++	last time I looked.
++	
++	These are the last bit of outstanding changes I have in the LinuxSH
++	tree for asiliantfb, so it would be nice to get this out of the way.
++	
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<eger at havoc.gtf.org>
++	[PATCH] fix radeonfb panning and make it play nice with copyarea()
++	
++	radeonfb: fix panning corruption on a large virtual screen, Make panning
++	and copyarea() play nicely with each other.
++	
++	Signed-off-by: David Eger <eger at havoc.gtf.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] fix warning in fbmem.c
++	
++	Fix a const/non-const warning.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<eger at havoc.gtf.org>
++	[PATCH] rivafb: fb accel capabilities
++	
++	Here's the fb accel capabilities patch for rivafb.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<chrisw at osdl.org>
++	[PATCH] fix simple_strtoul base 16 handling
++	
++	I know it's simple_strtoul, but is it meant to be that simple?  Fix up for
++	both simple_strtoul and simple_strtoull.
++	
++	simple_strtoul(0x401b, NULL, 0) = 0x401b
++	simple_strtoul(0X401b, NULL, 0) = 0x0
++	simple_strtoul(0x401b, NULL, 16) = 0x0
++	simple_strtoul(0X401b, NULL, 16) = 0x0
++	
++	simple_strtoull(0x401b, NULL, 0) = 0x401b
++	simple_strtoull(0X401b, NULL, 0) = 0x0
++	simple_strtoull(0x401b, NULL, 16) = 0x0
++	simple_strtoull(0X401b, NULL, 16) = 0x0
++	
++	Signed-off-by: Chris Wright <chrisw at osdl.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<jmorris at redhat.com>
++	[PATCH] SELinux: Fine-grained Netlink support - SELinux headers update
++	
++	This patch regenerates the SELinux module headers to reflect new class and
++	access vectors definitions.  The size of the diff is misleading; much of it is
++	simply a change in the ordering of the automatically generated definitions.
++	The corresponding generation script has been changed to ensure a stable order
++	in the future.  Please apply.
++	
++	Author: Stephen Smalley <sds at epoch.ncsc.mil>
++	Cc: David S. Miller <davem at redhat.com>
++	Signed-off-by:  Stephen Smalley <sds at epoch.ncsc.mil>
++	Signed-off-by:  James Morris <jmorris at redhat.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<jmorris at redhat.com>
++	[PATCH] SELinux: Fine-grained Netlink support - move security_netlink_send() hook
++	
++	This patch moves the security_netlink_send() LSM hook after the user copy, so
++	that LSM modules can safely examine skb payload content.  For SELinux, we need
++	to look at the Netlink message type.
++	
++	Cc: David S. Miller <davem at redhat.com>
++	Signed-off-by: James Morris <jmorris at redhat.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<jmorris at redhat.com>
++	[PATCH] SELinux: Fine-grained Netlink support - add sk to netlink_send hook
++	
++	Modifies the LSM netlink_send() hook so that it takes a struct sock parameter.
++	 SELinux will use this parameter to lookup the class of socket, which was
++	assigned during socket security initialization.
++	
++	Cc: David S. Miller <davem at redhat.com>
++	Signed-off-by: James Morris <jmorris at redhat.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<jmorris at redhat.com>
++	[PATCH] SELinux: Fine-grained Netlink support - SELinux changes
++	
++	This patch contains SELinux changes which add support for extended Netlink
++	socket classes and the associated permissions nlmsg_read and nlmsg_write.
++	
++	Cc: David S. Miller <davem at redhat.com>
++	Signed-off-by: James Morris <jmorris at redhat.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<minyard at acm.org>
++	[PATCH] IPMI base patch to fix channel handling and add polling
++	
++	This patch fixes some problems with handling of channel detection in the
++	driver.  Some systems that are IPMI 1.5 do not implement the channel query
++	command.  Also, the interface has to be fully up before the command is
++	ready.
++	
++	This patch also adds a polling interface; this is required for situations
++	where interrupts are not running, but the system must still issue IPMI
++	commands, like when taking a crash dump.
++	
++	It also updates the driver version to v32.
++	
++	Signed-off-by: Corey Minyard <minyard at acm.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kenneth.w.chen at intel.com>
++	[PATCH] Hugetlb page bug fix for i386 in PAE mode
++	
++	Hit a bug check when unmap a hugetlb vma in PAE mode on i386 (and x86-64).
++	
++	 Bad page state at free_hot_cold_page (in process 'a.out', page c165cc40)
++	 flags:0x20000000 mapping:f75e1d00 mapped:0 count:0
++	 Backtrace:
++	 Call Trace:
++	  [<c0133e0d>] bad_page+0x79/0x9e
++	  [<c0134550>] free_hot_cold_page+0x71/0xfa
++	  [<c0115d60>] unmap_hugepage_range+0xa3/0xbf
++	  [<c013d375>] unmap_vmas+0xac/0x252
++	  [<c0117691>] default_wake_function+0x0/0xc
++	  [<c0140bea>] unmap_region+0xd8/0x145
++	  [<c0140f2d>] do_munmap+0xfc/0x14d
++	  [<c01b8a56>] sys_shmdt+0xa5/0x126
++	  [<c010a2ad>] sys_ipc+0x23c/0x27f
++	  [<c014a85e>] sys_write+0x38/0x59
++	  [<c0103e1b>] syscall_call+0x7/0xb
++	
++	It turns out there is a bug in hugetlb_prefault(): with 3 level page table,
++	huge_pte_alloc() might return a pmd that points to a PTE page.  It happens
++	if the virtual address for hugetlb mmap is recycled from previously used
++	normal page mmap.  free_pgtables() might not scrub the pmd entry on munmap
++	and hugetlb_prefault skips on any pmd presence regardless what type it is. 
++	Patch to fix the bug.
++	
++	Signed-off-by: Ken Chen <kenneth.w.chen at intel.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rddunlap at osdl.org>
++	[PATCH] remove blank line in show_trace()
++	
++	Delete a blank line for more error reporting on-screen.
++	
++	Signed-off-by: Randy Dunlap <rddunlap at osdl.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<greg at kroah.com>
++	[PATCH] remove EXPORT_SYMBOL(kallsyms_lookup)
++	
++	Distros have started to ship kernels with this patch, as it seems that some
++	unnamed binary module authors are already abusing this function (as well as
++	some open source modules, like the openib code.) I could not find any valid
++	reason why this symbol should be exported, so here's a patch against 2.6.7
++	that removes it.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kaos at ocs.com.au>
++	[PATCH] contify some scheduler functions
++	
++	Several scheduler macros only read from the task struct, mark them const.
++	It may help the compiler generate better code.
++	
++	Signed-off-by: Keith Owens <kaos at ocs.com.au>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<ysato at users.sourceforge.jp>
++	[PATCH] H8/300: ptrace fix
++	
++	- Kconfig typo fix
++	- PTRACE_PEEKUSER read process info support
++	- exr restore fix
++	- ptrace register offset fix
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<ysato at users.sourceforge.jp>
++	[PATCH] H8/300: io.h cleanup
++	
++	- optimize byteswap
++	- add noswap io mode
++	- cleanup var type
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kszysiu at iceberg.elsat.net.pl>
++	[PATCH] cmpci oops on rmmod + fix
++	
++	The cmpci driver included in Linux 2.6.7 causes an oops on rmmod, I believe
++	cm_remove should be marked __devexit rather than __devinit.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<torvalds at ppc970.osdl.org>
++	Fix kill_pg_info(): return success if _any_ signal succeeded.
++
++<chrisw at osdl.org>
++	[PATCH] RLIM: pass task_struct in send_signal()
++	
++	Update send_signal() api to allow passing the task receiving the signal.  This
++	is necessary to ensure signals generated out of process context can be charged
++	to the correct user.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<chrisw at osdl.org>
++	[PATCH] RLIM: enforce rlimits on queued signals
++	
++	Add a user_struct pointer to the sigqueue structure.  Charge sigqueue
++	allocation and destruction to the user_struct rather than a global pool.  This
++	per user rlimit accounting obsoletes the global queued_signals accouting.
++	
++	The patch as charges the sigqueue struct allocation to the queue that it's
++	pending on (the receiver of the signal).  So the owner of the queue is charged
++	for whoever writes to it (much like quota for a 777 file).
++	
++	The patch started out charging the task which allocated the sigqueue struct.
++	In most cases, these are always the same user (permission for sending a
++	signal), so those cases are moot.  In the cases where it isn't the same user,
++	it's a privileged user sending a signal to another user.
++	
++	It seems wrong to charge the allocation to the privleged user, when the other
++	user could block receipt as long as it feels.  The flipside is, someone else
++	can fill your queue (expectation is that someone else is privileged).  I think
++	it's right the way it is.  The change to revert is very small.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<chrisw at osdl.org>
++	[PATCH] RLIM: remove unused queued_signals global accounting
++	
++	Remove unused queued_signals global accounting.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<torvalds at ppc970.osdl.org>
++	This removes the files orphaned by the earlier PC9800 removal
++
++<icampbell at com.rmk.(none)>
++	[ARM PATCH] 1930/1: Allocate correct number of pseudo palette entries in pxafb
++	
++	Patch from Ian Campbell
++	
++	The pxafb driver incorrectly allocates 17 u32's for a 16 entry 
++	pseudo palette.
++
++<torvalds at ppc970.osdl.org>
++	Remove old stale header files that aren't referenced anywhere.
++	
++	Noted by Alexey Dobriyan.
++
++<icampbell at com.rmk.(none)>
++	[ARM PATCH] 1934/2:  Consolidate code to set CKEN on PXA
++	
++	Patch from Ian Campbell
++	
++	I've seen comments several times that various PXA drivers
++	update CKEN in an unsafe manner. This patch consolidates
++	this code into a single function pxa_set_cken() and updates
++	all the in tree drivers to use it.
++
++<axboe at suse.de>
++	[PATCH] cfq sysfs support
++	
++	This makes the CFQ tunables available in sysfs, like AS and deadline.
++	
++	Signed-off-by: Jens Axboe <axboe at suse.de>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<axboe at suse.de>
++	[PATCH] cfq allocation race
++	
++	It's possible under unlucky circumstances for this race to trigger. I
++	described it with a comment in the code.
++	
++	Signed-Off-By: Jens Axboe <axboe at suse.de>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<axboe at suse.de>
++	[PATCH] cfq direct io alias problem
++	
++	This is a fix for when we encounter an alias during insert. When that
++	happens we move the request to dispatch, but it may happen that this
++	request is also the ->last_merge hint. So we may attempt to merge with
++	this later, when it's either in progress or already freed. Rearrange the
++	logic a bit so we clear the merge hint there as well. It looks more
++	complex than it is, the only real code change is the addition of a
++	cfq_remove_merge_hints() in cfq_dispatch_sort().
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: dummy_hcd shouldn't reject SET-ADDRESS requests
++	
++	This patch for the dummy_hcd driver prevents it from rejecting SET-ADDRESS
++	requests when the address is already set.  The USB 2.0 spec states that if
++	a device is in the ADDRESS state, it should accept and start using the new
++	address.  Behavior in the CONFIGURED state is undefined, but since
++	dummy_hcd doesn't keep track of the difference between the two states we
++	might as well accept the new address in any case.
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<nico at org.rmk.(none)>
++	[ARM PATCH] 1932/1: fix comment about cache handling syscall
++	
++	Patch from Nicolas Pitre
++	
++	Let's make it coherent with what the actual code is doing and has
++	always done, even in 2.4.  Nobody complained about this so let's
++	just fix the comment.  The most natural usage pattern for this is
++	a base address and a size so it's more efficient to have an exclusive
++	end address anyway.
++
++<tony at com.rmk.(none)>
++	[ARM PATCH] 1931/1: Allow device address translation in dma-mapping, version 3
++	
++	Patch from Tony Lindgren
++	
++	Allows translation of shared memory addresses for devices using 
++	dma-mapping. In some cases the device DMA address is different
++	from the ARM DMA address, for example with some USB OHCI 
++	controllers.
++	
++	For more background information, please see the ARM Linux mailing
++	list thread "OHCI controller".
++
++<greg at kroah.com>
++	USB: mark pwc driver broken again, as it still is :(
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Remove TBOX.
++	
++	This platform is no longer maintained, and its maintainer says that
++	the hardware is obsolete and out of circulation.
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Remove NexusPCI/FTVPCI platform.
++	
++	This platform is no longer maintained, and its maintainer says that
++	the hardware is obsolete and out of circulation.
++
++<shemminger at osdl.org>
++	[BRIDGE]: Kill sysfs hotplug avoidance hacks.
++	
++	The whole effort to avoid hotplug was misguided.  If it is really a problem
++	(which it doesn't appear to be) then it can more easily be addressed by smarter
++	hotplug scripts in user space.
++	
++	This patch gets rid of the whole subsystem hack for bridge kobjects.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[PKT_SCHED]: Delay scheduler enqueue always succeeds.
++	
++	If underlying fifo enqueue fails, return the status not 0.
++	Same patch should apply to both 2.6 and 2.4
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: i387 math-emu annotation
++	
++	arch/i386/math-emu/* annotated.
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: rt_sigsuspend/sigaltstack sanitized
++	
++	rt_sigsuspend() and sigaltstack() prototype changed; instead of
++	playing games with casts of argument address to struct pt_regs * and
++	digging through it, we declare them as
++	
++		int <fn>(struct pt_regs regs)
++	
++	instead.
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: vm86.c annotated
++	
++	vm86.c annotated; vm86old(2) and vm86(2) switched to explicit
++	
++		int <fn>(struct pt_regs regs)
++	
++	format.
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: ixj annotated
++	
++	drivers/telephony (aka ixj.c) annotated, IXJ_CADENCE split into kernel
++	and userland variants, ioctl structures got __user on pointers.
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: drivers/char/watchdog annotation
++	
++	Trivial annotations in drivers/char/watchdog/*
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: drivers/input annotations
++	
++	Trivial annotations in drivers/input
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: ide-tape annotation
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: ibmasmfs annotations
++	
++	Trivial annotations + couple of missing (void) in prototypes
++
++<rmk+lkml at arm.linux.org.uk>
++	[PATCH] Couple of sysfs patches
++	
++	On Wed, Jun 16, 2004 at 05:51:03PM -0500, Dmitry Torokhov wrote:
++	> What about freeing the resources? Can it be put in platform_device_unregister
++	> or is it release handler task? I'd put it in unregister because when I call
++	> unregister I expect device be half-dead and release as much resources as it
++	> can.
++	
++	
++	Here's the updated patch - to be applied on top of the
++	platform_get_resource() patch sent previously.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<shemminger at osdl.org>
++	[PKT_SCHED]: Delay scheduler should retry if requeue fails.
++	
++	If delay scheduler decides not to send the packet right away, it requeues
++	it.  If the requeue fails, it should go and look again rather than waking
++	up prematurely.
++	
++	Same patch should apply to both 2.6 and 2.4
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] crapectomy - last users of kernel_scsi_ioctl() gone
++	
++	Last 3 users of kernel_scsi_ioctl() eliminated; two of them used to read
++	partition table by issuing a READ6 via ioctl (instead of just calling
++	scsi_bios_ptable() as every other ->biosparam() instance does).
++	
++	The last one was doing a very quaint access to fields of scsi_device by
++	issuing SCSI_IOCLT_GET_LUN and then shuffling bits in the result.  Down
++	with that insanity...
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: drivers/message/fusion annotations and fixes
++	
++	Sigh...  First of all, LSI folks have very quaint idea of existing
++	platforms and word sizes on those.  Their definitions of U32 and S32
++	should really be reserved for posterity (preferably chiseled into the
++	rock they have between the ears), but kernel is the wrong place for
++	that.  Fixed.
++	
++	mptctl_do_mpt_command() was always called on userland pointers;
++	kernel/userland argument removed along with dead code, function
++	annotated, callers updated.
++	
++	The rest is trivial annotations in mptctl.c and in its ioctl structures
++	- nothing fancy there.
++
++<torvalds at ppc970.osdl.org>
++	sparse: fix up fusion/mptctl.c after merge
++
++<davem at nuts.davemloft.net>
++	[PKT_SCHED]: Do not check netif_queue_stopped() in dequeue ops, races with driver.
++	
++	Based upon a patch from Stephen Hemminger.
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[PKT_SCHED]: Add loss option to network delay scheduler.
++	
++	This enhances the network simulation scheduler to do simple random loss.
++	
++	The loss parameter is a simple 32 bit value such that 0 means no loss, and
++	0xffffffff is always drop.  I have a new version of the tc command which takes
++	care of conversion from percent to this value.
++	
++	Same patch for 2.4 and 2.6
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<dlstevens at us.ibm.com>
++	[IPV6]: Handle user asking for any device in mcast calls.
++
++<wli at holomorphy.com>
++	[IRDA]: Remove usage of isa_virt_to_bus()
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<yoshfuji at linux-ipv6.org>
++	[IPV6]: Fix autoconf description in ip-sysctl.txt.
++
++<akpm at osdl.org>
++	[NET]: Fix eql.c failed dev_get_by_name() return value check.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: binfmt_aout annotation
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: mwave annotation
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: nfs partial annotation
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: drivers/video partial annotation
++	
++	misc annotation in drivers/video/* (nowhere near complete)
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: drivers/video/kyro annotation
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: drivers/video/matrox annotation
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: udf cleanups
++	
++	removed bogus externs from declarations in fs/udf/*
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: applicom annotation
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: amd64 bits
++	
++	 - added define of __x86_64__ to sparse arguments on amd64
++	 - switched amd64 uaccess.h to __chk_user_ptr()
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: ipmi annotation
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: cyclades annotation
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: synclinkmp annotation
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: autofs annotation
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: drivers/video/aty annotation
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: drivers/video/sis annotation
++
++<brking at us.ibm.com>
++	[PATCH] ipr abort hang fix
++	
++	The following patch fixes a hang that occurs when an abort
++	is issued by the midlayer. The hang is the result of overriding
++	a field in the union of the ipr_cmd struct. It is fixed by moving
++	this pointer outside of the union, since it is not mutually exclusive
++	with the other fields in the union.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<brking at us.ibm.com>
++	[PATCH] ipr only tcq cancel all
++	
++	Some SCSI-IDE cdrom drives take up to 15 seconds to respond following
++	an abort being issued to them. This patch changes ipr to only send
++	a cancel all to a device as part of request sense processing when
++	the device is running tagged command queueing.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<brking at us.ibm.com>
++	[PATCH] ipr bump version to 2.0.10
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<rddunlap at osdl.org>
++	[PATCH] sparse: kernel/module.c sparse fix
++	
++	Add __user annotation for !CONFIG_MODULE_UNLOAD case.
++	
++	From: Mika Kukkonen <mika at osdl.org>
++	Signed-off-by: Randy Dunlap <rddunlap at osdl.org>
++
++<rddunlap at osdl.org>
++	[PATCH] sparse: lib/string.c sparse fix
++	
++	A classic..
++	
++	  lib/string.c:165:19: warning: assignment expression in conditional
++	
++	From: Mika Kukkonen <mika at osdl.org>
++	Signed-off-by: Randy Dunlap <rddunlap at osdl.org>
++
++<stevef at smfhome1.smfdom>
++	Do not send junk in bcc area of oplock break SMB Lock request, and always let oplock break release
++	through even if requests are ahead of it waiting for responses to complete.
++	
++	Signed-off-by: Steve French (sfrench at us.ibm.com)
++
++<stevef at smfhome1.smfdom>
++	check better for free files on writepage retry
++	
++	Signed-off-by: Steve French (sfrench at us.ibm.com)
++
++<arun.sharma at intel.com>
++	[PATCH] ia64: fix ia32 partial-page map support for overlapping mmaps
++	
++	- Handle the overlapping mmaps in the MAP_FIXED case
++	- Handle unmaps correctly i.e. call __ia32_delete_pp_range()
++	- There are now three clear entry points into the pp manipulation code
++	        - ia32_set_pp
++	        - ia32_unset_pp
++	        - ia32_compare_pp
++	- Rename internal functions to __ia32_*pp_*
++	- Grab mmap_sem just once at the main entry point
++	
++	Signed-off-by: Gordon Jin <gordon.jin at intel.com>
++	Signed-off-by: Arun Sharma <arun.sharma at intel.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<ashok.raj at intel.com>
++	[PATCH] ia64: move move_irq() from iosapic.c to irq.c
++	
++	This patch moves move_irq() from ioaspic.c to irq.c to make this common
++	for ia64 subarches.
++	
++	Signed-off-by: Ashok Raj <ashok.raj at intel.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<eranian at hpl.hp.com>
++	[PATCH] ia64: perfmon stack consumption fix
++	
++	This patch moves the pfm_ovfl_arg_t structure from the kernel stack
++	into the pfm_context_t structure. This minimizes kernel stack space
++	consumption.
++	
++	Signed-off-by: Stephane Eranian <eranian at hpl.hp.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<yanmin.zhang at intel.com>
++	[PATCH] ia64: fix free_huge_page() call in hugetlb_prefault()
++	
++	In base kernel 2.6.7, there is bug in function hugetlb_prefault().  The
++	call to free_huge_page() is incorrect and should be replaced with a call
++	to page_cache_release().
++	
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<akpm at osdl.org>
++	[PATCH] mptctl.c build fix
++	
++	drivers/message/fusion/mptctl.c:89:24: asm/compat.h: No such file or directory
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++
++<mikulas at artax.karlin.mff.cuni.cz>
++	[PATCH] HPFS fixes for 2.6.7 kernel
++	
++	This contains hpfs fixes from my source ported to 2.6.7 kernel:
++	
++	updates:
++	- allocator fragments files less
++	- OS/2 Warp Server filesystem can be mounted read/only
++	- added reschedule points so that it doesn't hog CPU
++	
++	bug fixes:
++	- filesystem error message when syncing or fsyncing deleted file (or when
++	  system just writes it on its own)
++	- filesystem error on extremly fragmented files
++	- corrupted disk structures could possibly corrupt memory
++
++<rmk at flint.arm.linux.org.uk>
++	[PCMCIA] Add Cirrus PD6729 PCMCIA bridge support.
++	
++	Patch from Komuro, cleaned up by Russell King.
++
++<akpm at osdl.org>
++	[NET]: Fix econet build bustage.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<yoshfuji at linux-ipv6.org>
++	[NET]: Fix some userland header bustage.
++
++<davem at nuts.davemloft.net>
++	[IPV6]: Export necessary xfrm6_tunnel functions.
++
++<rmk at flint.arm.linux.org.uk>
++	[PCMCIA] 02-validatemem
++	
++	Move validate_mem() so we don't recurse.  We call this function from
++	the DS_GET_FIRST_TUPLE and DS_VALIDATE_CIS calls, which are the the
++	first two functions which may be called by cardmgr or cardctl which
++	require CIS access.
++
++<rmk at flint.arm.linux.org.uk>
++	[PCMCIA] 03-memwin
++	
++	Eliminate win->base and win->size elements from window_t.
++	window_t contains struct pccard_mem_map, which contains a
++	copy of these (sys_start, sys_stop) in a slightly different
++	form.
++
++<manfred at colorfullife.com>
++	[PATCH] natsemi updates
++	
++	- support for external phys, both fibre and twisted pair, added:
++	      * remove the "phy" parameter from mdio_{read,write}: the
++	        function accesses the current phy.
++	      * new functions to access external phys: miiport_{read,write}
++	      * scan for external phys on _probe.
++	      * ethtool support for switching between internal
++	        and external phys.
++	      * introduce an init_phy_fixup helper: a few settings must be
++	        reapplied after reenabling the internal phy.
++	- move register_netdev to the end of _probe. The current position
++	could cause races with hotplug.
++	- do not wait for autonegotiation completed after initialization.
++	- use pci_name() instead of dev->name until register_netdev has
++	initialized dev->name.
++	- read the BMSR register in the link beat interrupt twice:
++	The link status field is latched, without reading twice a link up
++	event will be missed (and only noticed a few seconds later in the
++	media timer)
++	- restart the autonegotiation after modifying the capabilities. 
++
++<achirica at telefonica.net>
++	[wireless airo] Clean initialization of Mini-PCI cards even from suspend
++
++<herbert at gondor.apana.org.au>
++	[PATCH] Re: linux-2.6.7 Equalizer Load-balancer.  eql.c. local non-privileged DoS
++	
++	Vitaly V. Bursov <vitalyvb at ukr.net> wrote:
++	>
++	> there are multiple vulns in drivers/net/eql.c
++	>
++	> if there is no such device, dev_get_by_name returns NULL and everything dies.
++	> Exploiting this is trivial.
++	
++	Thanks for the report.  This patch should fix them.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	
++	Cheers,
++	--
++	Visit Openswan at http://www.openswan.org/
++	Email:  Herbert Xu ~{PmV>HI~} <herbert at gondor.apana.org.au>
++	Home Page: http://gondor.apana.org.au/~herbert/
++	PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
++	--
++	===== drivers/net/eql.c 1.13 vs edited =====
++
++<akpm at osdl.org>
++	[PATCH] H8/300: smc9194 driver
++	
++	From: Yoshinori Sato <ysato at users.sourceforge.jp>
++	
++	- H8/300 target support
++	- fixed irq support
++	- high address (>0xffff) i/o fix
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++
++<shemminger at osdl.org>
++	[PATCH] convert sk fddi driver to ANSI C
++	
++	Sparse does not handle K&R at all, and I think I saw Linus saying that
++	he has no intention of adding it to sparse while ago. So here is a blob
++	of patch to convert drivers/net/skfp/* from K&R to ANSI-C. Compile
++	tested with "make allmodconfig" on x86, as I obviously don't have the
++	HW.
++	
++	Mika
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++
++<jeb.j.cramer at intel.com>
++	[PATCH] e1000 management reset fix
++	
++	* Resetting the adapter blew away management settings.  So we save the
++	important bits before performing a reset.
++
++<fenlason at redhat.com>
++	[PATCH] sunhme patch
++	
++	Without this patch, insmod-ing the sunhme module crashes on my fc2
++	box.
++	
++			-- JF
++
++<davem at redhat.com>
++	[PATCH] hamachi DMA
++	
++	Let's get this thing not using bus_to_virt() anymore,
++	as follows.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++	
++	===== drivers/net/hamachi.c 1.35 vs edited =====
++
++<brazilnut at us.ibm.com>
++	[PATCH] pcnet32: discard oversize rx packets
++	
++	This patch will discard received frames that are larger than one buffer.
++	This has been tested on ia32 and ppc64 systems.
++	
++	Please also apply to 2.4.7 (with offset of -3), tested ia32.
++	
++	Signed-off by: brazilnut at us.ibm.com
++
++<brazilnut at us.ibm.com>
++	[PATCH] pcnet32: recover after rx hang.
++	
++	This patch fixes a receive hang that occasionally occurs after a Tx
++	FIFO underrun.  The receive dma remains in a hung state sometimes.  The
++	transmit operations continue to occur, but no receive activity.
++	
++	This was reproduced on several ppc64 systems and the fix has been verified
++	there.  The patch has been tested as well on an ia32 system, which did
++	not experience the hang because it did not have fifo underruns, which is
++	a preqrequisite for the hang.  The memory barriers decreased the frequency
++	of occurrence.  The final change to reset the chip instead of just stopping
++	it eliminated the last hangs.
++	
++	Please also apply against 2.4.7 (with offset of -1), tested ia32.
++	
++	Signed-off by: brazilnut at us.ibm.com
++
++<brazilnut at us.ibm.com>
++	[PATCH] pcnet32: cleanup IRQ limitation.
++	
++	Cleanup pcnet32 IRQ handling based on suggestions from Ralf Baechle
++	<ralf at linux-mips.org>, and Brian Murphy <brian at murphy.dk>
++	
++	Tested by myself and Brian Murphy.
++	
++	Please also apply to 2.4.27-pre6.
++	
++	Signed-off-by: Don Fry <brazilnut at us.ibm.com>
++
++<ryan at michonline.com>
++	[PATCH] orinoco.c rate limit lost information frame message
++	
++	Rate limit a (apparently) harmless warning in orinoco.c
++	
++	(My laptop remained connected with active X applications running over
++	ssh while this message was hitting every second, since I patched my
++	driver to include this the problem hasn't recurred.)
++	
++	Signed-Off-By: Ryan Anderson <ryan at michonline.com>
++
++<akpm at osdl.org>
++	[PATCH] sis900-fix-phy-transceiver-detection.patch
++	
++	From: Daniele Venzano <webvenza at libero.it>
++	
++	Fix PHY transceiver detection code to fall back to known PHY and not to the
++	last detected.
++	
++	The code checks every transceiver detected for link status and type, but fails
++	when ghost transceivers are detected, deciding to use the last one detected.
++	
++	With this patch the driver should choose the correct transceiver even when
++	some ghosts are detected by checking for the type of the tranceiver it is
++	going to use.
++
++<arjanv at redhat.com>
++	[PATCH] sk98lin pci id
++
++<ralf at linux-mips.org>
++	[PATCH] Use netdev_priv in sgiseeq
++	
++	The combined allocation of of receive and transmit rings and driver data
++	so far made the use of netdev_priv impossible.  Split the allocation
++	and use netdev_priv to access the non-ring driver_private data.
++	
++	Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
++
++<ralf at linux-mips.org>
++	[PATCH] Reformat
++	
++	Pure microcosmetic.
++	
++	Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
++
++<ralf at linux-mips.org>
++	[PATCH] Cosmetic cleanups to sb1250-mac.c
++	
++	Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
++
++<ralf at linux-mips.org>
++	[PATCH] hdlcdrv needs to stop queueing
++	
++	We better stop the queue in the close call.
++	
++	Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
++
++<yoshfuji at linux-ipv6.org>
++	[ECONET]: Fix some warnings.
++
++<akpm at osdl.org>
++	[NET]: Fix warning in farsync WAN driver.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<acme at toy.kerneljanitors.org>
++	[NET] generalise tcp_add_data, skb_split and tcp_copy_to_page
++	
++	Signed-off-by: Arnaldo Carvalho de Melo <acme at conectiva.com.br>
++
++<stevef at steveft21.ltcsamba>
++	Do not kill cifsd thread until last smb session on tcp session is
++	SMBulogged off.  Fixes umounting bug (pointed out by Nick Millington)
++	when multiple mounts with different userids are mounted to the same
++	server from the client.  
++	
++	Signed-off-by: Steve French (sfrench at us.ibm.com)
++
++<arjanv at redhat.com>
++	[PATCH] final hosts.h usage removal
++	
++	the patch below finishes off the removal of the obsolete hosts.h usage, and
++	now that the users are gone, it's safe to turn on the warning to
++	prevent accidental future use... Please apply
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<hch at lst.de>
++	[PATCH] switch scsi core and sd to <scsi/*.h> headers
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<marcel at holtmann.org>
++	[Bluetooth] Fix connection creation error handling
++	
++	This patch fixes the problem that ACL connections are removed from
++	the kernel connection hash when a hci_create_connection returns a
++	command status other than 0x00.
++	
++	Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
++
++<marcel at holtmann.org>
++	[Bluetooth] Fix config change for firmware loading
++	
++	The switching between firmware loading and running state is done via
++	different configurations. To get this right the USB toggle and halted
++	bits must be reset to zero after it.
++	
++	Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
++
++<jejb at mulgrave.(none)>
++	ncr53c8xx updates
++	
++	From: Matthew Wilcox <willy at debian.org>
++	
++	- remove all of the PCI chips (8xx series) leaving only 720
++	- pull out stand alone initialisation code (driver becomes a chip only
++	  driver for NCR Q720 and Zalon)
++	- remove most vestiges of PCI support (chip driver should be bus neutral)
++	- tidy up typedefs
++	- remove simulated intfly (may need putting back for 770)
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<jejb at mulgrave.(none)>
++	Make ncr53c8xx respect clustering
++	
++	From: Joel Soete <soete.joel at tiscali.be>
++	
++	This patch makes the ncr driver capable of accepting segments which
++	are larger than the block size.  It has been tested against IOMMU
++	merging on parisc.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<arjanv at redhat.com>
++	[PATCH] fix amd64 boot breakage
++	
++	This fixes a bug that prevent my amd64 box from booting;
++	numa_default_policy was __init however it's called like this in
++	init/main.c:
++	
++	        free_initmem();
++	        unlock_kernel();
++	        system_state = SYSTEM_RUNNING;
++	        numa_default_policy();
++	
++	
++	eg after free_initmem(). This resulted in it being reused/freed and that
++	gives a nasty oops.
++
++<torvalds at ppc970.osdl.org>
++	Follow 2.4.x semantics for in-kernel signal sending.
++
++<hirofumi at mail.parknet.co.jp>
++	[PATCH] FAT: don't use "utf8" charset and NLS_DEFAULT
++	
++	Recently, some distributors have set "utf8" to NLS_DEFAULT, therefore,
++	FAT uses the "iocharset=utf8" as default.  But, since "iocharset=utf8"
++	doesn't provide the function (lower <-> upper conversion) which FAT
++	needs, so FAT can't provide suitable behavior.
++	
++	This patch does:
++	
++	     - doesn't recognize "utf8" as "iocharset"
++	     - doesn't use NLS_DEFAULT as default "iocharset"
++	     - instead of NLS_DEFAULT, adds FAT_DEFAULT_CODEPAGE and
++	       FAT_DEFAULT_IOCHARSET
++	   
++	NOTE: the following looks like buggy, so it's not recommended
++	
++	    "codepage=437,iocharset=iso8859-1,utf8"
++	
++	however, some utf8 file name can handle. (in this case, it uses the
++	table of iso8859-1 for lower <-> upper conversion)
++	
++	
++	Sign-off-by: Jesse Barnes <jbarnes at engr.sgi.com>
++	Sign-off-by: OGAWA Hirofumi <hirofumi at mail.parknet.co.jp>
++	Sign-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] m68k: IFPSP060 update
++	
++	IFPSP060: Make sure that the destination address of a misaligned cas access is
++	properly mapped in, so the kernel won't oops in the emulation handler (from
++	Roman Zippel).
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] m68k: handle new gcc's
++	
++	M68k: Fixes for when compiling with modern gcc (from Roman Zippel):
++	  - Avoid warning 'use of memory input without lvalue in asm operand 0 is
++	    deprecated' of newer gcc
++	  - Replace some '%/' with offical '%%' to escape a '%'
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] m68k: new gcc optimizations
++	
++	M68k compiler updates from Roman Zippel:
++	  - Fix various lvalue warnings from newer gcc
++	  - Remove unnecessary volatile declarations
++	  - Change some constraints from "a" to "m" to generate slightly better code
++	  - Use "o" constraint for bitfield instructions
++	  - Use generic bitmap functions for some of the ext2/minix bitmap functions
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] m68k: bus error handling
++	
++	M68k: Allow to catch a bus error via the exception mechanism (from Roman
++	Zippel)
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] m68k: use set_page_count()
++	
++	M68k: From 2.6.7-rc1 on, it's no longer allowed to access page->count directly
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] affs remount fixes
++	
++	AFFS: Fix oops on write after remount (from Roman Zippel):
++	  - Allocate/free bitmap as necessary
++	  - Remove last uses of SF_READONLY
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] m68k: Mac Sonic Ethernet
++	
++	Mac Sonic Ethernet: Kill duplicate `MODULE_LICENSE("GPL");' (already defined in
++	included sonic.c) which causes a compile failure
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] m68k: sparse infrastructure
++	
++	M68k: Make sparse work
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] m68k: Mac IOP fix
++	
++	Mac IOP: Fix copy-and-paste bug (found by OPERA, reported by Zhenmin Li,
++	confirmed by Brad Boyer)
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] m68k: atomic op fixups
++	
++	M68k: Add missing atomic operations (from Roman Zippel and me) and replace
++	`__inline__' by `inline' while we're at it.
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] m68k: I/O abstraction updates
++	
++	M68k I/O abstraction updates:
++	  - Make I/O ports and addresses `unsigned long'
++	  - Add casts to make operations warning-compatible with other archs
++	  - Add {in,out}[wl]_p() and {in,out}l(), which are needed for some drivers
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Check _TIF_SYSCALL_SUCCESS before syscall return value.
++	
++	We might have to clear the flag, and if we do not
++	then subsequent syscalls can get confused.
++	
++	Bug easily triggered by suspending emacs in a pty
++	and then resuming, select() returns due to a pending
++	signal but because _TIF_SYSCALL_SUCCESS is erroneously
++	set by a previous syscall -514 ends up slipping into
++	userspace.  Oops.
++
++<rmk at flint.arm.linux.org.uk>
++	[PCMCIA] 04-memres
++	
++	Make find_mem_region() return a struct resource.  We preserve
++	pccard_mem_map's sys_start and sys_stop elements for the moment
++	since socket drivers are relying on this information for setting
++	up their windows.
++
++<rmk at flint.arm.linux.org.uk>
++	[PCMCIA] 05-nonbusy
++	
++	When allocating memory and IO resources, do not mark them busy.
++	This allows drivers themselves to claim and mark the regions busy,
++	as they are supposed to.
++
++<hadi at zynx.com>
++	[NET]: Fix module refcounting of TC actions.
++
++<acme at conectiva.com.br>
++	[NET] move skb_can_coalesce to skbuff.h
++	
++	This one also removes the duplicate can_coalesce in tcp.c and makes it
++	use skb_can_coalesce.
++	
++	Signed-off-by: Arnaldo Carvalho de Melo <acme at conectiva.com.br>
++
++<acme at conectiva.com.br>
++	[NET] move tcp_memory_free to sk_stream_memory_free
++	
++	Signed-off-by: Arnaldo Carvalho de Melo <acme at conectiva.com.br>
++
++<akepner at sgi.com>
++	[NET]: Lockless loopback patch (version 2).
++
++<akpm at osdl.org>
++	[SPARC64]: bug.h needs compiler.h
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<akpm at osdl.org>
++	[PATCH] ppc64 CONFIG_ALTIVEC=n build fix
++	
++	With CONFIG_ALTIVEC=n, flush_altivec_to_thread() has no implementation.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] ppc64: eeh.h warning-fix
++	
++	In file included from include/asm/io.h:365,
++	                 from drivers/video/kyro/STG4000Reg.h:23,
++	                 from drivers/video/kyro/STG4000Ramdac.c:16:
++	include/asm/eeh.h:58: warning: `struct device_node' declared inside parameter list
++	include/asm/eeh.h:58: warning: its scope is only this definition or declaration, which is probably not what you want
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pazke at donpac.ru>
++	[PATCH] export DMI check functions
++	
++	This patch creates and exports 2 functions which can be used by the rest of
++	kernel code to perform DMI data checks:
++	
++	- dmi_check_system() function checks system DMI data against given blacklist
++	  table and on each match runs corresponding callback function;
++	
++	- dmi_get_system_info() function returns DMI data value.  Useful for people
++	  wanting more complex DMI data check than simple string match.
++	
++	Also filling unused match entries with NO_MATCH made optional, but existing
++	NO_MATCH occurences are left intact, so people are free to continue dmi_scan.c
++	patching without massive reject problems.
++	
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pazke at donpac.ru>
++	[PATCH] use new DMI API for HP Pavilion
++	
++	Example code for the new DMI APU - port HP Pavilion irq workaround to new
++	DMI probing.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<daniel.ritz at gmx.ch>
++	[PATCH] pcmcia: enable read prefetch on o2micro bridges to fix HDSP
++	
++	enable read prefetching on O2micro bridges. It fixes the problems
++	seen with the RME Hammerfall DSP.
++	Thanks to Eric Still from O2micro for the input.
++	
++	Cc: Russell King <rmk at arm.linux.org.uk>
++	Signed-off-by: Daniel Ritz <daniel.ritz at gmx.ch>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<dhowells at redhat.com>
++	[PATCH] Permit inode & dentry hash tables to be allocated > MAX_ORDER size
++	
++	Here's a patch to allocate memory for big system hash tables with the
++	bootmem allocator rather than with main page allocator.
++	
++	It is needed for three reasons:
++	
++	(1) So that the size can be bigger than MAX_ORDER.  IBM have done some
++	    testing on their big PPC64 systems (64GB of RAM) with linux-2.4 and found
++	    that they get better performance if the sizes of the inode cache hash,
++	    dentry cache hash, buffer head hash and page cache hash are increased
++	    beyond MAX_ORDER (order 11).
++	
++	     Now the main allocator can't allocate anything larger than MAX_ORDER, but
++	     the bootmem allocator can.
++	
++	     In 2.6 it appears that only the inode and dentry hashes remain of those
++	     four, but there are other hash tables that could use this service.
++	
++	(2) Changing MAX_ORDER appears to have a number of effects beyond just
++	    limiting the maximum size that can be allocated in one go.
++	
++	(3) Should someone want a hash table in which each bucket isn't a power of
++	    two in size, memory will be wasted as the chunk of memory allocated will
++	    be a power of two in size (to hold a power of two number of buckets).
++	
++	    On the other hand, using the bootmem allocator means the allocation
++	    will only take up sufficient pages to hold it, rather than the next power
++	    of two up.
++	
++	    Admittedly, this point doesn't apply to the dentry and inode hashes,
++	    but it might to another hash table that might want to use this service.
++	
++	
++	I've coelesced the meat of the inode and dentry allocation routines into
++	one such routine in mm/page_alloc.c that the the respective initialisation
++	functions now call before mem_init() is called.
++	
++	This routine gets it's approximation of memory size by counting up the
++	ZONE_NORMAL and ZONE_DMA pages (and ZONE_HIGHMEM if requested) in all the
++	nodes passed to the main allocator by paging_init() (or wherever the arch
++	does it).  It does not use max_low_pfn as that doesn't seem to be available
++	on all archs, and it doesn't use num_physpages since that includes highmem
++	pages not available to the kernel for allocating data structures upon -
++	which may not be appropriate when calculating hash table size.
++	
++	On the off chance that the size of each hash bucket may not be exactly a
++	power of two, the routine will only allocate as many pages as is necessary
++	to ensure that the number of buckets is exactly a power of two, rather than
++	allocating the smallest power-of-two sized chunk of memory that will hold
++	the same array of buckets.
++	
++	The maximum size of any single hash table is given by
++	MAX_SYS_HASH_TABLE_ORDER, as is now defined in linux/mmzone.h.
++	
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: David Howells <dhowells at redhat.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<cesarb at nitnet.com.br>
++	[PATCH] O_NOATIME support
++	
++	This patch adds support for the O_NOATIME open flag (GNU extension):
++	
++	int O_NOATIME  	Macro
++	  If this bit is set, read will not update the access time of the file.
++	  See File Times. This is used by programs that do backups, so that
++	  backing a file up does not count as reading it. Only the owner of the
++	  file or the superuser may use this bit.
++	
++	It is useful if you want to do something with the file atime (for instance,
++	moving files that have not been accessed in a while to somewhere else, or
++	something like Debian's popularity-contest) but you also want to read all
++	files periodically (for instance, tripwire or debsums).
++	
++	Currently, the program that reads all files periodically has to use utimes,
++	which can race with the atime update:
++	
++	    A               B
++	  open
++	  fstat
++	  read
++	                  open
++	                  read
++	                  close
++	  close
++	  utimes
++	
++	And the file still has the old atime, instead of the new one from when B
++	did the read from it.  This problem does not happen if A uses O_NOATIME
++	instead of utimes to preserve the atime.
++	
++	This patch adds the O_NOATIME constant for all architectures, but it would
++	also be possible to add it one architecture at a time by defining it to 0
++	when not defined in asm-*.
++	
++	Based on patch by Marek Michalkiewicz <marekm at i17linuxb.ists.pwr.wroc.pl> at
++	http://www.uwsg.iu.edu/hypermail/linux/kernel/9811.2/0118.html
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulkf at microgate.com>
++	[PATCH] ppp_synctty.c receive/write_wakeup fix
++	
++	Allow receive and write_wakeup callbacks to be called at hard interrupt
++	context and/or with interrupts disabled (removes softirq warning).
++	
++	This mirrors changes by Paul Mackerras to ppp_async.c for the same purpose.
++	Patch has been previously posted for comments and has been tested with
++	success by multiple persons.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] airo.c broke
++	
++	But Al fixed it again.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<shaggy at austin.ibm.com>
++	[PATCH] jfs build fix
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] swapoff: activate pages
++	
++	People like to use swapoff/swapon as a way of restoring their VM to a
++	predictable "preconditional" state.
++	
++	Problem is, swapoff leaves mapped anon/pagecache pages on the inactive list,
++	so they immediately get swapped out again when swapspace becomes available.
++	
++	Let's move these pages onto the active list to the VM has to again decide
++	whether to swap them out.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mark at alpha.dyndns.org>
++	[PATCH] Add ovcamchip driver
++	
++	This patch adds a new driver for the OmniVision OV6xx0 and OV7xx0 series of
++	CMOS image sensors.  It is currently used by the w9968cf USB webcam driver,
++	which is already in mainline 2.6.  Up until now it had to be compiled
++	outside the kernel tree, which is clearly suboptimal.
++	
++	It is also used by version 2 of the ov511 USB webcam driver, which will be
++	merged in the near future.  That will reduce some code duplication, since
++	the existing ov511 has much of this code built-in.
++	
++	This was previously submitted to Linux-USB-Devel, and I have fixed the
++	concerns that came up at that time.
++	
++	Developer's Certificate of Origin 1.0
++	
++	By making a contribution to this project, I certify that:
++	
++	(a) The contribution was created in whole or in part by me and I
++	        have the right to submit it under the open source license
++	        indicated in the file; or
++	
++	(b) The contribution is based upon previous work that, to the best
++	        of my knowledge, is covered under an appropriate open source
++	        license and I have the right under that license to submit that
++	        work with modifications, whether created in whole or in part
++	        by me, under the same open source license (unless I am
++	        by me, under the same open source license (unless I am
++	        permitted to submit under a different license), as indicated
++	        in the file; or
++	
++	(c) The contribution was provided directly to me by some other
++	        person who certified (a), (b) or (c) and I have not modified
++	        it.
++	
++	Signed-off-by: Mark McClelland <mark at alpha.dyndns.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mika at osdl.org>
++	[PATCH] Uninline machine_specific_memory_setup()
++	
++	Cleanup arch/i386/kernel/setup.c a little bit by:
++	
++	* un-inlining machine_specific_memory_setup() (it's implementations are
++	  pretty big to be inlined anyway)
++	
++	* remove setup_memory_region() by moving the code inside setup_arch()
++	
++	I would also recommend BK-renaming all four files
++	(include/asm-i386/*/setup_arch_post.h) to ".c" and moving them into
++	arch/i386/*/, but that obviously is not needed in anyway.  But IMHO they
++	are clearly ".c" files, not ".h" files.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<dcn at sgi.com>
++	[PATCH] add wait_event_interruptible_exclusive() macro
++	
++	This patch defines a macro that does exactly what
++	wait_event_interruptible() does except that it adds the current task to the
++	wait queue as an exclusive task (i.e., sets the WQ_FLAG_EXCLUSIVE flag)
++	rather than as a non-exclusive task as wait_event_interruptible() does.
++	
++	This allows one to do a wake_up_nr() to wake up a specific number of tasks.
++	 I'm in the process of submitting a patch to linux-ia64 that requires this
++	capability.  (Its subject line is "[PATCH 3/4] SGI Altix cross partition
++	functionality".)
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<axboe at suse.de>
++	[PATCH] iommu max segment size
++	
++	This patch is from James, I've changed it slightly only.
++	
++	The problem is that some IOMMU implementations have a maximum limit to the
++	size of the number of contiguously mappable pages (admittedly, this limit
++	is mostly in the resource management algorithms rather than the IOMMUs
++	themselves).
++	
++	This patch adds this concept to the bio layer via the parameter
++	
++	BIO_VMERGE_MAX_SIZE
++	
++	which architectures can define in asm/io.h (if undefined, we assume it to
++	be infinite, which is current behaviour).
++	
++	While adding this, I noticed several places where bio was making incorrect
++	assumptions about virtual mergeability (none of which was a bug: bio was
++	overestimating rather than underestimating).
++	
++	- The worst offender was bio_add_page(), which seemed never to check for
++	  virtual mergeability
++	
++	- I also fixed blk_hw_contig_segments() not to check the QUEUE_CLUSTER
++	  flag, and not to check the phys segment boundary.
++	
++	In order to track the hw segment size across bios, I had to introduce two
++	extra bio parameters: bi_hw_front_size and bi_hw_back_size which store the
++	sizes of the front and back hw contiguous segments (and which will be equal
++	if there's only one hw segment).  When the bio is merged into a request,
++	these fields are updated with the total hw contig size so they can always
++	be used to assess if the merger would violate the BIO_VMERGE_MAX_SIZE
++	parameter.
++	
++	Signed-Off-By: Jens Axboe <axboe at suse.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kraxel at bytesex.org>
++	[PATCH] v4l: v4l2 API updates
++	
++	This patch has some minor updates to v4l2 API:
++	
++	* A new pixel format (V4L2_PIX_FMT_SBGGR8).
++	
++	* Adds some #defines for tv norms for convenience.
++	
++	* Allow to specify the video source to capture from on a per-frame basis.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kraxel at bytesex.org>
++	[PATCH] v4l: update video-buf for per-frame input switching.
++	
++	This patch updates the video-buf module to support the per-frame input
++	switching added by the v4l2 API patch.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kraxel at bytesex.org>
++	[PATCH] v4l: video-buf magic numbers
++	
++	This patch adds some magic IDs and checks for them to the data structs of the
++	video-buf module.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kraxel at bytesex.org>
++	[PATCH] v4l: video-buf fixes.
++	
++	This patch has some minor bugfixes for the video-buf module.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kraxel at bytesex.org>
++	[PATCH] v4l: msp3400 cleanup.
++	
++	This patch has some cleanups for the msp3400 module: Balance is used directly
++	now instead of maintaining the state as left/right volume and calculate the
++	balance from that.  The msp3400 did that only for historical reasons and it
++	isn't needed any more ...
++	
++	Credits for that go to Perry Gilfillan.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kraxel at bytesex.org>
++	[PATCH] v4l: ir-common update
++	
++	Some minor changes for the ir-common module: Update for the RC5 keytable and
++	increase the IR_KEYTAB_SIZE #define.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kraxel at bytesex.org>
++	[PATCH] v4l: tuner + tda9887 updates
++	
++	This is a big update for the tuner and tda9887 modules which are used for TV
++	card tuning.
++	
++	The tda9887 module is basically completely rewritten and understands all the
++	config bits now instead of having just some fixed config presets.  Some of
++	these config bits can be changed by insmod options now.
++	
++	The other big change is that both modules allow to use the V4L2 API for
++	inter-module communication (i.e.  when bttv/saa7134/...  pass through the
++	tuning ioctls to the modules).  That allows to specify the TV norm more
++	precisely (not just PAL but PAL-I, PAL-BG, ...), which is needed in some cases
++	to make TV audio work correctly.  Using the old v4l1 API is still possible so
++	this shouldn't break any users of these two modules.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kraxel at bytesex.org>
++	[PATCH] v4l: bttv driver update
++	
++	This is a update of the bttv driver.  Changes:
++	
++	* some card-specific fixes + new cards.
++	
++	* separate buffer switching for video frames and vbi data, that should make
++	  bttv less sensitive to high irq latencies.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kraxel at bytesex.org>
++	[PATCH] v4l: IR input driver update.
++	
++	This patch updates the ir-kbd-gpio and ir-kbd-i2c drivers.  Nothing major,
++	just some keytable fixes and support for more hardware.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kraxel at bytesex.org>
++	[PATCH] saa7134 driver update
++	
++	This is an update for the saa7134 driver.  Changes:
++	
++	
++	* add support for more TV cards, as usual ;)
++	
++	* add support for image cropping.
++	
++	* use v4l2 API to talk to the tuner chips (thus it depends on the
++	  tuner/tda9887 patch).
++	
++	* fixes for the audio carrier scan.
++	
++	* make transport stream packet size configurable.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kraxel at bytesex.org>
++	[PATCH] v4l: cx88 driver update
++	
++	This is a update for the cx88 tv card driver.  Changes:
++	
++	* finally make it build with gcc 2.95 ;)
++	
++	* add new tv cards.
++	
++	* plenty of fixes for the TV sound code.
++	
++	* use v4l2 API for communication with tuner + tda9887
++	
++	* misc other minor stuff.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kraxel at bytesex.org>
++	[PATCH] v4l: radio-zoltrix fix.
++	
++	From: Paul Focke <paul.focke at pandora.be>
++	
++	I recently upgraded from 2.4 to kernel 2.6 & noticed that the zoltrix radio
++	driver was not working.  Seems like a little typo.  I tested this on my system
++	and it's working fine now.  I doubt there are any other linux users in the
++	world who still use this card ;-)
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<hch at lst.de>
++	[PATCH] fix isdn to not assume mem*io return values
++	
++	These are defined like the normal ISO C mem* routines although x86 happens
++	to return void by accident.  Fix isdn to not assume a return value.
++	
++	Sent to the isdn list, but as usual I didn't get any reply.
++	
++	The patch is from the Debian kernel package and really old.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<jbarnes at engr.sgi.com>
++	[PATCH] export sys_ioctl to modules
++	
++	Small patch to export sys_ioctl if CONFIG_COMPAT is set.  This allows
++	platforms to implement 32 bit compatibility ioctl handlers in modules.
++	
++	Submitted-by: Jesse Barnes <jbarnes at sgi.com>
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<hugh at veritas.com>
++	[PATCH] mprotect propagate anon_vma
++	
++	When mprotect shifts the boundary between vmas (merging the reprotected
++	area into the vma before or the vma after), make sure that the expanding
++	vma has anon_vma if the shrinking vma had, to cover anon pages imported.
++	Thanks to Andrea for alerting us to this oversight.
++	
++	Cc: <andrea at suse.de>
++	Signed-off-by: Hugh Dickins <hugh at veritas.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<fabian.frederick at skynet.be>
++	[PATCH] sparse annotation for sys_quotactl()
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mason at suse.com>
++	[PATCH] fix possible stack corruption during reiserfs_file_write
++	
++	With preallocation turned on, reiserfs_allocate_blocks_for_region wasn't
++	sending a large enough array to hold all the blocks it was asking the block
++	allocator to find.  This can result in stack corruption.
++	
++	The fix is to kmalloc an array to hold the blocks, making sure to allocate
++	something large enough.
++	
++	There was also a recent optimization to force the allocator to find a free
++	region large enough to hold the entire preallocation size.  This was
++	sometimes causing more blocks to be allocated then had been requested,
++	which would also overflow the array.  Something more elegant is required
++	here, until then just disable the optimization.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<ak at suse.de>
++	[PATCH] NUMA API updates
++	
++	This patch three issues in NUMA API
++	
++	- When 1 was passed to set_mempolicy or mbind as maxnodes argument
++	  get_nodes could corrupt the stack and cause a crash.  Fix that.
++	
++	- Remove the restriction to do interleaving only for order 0.  Together
++	  with the patch that went in previously to use interleaving policy at boot
++	  time this should give back the original behaviour of distributing the big
++	  hash tables.
++	
++	- Fix some bad white space in comments
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<juhl-lkml at dif.dk>
++	[PATCH] isp16 check_region() removal
++	
++	Convert check_region to request_region and clean up some parentheses in
++	return statements for drivers/cdrom/isp16.c.
++	
++	Signed-off-by: Jesper Juhl <juhl-lkml at dif.dk>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<axboe at suse.de>
++	[PATCH] deadline I/O scheduler documentation
++	
++	Document the deadline scheduler and its tunables.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<acme at conectiva.com.br>
++	[NET] generalise wait_for_tcp_connect
++	
++	This will be used by the poor cousins, look, for instance, at
++	x25_wait_for_connection_establishment :-)
++	
++	Signed-off-by: Arnaldo Carvalho de Melo <acme at conectiva.com.br>
++
++<acme at conectiva.com.br>
++	[NET] introduce sk_stream_wait_close, from tcp code
++	
++	Will be used by the poor cousins.
++	
++	Signed-off-by: Arnaldo Carvalho de Melo <acme at conectiva.com.br>
++
++<acme at conectiva.com.br>
++	[NET] generalise wait_for_tcp_memory
++	
++	Renaming it to sk_stream_wait_memory
++	
++	Signed-off-by: Arnaldo Carvalho de Melo <acme at conectiva.com.br>
++
++<akpm at osdl.org>
++	[PATCH] move as documentation
++	
++	Move the anticipatory scheduler documentation into Documentation/block.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<emoenke at gwdg.de>
++	[PATCH] CREDITS update
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bjoern at j3e.de>
++	[PATCH] NLS support for ASCII
++	
++	I created an ASCII NSL module manually based on the ISO-8859-1 NLS module.
++	
++	This might be of use for people who do not want any charset conversion to
++	take place.  fs modules like vfat for example then could be forced to
++	display any non-ASCII character in the uni_xlate escaped form.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<ralf at linux-mips.org>
++	[PATCH] mips: remove old junk
++	
++	Remove old, unused initialization stuff.
++	
++	Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<ralf at linux-mips.org>
++	[PATCH] DS1286 cleanups
++	
++	Remove #ifdef'ed hooks for the DS1286 driver through the kernel.  While
++	cleaning make it work as a module also and add back the core of the driver
++	got lost when drivers/sgi/ was shredded.
++	
++	Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<ralf at linux-mips.org>
++	[PATCH] Cobalt LCD Driver update
++	
++	Mostly reformatting to get the sometimes random formatting style of the LCD
++	driver to something Linux compliant.  Use module_init/exit for module
++	initialization and cleanup.
++	
++	Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<ralf at linux-mips.org>
++	[PATCH] Add M48T35 RTC driver
++	
++	Add M48T35 RTC driver for the SGI IP27 aka Origin 200, Origin 2000 and
++	Onyx 2.
++	
++	Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] jfs warning fix
++	
++	On ppc64, s64 is `long'.
++	
++	In file included from fs/jfs/jfs_xtree.h:25,
++	                 from fs/jfs/jfs_incore.h:26,
++	                 from fs/jfs/super.c:29:
++	fs/jfs/jfs_btree.h: In function `BT_STACK_DUMP':
++	fs/jfs/jfs_btree.h:151: warning: long long unsigned int format, s64 arg (arg 2)
++	
++	Cc: Dave Kleikamp <shaggy at austin.ibm.com>
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<nickpiggin at yahoo.com.au>
++	[PATCH] lindent rwsem
++	
++	Lindent rwsem.c and rwsem-spinlock.c and fix a few things by hand.  Also
++	added a couple of comments for the memory barriers.  Added the __sched
++	annotation that was left out of rwsem-spinlock.c.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<juhl-lkml at dif.dk>
++	[PATCH] Fix warning in tdfxfb.c
++	
++	drivers/video/tdfxfb.c:1104: warning: initialization discards qualifiers from pointer target type
++	
++	Signed-off-by: Jesper Juhl <juhl-lkml at dif.dk>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] Fix idr.h comment
++	
++	Fix path in <linux/idr.h> header file.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<sam at ravnborg.org>
++	[PATCH] wanxl firware build fix
++	
++	allmodconfig and allyesconfig are currently failing because they select
++	wanxl firmware rebuild, and that requires an m68k assembler toolchain.
++	
++	Add a new generic option to the "Generic Driver Options" menu.  The option
++	is defaul equals y and prevents us from building firmware unless really
++	needed.
++	
++	Firmware is usually provided in separate filer '_shipped', and there is no
++	need to rebuild them unless strictly required.  First user is WanXL - which
++	otherwise required a m68k tool-set to compile.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<sam at ravnborg.org>
++	[PATCH] Avoid rebuild of IKCFG when using O=
++	
++	When using a separate output directory the in-kernel config wiere rebuild
++	each time the kernel was compiled.  Fix this by specifying correct path to
++	Makefile in the prerequisite to the ikconfig.h file.
++	
++	Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<sam at ravnborg.org>
++	[PATCH] kbuild: add deb-pkg target
++	
++	To prepare kbuild for more kernel packaging formats move all packaging support
++	to scripts/package.
++	
++	In top-level Makefile introduce generic support for all package formats using
++	target names *-pkg.  Included the old rpm target for backward compatibility.
++	
++	A new variable KBUILD_IMAGE is used to specify what kernel image will be part
++	of the final package, and is to be set by the arch specific makefile.
++	KBUILD_IMAGE may be overridden from command line or environment.  KBUILD_IMAGE
++	will see wider usage later, mainly when installing kernel images.
++	
++	Introducing KBUILD_IMAGE allowed arch specific details to be deleted from the
++	mkspec and builddeb scripts.
++	
++	While in the process added the deb packet format.  Script is From: Wichert
++	Akkerman <wichert at wiggy.net>
++	
++	To create a RPM packet use 'make rpm-pkg'.
++	To create a deb packet use 'make deb-pkg'.
++	Both targets are included in 'make help'
++	
++	Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<axboe at suse.de>
++	[PATCH] only clear ->last_merge when appropriate
++	
++	Make sure we only clear q->last_merge hint, if it matches the request
++	currently passed in.
++	
++	Signed-off-by: Jens Axboe <axboe at suse.de>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rmk at flint.arm.linux.org.uk>
++	[PCMCIA] 06-ide
++	
++	IDE releases the PCMCIA resource to work around the need to have
++	two conflicting subsystems (IDE and PCMCIA) claim resources.
++	Since PCMCIA no longer marks its resouces busy, this work around
++	must be removed.
++
++<aia21 at cantab.net>
++	NTFS: Use atomic kmap instead of kmap() in fs/ntfs/aops.c::ntfs_read{page,_block}().
++	
++	Signed-off-by: Anton Altaparmakov <aia21 at cantab.net>
++
++<aia21 at cantab.net>
++	NTFS: Use case sensitive attribute lookups instead of case insensitive ones.
++	
++	Signed-off-by: Anton Altaparmakov <aia21 at cantab.net>
++
++<aia21 at cantab.net>
++	NTFS: Lock all page cache pages belonging to mst protected attributes while
++	      accessing them to ensure we never see corrupt data while the page is
++	      under writeout.
++	
++	Signed-off-by: Anton Altaparmakov <aia21 at cantab.net>
++
++<aia21 at cantab.net>
++	NTFS: Add framework for generic ntfs collation (fs/ntfs/collation.[hc]).
++	      We have ntfs_is_collation_rule_supported() to check if the collation
++	      rule you want to use is supported and ntfs_collation() which actually
++	      collates two data items.  We currently only support COLLATION_BINARY
++	      and COLLATION_NTOFS_ULONG but support for other collation rules will
++	      be added as the need arises.
++	
++	Signed-off-by: Anton Altaparmakov <aia21 at cantab.net>
++
++<aia21 at cantab.net>
++	NTFS: Add a new type, ntfs_index_context, to allow retrieval of an index
++	      entry using the corresponding index key.  To get an index context,
++	      use ntfs_index_ctx_get() and to release it, use ntfs_index_ctx_put().
++	      This also adds a new slab cache for the index contexts.  To lookup a
++	      key in an index inode, use ntfs_index_lookup().  After modifying an
++	      index entry, call ntfs_index_entry_flush_dcache_page() followed by
++	      ntfs_index_entry_mark_dirty() to ensure the changes are written out
++	      to disk.  For details see fs/ntfs/index.[hc].  Note, at present, if
++	      an index entry is in the index allocation attribute rather than the
++	      index root attribute it will not be written out (you will get a
++	      warning message about discarded changes instead).
++	
++	Signed-off-by: Anton Altaparmakov <aia21 at cantab.net>
++
++<dwmw2 at shinybook.infradead.org>
++	Add support for MPC8560 CPU and WindRiver PowerQUICC III SBC8560
++	
++	Signed-off-by: Kumar Gala <kumar.gala at freescale.com>
++
++<aia21 at cantab.net>
++	NTFS: Load the quota file ($Quota) and check if quota tracking is enabled
++	      and if so, mark the quotas out of date.  This causes windows to
++	      rescan the volume on boot and update all quota entries.
++	
++	Signed-off-by: Anton Altaparmakov <aia21 at cantab.net>
++
++<dwmw2 at shinybook.infradead.org>
++	Update CPM UART driver according to feedback from Dan Malek.
++	Patch from Pantelis Antoniou <panto at intracom.gr>
++
++<hch at lst.de>
++	[PATCH] avoiding obsolete scsi APIs in dc395
++	
++	replace obsolete typedefs and scsi_to_pci_dma_dir, use proper includes
++	and re-order includes correctly.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<acme at conectiva.com.br>
++	[NET] generalise tcp_set_owner_r and tcp_rfree
++	
++	Will be used by the poor cousins
++	
++	Signed-off-by: Arnaldo Carvalho de Melo <acme at conectiva.com.br>
++
++<akm at osdl.org>
++	[NET]: Fix dev_queue_xmit build with older gcc.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<akpm at osdl.org>
++	[NET]: Loopback, allocate per-cpu stats statically and fix cpu refcounting.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<trini at kernel.crashing.org>
++	[PPC32] Add SysRq-G support to our KGDB stub.
++	From David Woodhouse <dwmw2 at infradead.org>.
++
++<jgarzik at pobox.com>
++	Rename 'carmel' block driver to 'sx8'.
++	
++	Requested by Promise.  The hardware isn't widely deployed yet,
++	with almost all users being early evaluators, so this should be OK.
++
++<len.brown at intel.com>
++	[ACPI] fix double timer interrupt mapping (Hans-Frieder Vogt)
++	caused by errant fix for OSDL 2835
++
++<herbert at gondor.apana.org.au>
++	[NET]: In sungem driver, keep track of rx buffer alloc size based upon MTU.
++
++<hch at lst.de>
++	[PATCH] wd7000 updates
++	
++	Avoid old APIs and fix a bad bug were the irq handler argument was
++	derefenced as struct Scsi_Host * instead of Adpater * which made the
++	driver instantly crash on SMP.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<kaber at trash.net>
++	[NETFILTER]: Fix non-existant config option for IP_NF_ASSERT, fix some broken assertions
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: Harald Welte <laforge at netfilter.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<kaber at trash.net>
++	[NETFILTER]: complain about brokeness on SMP for pid, sid and command matching in ipt_owner
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: Harald Welte <laforge at netfilter.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<kaber at trash.net>
++	[NETFILTER]: Change permissions of /proc/net/ip_conntrack to 0440
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: Harald Welte <laforge at netfilter.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<kaber at trash.net>
++	[NETFILTER]: skip internal targets in iptables proc listing
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: Harald Welte <laforge at netfilter.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<hch at lst.de>
++	[PATCH] wd33c93 update
++	
++	avoid obsolete APIs
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<kaber at trash.net>
++	[NETFILTER]: Fix inverted matching in ipt_helper
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: Harald Welte <laforge at netfilter.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<kaber at trash.net>
++	[NETFILTER]: 'any' matching in ipt_helper
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: Harald Welte <laforge at netfilter.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<kaber at trash.net>
++	[NETFILTER]: Don't reroute on nfmark change in mangle table when routing by nfmark is not enabled
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: Harald Welte <laforge at netfilter.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<kaber at trash.net>
++	[NETFILTER]: Fix expectation eviction order
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: Harald Welte <laforge at netfilter.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<kaber at trash.net>
++	[NETFILTER]: Fix offset calculation in amanda conntrack helper
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: Harald Welte <laforge at netfilter.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<kaber at trash.net>
++	[NETFILTER]: Relax hook check in ipt_CLASSIFY
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: Harald Welte <laforge at netfilter.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<kaber at trash.net>
++	[NETFILTER]: Add new function 'nf_reset' to reset netfilter related skb-fields
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: Harald Welte <laforge at netfilter.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<kaber at trash.net>
++	[NETFILTER]: Add addrtype match
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: Harald Welte <laforge at netfilter.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<kaber at trash.net>
++	[NETFILTER]: Add realm match
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: Harald Welte <laforge at netfilter.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<kaber at trash.net>
++	[NETFILTER]: ip_table_raw C99 initialization
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: Harald Welte <laforge at netfilter.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<hch at lst.de>
++	[PATCH] avoid obsolete APIs in sr
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<hch at lst.de>
++	[PATCH] avoid obsolete APIs in fdomain
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<hch at lst.de>
++	[PATCH] avoid obsolete APIs in atp870u
++	
++	 + minor cleanups
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<markh at osdl.org>
++	[PATCH] aacraid 32bit app ioctl compat patch (Updated)
++	
++	Allows 32 bit apps to use ioctls in a 64 bit kernel.
++	
++	Signed-off-by Mark Haverkamp <markh at osdl.org>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<hadi at zynx.com>
++	[PKT_SCHED]: C99'ify act_police_ops.
++
++<greg at kroah.com>
++	merge fixups.
++
++<g.liakhovetski at gmx.de>
++	[PATCH] tmscsim: init / exit cleanup
++	
++	On Sun, 23 May 2004, Christoph Hellwig wrote:
++	> these leaks.  Maybe also  merge dc390_init and dc390_init_one?
++	>
++	> Similarly I think DC390_release should be merged into dc390_remove_one.
++	
++	Attached. Also fixed some __init / __devinit and __exit / __devexit
++	attributes. Although, would be good to have something like
++	
++	#ifdef CONFIG_HOTPLUG_PCI
++	#define __pcidevinit
++	#define __pcidevinitdata
++	#define __pcidevexit
++	#define __pcidevexitdata
++	#else
++	#define __pcidevinit __init
++	#define __pcidevinitdata __initdata
++	#define __pcidevexit __exit
++	#define __pcidevexitdata __exitdata
++	#endif
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<len.brown at intel.com>
++	[ACPI] re-factor previous mpparse IRQ override fix (Linus Torvalds)
++	Reflect that only the dstirq depends on the dstapic.
++
++<g.liakhovetski at gmx.de>
++	[PATCH] tmscsim: host_lock use in LLD
++	
++	While reviewing tmscsim, I noticed something, I didn't quite like /
++	understand. The driver takes the host_lock (with irqsave) at the entry to
++	the ISR, and releases it at the exit. And inside the ISR there are
++	potentially long busy-waits... Like
++	
++	 	int ctr = 6000000; /* only try for about a second */
++	 	while( --ctr && !((dstate = DC390_read8 (DMA_Status)) &
++	 				DMA_XFER_DONE) && pSRB->SGToBeXferLen );
++	
++	The attached patch is attempting to fix those places. Not sure if this is
++	a proper fix though. In my understanding, after looking through the code,
++	the host_lock is used to protect host-specific data and host-registers.
++	The ->queuecommand is already called with it help, so, one just,
++	basically, have to protect other contexts - interrupt, timer,... So, looks
++	mostly right.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<acme at conectiva.com.br>
++	[NET] generalise tcp_error, renaming it to sk_stream_error
++	
++	Signed-off-by: Arnaldo Carvalho de Melo <acme at conectiva.com.br>
++
++<viro at www.linux.org.uk>
++	[PATCH] ibmtr missing include
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: ncpfs/ioctl.c annotation
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: zlib stray extern removal
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: efivars.c initializer fix
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: drivers/net/wan annotation
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: raw1394 annotation
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: sock_fprog sanitized
++	
++	sock_fprog instances that had kernel pointer in ->filter (both of them -
++	in ppp_generic and isdn_ppp) replaced with explicit pairs len + kernel
++	pointer.  Copying of userland sock_fprog (with its __user ->filter)
++	cleaned up and sanitized.
++	
++	Trivial annotation done in the rest of ->ioctl() in ppp_generic and
++	isdn_ppp.
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: quota annotation
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: hd.c annotation
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: the rest of ieee1394 annotation
++
++<acme at conectiva.com.br>
++	[NET] generalise tcp_free_skb, renaming it to sk_stream_free_skb
++	
++	Will be used by the poor cousins
++	
++	Signed-of-by: Arnaldo Carvalho de Melo <acme at conectiva.com.br>
++
++<bunk at fs.tum.de>
++	[PATCH] 2.6.7-mm1: drivers/scsi/hosts.h -> scsi/scsi_host.h
++	
++	On Sun, Jun 20, 2004 at 05:46:32PM -0700, Andrew Morton wrote:
++	>...
++	> All 226 patches:
++	>...
++	> bk-libata.patch
++	>...
++	
++	drivers/scsi/hosts.h is obsolete, use scsi/scsi_host.h.
++	
++	Please apply
++	Adrian
++
++<acme at conectiva.com.br>
++	[NET] generalise tcp_moderate_sndbuf
++	
++	Renaming it to sk_stream_moderate_sndbuf, further patches will move
++	all the tcp memory pressure handling support into net/core/stream.c
++	to make them usable by the poor cousins, starting with LLC.
++	
++	Signed-off-by: Arnaldo Carvalho de Melo <acme at conectiva.com.br>
++
++<jgarzik at pobox.com>
++	[libata] move some code around
++	
++	Split ata_eng_timeout into the main part (ata_qc_timeout)
++	and the part called by the SCSI layer (ata_eng_timeout).
++	
++	Zero behavior changes.
++
++<torvalds at ppc970.osdl.org>
++	Fix up permissions of some files that were not readable
++	by "other". The normal permissions for the kernel tree
++	should be -rw-r--r--.
++
++<jgarzik at pobox.com>
++	[libata] fix build error, minor cleanups
++
++<jgarzik at pobox.com>
++	[libata ata_piix] combined mode bug fix; improved ICH6 support
++
++<acme at conectiva.com.br>
++	[NET] move send_head from tcp private area to struct sock
++	
++	The poor cousins also need this, LLC will be the first to use it.
++	
++	Signed-off-by: Arnaldo Carvalho de Melo <acme at conectiva.com.br>
++
++<aia21 at cantab.net>
++	NTFS: Forgot the set_page_writeback()/end_page_writeback() in the mst
++	      protected writepage case.
++	
++	Signed-off-by: Anton Altaparmakov <aia21 at cantab.net>
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Move cpu_switch_mm() and cpu_get_pgd() to asm/proc-fns.h
++
++<andrew.vasquez at qlogic.com>
++	[PATCH] [1/18]  qla2xxx: Add wmb() to critical paths
++	
++	  Add memory barriers to ensure that all load operations have
++	  completed before the (MMIO) write to the ISP's registers.
++	
++	Signed-off-by: Andrew Vasquez <andrew.vasquez at qlogic.com>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<andrew.vasquez at qlogic.com>
++	[PATCH] [2/18]  qla2xxx: Correct residual counts
++	
++	  Problem reported/corrected by Tony Battersby [tonyb at cybernetics.com]:
++	
++	  o The qla2xxx driver calculates data transfer residuals
++	    for some but not all circumstances.  The patch below
++	    adds data transfer residual calculations for the
++	    remaining cases.
++	
++	  o Interrogate the proper cmnd[] array when determining
++	    the transfer direction.
++	
++	Signed-off-by: Andrew Vasquez <andrew.vasquez at qlogic.com>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<andrew.vasquez at qlogic.com>
++	[PATCH] qla2xxx: remove unnecessary command direction determination
++	
++	On Tuesday, June 22, 2004 12:07 AM, Arjan van de Ven wrote:
++	> On Tue, 2004-06-22 at 07:49, Andrew Vasquez wrote:
++	>
++	> > diff -Nru a/drivers/scsi/qla2xxx/qla_iocb.c
++	> b/drivers/scsi/qla2xxx/qla_iocb.c
++	> > --- a/drivers/scsi/qla2xxx/qla_iocb.c	2004-06-21 15:36:37 -07:00
++	> > +++ b/drivers/scsi/qla2xxx/qla_iocb.c	2004-06-21 15:36:37 -07:00 @@
++	> >  	-43,7 +43,7 @@ else if (cmd->sc_data_direction ==
++	> >  	DMA_FROM_DEVICE)  		cflags = CF_READ; else {
++	> > -		switch (cmd->data_cmnd[0]) {
++	> > +		switch (cmd->cmnd[0]) {
++	> >  		case WRITE_6:
++	> >  		case WRITE_10:
++	> >  		case WRITE_12:
++	>
++	> this sounds wrong.
++	>
++	
++	Yes, it is _wrong_!   This code is baggage left behind from earlier
++	drivers when we were 'asked' to work around certain applications'
++	inability to properly construct commands.
++	
++	> Is there any reason qlogic drivers can't use/trust the midlayer
++	> instead of doing qla2x00_get_cmd_direction() to reverse engineer to
++	> direction ??
++	
++	Sure.  Especially considering an earlier thread:
++	
++		http://marc.theaimsgroup.com/?t=108727983000002&r=1&w=2
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<andrew.vasquez at qlogic.com>
++	[PATCH] [3/18]  qla2xxx: PCI DMA mappings rework
++	
++	  Restructure qla2x00_start_scsi() so that PCI mappings are
++	  done after we've verified command list and request queue
++	  resource availability.
++	
++	Signed-off-by: Andrew Vasquez <andrew.vasquez at qlogic.com>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<andrew.vasquez at qlogic.com>
++	[PATCH] [4/18]  qla2xxx: ISR RISC paused fixes
++	
++	  Problem reported/corrected by Michael Reed [mdr at sgi.com]:
++	
++	  We have a 2312 that puts the 8.00.00b12-k qla2xxx driver
++	  into an infinite loop with a solid interrupt, 0x8008,
++	  hcsr = 0x7430, risc status register 0x40008110,
++	  immediately after enabling parity on the board.
++	
++	  It looks as though the early out test in
++	  qla_isr.c:qla2x00_intr_handler() against stat is broken.
++	  HSR_RISC_PAUSED is set.  Also, there's a stale mailbox
++	  completion flagged (stat&0xff) which will short circuit
++	  the default case in the switch if it got that far.
++	
++	Signed-off-by: Andrew Vasquez <andrew.vasquez at qlogic.com>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<andrew.vasquez at qlogic.com>
++	[PATCH] [5/18]  qla2xxx: Add module parameter permissions
++	
++	  Add permissions to the driver's module_params.
++	
++	Signed-off-by: Andrew Vasquez <andrew.vasquez at qlogic.com>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<andrew.vasquez at qlogic.com>
++	[PATCH] [6/18]  qla2xxx: Initialization fixes
++	
++	  Small initialization fixes:
++	
++	  	o 'point-to-point preferred, else loop' is not a safe
++	  	  connection mode setting for ISP2200 boards.  Use
++	  	  'loop preferred, else point-to-point.'
++	
++	  	o Add modules parameter to enable ZIO -- Support mode
++	  	  5 only.
++	
++	  	o No point in doing a PRLI (process login) to the SNS
++	  	  port.
++	
++	  	o Fix problem where the driver would incorrectly skip
++	  	  ports with the same domain and area of the HBA.
++	
++	Signed-off-by: Andrew Vasquez <andrew.vasquez at qlogic.com>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<andrew.vasquez at qlogic.com>
++	[PATCH] [7/18]  qla2xxx: Tape command handling fixes
++	
++	  Fix several tape handling issue:
++	
++	  1) When the firmware receives the LOGO from the device, any
++	  active exchanges will be returned with a completion status
++	  of 0x29 -- this will cause the port to be marked as lost and
++	  request made to the DPC routine to begin a relogin attempt.
++	  The problem is, since we've never actually logged out of the
++	  device and cannot do so in interrupt context, we must be
++	  sure to perform the logout before the qla2x00_fabric_login()
++	  in the RELOGIN_NEEDED code.
++	
++	  2) Sets the Get Port Database options to ZERO when issuing
++	  the call to qla2x00_get_port_database().  This consolidates
++	  actuall login handling in the place it should be, in the
++	  previous qla2x00_fabric_login() call rather than depending
++	  on any 'hidden' behaviour of the firmware.  If a device did
++	  a LOGO after the login, then any subsequent exachanges will
++	  be returned with an 0x29 completion status and the
++	  RELOGIN_NEEDED code will handle the login.
++	
++	  3) Finally, if the master and slave state do not indicate a
++	  logged-in state from the Get Port Database call, then one
++	  cannot depend on the information returned from the firmware
++	  -- the firmware typically wipes out the PCB information for
++	  a given loopID when logged out.  So, return immediately with
++	  a failed status.
++	
++	Signed-off-by: Andrew Vasquez <andrew.vasquez at qlogic.com>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<andrew.vasquez at qlogic.com>
++	[PATCH] [8/18]  qla2xxx: Remove dead code
++	
++	  Remove several unused failover variables and functions from
++	  the embedded driver.
++	
++	Signed-off-by: Andrew Vasquez <andrew.vasquez at qlogic.com>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<andrew.vasquez at qlogic.com>
++	[PATCH] [9/18]  qla2xxx: Tape command handling fixes
++	
++	  Address several outstanding problem within the various
++	  eh_*() functions:
++	
++	  	o Fixup nested spinlock usage in error-hanlding
++	  	  functions.
++	
++	  	o Set the Loop down timer during abort isp if loop
++	  	  was already down for the driver to detect cable
++	  	  is unplugged at min time.
++	
++	Signed-off-by: Andrew Vasquez <andrew.vasquez at qlogic.com>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<andrew.vasquez at qlogic.com>
++	[PATCH] [10/18] qla2xxx: Additional tape handling fixes
++	
++	  Issue a big-hammer after link-down-timeout expires in order
++	  properly return tape commands to the mid-layer.
++	
++	Signed-off-by: Andrew Vasquez <andrew.vasquez at qlogic.com>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Correct MMCI clock rate on Integrator/CP.
++
++<andrew.vasquez at qlogic.com>
++	[PATCH] [11/18] qla2xxx: Misc. fixes
++	
++	  Small fixes:
++	
++	  o Remove incorrect and unused ISP2100 #define
++	    SS_RESIDUAL_LEN_VALID.
++	
++	  o Fix problem where an incorrect status would be returned
++	    for qla2x00_configure_fabric() if the driver was unable to
++	    log into a fabric's SNS.
++	
++	  o Check for the additional WAIT_FOR_AL_PA state in
++	    qla2x00_fw_ready() since switch vendors may push NOS/OLS
++	    primitives during a 'port disabled' state.
++	
++	Signed-off-by: Andrew Vasquez <andrew.vasquez at qlogic.com>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<andrew.vasquez at qlogic.com>
++	[PATCH] [12/18] qla2xxx: Extend firmware dump support
++	
++	  Add firmware dump support for ISPs with memory chips larger than
++	  128KB (512/1024KB).
++	
++	Signed-off-by: Andrew Vasquez <andrew.vasquez at qlogic.com>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<rddunlap at osdl.org>
++	[PATCH] Fix sparse warning in fs/devfs/base.c
++	
++	From: Mika Kukkonen <mika at osdl.org>
++	Signed-off-by: Randy Dunlap <rddunlap at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rddunlap at osdl.org>
++	[PATCH] Fix sparse warning in fs/proc/base.c
++	
++	From: Mika Kukkonen <mika at osdl.org>
++	Signed-off-by: Randy Dunlap <rddunlap at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rddunlap at osdl.org>
++	[PATCH] Fix sparse warning in drivers/block/ll_rw_blk.c
++	
++	From: Mika Kukkonen <mika at osdl.org>
++	Signed-off-by: Randy Dunlap <rddunlap at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rddunlap at osdl.org>
++	[PATCH] sparse: make sys_quotactl() prototype match function
++	
++	Al missed this one in his sparse fixes
++	
++	Signed-off-by: Randy Dunlap <rddunlap at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<andrew.vasquez at qlogic.com>
++	[PATCH] [13/18] qla2xxx: Remove TRUE/FALSE usage
++	
++	  Christoph Hellwig <hch () lst !de>:
++	
++	  o Remove TRUE/FALSE #define usage within the driver.
++	
++	Signed-off-by: Andrew Vasquez <andrew.vasquez at qlogic.com>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<jejb at mulgrave.(none)>
++	PATCH [14/18] qla2xxx: Use proper include files
++	
++	From: Andrew Vasquez <andrew.vasquez at qlogic.com>
++	
++	  Use the standard include/scsi/* headers rather than those in
++	  drivers/scsi/.  Slightly modified variant from initial patch sent by
++	  Christoph Hellwig <hch () lst !de>.
++	
++	Signed-off-by: Andrew Vasquez <andrew.vasquez at qlogic.com>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++	(fixed rejections)
++
++<andrew.vasquez at qlogic.com>
++	[PATCH] [15/18] qla2xxx: SRB handling cleanup and fixes
++	
++	  Cleanup qla2x00_eh_wait_on_command() srb_t handling.
++	
++	Signed-off-by: Andrew Vasquez <andrew.vasquez at qlogic.com>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<jejb at mulgrave.(none)>
++	PATCH [16/18] qla2xxx: 23xx/63xx firmware updates
++	
++	From: Andrew Vasquez <andrew.vasquez at qlogic.com>
++	
++	  Resync with latest released firmware -- 3.02.30.
++	
++	Signed-off-by: Andrew Vasquez <andrew.vasquez at qlogic.com>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<andrew.vasquez at qlogic.com>
++	[PATCH] [17/18] qla2xxx: Bus reset handler fixes
++	
++	  Fix incorrect return-code check in bus-reset error handler.
++	
++	Signed-off-by: Andrew Vasquez <andrew.vasquez at qlogic.com>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<andrew.vasquez at qlogic.com>
++	[PATCH] [18/18] qla2xxx: Update driver version
++	
++	  Update version number to 8.00.00b14-k.
++	
++	Signed-off-by: Andrew Vasquez <andrew.vasquez at qlogic.com>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<greg at kroah.com>
++	[PATCH] USB: sparse fixups for devio.c
++
++<khali at linux-fr.org>
++	[PATCH] I2C: Drop out-of-date code in w83781d and w83627hf
++	
++	Here is a simple patch which drops some out-of-date code in the w83781d
++	and w83627hf i2c chip drivers. These bits are left over from the times
++	when chip drivers were setting default limits at init.
++	
++	
++	Signed-off-by: Jean Delvare <khali at linux-fr dot org>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<jejb at mulgrave.(none)>
++	[patch-kj] kernel_thread() audit drivers/scsi/aacraid/rx.c
++
++<torvalds at ppc970.osdl.org>
++	Fix C99'ism that breaks older gcc's.
++	
++	Also clean it all up - use get_cpu()/put_cpu() instead of
++	playing games by hand with preemption.
++
++<jejb at mulgrave.(none)>
++	[patch-kj] kernel_thread() audit drivers/scsi/aacraid/rkt.c
++	
++	From: 	maximilian attems <janitor at sternwelten.at>
++	
++	Cleaned up code for error handing. Added checks to unmap memory,
++	release IRQ's, and freeing up dev->queue.
++	
++	Signed-off-by: MJK <mkemp at cs.nmsu.edu>
++	Signed-off-by: Maximilian Attems <janitor at sternwelten.at>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++	(fixed up rejects by hand)
++
++<janitor at sternwelten.at>
++	[PATCH] kernel_thread() audit drivers/scsi/aacraid/sa.c
++	
++	 Cleaned up code for error handing. Added checks to unmap memory,
++	 release IRQ's, and freeing up dev->queue.
++	
++	Signed-off-by: MJK <mkemp at cs.nmsu.edu>
++	Signed-off-by: Maximilian Attems <janitor at sternwelten.at>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<jgarzik at pobox.com>
++	[blk carmel] s/carmel/sx8/ in the driver itself
++
++<torvalds at ppc970.osdl.org>
++	sparse: clean up warning in swapfile.c
++
++<James.Bottomley at steeleye.com>
++	[PATCH] HSV100 is verified as supporting REPORT LUNs
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<acme at conectiva.com.br>
++	[NET] Move sndmsg_page and sndmsg_off to struct sock
++	
++	Yeah, the poor cousins will use this as well :-)
++
++<davem at nuts.davemloft.net>
++	[IPSEC]: In ESP, do not put scatterlist array on stack.
++	
++	Put it in per-esp data instead.  Noticed by Linus.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<akepner at sgi.com>
++	[NET]: In loopback, make get_stats() get correct per-cpu stats.
++	
++	Signed-off-by: Arthur Kepner <akepner at sgi.com>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<trini at kernel.crashing.org>
++	[PPC32] Change how we handle DP memory on MPC8xx.
++	We now have a 'remote heap' implemented (see comments in
++	arch/ppc/lib/rheap.c) which manages this memory.
++	From Pantelis Antoniou <panto at intracom.gr>.
++	Signed-off-by: Tom Rini <trini at kernel.crashing.org>
++
++<acme at conectiva.com.br>
++	[NET] rename struct inet_protocol to net_protocol
++	
++	The poor cousins will also have registration routines, etc.
++	
++	Signed-off-by: Arnaldo Carvalho de Melo <acme at conectiva.com.br>
++
++<trini at kernel.crashing.org>
++	[PPC32] Update CPM2 (MPC82xx/MPC85xx) code to use rheap for DP memory
++	Originally from: Rune Torgersen <runet at innovsys.com>
++	Signed-off-by: Tom Rini <trini at kernel.crashing.org>
++
++<acme at conectiva.com.br>
++	[NET] remove fill_page_desc, its just a copy of skb_fill_page_desc
++	
++	Also remove an unused inet_opt variable from ipv6 code.
++	
++	Signed-off-by: Arnaldo Carvalho de Melo <acme at conectiva.com.br>
++
++<akpm at osdl.org>
++	[PATCH] raw.c cleanups
++	
++	- pass the raw_config_request by reference, not by value.
++	
++	- fix whitespace drainbamage
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<elf at com.rmk.(none)>
++	[ARM PATCH] 1913/1: lh7a40x #3 (1/2) serial
++	
++	Patch from Marc Singer
++	
++	Serial console and port driver for the LH7a40x CPUs.  The only change
++	made since the last patch was to change the PORT_ID (again).  This
++	patch superceeds two serial driver patches.
++	
++
++<icampbell at com.rmk.(none)>
++	[ARM PATCH] 1933/1: Convert PXA serial driver to device model and implement suspend and resume
++	
++	Patch from Ian Campbell
++	
++	Patch 1848/1 removed the hack for preserving FFUART over sleep.
++	
++	This patch adds back that support in the correct place by converting
++	the PXA serial driver to use the driver model and hooking up the 
++	suspend and resume methods.
++
++<jelenz at edu.rmk.(none)>
++	[ARM PATCH] 1935/1: Fix bug in sa1111 driver
++	
++	Patch from John Lenz
++	
++	The __sa1111_probe function is declared __init, and it is called from
++	the sa1111_probe function, which is not declared __init.
++	
++	Signed-off-by: John Lenz <jelenz at students.wisc.edu>
++
++<roland at topspin.com>
++	[PATCH] PCI: Fix MSI-X setup
++	
++	msix_capability_init() puts the offset of the MSI-X capability into
++	pos, then uses pos as a loop index to clear the MSI-X vector table,
++	and then tries to use pos as the offset again, which results in
++	writing the MSI-X enable bit off into space.
++	
++	This patch fixes that by adding a new loop index variable and using
++	that to clear the vector table.
++	
++	Signed-off-by: Roland Dreier <roland at tospin.com>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<shemminger at osdl.org>
++	[PATCH] PCI: remove duplicate in pci_ids.h
++	
++	Get rid of duplicate entry, one is in the middle of the file with duplicate
++	at the end
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<shemminger at osdl.org>
++	[PATCH] PCI: fix out of order entry in pci_ids.h
++	
++	The last entry in pci_ids.h is out of order, someone wasn't reading the comment
++	to keep it sorted.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<shemminger at osdl.org>
++	[PATCH] PCI: add id's for sk98 driver
++	
++	Redoing the sk98 driver to correct pci model.  These are (most of) the entries
++	it uses.
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<jelenz at edu.rmk.(none)>
++	[ARM PATCH] 1936/1: Update collie fb entries to use new style initializers
++	
++	Patch from John Lenz
++	
++	Switches the collie framebuffer mach_info structure to use
++	the new initializers.
++	
++	Signed-off-by: John Lenz <jelenz at students.wisc.edu>
++
++<icampbell at com.rmk.(none)>
++	[ARM PATCH] 1939/1: SA1100 watchdog driver also works on PXA2xx
++	
++	Patch from Ian Campbell
++	
++	The SA1100 watchdog driver also works fine on the PXA2xx. Tested on 
++	a PXA255 based platform.
++
++<shemminger at osdl.org>
++	[NET]: rtentry->rt_dev is __user.
++	
++	The device entry in the route ioctl's needs annotation.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[IPV4]: ip_rt_ioctl argument is user pointer.
++	
++	The function ip_rt_ioctl expects a pointer to a user route structure, so define
++	it that way and cast as appropriate.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[BRIDGE]: Turn off debug message in bridge ioctl.
++	
++	Trivial patch to turn off a debug message.  It seems some SNMP daemons just
++	periodically trying to look at MII state.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<dvrabel at com.rmk.(none)>
++	[ARM PATCH] 1940/1: asm-arm/checksum.h - missing include
++	
++	Patch from David Vrabel
++	
++	Missing include (cf. include/asm-i386/checksum.h) in include/asm-arm/checksum.h.
++
++<jgarzik at pobox.com>
++	[libata sata_sil] Re-fix mod15write bug
++	
++	Certain early SATA drives have problems with write requests whose
++	length satisfy the equation "sectors % 15 == 1", on the SiI 3112.
++	Other drives, and other SiI controllers, are not affected.
++	
++	The fix for this problem is to avoid such requests, in one of three
++	ways, for the affect drive+controller combos:
++	1) Limit all writes to 15 sectors
++	2) Use block layer features to avoid creating requests whose
++	   length satisfies the above equation.
++	3) When a request satisfies the above equation, split the request
++	   into two writes, neither of which satisfies the equation.
++	
++	I chose fix #1, the most simple to implement.  After discussion with
++	Silicon Image and others regarding the impact of this fix, I have
++	decided to remain with fix #1, and will not be implementing a
++	"better fix".  This means that the affected SATA drives will see
++	decreased performance, but set of affected drives is small and will
++	never grow larger.
++	
++	Further, the complexity of implementing solution #2 or
++	solution #3 is rather large.
++	
++	When implementing lba48 'large request' support, I unintentionally
++	broke the fix for these affected drives.  Kudos to Ricky Beam for
++	noticing this.
++	
++	This change restores the fix, by adding a flag ATA_DFLAG_LOCK_SECTORS
++	to indicate that the max_sectors value set by the low-level driver
++	should never be changed.
++
++<acme at conectiva.com.br>
++	[NET] Generalise tcp memory pressure handling
++	
++	Signed-off-by: Arnaldo Carvalho de Melo <acme at conectiva.com.br>
++
++<benh at kernel.crashing.org>
++	[PATCH] ppc32: Cleanups & warning fixes of traps.c
++	
++	This cleans up arch/ppc/kernel/traps.c and vecemu.c to use the same
++	formatting style for all functions, and fixes 2 warnings in the altivec
++	floating point emulation code.  No functional change. 
++	
++	Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<benh at kernel.crashing.org>
++	[PATCH] ppc32: oprofile support
++	
++	This adds basic oprofile support to ppc32.  Originally from Anton
++	Blanchard, I just re-diffed it against current kernels.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<benh at kernel.crashing.org>
++	[PATCH] ppc32: Support for new Apple laptop models
++	
++	This adds support for newer Apple laptop models.  It adds the basic
++	identification for the new motherboards and the cpufreq support for
++	models using the new 7447A CPU from Motorola.
++	
++	This is mostly the work of John Steele Scott <toojays at toojays.net> with
++	some bits from Sebastian Henschel <linux at kodeaffe.de> and some rework by
++	myself.  Please apply,
++	
++	Signed-off-by: John Steele Scott <toojays at toojays.net>
++	Signed-off-by: Sebastian Henschel <linux at kodeaffe.de>
++	Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<benh at kernel.crashing.org>
++	[PATCH] radeonfb: Fix panel detection on some laptops
++	
++	The code in radeonfb looking for the BIOS image currently uses the BIOS
++	ROM if any, and falls back to the RAM image if not found.  This is
++	unfortunatly not correct for a bunch of laptops where the real panel
++	data are only present in the RAM image.
++	
++	This works around this problem by preferring the RAM image on mobility
++	chipsets.  This is definitely not the best workaround, we need some arch
++	support for linking the RAM image to the PCI ID (preferrably by having
++	the arch snapshot it during boot, isolating us completely from the
++	details of where this image is in memory).  I'll see how we can get such
++	an improvement later.
++	
++	Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulus at samba.org>
++	[PATCH] Handle altivec assist exception properly
++	
++	This is the PPC64 counterpart of the PPC32 Altivec assist exception
++	handler that went in recently.
++	
++	On PPC64 machines with Altivec (i.e.  machines that use the PPC970 chip,
++	such as the G5 powermac), the altivec floating-point instructions can
++	operate in two modes: one where denormalized inputs or outputs are
++	truncated to zero, and one where they aren't.  In the latter mode the
++	processor can take an exception when it encounters denormalized
++	floating-point inputs or outputs rather than dealing with them in
++	hardware.
++	
++	This patch adds code to deal properly with the exception, by emulating
++	the instruction that caused the exception.  Previously the kernel just
++	switched the altivec unit into the truncate-to-zero mode, which works
++	but is a bit gross.  Fortunately there are only a limited set of altivec
++	instructions which can generate the assist exception, so we don't have
++	to emulate the whole altivec instruction set.
++	
++	Note that Altivec is Motorola's name for the PowerPC vector/SIMD
++	instructions; IBM calls the same thing VMX, and currently only IBM makes
++	64-bit PowerPC CPU chips.  Nevertheless, I have used the term Altivec in
++	the PPC64 code for consistency with the PPC32 code.
++	
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<jbarnes at engr.sgi.com>
++	[PATCH] ppc32: Support for new Apple laptop models
++	
++	This adds sound support for some of the newer PowerBooks.  It appears
++	that this chip supports the AWACS sample rates, but has a snapper-style
++	mixer.  Tested and works on my PowerBook5,4. 
++	
++	Signed-off-by: Jesse Barnes <jbarnes at sgi.com>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<dwmw2 at shinybook.infradead.org>
++	WindRiver PowerQUICC III platform support cleanup.
++	
++	Respond to maintainer feedback -- remove unneeded setup for
++	the FEC port which doesn't exist; small cosmetic changes.
++	
++	Signed-off-by: Kumar Gala <kumar.gala at freescale.com>
++
++<yoshfuji at linux-ipv6.org>
++	[NETFILTER]: Fix iptable_raw.c build with older gcc.
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Fix Integrator/CP timer support.
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] bug in V-link handling (arch/i386/pci/irq.c)
++	
++		Via southbridges use register 0x3c of the on-board devices (USB and
++	AC97) to control interrupt routing for those.  In drivers/pci/quirks.c we
++	set it correctly (dev->irq & 15).  However, in pirq_enable_irq() where the
++	second half of that stuff lives, we forget to apply the mask.
++	
++		That's what causes problems with ioapic on via motherboards in 2.6.
++	One-liner below ACKed by Alan, verified on via-based boxen here, obviously
++	doesn't affect non-via ones (we only set interrupt_line_quirk for via
++	chipsets). 
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Fix platform device registration.
++	
++	Since the platform device registration is now merged into the driver
++	model, remove it from the ARM specific code.
++
++<acme at conectiva.com.br>
++	[NET] Generalise tcp_{writequeue_purge,rmem_schedule,alloc_{pskb,page}}
++	
++	Only new requirement was to add a max_header field to struct sock sk_prot
++	member.
++	
++	Signed-off-by: Arnaldo Carvalho de Melo <acme at conectiva.com.br>
++
++<tony at com.rmk.(none)>
++	[ARM PATCH] 1943/1: OMAP compile fix
++	
++	Patch from Tony Lindgren
++	
++	This patch fixes OMAP compile after the ARM timer changes 
++	in cset 1.1821.5.3 and dma-mapping device address translation 
++	in cset 1.1821.5.3.
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Add logical connect-change notices to the hub driver
++	
++	This patch implements the missing functionality necessary to get device
++	resets working fully.  It adds a bit-array of ports with logical
++	connect-changes pending to the hub structure, so that the hub driver can
++	recognize that these ports should be treated as though they had
++	disconnected and re-connected.  This is how we will handle devices that
++	"morph" (i.e., change their descriptors) following a reset, as might
++	happen with a firmware upload.
++	
++	There is also a lot of additional kerneldoc and a few small changes to
++	some log messages.  An important restriction is that usb_reset_device()
++	will refuse to work if the device is suspended.  Trying to reset a
++	suspended device leads to several problems, not least of which is that the
++	device's parent hub might be suspended as well.
++	
++	With this patch the device reset code is pretty much complete.  However it
++	won't always work correctly until the device locking is straightened out.
++	That's coming up next.
++	
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Fail pending URBs in dummy_hcd upon disconnect
++	
++	This patch fixes another bug in the dummy_hcd driver.  When a gadget
++	driver unregisters (simulating a device disconnect), dummy_hcd stops the
++	timer that it uses for processing outstanding URBs.  Unfortunately this
++	means that those URBs will never be given back.  The patch lets the timer
++	continue running; when it expires all the remaining URBs will fail so the
++	timer won't be reinitialized.
++	
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<oliver at neukum.org>
++	[PATCH] USB:  patches to acm driver
++	
++	  - races with urb->current, union header evaluation, DMA handling
++	
++	Signed-off-By: Oliver Neukum <oliver at neukum.name>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<oliver at neukum.org>
++	[PATCH] USB: another error check in acm
++	
++	I overlooked that setting control lines in open can fail.
++	
++	  - check for error doing control transfers
++	
++	Signed-Off-By: Oliver Neukum <oliver at neukum.name>
++	Signed-off-by: Vojtech Pavlik <vojtech at suse.cz>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Fix EBSA110 timer functions.
++	
++	Unfortunately this broke in Deepak's merge.  Fix it.
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Fix Footbridge timer functions.
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Fix acornfb build error.
++
++<ossi at kde.org>
++	[PATCH] PCI: (one more) PCI quirk for SMBus bridge on Asus P4 boards
++	
++	my board has one of those "clever" bioses that hide the smbus. this tiny
++	patch adds it to the Bad Guy List (TM).
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<davem at nuts.davemloft.net>
++	[NETFILTER]: Use correct size_t printk format string in ipt_addrtype.c
++
++<davem at nuts.davemloft.net>
++	[ATM]: In proc_mpc_read, make length ssize_t.
++
++<acme at conectiva.com.br>
++	[NET] make the struct proto entries related to memory pressure be pointers
++	
++	This is needed because tcpv6_prot has to point to the same place tcp_prot points,
++	as they share the same accounting variables.
++	
++	This fixes a bug noticed by David Miller when using the ipv6_mapped functionality,
++	thanks David!
++	
++	Signed-off-by: Arnaldo Carvalho de Melo <acme at conectiva.com.br>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<akpm at osdl.org>
++	[PATCH] Allow i386 to reenable interrupts on lock contention
++	
++	From: Zwane Mwaikambo <zwane at linuxpower.ca>
++	
++	Following up on Keith's code, I adapted the i386 code to allow enabling
++	interrupts during contested locks depending on previous interrupt
++	enable status. Obviously there will be a text increase (only for non
++	CONFIG_SPINLINE case), although it doesn't seem so bad, there will be an
++	increased exit latency when we attempt a lock acquisition after spinning
++	due to the extra instructions. How much this will affect performance I'm
++	not sure yet as I haven't had time to micro bench.
++	
++	   text    data     bss     dec     hex filename
++	2628024  921731       0 3549755  362a3b vmlinux-after
++	2621369  921731       0 3543100  36103c vmlinux-before
++	2618313  919222       0 3537535  35fa7f vmlinux-spinline
++	
++	The code has been stress tested on a 16x NUMAQ (courtesy OSDL).
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] jbd needs to wait for locked buffers
++	
++	From: Chris Mason <mason at suse.com>
++	
++	jbd needs to wait for any io to complete on the buffer before changing the
++	end_io function.  Using set_buffer_locked means that it can change the
++	end_io function while the page is in the middle of writeback, and the
++	writeback bit on the page will never get cleared.
++	
++	Since we set the buffer dirty earlier on, if the page was previously dirty,
++	pdflush or memory pressure might trigger a writepage call, which will race
++	with jbd's set_buffer_locked.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] Move saved_command_line to init/main.c
++	
++	From: Rusty Russell <rusty at rustcorp.com.au>
++	
++	Currently every arch declares its own char saved_command_line[].  Make sure
++	every arch defines COMMAND_LINE_SIZE in asm/setup.h, and declare
++	saved_command_line in linux/init.h (init/main.c contains the definition).
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] rcu lock update: Add per-cpu batch counter
++	
++	From: Manfred Spraul <manfred at colorfullife.com>
++	
++	Below is the one of my patches from my rcu lock update.  Jack Steiner tested
++	the first one on a 512p and it resolved the rcu cache line trashing.  All were
++	tested on osdl with STP.
++	
++	Step one for reducing cacheline trashing within rcupdate.c:
++	
++	The current code uses the rcu_cpu_mask bitmap both for keeping track of the
++	cpus that haven't gone through a quiescent state and for checking if a cpu
++	should look for quiescent states.  The bitmap is frequently changed and the
++	check is done by polling - together this causes cache line trashing.
++	
++	If it's cheaper to access a (mostly) read-only cacheline than a cacheline that
++	is frequently dirtied, then it's possible to reduce the trashing by splitting
++	the rcu_cpu_mask bitmap into two cachelines:
++	
++	The patch adds a generation counter and moves it into a separate cacheline.
++	This allows to removes all accesses to rcu_cpumask (in the read-write
++	cacheline) from rcu_pending and at least 50% of the accesses from
++	rcu_check_quiescent_state.  rcu_pending and all but one call per cpu to
++	rcu_check_quiescent_state access the read-only cacheline.  Probably not enough
++	for 512p, but it's a start, just for 128 byte more memory use, without slowing
++	down rcu grace periods.  Obviously the read-only cacheline is not really
++	read-only: it's written once per grace period to indicate that a new grace
++	period is running.
++	
++	Tests on an 8-way Pentium III with reaim showed some improvement:
++	
++	oprofile hits:
++	Reference: http://khack.osdl.org/stp/293075/
++	Hits	   %
++	23741     0.0994  rcu_pending
++	19057     0.0798  rcu_check_quiescent_state
++	6530      0.0273  rcu_check_callbacks
++	
++	Patched: http://khack.osdl.org/stp/293076/
++	8291      0.0579  rcu_pending
++	5475      0.0382  rcu_check_quiescent_state
++	3604      0.0252  rcu_check_callbacks
++	
++	The total runtime differs between both runs, thus the % number must
++	be compared: Around 50% faster. I've uninlined rcu_pending for the
++	test.
++	
++	Tested with reaim and kernbench.
++	
++	Description:
++	
++	- per-cpu quiescbatch and qs_pending fields introduced: quiescbatch contains
++	  the number of the last quiescent period that the cpu has seen and qs_pending
++	  is set if the cpu has not yet reported the quiescent state for the current
++	  period.  With these two fields a cpu can test if it should report a
++	  quiescent state without having to look at the frequently written
++	  rcu_cpu_mask bitmap.
++	
++	- curbatch split into two fields: rcu_ctrlblk.batch.completed and
++	  rcu_ctrlblk.batch.cur.  This makes it possible to figure out if a grace
++	  period is running (completed != cur) without accessing the rcu_cpu_mask
++	  bitmap.
++	
++	- rcu_ctrlblk.maxbatch removed and replaced with a true/false next_pending
++	  flag: next_pending=1 means that another grace period should be started
++	  immediately after the end of the current period.  Previously, this was
++	  achieved by maxbatch: curbatch==maxbatch means don't start, curbatch!=
++	  maxbatch means start.  A flag improves the readability: The only possible
++	  values for maxbatch were curbatch and curbatch+1.
++	
++	- rcu_ctrlblk split into two cachelines for better performance.
++	
++	- common code from rcu_offline_cpu and rcu_check_quiescent_state merged into
++	  cpu_quiet.
++	
++	- rcu_offline_cpu: replace spin_lock_irq with spin_lock_bh, there are no
++	  accesses from irq context (and there are accesses to the spinlock with
++	  enabled interrupts from tasklet context).
++	
++	- rcu_restart_cpu introduced, s390 should call it after changing nohz:
++	  Theoretically the global batch counter could wrap around and end up at
++	  RCU_quiescbatch(cpu).  Then the cpu would not look for a quiescent state and
++	  rcu would lock up.
++	
++	Signed-off-by: Manfred Spraul <manfred at colorfullife.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] rcu lock update: Use a sequence lock for starting batches
++	
++	From: Manfred Spraul <manfred at colorfullife.com>
++	
++	Step two for reducing cacheline trashing within rcupdate.c:
++	
++	rcu_process_callbacks always acquires rcu_ctrlblk.state.mutex and calls
++	rcu_start_batch, even if the batch is already running or already scheduled to
++	run.
++	
++	This can be avoided with a sequence lock: A sequence lock allows to read the
++	current batch number and next_pending atomically.  If next_pending is already
++	set, then there is no need to acquire the global mutex.
++	
++	This means that for each grace period, there will be
++	
++	- one write access to the rcu_ctrlblk.batch cacheline
++	
++	- lots of read accesses to rcu_ctrlblk.batch (3-10*cpus_online()).  Behavior
++	  similar to the jiffies cacheline, shouldn't be a problem.
++	
++	- cpus_online()+1 write accesses to rcu_ctrlblk.state, all of them starting
++	  with spin_lock(&rcu_ctrlblk.state.mutex).
++	
++	  For large enough cpus_online() this will be a problem, but all except two
++	  of the spin_lock calls only protect the rcu_cpu_mask bitmap, thus a
++	  hierarchical bitmap would allow to split the write accesses to multiple
++	  cachelines.
++	
++	Tested on an 8-way with reaim.  Unfortunately it probably won't help with Jack
++	Steiner's 'ls' test since in this test only one cpu generates rcu entries.
++	
++	Signed-off-by: Manfred Spraul <manfred at colorfullife.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] rcu lock update: Code move & cleanup
++	
++	From: Manfred Spraul <manfred at colorfullife.com>
++	
++	Step three for reducing cacheline trashing within rcupdate.c:
++	
++	Cleanup and code move from <linux/rcupdate.h> to kernel/rcupdate.c: Remove
++	internal details from the header file.
++	
++	Signed-off-by: Manfred Spraul <manfred at colorfullife.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] reduce rcu_head size - core
++	
++	From: Dipankar Sarma <dipankar at in.ibm.com>
++	
++	This reduces the RCU head size by using a singly linked to maintain them.
++	The ordering of the callbacks is still maintained as before by using a tail
++	pointer for the next list.
++	
++	Signed-Off-By : Dipankar Sarma <dipankar at in.ibm.com>
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] rcu: avoid passing an argument to the callback function
++	
++	From: Dipankar Sarma <dipankar at in.ibm.com>
++	
++	This patch changes the call_rcu() API and avoids passing an argument to the
++	callback function as suggested by Rusty.  Instead, it is assumed that the
++	user has embedded the rcu head into a structure that is useful in the
++	callback and the rcu_head pointer is passed to the callback.  The callback
++	can use container_of() to get the pointer to its structure and work with
++	it.  Together with the rcu-singly-link patch, it reduces the rcu_head size
++	by 50%.  Considering that we use these in things like struct dentry and
++	struct dst_entry, this is good savings in space.
++	
++	An example :
++	
++	struct my_struct {
++		struct rcu_head rcu;
++		int x;
++		int y;
++	};
++	
++	void my_rcu_callback(struct rcu_head *head)
++	{
++		struct my_struct *p = container_of(head, struct my_struct, rcu);
++		free(p);
++	}
++	
++	void my_delete(struct my_struct *p)
++	{
++		...
++		call_rcu(&p->rcu, my_rcu_callback);
++		...
++	}
++	
++	Signed-Off-By: Dipankar Sarma <dipankar at in.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] cpumask: make cpu_present_map real even on non-smp
++	
++	From: Paul Jackson <pj at sgi.com>
++	
++	This patch makes cpu_present_map a real map for all configurations, instead of
++	a constant for non-SMP.  It also moves the definition of cpu_present_map out
++	of kernel/cpu.c into kernel/sched.c, because cpu.c isn't compiled into non-SMP
++	kernels.
++	
++	The pattern is that each of the possible, present and online cpu maps are
++	actual kernel global cpumask_t variables, for all configurations.  They are
++	documented in include/linux/cpumask.h.  Some of the UP (NR_CPUS=1) code
++	cheats, and hardcodes the assumption that the single bit position of these
++	maps is always set, as an optimization.
++	
++	Signed-off-by: Paul Jackson <pj at sgi.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] cpumask: bitmap cleanup preparation for cpumask overhaul
++	
++	From: Paul Jackson <pj at sgi.com>
++	
++	Document the bitmap bit model and handling of unused bits.
++	
++	Tighten up bitmap so it does not generate nonzero bits in the unused tail if
++	it is not given any on input.
++	
++	Add intersects, subset, xor and andnot operators.  Change bitmap_complement to
++	take two operands.
++	
++	Add a couple of missing 'const' qualifiers on bitops test_bit and bitmap_equal
++	args.
++	
++	Signed-off-by: Paul Jackson <pj at sgi.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] cpumask: bitmap inlining and optimizations
++	
++	From: Paul Jackson <pj at sgi.com>
++	
++	These bitmap improvements make it a suitable basis for fully supporting
++	cpumask_t and nodemask_t.  Inline macros with compile-time checks enable
++	generating tight code on both small and large systems (large meaning cpumask_t
++	requires more than one unsigned long's worth of bits).
++	
++	The existing bitmap_<op> macros in lib/bitmap.c are renamed to __bitmap_<op>,
++	and wrappers for each bitmap_<op> are exposed in include/linux/bitmap.h
++	
++	This patch _includes_ Bill Irwins rewrite of the bitmap_shift operators to not
++	require a fixed length intermediate bitmap.
++	
++	Improved comments list each available operator for easy browsing.
++	
++	Signed-off-by: Paul Jackson <pj at sgi.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] cpumask: rewrite cpumask.h - single bitmap based implementation
++	
++	From: Paul Jackson <pj at sgi.com>
++	
++	Major rewrite of cpumask to use a single implementation, as a struct-wrapped
++	bitmap.
++	
++	This patch leaves some 26 include/asm-*/cpumask*.h header files orphaned - to
++	be removed next patch.
++	
++	Some nine cpumask macros for const variants and to coerce and promote between
++	an unsigned long and a cpumask are obsolete.  Simple emulation wrappers are
++	provided in this patch for these obsolete macros, which can be removed once
++	each of the 3 archs (i386, ppc64, x86_64) using them are recoded in follow-on
++	patches to not need them.
++	
++	The CPU_MASK_ALL macro now avoids leaving possible garbage one bits in any
++	unused portion of the high word.
++	
++	An inproved comment lists all available operators, for convenient browsing.
++	
++	From: Mikael Pettersson <mikpe at csd.uu.se>
++	
++	  2.6.7-rc3-mm1 changed CPU_MASK_NONE into something that isn't a valid
++	  rvalue (it only works inside struct initializers).  This caused compile-time
++	  errors in perfctr in UP x86 builds.
++	
++	From: Arnd Bergmann <arnd at arndb.de>
++	
++	  cpumask-5-10-rewrite-cpumaskh-single-bitmap-based from 2.6.7-rc3-mm1
++	  causes include2/asm/smp.h:54:1: warning: "cpu_online" redefined
++	
++	Signed-off-by: Paul Jackson <pj at sgi.com>
++	Signed-off-by: Mikael Pettersson <mikpe at csd.uu.se>
++	Signed-off-by: Arnd Bergmann <arnd at arndb.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] cpumask: remove 26 no longer used cpumask*.h files
++	
++	From: Paul Jackson <pj at sgi.com>
++	
++	With the cpumask rewrite in the previous patch, these various
++	include/asm-*/cpumask*.h headers are no longer used.
++	
++	Signed-off-by: Paul Jackson <pj at sgi.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] cpumask: remove obsolete cpumask macro uses - i386 arch
++	
++	From: Paul Jackson <pj at sgi.com>
++	
++	Remove by recoding i386 uses of the obsolete cpumask const, coerce and promote
++	macros.
++	
++	Signed-off-by: Paul Jackson <pj at sgi.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] cpumask: remove obsolete cpumask macro uses - other archs
++	
++	From: Paul Jackson <pj at sgi.com>
++	
++	Remove by recoding other uses of the obsolete cpumask const, coerce and
++	promote macros.
++	
++	Signed-off-by: Paul Jackson <pj at sgi.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] x86_64: cpu_online fix
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] ppc64: cpu_online fix
++	
++	include/asm/smp.h:55:1: warning: "cpu_possible" redefined
++	include/asm/smp.h:54:1: warning: "cpu_online" redefined
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] cpumask: Remove no longer used obsolete macro emulation
++	
++	From: Paul Jackson <pj at sgi.com>
++	
++	Now that the emulation of the obsolete cpumask macros is no longer needed,
++	remove it from cpumask.h
++	
++	Signed-off-by: Paul Jackson <pj at sgi.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] cpumask: optimize various uses of new cpumasks
++	
++	From: Paul Jackson <pj at sgi.com>
++	
++	Make use of for_each_cpu_mask() macro to simplify and optimize a couple of
++	sparc64 per-CPU loops.
++	
++	Optimize a bit of cpumask code for asm-i386/mach-es7000
++	
++	Convert physids_complement() to use both args in the files
++	include/asm-i386/mpspec.h, include/asm-x86_64/mpspec.h.
++	
++	Remove cpumask hack from asm-x86_64/topology.h routine pcibus_to_cpumask().
++	
++	Clarify and slightly optimize several cpumask manipulations in kernel/sched.c
++	
++	Signed-off-by: Paul Jackson <pj at sgi.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] cpumask: comment, spacing tweaks
++	
++	From: Paul Jackson <pj at sgi.com>
++	
++	Tweak cpumask.h comments, spacing:
++	
++	- Add comments for cpu_present_map macros: num_present_cpus() and
++	  cpu_present()
++	
++	- Remove comments for obsolete macros: cpu_set_online(),
++	  cpu_set_offline()
++	
++	- Reorder a few comment lines, to match the code and confuse readers of
++	  this patch
++	
++	- Tabify one chunk of code
++	
++	Signed-off-by: Paul Jackson <pj at sgi.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] clean up cpumask_t temporaries
++	
++	From: Rusty Russell <rusty at rustcorp.com.au>
++	
++	Paul Jackson's cpumask tour-de-force allows us to get rid of those stupid
++	temporaries which we used to hold CPU_MASK_ALL to hand them to functions.
++	This used to break NR_CPUS > BITS_PER_LONG.
++	
++	Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] alpha: cpumask fixups
++	
++	From: William Lee Irwin III <wli at holomorphy.com>
++	
++	The cpumask patches broke alpha's build, even without the irqaction
++	patch, largely centering around cpu_possible_map.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] make irqaction use a cpu mask
++	
++	From: William Lee Irwin III <wli at holomorphy.com>
++	
++	The following patch makes irqaction's ->mask a cpumask as it was intended
++	to be and wraps up the rest of the sweep.  Only struct irqaction is
++	usefully greppable, so there may be some assignments to ->mask missing
++	still.  This removes more code than it adds.
++	
++	From: William Lee Irwin III <wli at holomorphy.com>
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] Fix and Reenable MSI Support on x86_64
++	
++	From: long <tlnguyen at snoqualmie.dp.intel.com>
++	
++	MSI support for x86_64 is currently disabled in the kernel 2.6.x.  Below is
++	the patch, which provides a fix and reenable it.
++	
++	In addition, the patch provides a info message during kernel boot if
++	configuring vector-base indexing.
++	
++	Cc: Andi Kleen <ak at muc.de>
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] vmscan.c: shuffle things around
++	
++	Move all the data structure declarations, macros and variable definitions to
++	less surprising places.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] vmscan.c scan rate fixes
++	
++	We've been futzing with the scan rates of the inactive and active lists far
++	too much, and it's still not right (Anton reports interrupt-off times of over
++	a second).
++	
++	- We have this logic in there from 2.4.early (at least) which tries to keep
++	  the inactive list 1/3rd the size of the active list.  Or something.
++	
++	  I really cannot see any logic behind this, so toss it out and change the
++	  arithmetic in there so that all pages on both lists have equal scan rates.
++	
++	- Chunk the work up so we never hold interrupts off for more that 32 pages
++	  worth of scanning.
++	
++	- Make the per-zone scan-count accumulators unsigned long rather than
++	  atomic_t.
++	
++	  Mainly because atomic_t's could conceivably overflow, but also because
++	  access to these counters is racy-by-design anyway.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] vmscan.c: dont reclaim too many pages
++	
++	The shrink_zone() logic can, under some circumstances, cause far too many
++	pages to be reclaimed.  Say, we're scanning at high priority and suddenly hit
++	a large number of reclaimable pages on the LRU.
++	
++	Change things so we bale out when SWAP_CLUSTER_MAX pages have been reclaimed.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] vm: vfs shrinkage tuning
++	
++	Some people want the dentry and inode caches shrink harder, others want them
++	shrunk more reluctantly.
++	
++	The patch adds /proc/sys/vm/vfs_cache_pressure, which tunes the vfs cache
++	versus pagecache scanning pressure.
++	
++	- at vfs_cache_pressure=0 we don't shrink dcache and icache at all.
++	
++	- at vfs_cache_pressure=100 there is no change in behaviour.
++	
++	- at vfs_cache_pressure > 100 we reclaim dentries and inodes harder.
++	
++	
++	The number of megabytes of slab left after a slocate.cron on my 256MB test
++	box:
++	
++	vfs_cache_pressure=100000   33480
++	vfs_cache_pressure=10000    61996
++	vfs_cache_pressure=1000     104056
++	vfs_cache_pressure=200      166340
++	vfs_cache_pressure=100      190200
++	vfs_cache_pressure=50       206168
++	
++	Of course, this just left more directory and inode pagecache behind instead of
++	vfs cache.  Interestingly, on this machine the entire slocate run fits into
++	pagecache, but not into VFS caches.
++	
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] dnotify.c: use inode->i_lock in place of dn_lock
++	
++	From: "Adam J. Richter" <adam at yggdrasil.com>
++	
++	Replace the use of a global spinlock with the per-inode ->i_lock.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] Use fancy wakeups in wait.h
++	
++	Use the more SMP-friendly prepare_to_wait()/finish_wait() in wait_event() and
++	friends.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] tweak the buddy allocator for better I/O merging
++	
++	From: William Lee Irwin III <wli at holomorphy.com>
++	
++	Based on Arjan van de Ven's idea, with guidance and testing from James
++	Bottomley.
++	
++	The physical ordering of pages delivered to the IO subsystem is strongly
++	related to the order in which fragments are subdivided from larger blocks
++	of memory tracked by the page allocator.
++	
++	Consider a single MAX_ORDER block of memory in isolation acted on by a
++	sequence of order 0 allocations in an otherwise empty buddy system.
++	Subdividing the block beginning at the highest addresses will yield all the
++	pages of the block in reverse, and subdividing the block begining at the
++	lowest addresses will yield all the pages of the block in physical address
++	order.
++	
++	Empirical tests demonstrate this ordering is preserved, and that changing
++	the order of subdivision so that the lowest page is split off first
++	resolves the sglist merging difficulties encountered by driver authors at
++	Adaptec and others in James Bottomley's testing.
++	
++	James found that before this patch, there were 40 merges out of about 32K
++	segments.  Afterward, there were 24007 merges out of 19513 segments, for a
++	merge rate of about 55%.  Merges of 128 segments, the maximum allowed, were
++	observed afterward, where beforehand they never occurred.  It also improves
++	dbench on my workstation and works fine there.
++	
++	Signed-off-by: William Lee Irwin III <wli at holomorphy.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] hwcache align kmalloc caches
++	
++	From: Manfred Spraul <manfred at colorfullife.com>
++	
++	Reversing the patches that made all caches hw cacheline aligned had an
++	unintended side effect on the kmalloc caches: Before they had the
++	SLAB_HWCACHE_ALIGN flag set, now it's clear.  This breaks one sgi driver -
++	it expects aligned caches.  Additionally I think it's the right thing to
++	do: It costs virtually nothing (the caches are power-of-two sized) and
++	could reduce false sharing.
++	
++	Additionally, the patch adds back the documentation for the
++	SLAB_HWCACHE_ALIGN flag.
++	
++	Signed-Off: Manfred Spraul <manfred at colorfullife.com>
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] reduce function inlining in slab.c
++	
++	From: Manfred Spraul <manfred at colorfullife.com>
++	
++	slab.c contains too many inline functions:
++	
++	- some functions that are not performance critical were inlined.  Waste
++	  of text size.
++	
++	- The debug code relies on __builtin_return_address(0) to keep track of
++	  the callers.  According to rmk, gcc didn't inline some functions as
++	  expected and that resulted in useless debug output.  This was probably
++	  caused by the large debug-only inline functions.
++	
++	The attached patche removes most inline functions:
++	
++	- the empty on release/huge on debug inline functions were replaced with
++	  empty macros on release/normal functions on debug.
++	
++	- spurious inline statements were removed.
++	
++	The code is down to 6 inline functions: three one-liners for struct
++	abstractions, one for a might_sleep_if test and two for the performance
++	critical __cache_alloc / __cache_free functions.
++	
++	Note: If an embedded arch wants to save a few bytes by uninlining
++	__cache_{free,alloc}: The right way to do that is to fold the functions
++	into kmem_cache_xy and then replace kmalloc with
++	kmem_cache_alloc(kmem_find_general_cachep(),).
++	
++	Signed-Off: Manfred Spraul <manfred at colorfullife.com>
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] abs() fixes
++	
++	OK, the pending abs() disaster has hit:
++	
++	drivers/usb/class/audio.c:404: warning: static declaration of 'abs' follows non-static declaration
++	
++	This is due to the declaration in kernel.h.  AFAIK there's not even a matching
++	definition for that.
++	
++	The patch implements abs() as a macro in kernel.h and kills off various
++	private implementations.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] Support NetMOS based PCI cards providing serial and parallel ports
++	
++	From: Christoph Lameter <christoph at graphe.net>
++	
++	Attached a patch to support a variety of PCI based serial and parallel port
++	I/O ports (typically labeled 222N-2 or 9835).
++	
++	I think this should go into 2.6.0 since it has been out there for a long
++	time and is just some additional driver support that somehow fell through
++	the cracks in 2.4.X. Tim Waugh submitted it in the 2.4.X series.
++	
++	See also http://winterwolf.co.uk/pciio
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] help text for FB_RIVA_I2C
++	
++	From: "Antonino A. Daplas" <adaplas at hotpop.com>
++	
++	Signed-off-by: Antonino Daplas <adaplas at pol.net>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] nr_pagecache can go negative
++	
++	We use per-cpu counters for the system-wide pagecache accounting.  The
++	counters spill into the global nr_pagecache atomic_t when they underflow or
++	overflow.
++	
++	Hence it is possible, under weird circumstances, for nr_pagecache to go
++	negative.  Anton says he has hit this.
++	
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] Make nr_swap_pages a long
++	
++	From: Anton Blanchard <anton at samba.org>
++	
++	../include/linux/swap.h:extern int nr_swap_pages;       /* XXX: shouldn't this be ulong? --hch */
++	
++	Sounds like it should be too me.  Some of the code checks for nr_swap_pages
++	< 0 so I made it a long instead.  I had to fix up the ppc64 show_mem() (Im
++	guessing there will be other trivial changes required in other 64bit archs,
++	I can find and fix those if you want).
++	
++	I also noticed that the ppc64 show_mem() used ints to store page counts.
++	We can overflow that, so make them unsigned long.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] make total_swap_pages a long
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] mips: SGI A2 audio rewrite and 2.6 fixes
++	
++	From: Ralf Baechle <ralf at linux-mips.org>
++	
++	Fix HAL2 audio driver for the SGI A2 audio subsystem and rewrite large
++	parts of it to finally work.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] Dell laptop lockup fix for ALSA
++	
++	From: Alan Cox <alan at redhat.com>
++	
++	OSS avoids the Dell lockup by not hitting the problem register (which
++	apparently breaks resume on a Sony laptop).  ALSA keeps a flag and uses pci
++	subvendor info to clear it for problem Dell laptops.  Unfortunately there
++	is at least one other Dell laptop which is affected.  This adds its sub
++	id's
++	
++	[Patch from Dan Williams @ Red Hat slightly reformatted by me]
++	
++	Signed-off-by: Alan Cox <alan at redhat.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] MIPS Update
++	
++	From: Ralf Baechle <ralf at linux-mips.org>
++	
++	MIPS update:
++	
++	 - Further conversion of MIPS kernel configuration to reverse dependencies.
++	 - Support for the PMC-Sierra Yosemite evaluation board.
++	 - Merge arch/mips/mm-32 and arch/mips/mm-32 into arch/mips/mm.
++	 - Partial support for the R8000 now that I finally have clearance for the
++	   documentation previously covered by NDA.
++	 - Make distclean fixes.
++	 - Regenerate default configuration files against latest Kconfig files.
++	 - Fix handling of data bus errors in modules.
++	 - Make R4000 bug probing more bullet proof.
++	 - Rewrite semaphore code folloing the PPC implementation to no longer
++	   manipulate 2 32-bit quantities atomically using 64-bit instructions.
++	   Occasionally this did cause problems due to struct semaphore not having
++	   sufficient alignment.
++	 - Make sys_pipe() code bullet proof against gcc 3.5 over-optimization.
++	 - Fix possibly exploitable bug in IRIX compatibility statvfs(2).
++	 - Make sched_clock() an outline function.
++	 - Support for the MIPS 24K and 25K processors.
++	 - Make functions static that aren't needed anywhere else.
++	 - Factor out some more generic MIPS SMP code.
++	 - Factor out common part of the GT-64240 code.
++	 - Ocelot C now uses the generic MV-64340 interrupt handler code.
++	 - Factor out common board support code
++	 - More cleanup and bug fixes for the NEC VR41xx code.
++	 - Start cleanup of hazard handling as required for MIPS32/64 V2 processors.
++	 - Enforce minimal kmalloc alignment of 8 byte so 64-bit registers can be
++	   stored into fields without exceptions.
++	 - Speeling and warning fixes.
++	
++	Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] Indydog update
++	
++	From: Ralf Baechle <ralf at linux-mips.org>
++	
++	Forward port of the 2.4 driver with changes required for 2.6.
++	
++	Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] fix linker trouble with CONFIG_FB_RIVA_I2C=y and modular I2C
++	
++	From: Adrian Bunk <bunk at fs.tum.de>
++	
++	> This version causes linker trouble with
++	> CONFIG_I2C=m
++	> CONFIG_I2C_ALGOBIT=m
++	> CONFIG_FB_RIVA_I2C=y
++	>
++	>   CC      init/version.o
++	>   LD      init/built-in.o
++	>   LD      .tmp_vmlinux1
++	> drivers/built-in.o(.text+0xda101): In function `riva_setup_i2c_bus':
++	> : undefined reference to `i2c_bit_add_bus'
++	> drivers/built-in.o(.text+0xda218): In function `riva_delete_i2c_busses':
++	> : undefined reference to `i2c_bit_del_bus'
++	> drivers/built-in.o(.text+0xda237): In function `riva_delete_i2c_busses':
++	> : undefined reference to `i2c_bit_del_bus'
++	> drivers/built-in.o(.text+0xda2c9): In function `riva_do_probe_i2c_edid':
++	> : undefined reference to `i2c_transfer'
++	> make: *** [.tmp_vmlinux1] Error 1
++	>...
++	
++	The problem is:
++	FB_RIVA=y
++	FB_RIVA_I2C=y
++	I2C=m
++	I2C_ALGOBIT=m
++	
++	The patch below fixes this.
++	
++	Besides this, it contains:
++	- help text by Antonino A. Daplas
++	- converted spaces to tabs
++	- it was forgotten that FB_RIVA_I2C requires I2C_ALGOBIT
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] Fix early CPU vendor detection for non intel cpus
++	
++	From: Andi Kleen <ak at suse.de>
++	
++	Early CPU detect can only work after the various sub CPU drivers have
++	registered their devices.
++	
++	Currently the vendor would be always 0, which is Intel.
++	
++	This prevents Athlons from being recognized as buggy PPros and fixes some
++	other workarounds for non Intel CPUs too.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] OProfile: allow normal user to trigger sample dumps
++	
++	From: John Levon <levon at movementarian.org>
++	
++	In 2.4, OProfile allowed normal users to trigger sample dumps (useful under
++	low sample load).  The patch below, by Will Cohen, allows this for 2.6 too.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] SubmittingDrivers fix
++	
++	From: Jesper Juhl <juhl-lkml at dif.dk>
++	
++	Here's a small patch that lists X.Org as well as XFree86 in
++	Documentation/SubmittingDrivers in the section talking about video drivers.
++	
++	Signed-off-by: Jesper Juhl <juhl-lkml at dif.dk>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] Core fbcon fixes
++	
++	From: "Antonino A. Daplas" <adaplas at hotpop.com>
++	
++	This patch fixes the following bugs/regressions for fbcon:
++	
++	1.  Initialize and update global arrays used by fbcon during
++	   initialization and and by set_con2fbmap code.
++	
++	2.  Fixed screen corruption (white rectangle) at initial mode setting
++	   plaguing cards with VGA cores and with VGA console enabled.  (vga16fb,
++	   however, still shows remnants of previous text if boot logo is enabled)
++	
++	3. Improved fbcon_startup/fbcon_init code.
++	
++	4. Fixed set_con2fbmap code -- should support multiple devices mapped to
++	
++	Signed-off-by: Antonino A. Daplas <adaplas at pol.net>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] fbdev: video mode change notify (fbset)
++	
++	From: "Antonino A. Daplas" <adaplas at hotpop.com>
++	
++	This patch allows fbset to change the video mode and the console window
++	size via the notifier call chain.  It will only notify fbcon of mode
++	changes from user space.  Changes coming from upstream will be ignored.
++	
++	The code will only update the current console.
++	
++	Signed-off-by: Antonino Daplas <adaplas at pol.net>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] ppc64: fix POWER3 NUMA init
++	
++	From: Anton Blanchard <anton at samba.org>
++	
++	We were passing in the hole size as kB not pages to free_area_init which
++	made the VM misbehave.  This only hit on POWER3 because POWER4 and newer
++	places IO above all memory and so doesnt have a hole.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] Add PPC85xx MAINTAINERS entry
++	
++	From: Kumar Gala <kumar.gala at freescale.com>
++	
++	Added myself to the MAINTAINERS file for 85xx.  Added an entry into the
++	CREDITS file for me.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] (o)profile Documentation/basic_profiling.txt updates
++	
++	From: bert hubert <ahu at ds9a.nl>
++	
++	Signed-off-by: bert hubert <ahu at ds9a.nl>
++	Signed-off-by: John Levon <levon at movementarian.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] SELinux: Extend and revise calls to secondary module
++	
++	From: Stephen Smalley <sds at epoch.ncsc.mil>
++	
++	This patch extends the set of calls to the secondary security module by
++	SELinux as well as revising a few existing calls to support other security
++	modules and to more cleanly stack with the capability module.  Please
++	apply.
++	
++	Signed-off-by:  Stephen Smalley <sds at epoch.ncsc.mil>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] fix allocate_pgdat comments
++	
++	From: "Martin J. Bligh" <mbligh at aracnet.com>
++	
++	From: Andy Whitcroft <apw at shadowen.org>
++	
++	The comments for i386 allocate_pgdat indicate that the routine should be
++	modified to place the pgdat into node local memory.  However, this has
++	already been done as the pgdat is placed at node_remap_start_vaddr.  This
++	patch updates the comments to reflect this reality.
++	
++	Signed-off-by: Andy Whitcroft <apw at shadowen.org>
++	Signed-off-by: Martin J. Bligh <mbligh at aracnet.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] drivers/media/video/tda9840.c: honour return code of i2c_add_driver()
++	
++	From: Michael Hunold <m.hunold at gmx.de>
++	
++	i2c_add_driver() may actually fail, but my driver returns 0 regardless. 
++	Thanks to Arthur Othieno <a.othieno at bluewin.ch> for this obviously correct
++	patch.
++	
++	Signed-off-by: Michael Hunold <hunold at linuxtv.org>
++	Signed-off-by: Arthur Othieno <a.othieno at bluewin.ch>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] zap_pte_range speedup
++	
++	From: Hugh Dickins <hugh at veritas.com>
++	
++	zap_pte_range is wasting time marking anon pages accessed: its original
++	!PageSwapCache test should have been reinstated when page_mapping was
++	changed to return swapper_space; or more simply, just check !PageAnon.
++	
++	Signed-off-by: Hugh Dickins <hugh at veritas.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] h8300: delete obsolute header
++	
++	From: Yoshinori Sato <ysato at users.sourceforge.jp>
++	
++	- delete obsolute(unused) header file
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] cirrusfb: major update
++	
++	From: David Eger <eger at havoc.gtf.org>
++	
++	This patch brings the cirrusfb driver up to date with 2.6.  cirrusfb has
++	suffered bit rot like you wouldn't believe (last updated...  2.3.x era?).
++	The driver will now compile again, and you can change to a high resolution
++	text mode with stty.  Known defects: doesn't play nice with X, nor fbset.
++	
++	C = Cosmetic change
++	L = Logical change
++	A = API change
++	W = register Writing change
++	
++	(1-CA) fb_info and cirrusfb_info:
++	   - mostly cosmetic, but a lot less confusing, and no more nasty casting.
++	
++	  It used to be stylish to embed struct fb_info_gen (now struct fb_info)
++	  as the first member of struct clgenfb_info (now struct cirrusfb_info),
++	  and then you'd cast to the deisred struct.
++	  Now we pass the size of our data structure to framebuffer_alloc(), 
++	  and we make fb_info and cirrusfb_info reference each other with 
++	  pointers (as in radeonfb).
++	
++	  In the old code, there two declarations were common:
++	
++	  clgenfb_info *fb_info;
++	  clgenfb_info *info;
++	
++	  since there's also a 'struct fb_info' now, I found this really confusing,
++	  and unified usage as:
++	
++	  cirrusfb_info *cinfo;
++	  fb_info *info;
++	
++	  This accounts for a lot of the search and replace cosmetic upgrade.
++	
++	(2-A) All of the FB knowledge of FB internals is gone in 2.6
++	
++	(3-LW) revised maxclock numbers (cirrusfb_board_info_rec.maxclock[5])
++	
++		In my quest to get fbset to work, I borrowed some maxclock data
++		from the X.Org tree for various chipsets.  It didn't really seem 
++		to help.  oh well.
++	
++	(3-LA) upgraded PCI registration
++	
++		Instead of doing PCI walking from the driver, we hand off a
++		pci_device_id table to the PCI subsystem and just get called when
++		it finds a relevant board.
++	
++	(4-L) striking lots of __init and __initdata specifiers
++	
++		I was running into some things not working when I moved the call to
++		init_vgachip() from the driver registration to set_par().  I thought
++		perhaps this was due to some things being marked __init accidentally
++		so I axed said annotations.  Turns out it was something else.  See 5.
++	
++	(5-LA) delayed chip initialization, nasty double-set_par() pseudo-bug
++	
++	  Tony says that the fb drivers shouldn't do any chipset initialization
++	  until they get a set_par() call.  This way, fb modules can be safely
++	  unloaded if no one gets around to using them, and the vga_con -> fbcon
++	  hand off is smoother, as fbcon can still grab the back-scroll data from
++	  vga_con...
++	
++	  In any case, moving the calls to init_vgachip() and fbgen_do_set_var()
++	  from driver initialization to set_par() revealed that the cirrus
++	  register-writing function needs to be called twice for a mode change to
++	  work.  I don't understand why.
++	
++	(6-LA) split clgen_decode_var() into the bits that check the var and the
++	  bits that actually generate register information (par/regs) to write
++	
++	  Adding modedb hooks here might actually fix fbset, i think...
++	
++	(7-LW) No longer write the palette in init_vgachip() nor in set_par().
++	  Someone else (fbcon?) seems to be making its own calls to setcolreg()
++	  for us.
++	
++	(8-LW) setcolreg() -- while removing all of the console cruft, I had
++	  to try to reconstitute the palette code. I think I got this right, 
++	  but I could be off -- the penguin boots in the correct colors at least ;-)
++	
++	(9-L) pan_display() - we don't do wrap, silly. that's only on the amiga.
++	
++	(10-L) pan+BLT - to make pan play nicely with copyarea()/fillrect()
++	   I had to add a couple of calls to cirrusfb_WaitBLT() to make sure
++		the engine is idle.
++	
++	(11-LW) cirrusfb_blank() - I upgraded the switch here to use the new
++	  VESA_* blanking mode constants.  I think I translated the right
++	  logic for the right blanking levels.
++	
++	
++	Signed-off-by: David Eger <eger at havoc.gtf.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] update ikconfig help text
++	
++	From: "Randy.Dunlap" <rddunlap at osdl.org>
++	
++	Some elements of ikconfig have been removed, but the help text wasn't
++	updated to reflect those changes.
++	
++	Signed-off-by: Randy Dunlap <rddunlap at osdl.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] update ikconfig generator script
++	
++	From: "Randy.Dunlap" <rddunlap at osdl.org>
++	
++	http://bugme.osdl.org/show_bug.cgi?id=2701
++	
++	Current script has problems with some shells and utilities.  Remove use of
++	'echo' in the script.
++	
++	From: Roman Zippel <zippel at linux-m68k.org>
++	Signed-off-by: Randy Dunlap <rddunlap at osdl.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] hugetlb.c: use safe iterator
++	
++	From: "Chen, Kenneth W" <kenneth.w.chen at intel.com>
++	
++	With list poisoning on by default from linux-2.6.7, it's easier than ever to
++	trigger the bug in try_to_free_low().  It ought to use the safe version of
++	list iterater.
++	
++	Signed-off-by: Ken Chen <kenneth.w.chen at intel.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] swsusp minor docs updates
++	
++	From: Pavel Machek <pavel at ucw.cz>
++	
++	I shot myself in the foot with swsusp, so I guess documenting that
++	particular trap is right thing to do (tm).  Somehow two copies of "radeon
++	hint" crept in; fix that, too.
++	
++	Signed-off-by: Pavel Machek <pavel at suse.cz>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] Prepare for SMP suspend
++	
++	From: Pavel Machek <pavel at ucw.cz>
++	
++	Its very bad idea to freeze migration threads, as it crashes machine upon
++	next call to "schedule()".  In refrigerator, I had one "wake_up_process()"
++	too many.  This fixes it.
++	
++	Signed-off-by: Pavel Machek <pavel at suse.cz>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] swsusp: shuffle cpu.c to make it usable for smp suspend
++	
++	From: Pavel Machek <pavel at ucw.cz>
++	
++	This moves fix_processor_context() so that additional prototype is not
++	needed, and adds context * to processor state saving functions, so that
++	they can be used on SMP.  It should be done this way from the beggining.
++	
++	Signed-off-by: Pavel Machek <pavel at suse.cz>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] consolidate in-kernel configuration
++	
++	From: Andy Whitcroft <apw at shadowen.org>
++	
++	Being able to recover the configuration from a kernel is very useful and it
++	would be nice to default this option to Yes.  Currently, to have the config
++	available both from the image (using extract-ikconfig) and via /proc we
++	keep two copies of the original .config in the kernel.  One in plain text
++	and one gzip compressed.  This is not optimal.
++	
++	This patch removes the plain text version of the configuration and updates
++	the extraction tools to locate and use the gzip'd version of the file.
++	This has the added bonus of providing us with the exact same results in
++	both cases, the original .config; including the comments.
++	
++	Signed-off-by: Andy Whitcroft <apw at shadowen.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] sparse: fixes for "assignment expression in conditional" in fs/*
++	
++	From: Mika Kukkonen <mika at osdl.org>
++	
++	Fix various sparse "assignment expression in conditional" warnings in fs/
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] hugetlb.c - fix try_to_free_low()
++	
++	From: "Chen, Kenneth W" <kenneth.w.chen at intel.com>
++	
++	Turn on CONFIG_HIGHMEM and CONFIG_HUGETLBFS.  Try to config the hugetlb
++	pool:
++	
++	[root at quokka]# echo 100 > /proc/sys/vm/nr_hugepages
++	[root at quokka]# grep HugePage /proc/meminfo
++	HugePages_Total:   100
++	HugePages_Free:    100
++	
++	[root at quokka]# echo 20 > /proc/sys/vm/nr_hugepages
++	[root at quokka]# grep HugePage /proc/meminfo
++	HugePages_Total:     0
++	HugePages_Free:      0
++	
++	[root at quokka]# echo 100 > /proc/sys/vm/nr_hugepages
++	[root at quokka]# grep HugePage /proc/meminfo
++	HugePages_Total:   100
++	HugePages_Free:    100
++	
++	[root at quokka]# echo 0 > /proc/sys/vm/nr_hugepages
++	[root at quokka]# grep HugePage /proc/meminfo
++	HugePages_Total:    31
++	HugePages_Free:     31
++	
++	The argument "count" passed to try_to_free_low() is the config parameter
++	for desired hugetlb page pool size.  But the implementation took that input
++	argument as number of pages to free.  It also decrement the config
++	parameter as well.  All give random behavior depend on how many hugetlb
++	pages are in normal/highmem zone.
++	
++	A two line fix in try_to_free_low() would be:
++	
++	-			if (!--count)
++	-				return 0;
++	+			if (count >= nr_huge_pages)
++	+				return count;
++	
++	But more appropriately, that function shouldn't return anything.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] oom killer: ignore free swapspace
++	
++	From: William Lee Irwin III <wli at holomorphy.com>
++	
++	During stress testing at Oracle to determine the maximum number of clients
++	2.6 can service, it was discovered that the failure mode of excessive
++	numbers of clients was kernel deadlock.  The following patch removes the
++	check if (nr_swap_pages > 0) from out_of_memory() as this heuristic fails
++	to detect memory exhaustion due to pinned allocations, directly causing the
++	aforementioned deadlock.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] sh: SH-3 On-Chip ADC support
++	
++	From: Paul Mundt <lethal at Linux-SH.ORG>
++	
++	This adds support for the SH-3's on-chip ADC (which is needed by things like
++	the touchscreen, etc.).
++	
++	Signed-off-by: Andriy Skulysh <askulysh at image.kiev.ua>
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] sh: dma-mapping updates.
++	
++	From: Paul Mundt <lethal at Linux-SH.ORG>
++	
++	This updates the sh dma-mapping code, as well as doing some cleanup in the
++	consistent API.  We also add a consistent_{alloc,free} to the machvec for
++	platforms that need special handling.
++	
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] sh: DMA driver updates.
++	
++	From: Paul Mundt <lethal at Linux-SH.ORG>
++	
++	This updates the SuperH DMA driver, as well as cleaning up the registration
++	interface.
++	
++	We also drop the use of bitfields in dma-sh since things like the SH4-202,
++	7751R, 7760, etc.  all have a completely different set of register
++	definitions.
++	
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] sh: early printk() cleanup.
++	
++	From: Paul Mundt <lethal at Linux-SH.ORG>
++	
++	sh was using its own CONFIG_SH_EARLY_PRINTK, this is no longer necessary as we
++	can easily work with the generic CONFIG_EARLY_PRINTK.
++	
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] sh: fixmap support.
++	
++	From: Paul Mundt <lethal at Linux-SH.ORG>
++	
++	This adds fixmap support for sh.
++	
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] sh: Renesas HS7751RVoIP board support.
++	
++	From: Paul Mundt <lethal at Linux-SH.ORG>
++	
++	This adds support for the Renesas Technology Sales HS7751RVoIP board.
++	
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] sh: IDE cleanup.
++	
++	From: Paul Mundt <lethal at Linux-SH.ORG>
++	
++	This does a bit of IDE cleanup (in preparation for the SuperH generic IDE host
++	driver).  This also adds SuperH to the list of platforms that are interested
++	in CONFIG_IDE_MAX_HWIFS.
++	
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] sh: ptep_get_and_clear() compile fix.
++	
++	From: Paul Mundt <lethal at Linux-SH.ORG>
++	
++	This fixes up a compile error occuring with ptep_get_and_clear() existing in
++	pgalloc.h.  We move it to a somewhat more sensible location instead, and take
++	this opportunity to make some cleanups for use of generic code in the SH-3
++	case, etc.
++	
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] sh: sh-sci updates.
++	
++	From: Paul Mundt <lethal at Linux-SH.ORG>
++	
++	This adds support for the SH7300 as well as the SH5-101/103 processors as well
++	as specific board support for the RTS7751R2D.
++	
++	In addition to this, the sh early printk code is gutted so that we use the
++	generic CONFIG_EARLY_PRINTK interfaces instead.
++	
++	Signed-off-by: Hiroshi DOYU <Hiroshi_DOYU at montavista.co.jp>
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] sh: SolutionEngine 7300 board support.
++	
++	From: Paul Mundt <lethal at Linux-SH.ORG>
++	
++	This adds support for the SH7300 solution engine board (a forward port of the
++	2.4 code).
++	
++	Signed-off-by: Hiroshi DOYU <Hiroshi_DOYU at montavista.co.jp>
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] sh: Renesas RTS7751R2D board support.
++	
++	From: Paul Mundt <lethal at Linux-SH.ORG>
++	
++	This adds support for the Renesas Technology Sales RTS7751R2D board.
++	
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] sh: PCI updates
++	
++	From: Paul Mundt <lethal at Linux-SH.ORG>
++	
++	This updates the pci-auto code, as well as adding ops and fixups for the
++	RTS7751R2D board.
++	
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] sh: SH7705/SH7300 subtype support, ST40 updates.
++	
++	From: Paul Mundt <lethal at Linux-SH.ORG>
++	
++	This adds support for the SH7705 and SH7300 subtypes and also updates some
++	ST40-specific FRQCR handling code.
++	
++	Signed-off-by: Alex Bennee <kernel-hacker at bennee.com>
++	Signed-off-by: Hiroshi DOYU <Hiroshi_DOYU at montavista.co.jp>
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] sh: VoyagerGX companion chip support.
++	
++	From: Paul Mundt <lethal at Linux-SH.ORG>
++	
++	This adds support for the SM501/VoyagerGX companion chip, used by the
++	RTS7751R2D.
++	
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] sh: merge.
++	
++	From: Paul Mundt <lethal at Linux-SH.ORG>
++	
++	This merges the remaining sh changes, random bug fixes, added syscalls, cache
++	fixups, etc.  Nothing really eventful.
++	
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] sh: Consolidate SystemH with other Renesas boards.
++	
++	From: Paul Mundt <lethal at Linux-SH.ORG>
++	
++	Nothing really interesting here, with the addition of several other Renesas
++	boards, we just move the systemh directory to the renesas one to fit in
++	better with the directory structure.
++	
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] md: Fix up handling for read error in raid1.
++	
++	From: NeilBrown <neilb at cse.unsw.edu.au>
++	
++	There is severe bit-rot in this code, which is to say that it doesn't work
++	at all: an io error during read will do bad things.  It should work better
++	with this patch.
++	
++	Signed-off-by: Neil Brown <neilb at cse.unsw.edu.au>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] md: XOR template selection redo
++	
++	From: NeilBrown <neilb at cse.unsw.edu.au>
++	
++	From: Josh Litherland <josh at emperorlinux.com>
++	
++	The XOR routine selection process is often confusing as it often doesn't
++	choose the routine that measures the fastest, as sometime one routine is
++	known to have better cache performance.
++	
++	This patch avoids the comparison when there is a known best choice, and
++	makes the report more meaningful.
++	
++	Signed-off-by: Neil Brown <neilb at cse.unsw.edu.au>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] kswapd warning fix
++	
++	mm/vmscan.c: In function `kswapd':
++	mm/vmscan.c:1139: warning: no return statement in function returning non-void
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] balanced_irq warning fix
++	
++	arch/i386/kernel/io_apic.c: In function `balanced_irq':
++	arch/i386/kernel/io_apic.c:582: warning: no return statement in function returning non-void
++	
++	and clean things up a bit
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] fix broken alpha build ptrace.c error
++	
++	From: Darren Williams <dsw at gelato.unsw.edu.au>
++	
++	include/asm/checksum.h:75: warning: `struct in6_addr' declared inside parameter list include/asm/checksum.h:75
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<roland at redhat.com>
++	[PATCH] fix x86-64 ptrace access to 32-bit vsyscall page
++	
++	When I made get_user_pages support looking up a pte for the "gate" area, I
++	assumed it would be part of the kernel's fixed mappings.  On x86-64 running
++	a 32-bit task, the 32-bit vsyscall DSO page still has no vma but has its
++	pte allocated in the user mm in the normal fashion.  This patch makes it
++	use the generic page-table lookup calls rather than the shortcuts.
++	With this, ptrace on x86-64 can access a 32-bit process's vsyscall page.
++	
++	The behavior on x86 is unchanged.
++	
++	Signed-off-by: Roland McGrath <roland at redhat.com>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulus at samba.org>
++	[PATCH] ppc64: clean up prom.c and related files
++	
++	Somebody back in the mists of time decided that call_prom and rtas_call
++	should return longs even though both of those bits of firmware run in
++	32-bit mode and produce a 32-bit result.  To make life more interesting,
++	the 32-bit result gets zero-extended to 64 bits, which makes checking
++	for a -1 return value more complicated than it should be.
++	
++	This patch changes call_prom and rtas_call to return an int, and makes
++	the corresponding changes to use ints for the variables used to hold
++	those return values. 
++	
++	While I was doing this I finally got annoyed enough with the strings of
++	prom_print() and prom_print_hex() calls that we do to write a simple
++	prom_printf.  I deliberately didn't use snprintf because the execution
++	environment is weird at this point - we aren't running at the address we
++	are linked at just yet - and I didn't want to inflict that on any code
++	outside this file.  I also did a prom_debug() macro, which eliminated a
++	few ifdefs. 
++	
++	There are also a bunch of other minor cleanups.  This patch makes very
++	few algorithmic changes but does get rid of a lot of casts.  :)
++	
++	I have been running with this patch for a couple of weeks, and Anton has
++	tested it too.
++	
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulus at samba.org>
++	[PATCH] Better memset
++	
++	Anton noticed in some traces that we were spending an awfully long time
++	doing a memset.  The ppc64 memset is basically unchanged from the ppc32
++	version, and it only does 4-byte stores and doesn't unroll the loop. 
++	Here's a memset that performs a bit better.
++	
++	I have been using it for 3 weeks now, and Anton has tested it on a
++	variety of machines, without problems. 
++	
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulus at samba.org>
++	[PATCH] Clean up head.S whitespace
++	
++	The whitespace in arch/ppc64/kernel/head.S is a bit all over the place. 
++	This patch fixes it up.  This patch changes nothing other than
++	whitespace. 
++	
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<benh at kernel.crashing.org>
++	[PATCH] ppc64: Fix booting on LPAR machines with more than 1 CPU
++	
++	The exception rewrite contains a small bug that prevents bring up of CPUs
++	on logically partitioned machines.
++	
++	The kernel is trying to zero the backlink on the new stack while running
++	with relocation disabled, which potentially cause it to try to access an
++	address outside of the region allowed in real mode.  This seem to be a
++	leftover from previous code as we also zero the backlink later after
++	turning off the MMU. 
++	
++	This patch removes the offending bit.
++
++<Andries.Brouwer at cwi.nl>
++	[PATCH] revert partition nonsense
++	
++	Updating my source to 2.6.7 I see that you applied some
++	nonsense garbage patch. Please undo.
++	
++	[ Note by Linus: the fact that DOS_EXTENDED_PARTITION is 5, and we're
++	  iterating over slots 1-4 in the partition table, are two totally
++	  unrelated things. Using the symbolic constant does indeed not make
++	  any sense at all here, as Andries so eloquently points out. ]
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] make DVD ioctls that can legitimately fail quiet
++	
++	DVD_LU_SEND_{AGID,TITLE_KEY} can be legitimately rejected; in that case
++	we should not spew into logs.
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: trivial drivers/net/* annotations
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: trivial drivers/char/* annotation and format fixes
++	
++	 - trivial annotation in several places in drivers/mtd
++	 - a bunch of debugging printks switched from %x to %llx (they get 64bit
++	   values)
++	 - in doc200[01].c fixed type of (unused) last argument in their
++	   doc_read_ecc().
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: trivial annotations in drivers/char/*
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] isdn_writebuf_stub() sanitized
++	
++	isdn_writebuf_stub() was always called for userland pointers.
++	
++	Killed the argument telling whether it's kernel or userland pointer,
++	killed dead code, updated callers.
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: trivial drivers/isdn/* annotations
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: i2o fixed
++	
++	Fixes for direct dereferencing of userland pointers in i2o_config.c
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: trivial i2o annotations
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: scsi ->ioctl() annotation
++	
++	Low-level drivers' ->ioctl() gets a userland pointer from scsi_ioctl();
++	prototype annotated, so is scsi_debug instance.
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: remove redundant hwgroup->handler checks from ide-taskfile.c
++	
++	Remove checks for hwgroup->handler == NULL from task_[in,mulin,out]_intr()
++	(CONFIG_IDE_TASKFILE_IO=n versions).  These functions can be called only from
++	ide_intr() or ide_timer_expiry() and both set hwgroup->handler to NULL first.
++	
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: end request fix for CONFIG_IDE_TASKFILE_IO=y PIO handlers
++	
++	ide_end_drive_cmd() should only be called for "flagged" taskfiles
++	which have separate PIO handlers so use driver->end_request() instead.
++	
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: PIO-in drive busy fix (CONFIG_IDE_TASKFILE_IO=y)
++	
++	If the drive times out the final status check we should fail the request
++	instead of setting another handler for the next IRQ.
++	
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: check drive->mult_count in flagged_taskfile()
++	
++	Check drive->mult_count in flagged_taskfile() and fail request early
++	if necessary so there is no need to do it later in the PIO handlers.
++	
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: last IRQ fix for task_mulout_intr() (CONFIG_IDE_TASKFILE_IO=n)
++	
++	We should wait for the last IRQ after all data is sent.
++	
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: remove DTF() debugging printks from ide-taskfile.c
++	
++	They are off by default and conflict with the future changes.
++	
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: add task_multi_sectors() to ide-taskfile.c
++	
++	Move common code from task_mulin_intr() and task_mulout_intr()
++	(CONFIG_IDE_TASKFILE_IO=y) to a task_multi_sectors() helper.
++	
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: split task_sectors() and task_multi_sectors()
++	
++	- split __task_sectors() out of task_sectors()
++	- add bio and buffer versions of task[_multi]_sectors()
++	- use task_bio_sectors() instead of task_sectors() in pdc4030.c
++	- move task[_buffer]_sectors() to ide-taskfile.c
++	- uninline task[_multi]_sectors()
++	
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: don't clear rq->errors for REQ_DRIVE_TASKFILE requests
++	
++	REQ_DRIVE_TASKFILE requests aren't retried so don't clear rq->errors
++	in CONFIG_IDE_TASKFILE_IO=n PIO handlers and in CONFIG_IDE_TASKFILE_IO=y
++	PIO handlers clear rq->errors only for fs requests, flagged_* PIO
++	handlers were already okay.
++	
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: use task_buffer[_multi]_sectors() in ide-taskfile.c
++	
++	- update rq counters directly in task_buffer_sectors()
++	- use task_buffer[_multi]_sectors() in taskfile PIO
++	  handlers (CONFIG_IDE_TASKFILE_IO=n and flagged ones) so:
++	  (a) rq->hard_cur_sectors is used for rq mapping
++	  (b) in case of error valid rq->sector is reported
++	  (c) we can s/rq->current_nr_sectors/rq->nr_sectors/ later
++	- uninline task_buffer_sectors()
++	- remove not needed !rq->bio code from ide_[un]map_buffer()
++	  (it is used only for fs requests which are always bio based)
++	- remove no longer needed task_rq_offset()
++	
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: PIO-out setup fixes (CONFIG_IDE_TASKFILE_IO=n)
++	
++	- setup hwgroup->handler/timer in ->prehandler() (after checking
++	  drive status) and in do_rw_taskfile() only send a command
++	- make pre_task_mulout_intr() transfer first data block itself
++	  instead of calling ->handler() so we don't have to play tricks
++	  with hwgroup->handler/timer in task_mulout_intr()
++	
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: reduce > 3kb call path in ide-cs
++	
++	 - Reduce large stack usage in ide_config() by using kmalloc(), down
++	   from 0x4a4 bytes to 0x64 bytes (x86-32).
++	 - Little whitespace cleanup. 
++	 - Move function comment block to immediately above the function. 
++	
++	Module loaded and unloaded, otherwise not tested (no hardware).
++	
++	Signed-off-by: Randy Dunlap <rddunlap at osdl.org>
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: hpt36x/37x tuning fix
++	
++	From: Jonas Thornblad <jonas at thornblad.net>
++	
++	There is a problem in the hpt366.c driver where the function
++	ide_config_drive_speed(drive, speed) is called without using the correct
++	speed variable.  The speed variable should use the value returned by
++	hpt3xx_ratefilter which decides the speed after checking against the bad
++	drives list.
++	
++	I believe the following patch fixes the problem.
++	
++	Slightly reworked by me - Bart.
++	
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: check_region removal - trm290.c
++	
++	Signed-off-by: Jesper Juhl <juhl-lkml at dif.dk>
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] symlink 1/9: infrastructure and explanation
++	
++	This patch-kit gets past the limit on nested symlinks, without
++	incompatible API changes _and_ with killing code duplication in most of
++	the readlink/follow_link pairs.  And no, it's not the old ->getlink()
++	crap - procfs et.al.  are not special-cased there. 
++	
++	Here's how it works:
++	 * ->follow_link() still does what it used to do - replaces
++	   vfsmount/dentry in the nameidata it got from caller.  However, it can
++	   also leave a pathname to be resolved by caller. 
++	 * we add an array of char * into nameidata; we always work with
++	   nd->saved_names[current->link_count].  nd_set_link() sets it,
++	   nd_get_link() returns it.
++	 * callers of ->follow_link() (all two of them) check if ->follow_link()
++	   had left us something to do.  If it had (return value was zero and
++	   nd_get_link() is non-NULL), they do __vfs_follow_link() on that name.
++	   Then they call a new method (->put_link()) that frees whatever has to
++	   be freed, etc. 
++	
++	Note that absolute majority of symlinks have "resolve a pathname" as
++	part of their ->follow_link(); they can do something else and some don't
++	do that at all, but having that pathname resolution is very, very
++	common. 
++	
++	With that change we allow them to shift pathname resolution part to
++	caller.  They don't have to - it's perfectly OK to do all work in
++	->follow_link().  However, leaving the pathname resolution to caller
++	will
++	   a) exclude foo_follow_link() stack frame from the picture
++	   b) kill 2 stack frames - all callers are in fs/namei.c
++	and they can use inlined variant of vfs_follow_link().
++	
++	That reduction of stack use is enough to push the limit on nested
++	symlinks from 5 to 8 (actually, even beyond that, but since 8 is common
++	for other Unices it will do fine). 
++	
++	For those who have "pure" ->follow_link() (i.e.  "find a string that
++	would be symlink contents and say nd_set_link(nd, string)") we also get
++	a common helper implementing ->readlink() - it just calls
++	->follow_link() on a dummy nameidata, calls vfs_readlink() on result of
++	nd_get_link() and does ->put_link().  Using (or not using) it is up to
++	filesystem; it's a helper that can be used as a ->readlink() for many
++	filesystems, not a reimplementation of sys_readlink().  However, that's
++	_MANY_ filesystems - practically all of them. 
++	
++	Note that we don't put any crap like "if this is a normal symlink, do
++	this; otherwise call ->follow_link() and let it do its magic" into
++	callers - all symlinks are handled the same way.  Which was the main
++	problem with getlink proposal back then. 
++	
++	That covers almost everything; the only cases left are nfs, ncpfs and
++	cifs.  Those will go later - we are backwards compatible, so it's not a
++	problem. 
++	
++	First patch: infrastructure - helpers allowing ->follow_link() to leave
++	a pathname to be traversed by caller + corresponding code in callers. 
++
++<viro at www.linux.org.uk>
++	[PATCH] symlink 2/9: ext2 conversion and helper functions
++	
++	        ext2 conversion (helper functions for that one will be actually
++	used a lot by other filesystems, so to fs/namei.c they go)
++
++<viro at www.linux.org.uk>
++	[PATCH] symlink 3/9: trivial filesystems
++	
++	trivial cases - ones where we have no need to clean up after pathname
++	traversal (link body embedded into inode, etc.).
++	
++	Plugged leak in devfs_follow_link(), while we are at it.
++
++<viro at www.linux.org.uk>
++	[PATCH] symlink 4/9: simple filesystems
++	
++	cases that can simply reuse ext2 helpers (page_follow_link_light() and
++	page_put_link()).
++
++<viro at www.linux.org.uk>
++	[PATCH] symlink 5/9: smbfs
++	
++	smbfs - switched from on-stack allocation of buffer for link body (!) to
++	__getname()/putname(); switched to new scheme.
++
++<viro at www.linux.org.uk>
++	[PATCH] symlink 6/9: xfs
++	
++	xfs switched to new scheme; leaks plugged.
++
++<viro at www.linux.org.uk>
++	[PATCH] symlink 7/9: shmfs
++	
++	shm switched (it almost belongs to SL3, but it does some extra stuff
++	after the link traversal).
++
++<viro at www.linux.org.uk>
++	[PATCH] symlink 8/9: befs
++	
++	befs switched; leaks plugged.
++
++<viro at www.linux.org.uk>
++	[PATCH] symlink 9/9: jff2
++	
++	jffs2 switched; leaks plugged.
++
++<david-b at pacbell.net>
++	[PATCH] USB: EHCI IRQ tweaks
++	
++	Various tweaks to EHCI IRQ handling, these may affact some systems.
++	
++	 - Delays enabling IRQs until the root hub is more fully set up, so
++	   any "resume detect" IRQs can be handled properly.  (Craig Nadler)
++	
++	 - Power down ports on driver shutdown.  (Craig Nadler)
++	
++	 - Remove some duplicate irq-sharing logic that somehow crept in; check
++	   only once, and return IRQ_NONE to detect IRQ storms better (db)
++	
++	 - Minor comment fix re integrated TTs.  (db)
++	
++	From:          Craig Nadler <craig.nadler at arc.com>
++	Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: usb ethernet gadget build fixes on PXA
++	
++	Build fixes for ethernet gadget on PXA.
++	
++	From:          Frank Neuber <fn at kernelport.de>
++	Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<zinx at epicsol.org>
++	[PATCH] USB: hid-tmff fix
++	
++	This fixes a long-standing bug in the hid-tmff driver that
++	causes it to not work at all.
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<jejb at mulgrave.(none)>
++	qla2xxx: Remove qla_os.h
++	
++	From: Andrew Vasquez <praka at users.sourceforge.net>
++	
++	Instead make all files do the proper includes.
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Use 64-bit IO addresses in UHCI driver
++	
++	Thanks to Ludovic Aubry for this patch.  It changes some local variables
++	used by the UHCI driver to store IO addresses from unsigned int to
++	unsigned long.  This is vitally necessary on 64-bit platforms.
++	
++	
++	
++	
++	From: Ludovic Aubry <laubrycomm at free.fr>
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Imiprove usb_device tracking in dummy_hcd
++	
++	A tricky problem the dummy_hcd driver has to solve is keeping track of the
++	usb_device structure that corresponds to a registered gadget.  Right now
++	that's not done very robustly.  This patch stores the address of the
++	structure when a new URB is submitted and also acquires a reference to
++	make sure that completing the final URB won't deallocate the structure
++	before dummy_hcd is through with it.
++	
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Add mb() during initialization of UHCI controller
++	
++	In a recent thread it was mentioned that some architectures, such as PPC,
++	do not guarantee relative ordering between different varieties of
++	processor/device data transfers.  This patch adds an mb() instruction to
++	the UHCI driver, to insure that the data structures in memory (cached by
++	the CPU and accessed by DMA) are fully flushed before the controller is
++	started (by regular bus IO).
++	
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: usb gadget drivers should be stricter about ZLPs
++	
++	Some USB device controllers make it easy to handle all the various ways
++	hosts interpret the USB spec about when control-IN transfers need to send
++	a ZLP ... they can just send one if the host asks, or start the status
++	stage whenever the host thinks it's time.  Other controllers make it hard
++	to be forgiving in those cases.
++	
++	This patch updates all the gadget drivers to explicitly set the req->zero
++	flag to reflect whether the USB spec says a ZLP "must" be sent by the
++	device.  "Forgiving" drivers won't notice the change, but the others need
++	to see this information passed down from the gadget driver.
++	
++	Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<oliver at neukum.org>
++	[PATCH] USB: GFP_KERNEL in irq
++	
++	you are using GFP_KERNEL in irq. That's illegal. GFP_ATOMIC must
++	be used.
++	
++	Signed-Off-By: Oliver Neukum <oliver at neukum.name>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<oliver at neukum.org>
++	[PATCH] USB: kaweth not handling ESHUTDOWN
++	
++	kaweth fails to cleanly shut down operations upon shutdown of the
++	controller.
++	
++	
++	Signed-Off-By: Oliver Neukum <oliver at neukum.name>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: gadgetfs AIO support
++	
++	This patch adds AIO support to gadgetfs, letting user mode programs use
++	"libaio" to manage USB I/O concurrency with the same API as they may
++	already be using for disk files.  In particular, it's practical to
++	stream isochronous data to/from userspace using this API, by keeping
++	an endpoint's I/O queue from emptying.
++	
++	Each AIO "iocb" in userspace corresponds directly to one "usb_request"
++	(and one kiocb) in the kernel.  Their lifecycles, including cancelation,
++	overlap completely.  That's much of why the patch is so small (surprised
++	the heck out of me!); that, and using copy_{to,from}_user() rather than
++	trying fancy dma mapping tricks to attain zerocopy nirvana.
++	
++	The kernel AIO module forgot to export kick_iocb(), so this adds the
++	missing declaration ... needed when using gadgetfs as a module.
++	
++	Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<hverhagen at dse.nl>
++	[PATCH] USB: shut-up kaweth usb/net driver
++	
++	The kaweth usb ethernet driver is pretty noisy.  It generates over 40 lines
++	during a modprobe.  The following patch reduces the prints generated by
++	this driver.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<mdharm-usb at one-eyed-alien.net>
++	[PATCH] USB: Patch to signal underflow in usb-storage driver
++	
++	This patch causes the usb-storage driver to return an error indication
++	(DID_ERROR together with SUGGEST_RETRY) when the amount transferred by a
++	SCSI command is smaller than the "underflow" amount.  Some devices, like
++	the iRiver H100 series, occasionally transfer 0 bytes with GOOD status.
++	This change will make the sd driver aware that something unexpected has
++	happened so it can retry the command.
++	
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Matthew Dharm <mdharm-usb at one-eyed-alien.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<nemosoft at smcc.demon.nl>
++	[PATCH] USB: PWC 9.0.1
++	
++	Attached you will find patches that will bring the PWC driver in the kernel
++	up to version 9.0.1 from 8.12 (9.0 wasn't accepted at first). Patches are
++	against 2.4.26 and 2.6.7. The main difference with 9.0 is that the
++	video_relase() routine is now hopefully in line with kernel requirements.
++	I've also added one more ioctl() call, upon request.
++	
++	I'm also slightly in the dark on the status of the PWC in the 2.6 kernel;
++	I've seen two patches: the first was a bad one, since it would crash your
++	kernel when you unplug the cam. I've seen a second patch to reverse the
++	first one, but I don't know if that went in. Either way, you might get a
++	conflict in pwc-if.c in and about the pwc_video_release() routine; this
++	patch was generated against the clean 2.6.7 kernel source. Should you need
++	or want to fix it manually, this patch should remove the
++	pwc_video_release() in the 2.6 kernel.
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<greg at kroah.com>
++	[PATCH] USB: enable the pwc driver to be able to be built again.
++
++<torvalds at ppc970.osdl.org>
++	Make bitops/cpumask functions be "const" where appropriate.
++
++<akpm at osdl.org>
++	[NET]: Fix warning in tr.c
++	
++	A few things popped up when using current gcc cvs.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<akpm at osdl.org>
++	[NET]: Fix warning in fc.c
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<akpm at osdl.org>
++	[NETFILTER]: ip_fw_compat_masq.c needs net/ip.h for IP_OFFSET.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<akpm at osdl.org>
++	[PKT_SCHED]: Fix pkt_sched.h warnings.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[PKT_SCHED]: Fix typo in config help text, noticed by Geert.
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] symlink: fix missing 'depth' initialization
++	
++	Now we always care about one part of nameidata --- ->depth.  And we need
++	to make sure it's always initialized.
++	
++	generic_readlink() was missing that part.
++
++<nico at org.rmk.(none)>
++	[ARM PATCH] 1942/1: basic LCD support for the PXA270/Mainstone board
++	
++	Patch from Nicolas Pitre
++	
++	This is only basic support so the LCD pannel becomes usable
++	on Mainstone. No PXA270 specific capabilities were added.
++	The Mainstone defconfig also updated to enable LCD by default.
++
++<akpm at osdl.org>
++	[PATCH] x86: fix up cpumask breakage
++	
++	We can't do
++	
++		&some_inline_function();
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<davej at redhat.com>
++	[AGPGART] Fix silly logic bug in AGPx8 ->x4 fallback code.
++	Spotted by Rainer Klier
++	
++	Signed-off-by: Dave Jones <davej at redhat.com>
++
++<acme at conectiva.com.br>
++	[NET] move already shared functions from inet to core
++	
++	inet_recvmsg, inet_setsockopt, inet_getsockopt and inet_sock_release are
++	already shared with ipv6 and sctp, will be used as well by the poor cousins,
++	so reflect this properly renaming them to sock_common_NAME and move them to
++	net/core/sock.c
++	
++	Signed-off-by: Arnaldo Carvalho de Melo <acme at conectiva.com.br>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<acme at conectiva.com.br>
++	[NET] share tcp_v4_destroy_sock with tcpv6
++	
++	tcp_v6_destroy_sock just extends tcp_v4_destroy_sock, so reuse the
++	tcp_v4_destroy_sock instead of cut'n'pasting it into tcpv6.
++	
++	Signed-off-by: Arnaldo Carvalho de Melo <acme at conectiva.com.br>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<stevef at smfhome1.smfdom>
++	Do not loop in cifsd demultiplex thread when someone sigkills it.  
++	On unmount of second user on same tcp session, make sure that we
++	do not kill cifsd prematurely.
++	
++	Signed-off-by: Steve French (sfrench at us.ibm.com)
++
++<akpm at osdl.org>
++	[SPARC64]: Make find_next_bit take a const pointer.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<akpm at osdl.org>
++	[SPARC64]: Make ___arch_swapXp() take a const pointer.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Update defconfig.
++
++<herbert at gondor.apana.org.au>
++	[IPSEC]: Check encap_type at config time.
++	
++	The following patch moves the udp->encap_type check from the per-packet
++	hot-path into udp_setsockopt().
++	
++	As a consequence, this allows user space to detect whether the kernel
++	actually supports the encap type that they're requesting.  Pity no one
++	did this before the NON-IKE patch was applied.  As it is there is no
++	easy way to detect whether NON-IKE support is present.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[IPSEC]: Check encap_type at config time, in user API code.
++	
++	Here is the patch to check encap_type at the earliest possible
++	opportunity in xfrm_user/af_key.
++	
++	This will allow us to assume in esp4 that the encap_type from x->encap
++	is always valid.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<Andries.Brouwer at cwi.nl>
++	[PATCH] isofs fixes
++	
++	This fixes two things.
++	
++	On the one hand we have the old "cruft" mount option, that sometimes was
++	enabled automatically, for ridiculously large files or CDROMs.  But what
++	was ridiculous ten years ago, no longer is.  So, only decide that
++	something is cruft when the user said so. 
++	
++	On the other hand, sometimes we get negative sizes.  That is caused by
++	assignments inode->i_size = isonum_733(), where the latter was declared
++	integer.  I made it unsigned int, as the standard also does.
++	
++	(Someone with problems replied:
++	  >> Could you test the below?
++	  > Ok I did, the patch seems to work great!  Thanks!
++	)
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: idle disk on resume
++	
++	From: Jens Axboe <axboe at suse.de>
++	
++	I need this patch to survive suspend on my powerbook, if the drive is
++	sleeping when suspend is entered.  Otherwise it freezes on resume when it
++	tries to read from the drive.
++	
++	Acked by Ben.
++	
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: limit max_sectors to 256 for PDC20265
++	
++	PDC20265 seems to not like large LBA48 requests.
++	
++	Thanks to Adolfo Gonzalez Blazquez for help in debugging this problem.
++	
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<miles at mctpc71.ucom.lsi.nec.co.jp>
++	[PATCH] v850: guard declaration of handle_IRQ_event with #ifdef !__ASSEMBLY__
++	
++	Signed-off-by: Miles Bader <miles at gnu.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<miles at mctpc71.ucom.lsi.nec.co.jp>
++	[PATCH] v850: add missing end-of-line backslash to vmlinux.lds.S
++	
++	Signed-off-by: Miles Bader <miles at gnu.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<miles at mctpc71.ucom.lsi.nec.co.jp>
++	[PATCH] v850: add find_next_bit
++	
++	[Since many archs use the same implementation of find_next_bit, it might
++	be nice to have `generic_find_next_bit' or something.]
++	
++	Signed-off-by: Miles Bader <miles at gnu.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<miles at mctpc71.ucom.lsi.nec.co.jp>
++	[PATCH] v850: remove bogus __ARCH_WANT_ macro defs
++	
++	Signed-off-by: Miles Bader <miles at gnu.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<miles at mctpc71.ucom.lsi.nec.co.jp>
++	[PATCH] make CONFIG_SYSVIPC depend on CONFIG_MMU
++	
++	The sysv-ipc code uses mm/shmem.o, which in turn uses VM stuff and is
++	only compiled on MMU systems.
++	
++	Signed-off-by: Miles Bader <miles at gnu.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<jbarnes at engr.sgi.com>
++	[PATCH] ia64: early console registration
++	
++	Allow consoles to register early if they're capable of early output.
++	If one of them registers successfully, set CPU 0 online so that
++	printk() will actually call the console drivers.
++	
++	Signed-off-by: Jesse Barnes <jbarnes at sgi.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<holt at sgi.com>
++	[PATCH] ia64: Fixups for the SN2 Block Transfer Engine
++	
++	The attached patch contains some cleanups to the bte code and introduces
++	the ability to excercise bte interfaces on other nodes.  This is an SGI
++	Altix specific piece of hardware.
++	
++	Signed-off by: Robin Holt
++	Signed-off by: Jesse Barnes
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<jbarnes at engr.sgi.com>
++	[PATCH] ia64: make SN2 use 16MB granules, too
++	
++	Altix needs to use 16MB granules to prevent attribute aliasing in low
++	memory space.  This patch makes the kernel configuration system
++	enforce that requirement.
++	
++	Signed-off-by: Jesse Barnes <jbarnes at sgi.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<bjorn.helgaas at hp.com>
++	[PATCH] ia64: minor IOSAPIC cleanup
++	
++	Introduce iosapic_{read,write,eoi} to hide the IOSAPIC REG_SELECT
++	stuff.  i386 and x86_64 already do this for io_apic_{read,write}.
++	
++	Signed-off-by: Bjorn Helgaas <bjorn.helgaas at hp.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<jbarnes at engr.sgi.com>
++	[PATCH] ia64: another sn2_defconfig update
++	
++	This update fixes the FAT default NLS options and trims some others.
++	
++	Signed-off-by: Jesse Barnes <jbarnes at sgi.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<alex.williamson at hp.com>
++	[PATCH] ia64: trashing bootmem on non-NUMA boxes
++	
++	call_pernode_memory() is rounding memory regions to page boundaries,
++	but in the non-NUMA case, it's incorrectly passing the rounded start and
++	the original length.  Any reserved memory regions sitting beyond a
++	memory region that isn't nicely aligned is potentially at risk for
++	getting freed and trashed.  This is a fairly nasty bug that can bite in
++	very hard to find ways.  In my case, the EFI memory map was getting
++	overwritten, causing the ACPI methods to access chipset registers
++	cachable instead of uncachable.  It could potentially be causing some of
++	the random hangs and strange behavior we're seeing lately.
++	
++	Signed-off-by: Alex Williamson <alex.williamson at hp.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<rmk at flint.arm.linux.org.uk>
++	[PCMCIA] Fix bogus align value
++	
++	0 is not a valid alignment value for allocate_resource()
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Fix SA1100 build after timer changes.
++
++<dougg at torque.net>
++	[PATCH] More advansys fixes
++	
++	   - fix PCI wide "use_sg > 0" problem introduced in lk 2.6.7-bk2
++	   - fix ISA oops (present in all versions of the lk 2.6 series to date)
++	   - bump version to "3.3K" and add comments
++	   - fix compilation error when ADVANSYS_DEBUG defined
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<jejb at mulgrave.(none)>
++	advansys: add warning and convert #includes
++	
++	The DMA conversion of the advansys driver is still
++	broken.  Add a #warning to the driver and a comment
++	above it explaining what needs to be done.
++	
++	Mark the driver as BROKEN because of the warning
++	
++	Also remove the #include "scsi.h"
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<hch at lst.de>
++	[PATCH] ppc32: fix compilation
++	
++	PPC has an out of line and exported abs() that gives lots of nice and
++	wierd compilation erorrs.  Also kill the duplicate cpu_online() in
++	asm-ppc/smp.h.
++
++<hch at infradead.org>
++	[PATCH] MPT Fusion driver 3.01.09 update
++	
++	On Mon, Jun 21, 2004 at 12:16:08PM -0400, Moore, Eric Dean wrote:
++	> We are pleased to announce the MPT Fusion release candidate for lk 2.6
++	
++	I've worked with Eric offline to resolve the issue we had and get some
++	more changes in, but he has left for his vacation today.  He send me
++	a patch though and left it to me whether we'd merged it despite only
++	moderate testing.  Given 2.6.7 was just done and he'll certainly be
++	back before 2.6.8 I'd go for it.  Below is the patch rediffed against
++	scsi-misc-2.6:
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<herbert at gondor.apana.org.au>
++	[IPSEC]: Fix alen calcs in non-IKE encapsulation.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[IPSEC]: Remove run-time encap_type checks in esp4.
++	
++	This allows us to remove all the per-packet checks on x->encap->encap_type.
++	I've left the check in esp_input just in case someone adds a non-ESP encap
++	type in future.
++	
++	However, printing a warning and then continuing is definitely wrong.
++	So expect a follow-up patch to drop the packet when encap_type is
++	unknown in esp_input.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[IPSEC]: Drop bogus NAT-T printks in esp_input.
++	
++	Here is the patch to drop the packet if encap_type is unknown.
++	I've also removed the other two bogus printk's as they cannot
++	occur (printing a message is the last thing you want to do even
++	if they did occur :).
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<hadi at zynx.com>
++	[PKT_SCHED]: In tca_action_flush, don't pass NULL netlink callback into ops->walk().
++	
++	Signed-off-by: Jamal Hadi Salim <hadi at zynx.com>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[IPSEC]: Move common code out of udp_encap_rcv().
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<randy.dunlap at verizon.net>
++	[PATCH] fdomain screwup
++	
++	| From: Andrew Morton
++	| To: linux-scsi at vger.kernel.org
++	| Subject: fdomain screwup
++	|
++	| - fdomain_setup() is marked __init, but is called from non-__init
++	|   fdomain_16x0_detect()
++	|
++	| - fdomain_setup() is declared in drivers/scsi/pcmcia/fdomain_stub.c as
++	|   taking two arguments, but is implemented in fdomain_setup() taking a
++	|   single argument.
++	|
++	|   Please, never ever ever put extern function declarations in .c files.
++	|   Put it in a header file which is visible to the definition and to all
++	|   callsites.
++	|
++	| - fdomain_setup() is declared static, hence the linkage fails.
++	|
++	| - fdomain_16x0_bus_reset() is implemented in drivers/scsi/fdomain.c but
++	|   has static scope, so the call from drivers/scsi/pcmcia/fdomain_stub.c
++	|   doesn't work.
++	
++	[I didn't find this to be the case, so I didn't fix it.]
++	
++	| - fdomain_16x0_bus_reset() has an extern declaration in
++	|   drivers/scsi/pcmcia/fdomain_stub.c.  This should be moved to a header
++	|   file which is visible to etc...
++	
++	Builds and loads.  No hardware to test.
++	
++	Signed-off-by: Randy Dunlap <rddunlap at osdl.org>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<James.Bottomley at steeleye.com>
++	[PATCH] fix aic7xxx probing
++	
++	aic7xxx probing routines are still wrong on eisa.
++	
++	Fix eisa by incrementing found if it returns successfully
++	Also make all the various incarnations of the pci probing routine
++	consistently return the number of found cards (or 1 for the later
++	generic device model probing).
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<chas at cmf.nrl.navy.mil>
++	[ATM]: fix sparse checker warnings (by Stephen Hemminger <shemminger at osdl.org>)
++
++<jejb at raven.il.steeleye.com>
++	Fix up fdomain after mismerge
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<akpm at osdl.org>
++	[PATCH] mptbase.c build fix
++	
++	drivers/message/fusion/mptbase.c: In function `procmpt_summary_read':
++	drivers/message/fusion/mptbase.c:5160: parse error before `int'
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<jejb at raven.il.steeleye.com>
++	ncr53c8xx turn on clustering
++	
++	Since the driver now supports multiple virtual segments
++	in an iommu situation, it can also support clustering
++	for non-iommu systems.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<hch at lst.de>
++	[PATCH] some tmscsim consolidation
++	
++	On Sun, Jun 06, 2004 at 02:41:56PM +0200, Christoph Hellwig wrote:
++	> I've looked through my old tmscsim patch queue and found this one:
++	>
++	>  - merge dc390_initDCB into dc390_slave_alloc
++	>  - merge DC390_release and dc390_shutdown into dc390_remove_one,
++	>    use del_timer_sync to make sure the timer is really deleted on
++	>    removal, adjust locking accordingly
++	>  - some tiny related cleanups
++	
++	Okay, here's a resend vs current scsi-misc-2.6 that has your three
++	outstanding merged.  Additionally I've also killed dc390_freeDCBs()
++	as all dcbs are removed in ->slave_destroy.
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<g.liakhovetski at gmx.de>
++	[PATCH] kill obsolete typedefs and wrappers from tmscsim
++	
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] PATCH: (as333) BLIST flag for non-lockable devices
++	
++	On Wed, 23 Jun 2004, Mike Anderson wrote:
++	> Since SCSI already has the device list it would seem like we would
++	> possibly add a new flag like was done for mode sense. As this is not a
++	> transport issue I would assume we would not want to add flags in
++	> usb/storage, but handle it in the mid-layer as a SCSI protocol
++	> non-compliance.
++	
++	Here is a patch that implements this suggestion.  It's rather similar to
++	the one that Javier Marcet wrote back in January, in
++	
++	http://marc.theaimsgroup.com/?l=linux-usb-users&m=107345268526718&w=2
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
++
++<bjorn.helgaas at hp.com>
++	[PATCH] Add PCDP console detection support
++	
++	Add support for the EFI/DIG PCDP console discovery table (see
++	http://www.dig64.org/specifications/DIG64_HCDPv20_042804.pdf).
++	
++	This moves the code from drivers/serial/8250_hcdp.[ch] to
++	drivers/firmware/pcdp.[ch], since it's no longer 8250-specific.  It also
++	obsoletes CONFIG_SERIAL_8250_HCDP, replacing it with CONFIG_EFI_PCDP (which
++	defaults to Y for ia64).
++	
++	In a nutshell, HCDP tells us "these UARTs are available for use as a
++	console," and it's up to the user to explicitly specify the console device.
++	 The kernel can guess in some cases, but not all.
++	
++	The PCDP (aka HCDP v2) tells us what we really want to know, namely, "this
++	UART or VGA device is the console device." (It also has provision for
++	support for new device types.)
++	
++	Signed-off-by: Bjorn Helgaas <bjorn.helgaas at hp.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] ppc64: COMMAND_LINE_SIZE fix
++	
++	In file included from arch/ppc64/kernel/setup.c:37:
++	include/asm/machdep.h:116: `COMMAND_LINE_SIZE' undeclared here (not in a function)
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<anton at samba.org>
++	[PATCH] ppc64: fix oprofile on 970
++	
++	- Use 970/970FX instead of GPUL
++	- Add POWER5 and 970FX to systemcfg.h
++	- Create new cpu feature CPU_FTR_MMCRA_SIHV and use it
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<anton at samba.org>
++	[PATCH] ppc64: udbg should use snprintf
++	
++	Use vsnprintf/snprintf in udbg.c
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<anton at samba.org>
++	[PATCH] ppc64: another udbg fix
++	
++	udbg_read would lock up if ppc_md.udbg_putc didnt exist.  Just return 0 and
++	dont lock up instead.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<anton at samba.org>
++	[PATCH] ppc64: udbg fix
++	
++	Some udbg.c cleanups:
++	
++	- remove some old comments
++	- clean up formatting
++	- remove unused udbg_puthex and udbg_printSP
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<anton at samba.org>
++	[PATCH] ppc64: remove a stale comment in rtas.c
++	
++	rtas.c doesn't call reloc_offset
++	
++	remove comment from rtas.c and extern function declaration
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Milton Miller <miltonm at bga.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<dhowells at redhat.com>
++	[PATCH] ppc64: fix usage of cpumask_t on iSeries
++	
++	This fixes a bit of iSeries code that hadn't been changed to reflect that
++	cpumask_t is now a struct and not an integer type.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<anton at samba.org>
++	[PATCH] __alloc_bootmem_node should not panic when it fails
++	
++	__alloc_bootmem_node currently panics if it cant satisfy an allocation for
++	a particular node.  Thats rather antisocial, we should at the very least
++	return NULL and allow the caller to proceed (eg try another node).
++	
++	A quick look at alloc_bootmem_node usage suggests we should fall back to
++	allocating from other nodes if it fails (as arch/alpha/kernel/pci_iommu.c
++	and arch/x86_64/kernel/setup64.c do).
++	
++	The following patch does that.  We fall back to the regular __alloc_bootmem
++	when __alloc_bootmem_node fails, which means all other nodes are checked
++	for available memory.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<stsp at aknet.ru>
++	[PATCH] larger IO bitmaps
++	
++	The previous discussion was started here:
++	http://www.uwsg.iu.edu/hypermail/linux/kernel/0211.0/0477.html but in 2.4
++	times this was kind of problematic.
++	
++	Now, with the lazy bitmap allocation and per-CPU TSS, this will really not
++	drain any resources I think.  8K TSS increase and 8K per process *that does
++	ioperm()* - I think it is not very bad.
++	
++	The reasons why I need that, are described in the URL above.  Basically this
++	will allow to use full-screen VESA under dosemu (without LFB though), and this
++	may be also helpfull for the XFree project and some other projects:
++	
++	http://www.uwsg.iu.edu/hypermail/linux/kernel/9807.1/1079.html
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mingo at elte.hu>
++	[PATCH] NX (No eXecute) support for x86
++	
++	we'd like to announce the availability of the following kernel patch:
++	
++	     http://redhat.com/~mingo/nx-patches/nx-2.6.7-rc2-bk2-AE
++	
++	which makes use of the 'NX' x86 feature pioneered in AMD64 CPUs and for
++	which support has also been announced by Intel. (other x86 CPU vendors,
++	Transmeta and VIA announced support as well. Windows support for NX has
++	also been announced by Microsoft, for their next service pack.) The NX
++	feature is also being marketed as 'Enhanced Virus Protection'. This
++	patch makes sure Linux has full support for this hardware feature on x86
++	too.
++	
++	What does this patch do? The pagetable format of current x86 CPUs does
++	not have an 'execute' bit. This means that even if an application maps a
++	memory area without PROT_EXEC, the CPU will still allow code to be
++	executed in this memory. This property is often abused by exploits when
++	they manage to inject hostile code into this memory, for example via a
++	buffer overflow.
++	
++	The NX feature changes this and adds a 'dont execute' bit to the PAE
++	pagetable format. But since the flag defaults to zero (for compatibility
++	reasons), all pages are executable by default and the kernel has to be
++	taught to make use of this bit.
++	
++	If the NX feature is supported by the CPU then the patched kernel turns
++	on NX and it will enforce userspace executability constraints such as a
++	no-exec stack and no-exec mmap and data areas. This means less chance
++	for stack overflows and buffer-overflows to cause exploits.
++	
++	furthermore, the patch also implements 'NX protection' for kernelspace
++	code: only the kernel code and modules are executable - so even
++	kernel-space overflows are harder (in some cases, impossible) to
++	exploit. Here is how kernel code that tries to execute off the stack is 
++	stopped:
++	
++	 kernel tried to access NX-protected page - exploit attempt? (uid: 500)
++	 Unable to handle kernel paging request at virtual address f78d0f40
++	  printing eip:
++	 ...
++	
++	The patch is based on a prototype NX patch written for 2.4 by Intel -
++	special thanks go to Suresh Siddha and Jun Nakajima @ Intel. The
++	existing NX support in the 64-bit x86_64 kernels has been written by
++	Andi Kleen and this patch is modeled after his code.
++	
++	Arjan van de Ven has also provided lots of feedback and he has
++	integrated the patch into the Fedora Core 2 kernel. Test rpms are
++	available for download at:
++	
++	    http://redhat.com/~arjanv/2.6/RPMS.kernel/
++	
++	the kernel-2.6.6-1.411 rpms have the NX patch applied.
++	
++	here's a quickstart to recompile the vanilla kernel from source with the
++	NX patch:
++	
++	    http://redhat.com/~mingo/nx-patches/QuickStart-NX.txt
++	
++	update:
++	
++	 - make the heap non-executable on PT_GNU_STACK binaries.
++	
++	 - make all data mmap()s (and the heap) executable on !PT_GNU_STACK
++	   (legacy) binaries. This has no effect on non-NX CPUs, but should be
++	   much more compatible on NX CPUs. The only effect it has it has on
++	   non-NX CPUs is the extra 'x' bit displayed in /proc/PID/maps.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] sysfs: fill_read_buffer() fix
++	
++	This BUG_ON() triggers for `count = -EFOO' due to PAGE_SIZE being unsigned.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<zwane at linuxpower.ca>
++	[PATCH] Remove smbfs server->rcls/err
++	
++	This is a small cleanup requested by Urban, use the rcls/err in smb_request
++	as opposed to smb_sb_info.
++	
++	Signed-off-by: Zwane Mwaikambo <zwane at linuxpower.ca>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kaos at sgi.com>
++	[PATCH] kallsyms: exclude kallsyms-generated symbols
++	
++	Exclude symbols added by kallsyms itself, so .tmp_kallsyms[12].S have
++	the same list of symbols.
++	
++	Signed-off-by: Keith Owens <kaos at sgi.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kaos at sgi.com>
++	[PATCH] kallsyms: verify that System.map is stable
++	
++	Verify that linking kallsyms into vmlinux generates a stable System.map,
++	instead of assuming that it is stable.
++	
++	Add CONFIG_KALLSYMS_EXTRA_PASS as a temporary workaround for unstable maps,
++	so users can proceed while waiting for kallsyms to be fixed.
++	
++	Signed-off-by: Keith Owens <kaos at sgi.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<coywolf at greatcn.org>
++	[PATCH] kbuild: distclean srctree fix
++	
++	I just find a bug that ``make distclean'' cannot remove the editor backup
++	files and the like when using build directory.  That is because the find
++	command is improperly searching the build directory instead of the
++	$(srctree) it should.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mbligh at aracnet.com>
++	[PATCH] make __free_pages_bulk more comprehensible
++	
++	I find __free_pages_bulk very hard to understand ...  (I was trying to mod
++	it for the non MAX_ORDER aligned zones, and cleaned it up first).  This
++	should make it much more comprehensible to mortal man ...  I benchmarked
++	the changes on the big 16x and it's no slower (actually it's about 0.5%
++	faster, but that's within experimental error).
++	
++	I moved the creation of mask into __free_pages_bulk from the caller - it
++	seems to really belong inside there.  Then instead of doing wierd limbo
++	dances with mask, I made it use order instead where it's more intuitive.
++	Personally I find this makes the whole thing a damned sight easier to
++	understand.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rusty at rustcorp.com.au>
++	[PATCH] Fix race between CONFIG_DEBUG_SLABALLOC and modules
++	
++	store_stackinfo() does an unlocked module list walk during normal runtime
++	which opens up a race with the module load/unload code.  This can be
++	triggered by simply unloading and loading a module in a loop with
++	CONFIG_DEBUG_PAGEALLOC resulting in store_stackinfo() tripping over bad
++	list pointers.
++	
++	kernel_text_address doesn't take any locks, because during an OOPS we don't
++	want to deadlock.  Rename that to __kernel_text_address, and make
++	kernel_text_address take the lock.
++	
++	Signed-off-by: Zwane Mwaikambo <zwane at fsmlabs.com>
++	Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> (modified)
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pazke at donpac.ru>
++	[PATCH] dmi_scan: port Acer laptop irq routing workaround to new DMI probing
++	
++	This patch moves PCI IRQ routing workaround for Acer TravelMate 360 laptop to
++	arch/i386/pci/irq.c and makes acer_tm360_irqrouting variable static.  It also
++	fixes VisWs build error caused by this workaround code.
++	
++	Signed-off-by: Andrey Panin <pazke at donpac.ru>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pazke at donpac.ru>
++	[PATCH] dmi_scan: port PnP BIOS driver to new DMI probing
++	
++	This patch ports PnP BIOS driver to new DMI probing API.
++	
++	Signed-off-by: Andrey Panin <pazke at donpac.ru>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pazke at donpac.ru>
++	[PATCH] dmi_scan: port sonypi driver to new DMI probing
++	
++	This patch ports sonypi driver to new DMI probing API and removes
++	is_sony_vaio_laptop global variable.
++	
++	Signed-off-by: Andrey Panin <pazke at donpac.ru>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pazke at donpac.ru>
++	[PATCH] dmi_scan: port PIIX4 SMBUS driver to new DMI probing
++	
++	This patch ports sonypi driver to new DMI probing API and removes
++	is_unsafe_smbus global variable.
++	
++	Signed-off-by: Andrey Panin <pazke at donpac.ru>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pazke at donpac.ru>
++	[PATCH] dmi_scan: port powernow-k7 driver to new DMI probing
++	
++	This patch ports powernow-k7 driver to new DMI probing API.
++	
++	Signed-off-by: Andrey Panin <pazke at donpac.ru>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pazke at donpac.ru>
++	[PATCH] dmi_scan: remove unused ASUS K7V-RM DMI quirk
++	
++	BROKEN_ACPI_Sx flag doesn't seem to be used anywhere in the kernel, so ASUS
++	K7V-RM can be removed.
++	
++	Signed-off-by: Andrey Panin <pazke at donpac.ru>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pazke at donpac.ru>
++	[PATCH] dmi_scan: port APM BIOS driver to new DMI probing
++	
++	This patch ports APM BIOS driver to new DMI probing API.
++	
++	Signed-off-by: Andrey Panin <pazke at donpac.ru>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<Robert.Picco at hp.com>
++	[PATCH] hpet fixes
++	
++	I eliminated the request_irq brain damage, chopped off procfs support
++	(didn't care for it too much in the first place and it was adopted from
++	rtc.c), made the check for FMODE_WRITE in hpet_open and responded to a few
++	other suggestions.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kenneth.w.chen at intel.com>
++	[PATCH] per node huge page stats in sysfs
++	
++	It adds per node huge page stats in sysfs.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<neilb at cse.unsw.edu.au>
++	[PATCH] knfsd: mark NFS/TCP server not EXPERIMENTAL
++	
++	From: Greg Banks <gnb at sgi.com>
++	
++	NFS/TCP has been used widely for a long time now, and is now enabled by many
++	distros and typically recommended for lossy or congested networks.  This patch
++	removes the EXPERIMENTAL tag, updates the help text, and changes arch
++	defconfigs to set it by default (note that several already did so).
++	
++	Signed-off-by: Neil Brown <neilb at cse.unsw.edu.au>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<neilb at cse.unsw.edu.au>
++	[PATCH] knfsd: simplify nfsd4 name encoding.
++	
++	Use opaque xdr encoding routines from xdr.c instead of rolling our own.
++	
++	Signed-off-by: J. Bruce Fields <bfields at citi.umich.edu>
++	Signed-off-by: Neil Brown <neilb at cse.unsw.edu.au>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<neilb at cse.unsw.edu.au>
++	[PATCH] knfsd: simplify nfsd4_release_lockowner
++	
++	Simplify nfsd4_release_lockowner a bit, factor out code that we need for
++	another patch.
++	
++	Signed-off-by: J. Bruce Fields <bfields at citi.umich.edu>        
++	Signed-off-by: Neil Brown <neilb at cse.unsw.edu.au>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<neilb at cse.unsw.edu.au>
++	[PATCH] knfsd: delete an obsolete comment from nfsd rpc code
++	
++	Signed-off-by: J. Bruce Fields <bfields at citi.umich.edu>        
++	Signed-off-by: Neil Brown <neilb at cse.unsw.edu.au>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<neilb at cse.unsw.edu.au>
++	[PATCH] knfsd: reduce stack usage in nfsd4
++	
++	nfsd4_proc_compound is using over a thousand bytes of stack.
++	
++	This is partly because it declares two local svc_fh's, partly because of a big
++	switch statement which calls a bunch of functions which may be inlined.
++	
++	Signed-off-by: J. Bruce Fields <bfields at citi.umich.edu>        
++	Signed-off-by: Neil Brown <neilb at cse.unsw.edu.au>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<neilb at cse.unsw.edu.au>
++	[PATCH] knfsd: nfsd4 lockowner fixes
++	
++	Insist that the first time a client presents a new lockowner, the seqid should
++	be 0.  (RFC 3530 section 8.1.5)
++	
++	Also, return an error if the client presents a previously-used lockowner as if
++	it were new.
++	
++	From: Andy Adamson <andros at citi.umich.edu>
++	Signed-off-by: J. Bruce Fields <bfields at citi.umich.edu>        
++	Signed-off-by: Neil Brown <neilb at cse.unsw.edu.au>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<neilb at cse.unsw.edu.au>
++	[PATCH] knfsd: parse nsfd4 callback information
++	
++	Preparation for delegations: parse callback information provided in
++	setclientid request.
++	
++	From: Andy Adamson <andros at citi.umich.edu>
++	Signed-off-by: J. Bruce Fields <bfields at citi.umich.edu>        
++	Signed-off-by: Neil Brown <neilb at cse.unsw.edu.au>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<neilb at cse.unsw.edu.au>
++	[PATCH] knfsd: improve cleaning up of nfsd4 requests
++	
++	Currently nfs4_arg->to_free keeps a list of void ptrs on which kfree is called
++	when freeing the nfs4_arg.  This allows us to do cleanup on e.g.  xdr decode
++	failures.  To allow more complicated objects to be freed (in particular,
++	acls), we add a "void (*release)(void *)" to allow us to request something
++	other than kfree be called when freeing.
++	
++	Signed-off-by: J. Bruce Fields <bfields at citi.umich.edu>
++	Signed-off-by: Neil Brown <neilb at cse.unsw.edu.au>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<neilb at cse.unsw.edu.au>
++	[PATCH] knfsd: allow user to set NFSv4 lease time.
++	
++	Allow the lease to be set from /proc/fs/nfs/nfsv4leasetime.
++	
++	To comply with rfc3530, this appears as a server reboot from the point of view
++	of the client, which must reclaim state with the grace period.
++	
++	From: Andy Adamson <andros at citi.umich.edu>
++	Signed-off-by: J. Bruce Fields <bfields at citi.umich.edu>
++	Signed-off-by: Neil Brown <neilb at cse.unsw.edu.au>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] i386: uninline memmove
++	
++	Using current gcc CVS I hit a piece of code in which the compiler was emitting
++	a memmove() call.  The kernel link failed.
++	
++	Uninline it.
++	
++	Also, move the memcpy and memset exports into memcpy.c.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<sds at epoch.ncsc.mil>
++	[PATCH] SELinux: fix build with CONFIG_SECURITY_NETWORK=n
++	
++	SELinux should just drop out the socket and netfilter hooks when that is
++	disabled.
++	
++	The problem was introduced because of the fine-grained netlink patches,
++	which made the selinux_netlink_send/recv hook functions depend on
++	CONFIG_SECURITY_NETWORK but the netlink_send/recv hooks themselves are not
++	dependent on it.
++	
++	Need to move selinux_netlink_send/recv back out of the conditional block,
++	and provide a static inline stub for selinux_nlmsg_perm if
++	CONFIG_SECURITY_NETWORK is not defined.
++	
++	Signed-off-by:  Stephen Smalley <sds at epoch.ncsc.mil>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<juhl-lkml at dif.dk>
++	[PATCH] tidy up the identify_cpu() output
++	
++	Here's a patch to line up the "CPU: After * identify, caps:" messages
++	produced by printk's in arch/i386/kernel/cpu/common.c
++	
++	Signed-off-by: Jesper Juhl <juhl-lkml at dif.dk>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<arjanv at redhat.com>
++	[PATCH] Permit root to choose vfat policy to UTF8
++	
++	Right now the kernel detects the sysadmin trying to set the iocharset of
++	vfat to UTF8 and prevents this with an error.  While I can see that this is
++	not recommended, enforcing this is policy that probably doesn't belong in
++	the kernel.  The patch below makes this situation a warning and a
++	recommendation instead of a strong blockage.
++	
++	https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=126641
++	
++	is an example of a sysadmin disliking this policy enforcement.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pazke at donpac.ru>
++	[PATCH] crc: add common CRC16 module
++	
++	Currently we have 8 copies of CRC16 calculation table in different device
++	drivers, this patch creates common crc16.c module to replace them.
++	
++	Signed-off-by: Andrey Panin <pazke at donpac.ru>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pazke at donpac.ru>
++	[PATCH] crc: use it in async PPP driver
++	
++	This patch makes async PPP driver use common crc16 code.
++	
++	Signed-off-by: Andrey Panin <pazke at donpac.ru>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pazke at donpac.ru>
++	[PATCH] crc: use it in IRDA drivers
++	
++	This patch makes IRDA subsystem use common crc16 code.
++	
++	Signed-off-by: Andrey Panin <pazke at donpac.ru>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pazke at donpac.ru>
++	[PATCH] crc: use it in ISDN drivers
++	
++	This patch makes various ISDN drivers use common crc16 code.
++	
++	Signed-off-by: Andrey Panin <pazke at donpac.ru>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pazke at donpac.ru>
++	[PATCH] crc: use it in AX.25 drivers
++	
++	This patch makes AX.25 drivers use common crc16 code.
++	
++	Signed-off-by: Andrey Panin <pazke at donpac.ru>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kenneth.w.chen at intel.com>
++	[PATCH] Fix direct I/O into hugetlb page
++	
++	Hit a kernel oops on 2.6.7 kernel when doing direct I/O to hugetlb page.
++	
++	The destructor of compound page was moved into page->mapping since 2.6.6.
++	It got interfered with set_page_dirty() for hugetlb page: an O_DIRECT read
++	into first tail page of the compound page will fool set_page_dirty() to
++	deference page->mapping->a_ops and then kernel oops.  Patch to fix the
++	oops.  We do just like what bio_set_pages_dirty() does.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mbligh at aracnet.com>
++	[PATCH] fix NUMA boundaray between ZONE_NORMAL and HIGHMEM
++	
++	From: Andy Whitcroft <apw at shadowen.org>
++	
++	This patch eliminates the false hole which can form between ZONE_NORMAL and
++	ZONE_HIGHMEM.  This is most easily seen when 4g/4g split is enabled, but
++	it's always broken, and we just happen not to hit it most of the time.
++	Basically, the patch changes the allocation of the numa remaps regions (the
++	source of the holes) such that they officially fall within VMALLOC space,
++	where they belong.
++	
++	Tested in -mjb for a couple of months, and again against 2.6.7-mm1.
++	
++	Signed-off-by: Andy Whitcroft <apw at shadowen.org>
++	Signed-off-by: Martin J. Bligh <mbligh at aracnet.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<dhowells at redhat.com>
++	[PATCH] missing semicolon in 2.6.7 VIODASD driver
++	
++	There appears to be a missing semicolon in the VIODASD driver in 2.6.7.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulkf at microgate.com>
++	[PATCH] ppp_generic.c get_filter made conditional
++	
++	Add #ifdef CONFIG_PPP_FILTER around get_filter implementation which is only
++	used when this option is enabled.  This prevents compiler warning (unused
++	function) when CONFIG_PPP_FILTER is not defined.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bart at samwel.tk>
++	[PATCH] laptop-mode documentation update
++	
++	The laptop mode docs don't say that no kernel configuration changes are
++	needed to use laptop mode.  That's caused some people to look for the
++	option.  This patch makes the doc explicitly mention the lack of an option.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] inodes_stat.nr_unused fix
++	
++	__sync_single_inode() is forgetting to increment inodes_stat.nr_unused when
++	moving a previously-dirty inode onto the inode_unused list.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bart at samwel.tk>
++	[PATCH] Laptop mode control script improvements
++	
++	From: Herve Eychenne <rv at eychenne.org>
++	
++	Clean up the script. This also makes it two times faster. (Thanks to
++	Herve Eychenne.)
++	
++	- moved variable definitions to the top, for easier configuration
++	- the script contains bashisms, so make it /bin/bash
++	- use sed -e'...' -e '...' instead of sed | sed 
++	- avoid subshells: () changed to {}
++	- various other minor optimizations and improvements
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pavel at ucw.cz>
++	[PATCH] swsusp.S: meaningful assembly labels
++	
++	This introduces meaningfull labels instead of .L1234, meaning code is
++	readable, kills alignment where unneccessary, and kills TLB flush that was
++	only pure paranoia (and slows it down a lot on emulated systems).
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<lcapitulino at prefeitura.sp.gov.br>
++	[PATCH] drivers/char/ipmi/ipmi_si_intf.c warnings
++	
++	drivers/char/ipmi/ipmi_si_intf.c: In function `acpi_gpe_irq_setup':
++	drivers/char/ipmi/ipmi_si_intf.c:1173: warning: passing arg 4 of `acpi_install_gpe_handler' from incompatible pointer type
++	drivers/char/ipmi/ipmi_si_intf.c: In function `acpi_gpe_irq_cleanup':
++	drivers/char/ipmi/ipmi_si_intf.c:1193: warning: passing arg 3 of `acpi_remove_gpe_handler' from incompatible pointer type
++	
++	Signed-off-by: Luiz Capitulino <lcapitulino at prefeitura.sp.gov.br>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<hugh at veritas.com>
++	[PATCH] anon_vma list locking bug
++	
++	Vladimir Saveliev reported anon_vma_unlink list_del BUG (LKML 24 June). 
++	His testing is still in progress, but we believe it comes from a nasty
++	locking deficiency I introduced in 2.6.7's anon_vma_prepare.
++	
++	Andrea's original anon_vma_prepare was fine, it needed no anon_vma lock
++	because it was always linking a freshly allocated structure; but my
++	find_mergeable enhancement let it adopt a neighbouring anon_vma, which of
++	course needs locking against a racing linkage from another mm - which the
++	earlier adjust_vma fix seems to have made more likely.
++	
++	Does anon_vma->lock nest inside or outside page_table_lock?  Inside, but
++	that's not obvious without a lock ordering list: instead of listing the
++	order here, update the list in filemap.c; but a separate patch because
++	that's less urgent and more likely to get wrong or provoke controversy.
++	
++	(Could do it with anon_vma lock after dropping page_table_lock, but a long
++	comment explaining why some code is safe suggests it's not.)
++	
++	Signed-off-by: Hugh Dickins <hugh at veritas.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<juhl-lkml at dif.dk>
++	[PATCH] cpufreq_delayed_get() inlining fix
++	
++	Here's a patch to reorder timer_tsc.c so gcc 3.4 does not fail to inline
++	and thus fix the warning "arch/i386/kernel/timers/timer_tsc.c:30: warning:
++	inlining failed in call to 'cpufreq_delayed_get': function body not
++	available"
++	
++	Signed-off-by: Jesper Juhl <juhl-lkml at dif.dk>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] lock ordering comment update
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] ext3: direct-io transaction extending fix
++	
++	ext3_direct_io_get_blocks() is misinterpreting the return value from
++	ext3_journal_extend(), and is consequently running out of buffer credits and
++	going BUG on tremendously large direct-io writes.  Fix that up.
++	
++	Also, I note that the really large direct-io writes can hold a transaction
++	open for the entire duration, which can be minutes.  This violates ext3's
++	attempt to commit data at regular intervals.  Fix that up by looking at the
++	transaction state: if it's T_LOCKED, shut off the current handle so the
++	pending commit can complete.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rmk+lkml at arm.linux.org.uk>
++	[PATCH] ARM COMMAND_LINE_SIZE build fix
++	
++	Rework the declaration, sizing and memcpying of saved_command_line[] so
++	that ARM doesn't need to implement unwelcome header file nestings.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<hugh at veritas.com>
++	[PATCH] Don't hold i_sem on swapfiles
++	
++	We permanently hold the i_sem of swapfiles so that nobody can addidentally
++	ftruncate them, causing subsequent filesystem destruction.
++	
++	Problem is, it's fairly easy for things like backup applications to get
++	stuck onthe swapfile, sleeping until someone does a swapoff.
++	
++	So take all that out again and add a new S_SWAPFILE inode flag.  Test that
++	in the truncate path and refuse to truncate an in-use swapfile.
++	
++	Synchronisation between swapon and truncate is via i_sem.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] ext2_setattr retval fix
++	
++	ext2_setattr() drops the inode_setattr() return value on the floor.  This is
++	very bad - I/O errors during truncate are lost.
++	
++	The patch changes ext2_setattr() so that we no longer call ext2_acl_chmod() if
++	inode_setattr(), which is what ext3 does.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] reiserfs_setattr retval fix
++	
++	reiserfs() is also dropping inode_setattr() retvals on the floor.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] jfs_setattr() fix
++	
++	jfs is dropping inode_setattr()'s return value.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] cifs_setattr() retval fix
++	
++	CIFS is failing to propagate the inode_setattr() return value.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] ncpfs_setattr() retval fix
++	
++	ncpfs is failing to propagate the inode_setattr return value.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] affs_setattr() retval fix
++	
++	affs is failing to propagate the inode_setattr() return value.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<sfr at canb.auug.org.au>
++	[PATCH] PPC64 iSeries fails to boot
++	
++	Jeremy Katz of Red Hat reported that his iSeries machine would not boot
++	with 2.6.7 based kernels.
++	
++	It appears that with the inclusion of Paul Mackerras' patch "Optimize
++	exception/syscall entry/exit" a small previous patch got reverted.  Here
++	is that patch again.  The lack of this patch does not stop all iSeries
++	machines booting, but it does stop some.
++	
++	Signed-off-by: Stephen Rothwell <sfr at canb.auug.org.au>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: No longer set WANT_PAGE_VIRTUAL.
++	
++	Also uninline pfn_to_page and page_to_pfn.
++	Struct page is now 8 bytes smaller.
++
++<stevef at smfhome1.smfdom>
++	Fix cifs xid transaction counts to be more consistent. Start using __set_page_dirty_no_buffers.
++	
++	Signed-off-by: Steve French (sfrench at us.ibm.com)
++
++<bunk at fs.tum.de>
++	[NET]: Kill spurious ifndef in net/ip.h
++	
++	Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[NET]: Fix SO_{RCV,SND}TIMEO getsockopt handling.
++	
++	A microsecond is 1 millionth of a second not
++	1 thousandth of a second.
++	
++	Noticed by Markus Mottl <markus at oefai.at>
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<jhf at rivenstone.net>
++	[PATCH] ppc32: command_line_size build fix
++	
++	We need setup.h for COMMAND_LINE_SIZE.
++	
++	Signed-off-by: Joseph Fannin <jhf at rivenstone.net>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<apw at shadowen.org>
++	[PATCH] ia32: fix deadlocks when oopsing while mmap_sem is held
++	
++	If a fault in the kernel leads to an unexpected protection fault whilst in
++	a code path which holds mmap_sem we will deadlock in do_page_fault() while
++	trying to classify the fault.  By carefully testing the source of the fault
++	we can detect and OOPS on the vast majority of these, greatly enhancing
++	diagnosis of such bugs.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] x86 stack dump fixes
++	
++	- Fix the !CONFIG_FRAME_POINTER && !CONFIG_KALLSYMS output formatting.
++	
++	- Make print_context_stack() static
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<zwane at linuxpower.ca>
++	[PATCH] Fix smbfs readdir oops
++	
++	This has been reported a couple of times and is consistently causing some
++	folks grief, so Urban, would you mind terribly if i send this patch to at
++	least clear current bug reports.  If there is additional stuff you want
++	ontop of this let me know and i can send a follow up patch.
++	
++	The bug is that at times we haven't completed setting up the smb_ops so we
++	have a temporary 'null' ops in place until the connection is completely up.
++	 With this setup it's possible to hit ->readdir() whilst the null ops are
++	still in place, so we put the process to sleep until the connection setup
++	is complete and then call the real ->readdir().
++	
++	This patch addresses the bugzilla report at
++	http://bugzilla.kernel.org/show_bug.cgi?id=1671
++	
++	Signed-off-by: Zwane Mwaikambo <zwane at linuxpower.ca>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<eger at havoc.gtf.org>
++	[PATCH] radeonfb accel capabilities
++	
++	Here's the accel capabilities patch for radeonfb.  It updates radeonfb to
++	advertise its acceleration capabilities via fbinfo.flags.  I've tested this
++	on my box, and it gives me a nice fast console.
++	
++	defect: "$ fbset -accel 0" doesn't work for radeonfb -- disabling accel
++	will only work from the kernel command line :-/
++	
++	Cc: Benjamin Herrenschmidt <benh at kernel.crashing.org>
++	Signed-off-by: David Eger <eger at havoc.gtf.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<alan at redhat.com>
++	[PATCH] vc locking
++	
++	Like a few other drivers the vc driver is doing unlocked careless
++	references to file offsets.  Its got kind of 2.2 locking that hasnt been
++	updated in the lseek function so someone at least tried. 
++	
++	Fortunately we have a real lock for this and can just make lseek use that
++	too.
++	
++	The 'assume 64bit load is atomic' bug seems to be very widely spread
++	
++	akpm at osdl.org:
++	
++	   Move declarations to vt_kern.h
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<apw at shadowen.org>
++	[PATCH] fix GFP zone modifier interators
++	
++	For each node there are a defined list of MAX_NR_ZONES zones.  These are
++	selected as a result of the __GFP_DMA and __GFP_HIGHMEM zone modifier flags
++	being passed to the memory allocator as part of the GFP mask.  Each node
++	has a set of zone lists, node_zonelists, which defines the list and order
++	of zones to scan for each flag combination.  When initialising these lists
++	we iterate over modifier combinations 0 ..  MAX_NR_ZONES.  However, this is
++	only correct when there are at most ZONES_SHIFT flags.  If another flag is
++	introduced zonelists for it would not be initialised.
++	
++	This patch introduces GFP_ZONETYPES (based on GFP_ZONEMASK) as a bound for
++	the number of modifier combinations.
++	
++	Signed-off-by: Andy Whitcroft <apw at shadowen.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<adobriyan at mail.ru>
++	[PATCH] Remove include/asm-*/init.h
++	
++	There's no reason to keep files that
++	a) nobody #include's
++	b) produce #error 
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<Andries.Brouwer at cwi.nl>
++	[PATCH] minor CAP_DAC_OVERRIDE fix
++	
++	CAP_DAC_OVERRIDE fails to give search permission in a directory with
++	mode 0.
++	
++	Patch acked by Chris Wright <chrisw at osdl.org>
++	Signed-off-by: Andries Brouwer <aeb at cwi.nl>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<torvalds at ppc970.osdl.org>
++	ppc64: fix silly typo ("1" vs "i").
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Update ARM kernel install script
++	
++	- fix up for kbuild changes
++	- run users own kernel install script if present
++
++<wli at holomorphy.com>
++	[AIO]: kiocb->private is too large for kiocb's on-stack.
++	
++	sizeof(struct kiocb) is dangerously large for a structure commonly
++	allocated on-stack. This patch converts the 24*sizeof(long) field,
++	->private, to a void pointer for use by file_operations entrypoints.
++	A ->dtor() method is added to the kiocb in order to support the release
++	of dynamically allocated structures referred to by ->private.
++	
++	The sole in-tree users of ->private are async network read/write,
++	which are not, in fact, async, and so need not handle preallocated
++	->private as they would need to if ->ki_retry were ever used. The sole
++	truly async operations are direct IO pread()/pwrite() which do not
++	now use ->ki_retry(). All they would need to do in that case is to
++	check for ->private already being allocated for async kiocbs.
++	
++	This rips 88B off the stack on 32-bit in the common case.
++	
++	Signed-off-by: William Lee Irwin III <wli at holomorphy.com>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<olh at suse.de>
++	[DECNET]: Fix signed bug in net/decnet/dn_nsp_in.c:dn_nsp_linkservice()
++	
++	char can be either signed or unsigned, depending on the target system.
++	
++	Signed-off-by: Olaf Hering <olh at suse.de>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<kdesler at soohrt.org>
++	[NET]: Fix typos in pktgen docs.
++
++<noll at mathematik.tu-darmstadt.de>
++	[PATCH] nfs oops fix
++	
++	Al's current changes to struct nameidata broke nfsroot for my discless
++	clients (oops in nfs_fill_super).  The patch below fixes this problem
++	for me.
++	
++	Cc: Trond Myklebust <trond.myklebust at fys.uio.no>
++	Cc: <viro at parcelfarce.linux.theplanet.co.uk>
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<chrisw at osdl.org>
++	[PATCH] remove extraneous security_inode_setattr call in hugetlbfs
++	
++	remove extraneous security_inode_setattr call in hugetlbfs, it's already
++	done by VFS.
++	
++	Signed-off-by: Chris Wright <chrisw at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<nico at cam.org>
++	[PATCH] move prototype for __get_vm_area() to a sane location
++	
++	There are currently two files besides mm/vmalloc.c that make use of that
++	function:
++	
++	- arch/sh/kernel/cpu/sh4/sq.c
++	  which defined its own prototype locally risking not being in sync with
++	  the real function, and
++	
++	- arch/arm/kernel/module.c which has no prototype at all and cause
++	  build warnings.
++	
++	This fixes those issues
++
++<stevef at stevef95.austin.ibm.com>
++	hash cifs inodes
++	
++	Signed-off-by: Steve French (sfrench at us.ibm.com)
++
++<hch at lst.de>
++	[NETLINK]: Fix NLMSG_OK/RTA_OK length checking.
++	
++	Verify at least a full header is there before derefencing
++	length struct member.
++
++<greg at kroah.com>
++	USB: provide support for the HX version of pl2303 chips
++	
++	Thanks to Gordon Elam <gbe at shoremicro.com> for the information needed
++	to do this.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stevef at smfhome1.smfdom>
++	merge /proc/fs/cifs/SimultaneousOps into /proc/fs/cifs/Stats
++	
++	Signed-off-by: Steve French (sfrench at us.ibm.com)
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Move ZTEXTADDR/ZBSSADDR initialisation to compressed/Makefile
++	
++	Since this is where these two variables are used, it makes sense to
++	have them in that makefile.  Also, consolidate "targets"
++	initialisation, fixes a missing FORCE dependency for the uImage rule,
++	and remove more FTVPCI code.
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] arch/arm/boot variable name consistency.
++	
++	For clarity and consistency, use the same name for makefile and
++	linker symbols.
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Fix install/zinstall to work with separated source/build trees.
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Convert bootp to use kbuild infrastructure.
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Kernel boot decompressor updates
++	
++	- use 'Image' target for kernel image to be compressed rather than
++	  duplicating its generation.
++	- use .incbin-based generation of ELF objects from binary data rather
++	  than 'ld'-based generation.
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Prevent static data in misc.o
++	
++	Static data causes GOTOFF relocations to be used, which won't work
++	because we want to relocate the .data section separately from the
++	.text section.  Therefore, force all data to be nonstatic.
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] EBSA110 I/O and decompressor fixes.
++	
++	This fixes the buggy decompressor assembly, and fixes PCMCIA IO
++	to use the correct byte lane when accessing certain PCMCIA cards.
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] arch/arm/Makefile cleanups
++	
++	Clean up bzImage target, remove a couple of obsolete testing targets,
++	and add better bootpImage help text.
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Move ISA_DMA_THRESHOLD to asm/memory.h
++	
++	This allows machine classes to override ISA_DMA_THRESHOLD as
++	necessary.
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Move arch_adjust_zones to asm/memory.h
++	
++	This places arch_adjust_zones along side ISA_DMA_THRESHOLD.  These
++	two are related, but having them in separate files means its not
++	obvious that they are.
++	
++	ISA_DMA_THRESHOLD is a DMA mask which must be defined such that it
++	matches the memory handed out by GFP_DMA, which in turn is controlled
++	by arch_adjust_zones.
++
++<paulus at samba.org>
++	[PATCH] ppc64: fix memset
++	
++	This fixes a bug in the ppc64 memset where the code that gets the
++	destination address aligned (or is supposed to) was looking at the
++	bottom 3 bits of the count rather than the destination address.  The
++	result of this was that the kernel wouldn't boot on POWER3 machines. 
++	The patch also removes an unnecessary duplicate instruction.
++	
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mika at osdl.org>
++	[PATCH] sparse: fix ugly include/linux/efi.h typedef
++	
++	efi.h declares a function type, and then uses that as an argument to
++	another function, and expects the compiler to magically demote the
++	function to a function pointer.
++	
++	Even a gcc person (rth) was surprised that this was legal, and it
++	doesn't match any other use of a function pointer in the kernel, and
++	sparse doesn't like the implicit type-conversion.
++	
++	So make the type sane in the first place, instead of depending on
++	a very weird corner case of the C language.
++
++<aia21 at cam.ac.uk>
++	[PATCH] Remove NOOP code from fs/buffer.c::drop_buffers()
++	
++	I noticed that fs/buffer.c::drop_buffers() contains some code that
++	AFAICS doesn't actually do anything other than waste cpu cycles so here
++	is patch to remove it...  The local variable was_uptodate is being
++	messed with but it is not being read anywhere so it seems entirely
++	pointless.
++	
++	I assume this must be a remainder from old code which mucked around with
++	the page uptodateness but which has since been (re-)moved.
++	
++	Signed-off-by: Anton Altaparmakov <aia21 at cantab.net>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<torsten.scherer at uni-bielefeld.de>
++	[PATCH] USB Storage: unusual_devs.h addition
++	
++	took me a while to get my external usb drive running under linux-2.6.6,
++	appears to need the appended fix. according to the header in unusual_devs.h
++	one should send them to you, so here you go.
++	
++	the funny thing is that it works fine unter linux-2.6.0-test11 on different
++	hardware, but then i'm out of my depth concerning what might have been
++	changed in the usb driver in the meantime. i don't really follow the
++	changes. i didn't find any real documentation about what these flags do,
++	only a couple of "my usb drive worked with 2.4 but doesn't work any more
++	with 2.6" messages on the web, and some of them pointed to unusual_devs.h. i
++	do not claim to know what i've done with this fix, but i'd like to see it
++	officially included. :-)
++	
++	
++	T:  Bus=04 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  2 Spd=480 MxCh= 0
++	D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
++	P:  Vendor=0402 ProdID=5621 Rev= 1.03
++	S:  Product=USB 2.0 Storage Device
++	S:  SerialNumber=00042222200000113608
++	C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
++	I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
++	E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
++	E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
++	
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<slansky at usa.net>
++	[PATCH] USB: PL2303 module, new IDs
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<akpm at osdl.org>
++	[PATCH] USB: pwc-uncompress.h
++	
++	For some reason, gcc-2.95.4 dies horridly on those asmlinkage
++	declarations.
++	
++	I was unable to work out _why_ those functions have asmlinkage, as there
++	seem to be no instances of them - nobody calls
++	pwc_register_decompressor().
++	 What's up with that?
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<herbert at gondor.apana.org.au>
++	[PATCH] USB: Fix pegasus_set_multicast lockup in drivers/usb/net/pegasus.c
++	
++	I strongly recommend that this patch be applied.
++	
++	Without this patch, running tcpdump on an SMP machine with the
++	pegasus adapter locks up 9 times out of 10.  This is what happens:
++	
++	CPU0				CPU1
++	pegasus_start_xmit
++		netif_stop_queue
++					pegasus_set_multicast
++						netif_stop_queue
++						netif_wake_queue
++	
++	Which crashes if another packet is sent to pegasus_start_xmit before
++	the first one is finished.
++	
++	If there are other drivers doing this, please fix them too.
++	
++	PS I submitted this to Petkan years ago but he probably lost it.
++	
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB Storage: Unusual_devs.h update
++	
++	On Sat, 26 Jun 2004, Edward C. Bailey wrote:
++	
++	> Hello,
++	>
++	>     I was downloading some pictures from my Digital Wallet to my Fedora
++	> Core 2 system at the same time I happened to be watching
++	> /var/log/messages.  Here's what I saw:
++	>
++	> Jun 26 12:16:02 raptor kernel: usb 1-1.2: new full speed USB device using address 6
++	> Jun 26 12:16:02 raptor kernel: usb-storage: This device (097a,0001,0001 S 06 P 01) has unneeded SubClass and Protocol entries in unusual_devs.h
++	> Jun 26 12:16:02 raptor kernel:    Please send a copy of this message to <linux-usb-devel at lists.sourceforge.net>
++	>
++	> Given that Minds at Work are out of business, you might not care about this
++	> information, but I thought I'd pass it on, just in case you do... :-)
++	
++	What the heck, we'll use it anyway.  Thanks for sending this in.
++	
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Reliably update SIZEOF_MACHINE_DESC
++	
++	Generate SIZEOF_MACHINE_DESC using asm-offsets method rather than
++	relying on people updating the definition in asm/mach/arch.h
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] MMC mclk is no longer used, so remove it.
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Miscellaneous fixes
++	
++	- Remove 'arc' machine name from Makefile
++	- clk_set_rate() should return non-zero atm.
++	- proc-sa1100.S doesn't need asm/ptrace.h
++	- update mach-types
++	- kill line of spaces in clock.h
++
++<bjorn.helgaas at hp.com>
++	[PATCH] ia64: define cpu_logical_id() always
++	
++	Define cpu_logical_id() even when !SMP.  I added uses of this in some
++	iosapic printk's, which broke the UP build.
++	
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<bjorn.helgaas at hp.com>
++	[PATCH] ia64: fix a couple of comment typos
++	
++	
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<hjl at lucon.org>
++	[PATCH] ia64: Don't use -mtune=merced for gcc 3.4
++	
++	Gcc 3.4 has a new DFA scheduler for ia64. Unfortunately, it is not
++	well tested for Itanium 1. When I tried to use gcc 3.4 to compile
++	2.6 kernel configured for Merced, gcc failed in many places:
++	
++	http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15598
++	http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15653
++	http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15655
++	http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16130
++	http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16142
++	http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16143
++	
++	Some of them have been fixed. But I am afraid many more remain. I don't
++	know how many Itanium 1 machines left in production use. If people want
++	to optimize kernel for Itanium 1, they can stick with the older gccs.
++	Or they should upgrade their machines. I think the gcc developer's time
++	should be better spent on somewhere else. I have been using this patch
++	for a while, kernel seems to work OK.
++	
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<kenneth.w.chen at intel.com>
++	[PATCH] ia64: change ia64_switch_mode_{phys,virt}() to preserve bsp/sp
++	
++	Change ia64_switch_mode_phys() and ia64_switch_mode_virt() to preserve
++	the virtual sp/bsp and update the call-sites accordingly.  This avoids
++	problems with the init_task pointer which lives in region 5 now.
++	
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<kaber at trash.net>
++	[NETFILTER]: Fix IP_NF_TARGET_NOTRACK config deps.
++
++<hadi at zynx.com>
++	[NET]: Two tc action fixes.
++	
++	Another patchlet after turning on preempt and rerunning tests.
++	- against dev.c is a genuine bug - i wish preempt would have
++	given a more sane hint. Strange on how its a non issue when preempt is
++	off. 
++	- against act_api.c is just an annoyance. I removed the kmod because it
++	will only make sense to list actions if policies exist for that action.
++	And if policies exist, the module would be loaded.
++	
++	Signed-off-by: Jamal Hadi Salim <hadi at zynx.com>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<kenneth.w.chen at intel.com>
++	[PATCH] ia64: Clean up needlessly large stack frames in PAL-call stubs
++	
++	The code allocated all 96 stacked registers, for no apparent reason.
++	
++	Also, fix ia64_pal_call_static() to switch RSE to enforced-lazy, LE
++	mode before the PAL-call.
++	
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<shemminger at osdl.org>
++	[PKT_SCHED]: Packet scheduler exports.
++	
++	The packet scheduling code has some ugly define's which were to deal with
++	configuration possibilities and the old style module exports.  With the current
++	2.6 method, this is unnecessary.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<greg at kroah.com>
++	USB: fix bug where removing usb-serial modules or usb serial devices could oops
++	
++	This fixes the issue where the Generic driver would bind to all usb-serial
++	devices, so the disconnect would not properly go to the real driver that
++	controlled the device.  This was very bad when unloading the module with
++	the device still connected.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<torvalds at ppc970.osdl.org>
++	sparse: fix pointer/integer confusion
++	
++	I don't think we're in K&R any more, Toto.
++	
++	If you want a NULL pointer, use NULL. Don't use an integer.
++	
++	Most of the users really didn't seem to know the proper type.
++
++<kenneth.w.chen at intel.com>
++	[PATCH] ia64: fix incorrect initialization of ar.k4 for BP
++	
++	The patch to move the current pointer for init_task from region 7 to
++	region 5 inadvertendly caused ar.k4 (CURRENT_STACK) to be initialized
++	improperly for the bootstrap processor.  Fix this by initializing it
++	to -1.
++	
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<shemminger at osdl.org>
++	[PKT_SCHED]: Bad TDIFF_SAFE in csz.
++	
++	This code in the csz scheduler, is just plain broken.  The TDIFF_SAFE 
++	effectively expands to:
++		unsigned long delay = now - q->t_c;
++		if (delay > 0) {
++			delay = 0;
++			goto do_reset;
++		}
++		if (delay >> q->delta_log)
++	
++	So delay is always 0!  I assume that what was originally intended
++	is the to keep delay bounded to 1<<q->delta_log. 
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[PKT_SCHED]: Eliminate guard from TDIFF_SAFE.
++	
++	The last argument in the PSCHED_TDIFF_SAFE is no longer used;
++	only usage eliminated by previous patch. It gets rid of a bad macro
++	usage.
++	
++	Also, can use the standard min_t macro which also eliminates the
++	macro problem of double evaluation of bound.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[PKT_SCHED]: Use get_jiffies_64()
++	
++	The packet scheduler simulates 64 bit jiffies on 32 bit platforms by running
++	a timer keeping a mark and and offset.  Since there is no locking and this is
++	racy and doesn't handle jiffie wrap real well.
++	
++	We can use get_jiffies_64 on 2.6 do get what is needed.
++	The downside is the overhead of a function call, and a cache miss in
++	get_jiffies_64.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<jbarnes at engr.sgi.com>
++	[PATCH] ia64: update early printk for new console driver
++	
++	The Altix console driver has been replaced in Andrew's tree by a new
++	one that uses the serial core API.  Update the early_console_setup
++	routine to use the new config option so that it's ready when the
++	driver hits Linus' tree.  This will also fix a build bug since the old
++	driver hasn't been updated.
++	
++	Signed-off-by: Jesse Barnes <jbarnes at sgi.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<davem at nuts.davemloft.net>
++	Cset exclude: dtor_core at ameritech.net|ChangeSet|20040629212548|46753
++
++<davej at redhat.com>
++	[AGPGART] Fix sparse NULL pointer warnings.
++	
++	Signed-off-by: Dave Jones <davej at redhat.com>
++
++<tony.luck at intel.com>
++	[PATCH] ia64: fix reloc-out-of-range error on module loading
++	
++	I'm hitting this problem because the module I want to load was
++	compiled with -g, so the filesize is absolutely huge.  kernel/module.c
++	does a vmalloc() to inhale the entire file, and then two calls to
++	module_alloc() (which calls vmalloc() on ia64) to load the 'init' and
++	'core' sections. The 'init' is small and slips into a gap early in the
++	vmalloc playspace, while the 'core' area is allocated after the huge
++	area that was allocated for the inhaled copy of the whole file.
++	
++	I made a one coding change to Jean-Marc's version, adding a check to
++	see whether the init/core sections are close enough together for the
++	PCREL21B to reach (they almost always are).
++	
++	I've kept the test that there are no jumps from core to init (though
++	the message that is printed is almost as unhelpful as the one that you
++	get when you statically link a module into the kernel that has calls
++	to the discarded .exit section :-)
++	
++	This patch stalled out before on the question of whether a PLT was
++	overkill for a section-to-section branch, and whether it would be
++	better to use relaxation techniques to extend the range.  Doing that
++	might be more elegant in some way, but it needs a whole heap of extra
++	code (to count how many relaxed branches need to be added and
++	allocated them as needed).  This seems a lot of extra code that is
++	only ever going to be exercised by maniacs like me with 49MB .ko
++	files.
++	
++	I fixed up the comments to be a little more heplful.
++	
++	Signed-off-by: <tony.luck at intel.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<shemminger at osdl.org>
++	[BRIDGE]: Fix message age in bridge STP config packets.
++	
++	This is a revised version of Kishore's patch to set message age appropriately
++	in STP configuration packets.
++	
++	Signed-off-by: Kishore A K <KishoreAK at myw.ltindia.com>
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davidm at tiger.hpl.hp.com>
++	ia64: Fix UP-build breakage caused by early_console_setup() patch.
++
++<seto.hidetoshi at jp.fujitsu.com>
++	[PATCH] ia64: Quiet corrected errors (CMC/CPE)
++	
++	Trivial patch to quiet messages about corrected errors.
++	
++	Signed-off-by: Hidetoshi Seto <seto.hidetoshi at jp.fujitsu.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<akpm at osdl.org>
++	[PATCH] x86_64 .init.setup alignment fix
++	
++	We're now putting 24-byte structures into .init.setup via __setup.  But
++	x86_64's compiler is emitting a `.align 16' in there, so they end up on
++	32-byte boundaries and do_early_param()'s pointer arithmetic goes wrong.
++	
++	Fix that up by forcing the compiler to align these structures to sizeof(long).
++	
++	Cc: Andi Kleen <ak at muc.de>
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<apw at shadowen.org>
++	[PATCH] ppc64: fix deadlocks when oopsing while mmap_sem is held
++	
++	If a fault in the kernel leads to an unexpected protection fault whilst in
++	a code path which holds mmap_sem we will deadlock in do_page_fault() while
++	trying to classify the fault.  By carefully testing the source of the fault
++	we can detect and OOPS on the vast majority of these, greatly enhancing
++	diagnosis of such bugs.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<yoav_zach at yahoo.com>
++	[PATCH] binfmt misc fd passing via ELF aux vector
++	
++	The proposed patch uses the aux-vector to pass the fd of the open misc
++	binary to the interpreter, instead of using argv[1] for that purpose.
++	
++	Previous patch - open_nonreadable_binaries, offered the option of
++	binfmt_misc opening the binary on behalf of the interpreter.  In case
++	binfmt_misc is requested to do that it would pass the file-descriptor of
++	the open binary to the interpreter as its second argument (argv[1]).  This
++	method of passing the file descriptor was suspected to be problematic,
++	since it changes the command line that users expect to see when using tools
++	such as 'ps' and 'top'. 
++	
++	The proposed patch changes the method of passing the fd of the open binary
++	to the translator.  Instead of passing it as an argument, binfmt_misc will
++	request the ELF loader to pass it as a new element in the aux-vector that
++	it prepares on the stack for ELF interpreter.  With this patch, argv[1]
++	will hold the full path to the binary regardless of whether it opened it or
++	not.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kalin at ThinRope.net>
++	[PATCH] Translate Japanese comments in arch/v850
++	
++	Convert the Japanese comments in arch/v850.
++	
++	I am not exactly 100% sure I translated it correctly since I have no idea
++	what exactly was that NEC v850 evaluation board, but should be OK (say 95%
++	sure).
++	
++	Acked by Miles Bader <miles at lsi.nec.co.jp>
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rmk at arm.linux.org.uk>
++	[PATCH] Provide console_device()
++	
++	[This patch series has also been separately sent to the architecture
++	 maintainers]
++	
++	Add console_device() to return the console tty driver structure and the
++	index.  Acquire the console lock while scanning the list of console drivers
++	to protect us against console driver list manipulations.
++	
++	Signed-off-by: Russell King <rmk at arm.linux.org.uk>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rmk at arm.linux.org.uk>
++	[PATCH] Provide console_suspend() and console_resume()
++	
++	Add console_stop() and console_start() methods so the serial drivers
++	can disable console output before suspending a port, and re-enable output
++	afterwards.
++	
++	We also add locking to ensure that we synchronise with any in-progress
++	printk.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wim at iguana.be>
++	[PATCH] watchdog: indydog.c update
++	
++	<wim at iguana.be> (04/06/27 1.1770)
++	   [WATCHDOG] indydog.c-patch-20040627
++	   
++	   * Fix: since we use the new module_param's: make sure that
++	   linux/moduleparam.h stays included
++	   * in the release code we can just use indydog_stop();
++	
++	The ChangeSets can also be looked at on:
++		http://linux-watchdog.bkbits.net:8080/linux-2.6-watchdog
++	
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<adaplas at hotpop.com>
++	[PATCH] fbcon: fix display artifacts
++	
++	Fixed display artifacts present in the space reserved for the boot logo.
++	Use attributes of the background erase character instead of hardcoding the
++	color to zero.
++	
++	Signed-off-by: Antonino A. Daplas <adaplas at pol.net>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<tigran at veritas.com>
++	[PATCH] fix to microcode driver for the old CPUs.
++	
++	Here is a patch against Linux 2.6.7 which fixes the sigmatch() macro to
++	work for the relatively old processors as well, which have 'pf == 0'
++	(processor flags as read from MSR 0x17), For example, the processors
++	failing without this patch are Pentium II 300 MHz (Klamath) with
++	family/model/stepping 6/3/4 and 6/3/3.
++	
++	The patch also contains minor cosmetic changes (to make source code more
++	uniform).
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<lcapitulino at prefeitura.sp.gov.br>
++	[PATCH] CREDITS update
++	
++	Luiz has ~40 patches to his name, go he gets a banana.
++	
++	Signed-off-by: Luiz Capitulino <lcapitulino at prefeitura.sp.gov.br>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bjorn.helgaas at hp.com>
++	[PATCH] PCDP console detection support fixes
++	
++	Check for ioremap failure and use correct UPIO_{MEM,PORT} constants.
++	
++	Signed-off-by: Bjorn Helgaas <bjorn.helgaas at hp.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<sfr at canb.auug.org.au>
++	[PATCH] ppc64: vio infrastructure modifications
++	
++	The intention here is to have no effect on pSeries except:
++	
++	1) vio_register_device is renamed to vio_register_device_node to better
++	   reflect is purpose and to allow me to introduce
++	   vio_register_device_iseries.
++	
++	2) I have introduced the name and type fields in struct vio_dev to make
++	   these two fields independent of subarchitecture.
++	
++	Signed-off-by: Stephen Rothwell <sfr at canb.auug.org.au>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<sfr at canb.auug.org.au>
++	[PATCH] ppc64: iseries_veth integration
++	
++	Signed-off-by: Stephen Rothwell <sfr at canb.auug.org.au>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<sfr at canb.auug.org.au>
++	[PATCH] ppc64: viodasd integration
++	
++	Signed-off-by: Stephen Rothwell <sfr at canb.auug.org.au>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<sfr at canb.auug.org.au>
++	[PATCH] ppc64: viocd integration
++	
++	Signed-off-by: Stephen Rothwell <sfr at canb.auug.org.au>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<sfr at canb.auug.org.au>
++	[PATCH] ppc64: viotape integration
++	
++	Signed-off-by: Stephen Rothwell <sfr at canb.auug.org.au>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<Robert.Picco at hp.com>
++	[PATCH] hpet fixes
++	
++	Some hpet clean up and a fix to the RTC request_irq issue.
++	
++	Signed-off-by: Bob Picco <Robert.Picco at hp.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<lethal at Linux-SH.ORG>
++	[PATCH] sh64 support
++	
++	This patch adds sh64 support.
++	
++	This is a bit overdue, as this was on the should-fix list, though we
++	weren't done debugging and finishing off the port until just recently (I
++	did a port against 2.5.68 but it wasn't in any shape to be merged).
++	
++	sh64 is already in 2.4 and has been for quite awhile, so this is mostly
++	just a forward port of that code to 2.6 with appropriate bug fixes, etc.
++	along the way.  There isn't much in the way of new features that have been
++	added to the port yet, though I have added rough hugetlb and oprofile
++	support.
++	
++	This patch doesn't really touch any common code, with the exception of an
++	ifdef or two for keyboard support and an ifdef in fb.h to omit sh64 from
++	the __raw_xxx() wrapping that sh does.
++	
++	The only other common driver changes were to sh-sci for serial support, but
++	those bits were already merged with the latest batch of sh-sci updates.
++	
++	Beyond that, the port is completely isolated.
++	
++	Signed-off-by: Richard Curnow <richard.curnow at superh.com>
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<lethal at Linux-SH.ORG>
++	[PATCH] sh64: Fix syscall table alignment
++	
++	If the syscall table is in the text section, the movi that loads its
++	address into a register will at link time have its immediates resolved as
++	though it's an SHmedia symbol, i.e.  the LSB will be 1.  This is then
++	misaligned as a base address for loading the address to jump to.
++	
++	This could be fixed either by moving the table back to the .data section
++	(as done here), or by masking off the LSB after loading the table address
++	into a register.
++	
++	Signed-off-by: Richard Curnow <richard.curnow at superh.com>
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<lethal at Linux-SH.ORG>
++	[PATCH] kyrofb: Fix modedb usage when built as a module.
++	
++	Since James confirmed that this doesn't need to be module specific, we get
++	rid of the #ifndef MODULE checks for both the modedb and the modedb lookup.
++	
++	Additionally we also switch from memset_io() to fb_memset().
++	
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<lethal at Linux-SH.ORG>
++	[PATCH] sh/sh64: MAINTAINERS update.
++	
++	This updates MAINTAINERS for sh/sh64 to match up with the 2.4 entries.
++	
++	I've also removed NIIBE-san as an active sh maintainer, since he hasn't
++	been involved or submitted any code since 2002/06/26.
++	
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<romieu at fr.zoreil.com>
++	[PATCH] cirrusfb: minor fixes
++	
++	- fix unbalanced invocation of pci_enable_device();
++	
++	- leaks plugged in cirrusfb_zorro_setup();
++	
++	- move framebuffer_release() into cirrusfb_{pci/zorro}_unmap() to balance
++	  cirrusfb_{pci/zorro}_setup();
++	
++	- make cirrusfb_{pci/zorro}_setup() return adequate error codes when
++	  something fails;
++	
++	- cirrusfb_zorro_unmap: iounmap() now take as argument values previously
++	  returned by ioremap().
++	
++	Signed-off-by: Francois Romieu <romieu at fr.zoreil.com>
++	Signed-off-by: David Eger <eger at havoc.gtf.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<olh at suse.de>
++	[PATCH] signed bug in drivers/video/console/fbcon.c con2fb_map[]
++	
++	drivers/video/console/fbcon.c:310: warning: comparison is always true due
++	to limited range of data type
++	
++	char can be either signed or unsigned, depending on the target system.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<Matt_Domsch at dell.com>
++	[PATCH] EDD: store mbr_signature on first 16 int13 devices
++	
++	Currently, the x86/x86_64 real-mode kernel setup code reads and stores the
++	mbr_signature (4 bytes in the MBR at offset 440 decimal) for BIOS int13h
++	device 80h only.  This is useful, but not as useful as if we stored such
++	signatures for all int13h devices.  Think OS installer wanting to set up md
++	software RAID across several BIOS disks.
++	
++	Patch below against 2.6.7 allows the storing of the mbr_signature for the
++	first 16 BIOS int13h devices, and exports them via
++	/sys/firmware/edd/int13_dev8x/mbr_signature as before.
++	
++	This also merges the three EXPORT_SYMBOLs that setup.c exported for edd.c's
++	use into one.
++	
++	Signed-off-by: Matt Domsch <Matt_Domsch at dell.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mika at osdl.org>
++	[PATCH] Combined patch for remaining trivial sparse warnings in allnoconfig build
++	
++	Well, one of these (fs/block_dev.c) is little non-trivial, but i felt
++	throwing that away would be a shame (and I did add comments ;-).
++	
++	Also almost all of these have been submitted earlier through other
++	channels, but have not been picked up (the only controversial is again the
++	fs/block_dev.c patch, where Linus felt a better job would be done with
++	__ffs(), but I could not convince myself that is does the same thing as
++	original code).
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<James.Bottomley at SteelEye.com>
++	[PATCH] dma_get_required_mask()
++	
++	This patch implements dma_get_required_mask() which may be used by drivers
++	to probe the optimal DMA descriptor type they should be implementing on the
++	platform.
++	
++	I've also tested it this time with the sym_2 driver...making it chose the
++	correct descriptors for the platform.  (although I don't have a 64 bit
++	platform with >4GB memory, so I only confirmed it selects the 32 bit
++	descriptors all the time...)
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<joern at wohnheim.fh-wedel.de>
++	[PATCH] Add m68k support to checkstack
++	
++	Add m68k support to checkstack.pl
++	
++	Regular expression combination by Andres Schwab
++	
++	Signed-off-by: <geert at linux-m68k.org>
++	Signed-off-by: Jörn Engel <joern at wohnheim.fh-wedel.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<joern at wohnheim.fh-wedel.de>
++	[PATCH] small fixes to checkstack
++	
++	 - fix documentation
++	 - use $(src) in Makefile (fixes cross-compilation)
++	
++	Both spottet by Geert Uytterhoeven
++	
++	Signed-off-by: Jörn Engel <joern at wohnheim.fh-wedel.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<trini at kernel.crashing.org>
++	[PATCH] Add <linux/compiler.h> to <linux/fd.h>
++	
++	<linux/fd.h> references __user which is defined in <linux/compiler.h>.
++	
++	Signed-off-by: Tom Rini <trini at kernel.crashing.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<haveblue at us.ibm.com>
++	[PATCH] fix page->count discrepancy for zero page
++	
++	While writing some analysis tools for memory hot-remove, we came across a
++	single page which had a ->count that always increased, without bound.  It
++	ended up always being the zero page, and it was caused by a leaked
++	reference in some do_wp_page() code that ends up avoiding PG_reserved
++	pages.
++	
++	Basically what happens is that page_cache_release()/put_page() ignore
++	PG_reserved pages, while page_cache_get()/get_page() go ahead and take the
++	reference.  So, each time there's a COW fault on the zero-page, you get a
++	leaked page->count increment.
++	
++	It's pretty rare to have a COW fault on anything that's PG_reserved, in
++	fact, I can't think of anything else that this applies to other than the
++	zero page.
++	
++	In any case, it the bug doesn't cause any real problems, but it is a bit of
++	an annoyance and is obviously incorrect.  We've been running with this
++	patch for about 3 months now, and haven't run into any problems with it.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<peterc at gelato.unsw.edu.au>
++	[PATCH] Fix Alpha compilation
++	
++	When using gcc 3.3.3 on alpha, the current BK head doesn't compile.
++	
++	- there's an external declaration for abs() in the same scope as a macro
++	  definition in arch/alpha/time.c
++	
++	- The compiler is picky about `const' declarations, which breaks on
++	  bitops.h.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<eger at havoc.gtf.org>
++	[PATCH] radeonfb: 16bpp copyarea() fix
++	
++	radeonfb: fix 16bpp copyarea() bug
++	
++	It turns out the bug was due to my mis-copying a certain set of flags from
++	the x.org tree.
++	
++	Signed-off-by: David Eger <eger at havoc.gtf.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<oleg at tv-sign.ru>
++	[PATCH] kill mm_struct.used_hugetlb
++	
++	mm_struct.used_hugetlb used to eliminate costly find_vma() from
++	follow_page().  Now it is used only in ia64 version of follow_huge_addr(). 
++	I know nothing about ia64, but this REGION_NUMBER() looks simple enough to
++	kill used_hugetlb.
++	
++	There is debug version (commented out) of follow_huge_addr() in i386 which
++	looks at used_hugetlb, but it can work without this check.
++	
++	Signed-off-by: Oleg Nesterov <oleg at tv-sign.ru>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<torvalds at ppc970.osdl.org>
++	sparse: get rid of more integer/pointer confusion
++	
++	Use NULL, not 0, where appropriate.
++
++<ajgrothe at yahoo.com>
++	[CRYPTO]: Add TEA and XTEA algorithms.
++	
++	The following is a patch against 2.6.7 (should apply cleanly to 2.6.5 or 
++	above).  It implements the Tiny Encryption Algorithm (TEA) and the 
++	Xtended TEA (XTEA) algorithms.  TEA goes back to 1994 and is a good 
++	algorithm espically for memory constrained systems.  It is similar in
++	concept to the IDEA crypto.  It does NOT have any patent restrictions
++	and has been put in the public domain by Wheeler and Needham.  Tea is used
++	in quite a few products such as filesafe and even Microsoft's Xbox.
++	
++	Signed-off-by: Aaron Grothe <ajgrothe at yahoo.com>
++	Signed-off-by: James Morris <jmorris at redhat.com>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davej at redhat.com>
++	[AGPGART] K8T800 Pro support in amd64 driver.
++	
++	Signed-off-by: Kris Kersey <augustus at linuxhardware.org>
++	Signed-off-by: Dave Jones <davej at redhat.com>
++
++<greg at kroah.com>
++	Driver Core: remove extra space in Kconfig file.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<tony at com.rmk.(none)>
++	[ARM PATCH] 1947/1: Remove unused async_struct in OMAP pm.h
++	
++	Patch from Tony Lindgren
++	
++	Removes some dead code as noted by Russell King.
++
++<nico at org.rmk.(none)>
++	[ARM PATCH] 1948/1: Mainstone compile fix
++	
++	Patch from Nicolas Pitre
++	
++	... and a comment fix in bonus
++
++<nico at org.rmk.(none)>
++	[ARM PATCH] 1949/1: warning fix
++	
++	Patch from Nicolas Pitre
++	
++	Missing prototype.
++
++<shaggy at austin.ibm.com>
++	JFS: Error path released metadata page it shouldn't have
++	
++	Signed-off-by: Dave Kleikamp <shaggy at austin.ibm.com>
++
++<adwol at polsl.gliwice.pl>
++	[NETFILTER]: Fix opt[] to be array of u_int8_t in tcp_find_option().
++
++<davem at nuts.davemloft.net>
++	[IPV4]: Bootp packet extension area is variable length.
++	
++	1) Remove the magic 300 constant
++	2) Allow b->exten area to be zero or more
++	   variable bytes in length.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<mika at osdl.org>
++	[PATCH] sparse: NULL vs 0 - arch/i386/*
++
++<mika at osdl.org>
++	[PATCH] sparse: NULL vs 0 - drivers/acpi/*
++
++<mika at osdl.org>
++	[PATCH] sparse: NULL vs 0 - drivers/char/*
++
++<mika at osdl.org>
++	[PATCH] sparse: NULL vs 0 - rest of drivers
++
++<mika at osdl.org>
++	[PATCH] sparse: NULL vs 0 - drivers/usb
++
++<mika at osdl.org>
++	[PATCH] sparse: NULL vs 0 - filesystems
++
++<mika at osdl.org>
++	[PATCH] sparse: NULL vs 0 - net/*
++
++<mika at osdl.org>
++	[PATCH] sparse: NULL vs 0 - sound/*
++
++<mika at osdl.org>
++	[PATCH] sparse: NULL vs 0 - the rest of it
++
++<hch at sgi.com>
++	[XFS] Don't dereference buffer after pagebuf_iostrategy()
++	
++	SGI Modid: xfs-linux:xfs-kern:174326a
++	Signed-off-by: Nathan Scott <nathans at sgi.com>
++
++<margitsw at t-online.de>
++	[PATCH] prism54 cleanup functions
++	
++	2004-06-28 Margit Schubert-While <margitsw at t-online.de>
++	
++	* Clean up function definitions (missing static, extraneous inline)
++
++<margitsw at t-online.de>
++	[PATCH] prism54 missing error check
++	
++	2004-06-28 Margit Schubert-While <margitsw at t-online.de>
++	
++	* Missing error check after dev_alloc_skb
++
++<margitsw at t-online.de>
++	[PATCH] prism54 fix unlikely
++	
++	2004-06-28 Margit Schubert-While <margitsw at t-online.de>
++	
++	* Fix a thinko by me
++
++<margitsw at t-online.de>
++	[PATCH] prism54 device list cleanup
++	
++	2004-06-28 Margit Schubert-While <margitsw at t-online.de>
++	
++	* Clean up the device table
++
++<margitsw at t-online.de>
++	[PATCH] prism54 remove prog reg poke
++	
++	2004-06-28 Margit Schubert-While <margitsw at t-online.de>
++	
++	* Don't poke around in the timeout registers
++
++<margitsw at t-online.de>
++	[PATCH] prism54 use set_pci_mwi()
++	
++	2004-06-28 Margit Schubert-While <margitsw at t-online.de>
++	
++	* Use set_pci_mwi()
++
++<brazilnut at us.ibm.com>
++	[PATCH] pcnet32: acknowledge all interrupts early.
++	
++	A recent change I made broke pcnet32 in a way that allowed real hardware
++	to work, but broke VMWare.  This patch acknowledges all interrupts early
++	in the pcnet32_interrupt while loop.  Without this patch on real hardware
++	the first transmit operation would clear the 'init' interrupt, but in
++	VMWare it would rain interrupts.  Keith Moore did more testing for me
++	on VMWare and I did a better job testing on hardware.  Petr Vandrovec
++	correctly pointed out the source of the problem on lkml.
++	
++	This patch is not needed for 2.4.27-rc1 unless my patch labeled
++	"pcnet32: recover after rx hang" is applied (which it has not).
++	
++	signed-off-by: Don Fry <brazilnut at us.ibm.com>
++
++<brazilnut at us.ibm.com>
++	[PATCH] pcnet32: Add HomePNA parameter for 79C978.
++	
++	This patch adds a module parameter to select HomePNA mode of operation for
++	the 79C978 version of the pcnet32.  Tested ia32 and ppc64.
++	
++	signed-off-by: Patrick Simmons <psimmons at flash.net>
++	signed-off-by: Don Fry <brazilnut at us.ibm.com>
++
++<brazilnut at us.ibm.com>
++	[PATCH] pcnet32:  correctly program bcr32.
++	
++	The pcnet32 driver was not correctly enabling MII autonegotiation after
++	booting when ppc firmware forced the speed/duplex mode of the chip.
++	After several conversations with AMD this patch corrects the problem.
++	
++	I have tested this on hardware I have available (ia32 and ppc64) but I
++	would like wider audience testing of this patch.
++	
++	Signed-off-by: Don Fry <brazilnut at us.ibm.com>
++
++<brazilnut at us.ibm.com>
++	[PATCH] pcnet32: change to use module_param
++	
++	Change the pcnet32 driver to use module_param and module_param_array.
++
++<akpm at osdl.org>
++	[PATCH] net/at1700.c depends on MCA_LEGACY
++	
++	From: "Luiz Fernando N. Capitulino" <lcapitulino at prefeitura.sp.gov.br>
++	
++	drivers/net/at1700.c does not compile without CONFIG_MCA_LEGACY set.
++	
++	As CONFIG_MCA_LEGACY depends on CONFIG_MCA, we can use only
++	CONFIG_MCA_LEGACY, insteed of "MCA && MCA_LEGACY".
++	
++	Signed-off-by: Luiz Capitulino <lcapitulino at prefeitura.sp.gov.br>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Document reserved and soft2 bits in PTE.
++
++<akpm at osdl.org>
++	[PATCH] net/ne2.c needs MCA_LEGACY
++	
++	From: "Luiz Fernando N. Capitulino" <lcapitulino at prefeitura.sp.gov.br>
++	
++	drivers/net/ne2.c does not compile without CONFIG_MCA_LEGACY set.
++	
++	As CONFIG_MCA_LEGACY depends on CONFIG_MCA, we can use only
++	CONFIG_MCA_LEGACY, insteed of "MCA && MCA_LEGACY".
++	
++	Signed-off-by: Luiz Capitulino <lcapitulino at prefeitura.sp.gov.br>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++
++<shemminger at osdl.org>
++	[PATCH] (1/3) skfp - cleanup is_XXX functions
++	
++	This started out from sparse warnings about calling with fddi_broadcast
++	that is declared const.  This fixes that and gets rid of some of the namespace
++	pollution of this driver by moving the predicate function is_individual, is_broadcast, ...
++	as inline's in the one file that uses them.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++
++<shemminger at osdl.org>
++	[PATCH] (2/3) skfp -- sparse __user annotation
++	
++	Add __user annotation to the device specific ioctl.
++
++<shemminger at osdl.org>
++	[PATCH] [sparse] get rid of warnings about #if DEBUG
++	
++	Several drivers use '#if DEBUG' which is a warning under the sparse checker.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++
++<shemminger at osdl.org>
++	[PATCH] get rid of __OPTIMIZE__ requirement in net drivers
++	
++	Several network drivers have checks that they are only built with -O.
++	This breaks checking with sparse and other tools, and seems like a holdover from
++	when drivers were built out of tree and the kernel build system was less stable.
++	This patch gets rid of these.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++
++<rmk+lkml at arm.linux.org.uk>
++	[PATCH] PCMCIA net device unplugging ordering fix
++	
++	This is a rather old patch which re-orders the teardown of PCMCIA
++	network devices.  Current device drivers remove the IO mappings,
++	interrupts, and free any PCMCIA windows before they unregister
++	themselves from the network layer.
++	
++	This patch ensures that we first unregister from the network layer
++	before performing any teardown of resources or windows.
++	
++	Note: the only card which has been tested in this patch is pcnet_cs.
++
++<dale at farnsworth.org>
++	[PATCH] Patch 1/2 enable smc91x enet driver for use by PPC
++	
++	Hi,
++	
++	Patch 1 of 2 to enable the smc91x driver to be used by the IBM Redwood5
++	and Redwood6 boards.
++	
++	Move drivers/net/arm/smc91x.[ch] to drivers/net
++	
++	Signed-off-by: Dale Farnsworth <dale at farnsworth.org>
++
++<dale at farnsworth.org>
++	[PATCH] Patch 2/2 enable smc91x enet driver for use by PPC
++	
++	Hi,
++	
++	Patch 2 of 2 to enable the smc91x driver to be used by the IBM Redwood5
++	and Redwood6 boards.
++	
++	Enable smc91x driver to support IBM Redwood5 and Redwood6 boards
++	
++	Signed-off-by: Dale Farnsworth <dale at farnsworth.org>
++
++<panto at intracom.gr>
++	[PATCH] add new fec_8xx network driver
++
++<shemminger at osdl.org>
++	[PATCH] skfddi - fix warning
++	
++	The conversion to ANSI, caused a warning because the mulitcast code needs
++	a cast.  dmi->dmi_addr is a u8 array, and fddi_addr is just a wrapper around a u8 array.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++
++<shemminger at osdl.org>
++	[PATCH] skfddi - cleanup local and dead functions
++	
++	Cleanup the SK Fddi driver a little more.  Mark some functions as static,
++	and eliminate (or comment out) some that are defined but never used.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++
++<jgarzik at pobox.com>
++	[netdrvr] add fec_8xx to Makefile
++
++<jgarzik at pobox.com>
++	[netdrvr] disable certain drivers that are broken on 64-bit
++	
++	Disable Toshiba FIR IRDA driver (donauboe) and IBM Lanstreamer
++	token ring driver on all 64-bit platforms.  Add #error to each driver
++	explaining the problem, causing build of driver to fail when
++	BITS_PER_LONG == 64.
++
++<jgarzik at pobox.com>
++	[netdrvr] fix warnings found on 64-bit platforms
++	
++	Updated:  8139too, arcnet/arcnet, rrunner
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Reserve a software PTE bit for _PAGE_EXEC.
++	
++	Based upon the PAX sparc64 patches.  Credit to
++	PaX Team <pageexec at freemail.hu>
++	
++	Also, reformat the comments here so the lines fit in
++	80 columns.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Non-executable page support.
++	
++	Based upon the PAX patches.  Credit to PaX Team
++	<pageexec at freemail.hu>
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<rmk at flint.arm.linux.org.uk>
++	[SERIAL] Remove UPF_RESOURCES
++	
++	The UPF_RESOURCES flag was added to the serial layer to cater for
++	the idiosyncrasies of the PCMCIA layer, where the PCMCIA core code
++	handles the claiming of busy resources.
++	
++	However, the PCMCIA core has progressed, and now does not claim busy
++	resources - IOW, it now behaves just like any other bus driver,
++	where resources are allocated non-busy and its up to the drivers to
++	mark their regions busy using request_region / request_mem_region.
++	
++	The effect of this is that the UPF_RESOURCES hack in the serial
++	layer is now redundant, and can now be removed - 8250 devices
++	should now always use request_region / request_mem_region
++	unconditionally.
++	
++	Signed-off-by: Russell King.
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] asm/arch-versatile/uncompress.h does not need linux/kernel.h
++
++<mingo at elte.hu>
++	[PATCH] enable SMP Opterons boot an NX-enabled x86 kernel
++	
++	This fixes a corner-case NX bug: the x86 SMP kernel doesnt boot on SMP
++	Opterons if NX is enabled [and mem=nopentium is specified], due to
++	kernel-space NX protection preventing the SMP trampoline from being
++	executable. 
++	
++	Since the SMP trampoline is a rare case of 'dynamic code' executed by
++	the kernel (it has to be below 640K so it cannot be part of the kernel
++	text itself), i've added the necessary infrastructure to enable/disable
++	executability of specific kernel pages. 
++	
++	We cannot simply disable NX via the MSR because we've got the NX bits in
++	the kernel pagetables, which are set up before we do the SMP bootup. 
++	The NX bit in the pagetables is undefined if EFER.NXE is 0, so we cannot
++	count on NX-capable CPUs not faulting when they encounter them. 
++	
++	I've tested the x86 kernel on a non-NX SMP x86 box and on an NX UP box,
++	on which i've also tested a simulated SMP trampoline, it all works fine. 
++	
++	- add infrastructure to enable/disable executability of kernel pages
++	
++	- make the SMP trampoline page executable.
++	
++	Signed-off-by: Ingo Molnar <mingo at elte.hu>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<petero2 at telia.com>
++	[PATCH] Can't open CDROM device for writing
++	
++	Opening a CDROM device for writing no longer works, because cdrom_open()
++	returns -EROFS even if cdrom_open_write() succeeds.
++	
++	This fixes it. 
++	
++	Signed-off-by: Peter Osterlund <petero2 at telia.com>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<andrea at suse.de>
++	[PATCH] zombie with CLONE_THREAD and strace
++	
++	'strace' shows a problem with a missing release_task for self-reaping
++	clones that have been traced.  We need to defer releasing them until the
++	tracer is done with them, but if the tracer dies, we need to handle that
++	case gracefully too. 
++	
++	We do that by having 'forget_original_parent()' generate a list of tasks
++	to release when this case happens.
++	
++	Patch based on discussions on linux-kernel, and suggestions from Roland
++	McGrath <roland at redhat.com>.
++
++<mika at osdl.org>
++	[PATCH] Fix sound/isa/gus/* compile error without CONFIG_PNP
++
++<kevcorry at us.ibm.com>
++	[PATCH] dm: kcopyd.c: Remove unused include
++	
++	kcopyd.c: Remove unused #include.
++	
++	Signed-off-by: Kevin Corry <kevcorry at us.ibm.com>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kevcorry at us.ibm.com>
++	[PATCH] dm: kcopyd.c: make client_add() return void
++	
++	kcopyd.c: client_add() can return void instead of an int, which will eliminate
++	an unnecessary error path in kcopyd_client_create().
++	
++	Signed-off-by: Kevin Corry <kevcorry at us.ibm.com>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kevcorry at us.ibm.com>
++	[PATCH] dm: dm-raid1.c: Enforce max of 9 mirrors
++	
++	dm-raid1.c: Since kcopyd can currently only handle 1 source and up to 8
++	destinations, enforce a max of 9 mirrors when creating a dm-mirror device.
++	
++	Signed-off-by: Kevin Corry <kevcorry at us.ibm.com>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kevcorry at us.ibm.com>
++	[PATCH] dm: dm-raid1.c: Use fixed-size arrays
++	
++	dm-raid1.c: Declare fixed-sized (instead of variable-sized) arrays on the
++	stack in recover() and do_write().
++	
++	Signed-off-by: Kevin Corry <kevcorry at us.ibm.com>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kevcorry at us.ibm.com>
++	[PATCH] dm: Remove 1024 devices limitation
++	
++	Remove the limitation of 1024 DM devices.
++	
++	Signed-off-by: Kevin Corry <kevcorry at us.ibm.com>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<shemminger at osdl.org>
++	[TCP]: TCP acts like it is always out of memory.
++	
++	Current 2.6.7 tree acts as if it is alway under memory pressure because
++	a recent change did a s/tcp_memory_pressure/tcp_prot.memory_pressure/.
++	The problem is tcp_prot.memory_pressure is a pointer, so it is always non-zero!
++	
++	Rather than using *tcp_prot.memory_pressure, just go back to looking at
++	tcp_memory_pressure.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Timer fixes for CLPS711x.
++
++<Matt_Domsch at dell.com>
++	[PATCH] EDD: x86-64 build fix
++	
++	On Wed, Jun 30, 2004 at 01:22:21AM -0400, Jeff Garzik wrote:
++	>   CC      arch/x86_64/kernel/setup.o
++	> arch/x86_64/kernel/setup.c: In function `copy_edd':
++	> arch/x86_64/kernel/setup.c:415: error: `EDD_MBR_SIGNATURE' undeclared=20
++	> (first use in this function)
++	> arch/x86_64/kernel/setup.c:415: error: (Each undeclared identifier is=20
++	> reported only once
++	> arch/x86_64/kernel/setup.c:415: error: for each function it appears in.)
++	> arch/x86_64/kernel/setup.c:417: error: `EDD_MBR_SIG_NR' undeclared=20
++	> (first use in this function)
++	> make[1]: *** [arch/x86_64/kernel/setup.o] Error 1
++	> make: *** [arch/x86_64/kernel] Error 2
++	
++	Arrgh.  On i386 it's in include/asm-i386/setup.h  On x86_64 it
++	belongs in include/asm-x86_64/bootsetup.h.
++	
++	Patch below defines EDD_MBR_SIG_NR and EDD_MBR_SIGNATURE on x86_64.
++	
++	Signed-off-by: Matt_Domsch <Matt_Domsch at dell.com>
++
++<aia21 at cantab.net>
++	NTFS: Add a set_page_dirty address space operation for ntfs_m[fs]t_aops.
++	      It is simply set to __set_page_dirty_nobuffers() to make sure that
++	      running set_page_dirty() on a page containing mft/ntfs records will
++	      not affect the dirty state of the page buffers.
++	
++	Signed-off-by: Anton Altaparmakov <aia21 at cantab.net>
++
++<aia21 at cantab.net>
++	NTFS: Add fs/ntfs/index.c::__ntfs_index_entry_mark_dirty() which sets all
++	      buffers that are inside the ntfs record in the page dirty after which
++	      it sets the page dirty.  This allows ->writepage to only write the
++	      dirty index records rather than having to write all the records in
++	      the page.  Modify fs/ntfs/index.h::ntfs_index_entry_mark_dirty() to
++	      use this rather than __set_page_dirty_nobuffers().
++	
++	Signed-off-by: Anton Altaparmakov <aia21 at cantab.net>
++
++<aia21 at cantab.net>
++	NTFS: Update __ntfs_index_entry_mark_dirty() so it makes sure that the
++	      page has buffers.  Otherwise we could end up with a dirty page
++	      without buffers and our set_page_dirty() would not mark the buffers
++	      dirty when they are created and thus they would not be written out
++	      and the dirty records would be lost.
++	
++	Signed-off-by: Anton Altaparmakov <aia21 at cantab.net>
++
++<aia21 at cantab.net>
++	NTFS: 2.1.15 - Implement fs/ntfs/aops.c::ntfs_write_mst_block() which
++	      enables the writing of page cache pages belonging to mst protected
++	      attributes like the index allocation attribute in directory indices
++	      and other indices like $Quota/$Q, etc.  This means that the quota is
++	      now marked out of date on all volumes rather than only on ones where
++	      the quota defaults entry is in the index root attribute of the
++	      $Quota/$Q index.
++	
++	Signed-off-by: Anton Altaparmakov <aia21 at cantab.net>
++
++<akpm at osdl.org>
++	[PATCH] err2-14: skge locking fix
++	
++	It can return with the lock held.
++	
++	Found by the Stanford locking checker.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++
++<simon at thekelleys.org.uk>
++	[PATCH] [Bug 2948] New: Atmel wireless driver Oopses
++
++<davem at nuts.davemloft.net>
++	[TG3]: Fibre PHY fixes from Sun.
++	
++	- Support HW autoneg on 5704.
++	- On serdes, no MII reg ioctl support.
++
++<davem at nuts.davemloft.net>
++	[TG3]: Update driver version and reldate.
++
++<david at gibson.dropbear.id.au>
++	[PATCH] ppc64: remove RTAS arguments from PACA
++	
++	This patch removes the RTAS arguments structure on ppc64 from the PACA. 
++	The args have to be in the RMO, but since we have a global spinlock for
++	RTAS anyway, there's no reason to have a separate copy of the args per-CPU.
++	 This patch replaces the PACA field with a single instance in the global
++	rtas structure.
++	
++	The one exception is for the rtas_stop_self() call, which can't take the
++	lock, because it never returns.  But it has a fixed set of arguments, so we
++	can use another global instance which is initialized at boot.
++	
++	This lets us remove rtas.h from paca.h, which substantially reduces overall
++	#include hairiness (because paca.h is now, as it wants to be, a nice
++	low-level structure-defining header which relies on very little and can
++	safely be included almost anywhere).  Although it does add some noise to
++	the patch, because a bunch of places relied on the indirect inclusion of
++	rtas.h, or even more indirect inclusions (see the hunks applying to eeh.h
++	and current.h!).
++	
++	Cc: Paul Mackerras <paulus at samba.org>
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<david at gibson.dropbear.id.au>
++	[PATCH] ppc64: PACA cleanup
++	
++	Cleanup the PPC64 PACA structure.  It was previously a big mess of
++	unecessary fields, overengineered cache layout and uninformative comments. 
++	This is essentially a rewrite of include/asm-pp64/paca.h with associated
++	changes elsewhere.  The patch:
++	
++	- Removes unused PACA fields
++	
++	- Removes uneeded #includes
++	
++	- Uses gcc attributes instead of explicit padding to get the desired
++	  cacheline layout, also rethinks the layout and comments accordingly.
++	
++	- Better comments where asm or firmware dependencies apply non-obvious
++	  layout constraints.
++	
++	- Splits up the pointless STAB structure, letting us move its elements
++	  independently.
++	
++	- Uses offsetof instead of hardcoded offset in spinlocks.
++	
++	- Eradicates xStudlyCaps identifiers
++	
++	- Replaces PACA guard page with an explicitly defined emergency stack
++	  (removing more than NR_CPUS pages from the initialized data segment).
++	
++	Cc: Paul Mackerras <paulus at samba.org>
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulus at samba.org>
++	[PATCH] ppc64: janitor log_rtas_error() call arguments
++	
++	This patch from Linas Vepstas (rediffed by me) fixes the confusing argument
++	aliasing of the log_rtas_error() subroutine.
++	
++	This patch makes no functional changes, it just cleans up some strange
++	usage.
++	
++	The rtas_args used to communicate with firmware are always taken from the
++	paca struct, so as to keep the args at a fixed, low-memory location.  But
++	the log_rtas_error() routine also took an rtas_args pointer, which it
++	assumed was aliased to the paca struct.  This aliasing is both
++	un-neccessary, and confusing; this patch eliminates this confusion.
++	
++	Signed-off-by: Linas Vepstas <linas at linas.org>
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulus at samba.org>
++	[PATCH] ppc64: Janitor rtas_call() return variables
++	
++	Recently I changed the return value of rtas_call() from an unsigned long to
++	an int.  That patch missed a few places where we declare a variable to
++	store the result from rtas_call().  This new patch changes those places to
++	use an int variable instead of a long or unsigned long variable.  Linas
++	Vepstas pointed this out.
++	
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<trini at kernel.crashing.org>
++	[PATCH] ppc32: OCP for MP10x
++	
++	Attached is the latest version of Adrian Cox's OCP patch for
++	MPC107/8240/8245.  This unifies some openpic setup code, and ensures that
++	the OCP devices are only added to the bus on chip variants which have them.
++	
++	All interested parties seem happy, and this patch is necessary to provide a
++	unified I2C driver for 85xx and 107/824x.
++	
++	Signed-off-by: Adrian Cox <adrian at humboldt.co.uk>
++	Signed-off-by: Tom Rini <trini at kernel.crashing.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mporter at kernel.crashing.org>
++	[PATCH] ppc32: PPC44x defconfig update and fixes
++	
++	Update PPC44x defconfigs and some fixes.
++	
++	Signed-off-by: Matt Porter <mporter at kernel.crashing.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mporter at kernel.crashing.org>
++	[PATCH] ppc32: PPC4xx preempt fix
++	
++	PPC4xx preempt fixes. Based on previous Classic PPC patch.
++	
++	Signed-off-by: Tom Rini <trini at kernel.crashing.org>
++	Signed-off-by: Matt Porter <mporter at kernel.crashing.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mporter at kernel.crashing.org>
++	[PATCH] ppc32: Fix dual UICs in 4xx PIC support
++	
++	Fixes a case where we were not correctly acking the base cascade controller
++	on PPC4xx.  Patch from Pavel Bartusek <pba at sysgo.com>
++	
++	Signed-off-by: Matt Porter <mporter at kernel.crashing.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pavel at ucw.cz>
++	[PATCH] swsusp: preparation for smp support & fix device suspending
++	
++	It fixes levels for calling driver model, puts devices into sleep before
++	powering down (so that emergency parking does not happen), and actually
++	introduces SMP support, but its disabled for now.  Plus noone should try to
++	freeze_processes() when thats not implemented, we now BUG()s -- we do not
++	want Heisenbugs.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<arjanv at redhat.com>
++	[PATCH] produce a warning on unchecked inode_setattr use
++	
++	The patch below uses the new-in-gcc-3.4 option to generate a warning on
++	unchecked results of marked functions, and applies this to the
++	inode_setattr function (which based on recent bk commits HAS to be checked
++	for it's return value for correct operation).  A warning looks like this:
++	
++	fs/ext2/inode.c:1279: warning: ignoring return value of 'inode_setattr', declared with attribute warn_unused_result
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<george at mvista.com>
++	[PATCH] Bugfix for CLOCK_REALTIME absolute timer
++	
++	As required by the standard, this patch adds to POSIX ABSOLUTE timers the
++	functionality of adjusting the timer when the clock is set so that it still
++	expires at the specified time (provided that time has not passed, in which
++	case the timer expires immeadiatly).
++	
++	The standard is, IMNSOHO, a bit vague on just how repeating timers are to
++	be handled so I made some choices:
++	
++	1) If an absolute timer is to expire every N intervals, we assume that
++	   the expiries should happen at those specified times after clock setting.
++	    I.e.  we adjust the repeat timer as well as the initial timer.  (The
++	   other option would be to treat the repeating timers as relative and not
++	   to adjust them.)
++	
++	2) If a clock set moves the the clock prior to the initial expiry time
++	   AND that time has already passed and been signaled, the current repeat
++	   timer is adjusted, i.e.  we DO NOT go back to the initial time and
++	   repeat that.  (The other option is to treat this case as a new request
++	   with the initial timer parameters (which by this time we have lost).)
++	
++	3) If time is advanced such that it appears that several expiries have
++	   been missed, the overrun count will reflect the misses.  (The other
++	   option is to not reflect this in the overrun.) At the same time, nothing
++	   is done to acknowledge, to the user, that we are repeating expiries when
++	   the clock is retarded.
++	
++	Signed-off-by: George Anzinger <george at mvista.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mika at osdl.org>
++	[PATCH] sparse: define max kernel symbol length and clean up errors in kernel/kallsyms.c
++	
++	  CHECK   kernel/kallsyms.c
++	kernel/kallsyms.c:136:7: warning: bad constant expression
++	kernel/kallsyms.c:136:7: warning: bad constant expression
++	kernel/kallsyms.c:136:7: warning: bad constant expression
++	kernel/kallsyms.c:143:22: warning: bad constant expression
++	kernel/kallsyms.c:143:22: warning: bad constant expression
++	kernel/kallsyms.c:143:22: warning: bad constant expression
++	
++	Now the cause of sparse warnings is that it does not handle runtime array
++	dimensioning (which I take it is a sparse problem), but in this particular
++	case it _might_ make sense to change the runtime allocation to compile
++	time, as the upper size of the array is known, because the code in
++	kernel/kallsyms.c clearly uses 127 (or 128) as "magic constant" for kernel
++	symbol (array) length, and in the other hand in include/linux/module.h
++	there is: #define MODULE_NAME_LEN (64 - sizeof(unsigned long))
++	
++	The only concern is that the array become quite big (the original comment
++	of it being "pretty small" no longer applies ...).  One way to help that
++	would be to use buffer[] also in place of namebuf[], but that would be
++	little tricky as the format string should be before the symbol name ... 
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mika at osdl.org>
++	[PATCH] sparse: fix sparse warnings in kernel/power/*
++	
++	  CHECK   kernel/power/swsusp.c
++	kernel/power/swsusp.c:320:15: warning: expected lvalue for member dereference
++	kernel/power/swsusp.c:337:15: warning: expected lvalue for member dereference
++	kernel/power/swsusp.c:359:14: warning: expected lvalue for member dereference
++	kernel/power/swsusp.c:925:12: warning: assignment expression in conditional
++	[...]
++	  CHECK   kernel/power/pmdisk.c
++	kernel/power/pmdisk.c:795:12: warning: assignment expression in conditional
++	
++	Trivial sparse fixes for two files under kernel/power. Patch attached.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mika at osdl.org>
++	[PATCH] sparse: fix sparse in drivers/pnp/pnpbios/*
++	
++	  CHECK   drivers/pnp/pnpbios/core.c
++	include/linux/pnpbios.h:144:5: warning: undefined preprocessor identifier 'needed'
++	  CC      drivers/pnp/pnpbios/core.o
++	  CHECK   drivers/pnp/pnpbios/bioscalls.c
++	include/linux/pnpbios.h:144:5: warning: undefined preprocessor identifier 'needed'
++	drivers/pnp/pnpbios/bioscalls.c:346:5: warning: undefined preprocessor identifier 'needed'
++	drivers/pnp/pnpbios/bioscalls.c:361:5: warning: undefined preprocessor identifier 'needed'
++	drivers/pnp/pnpbios/bioscalls.c:388:5: warning: undefined preprocessor identifier 'needed'
++	drivers/pnp/pnpbios/bioscalls.c:427:5: warning: undefined preprocessor identifier 'needed'
++	drivers/pnp/pnpbios/bioscalls.c:509:5: warning: undefined preprocessor identifier 'needed'
++	  CC      drivers/pnp/pnpbios/bioscalls.o
++	  CHECK   drivers/pnp/pnpbios/rsparser.c
++	include/linux/pnpbios.h:144:5: warning: undefined preprocessor identifier 'needed'
++	  CC      drivers/pnp/pnpbios/rsparser.o
++	  CHECK   drivers/pnp/pnpbios/proc.c
++	include/linux/pnpbios.h:144:5: warning: undefined preprocessor identifier 'needed'
++	
++	The fix is trivial, sparse wants the preprocessor symbol to be defined
++	before use.  There was a similar fix accepted by Linus couple weeks ago.
++	Patch attached.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rddunlap at osdl.org>
++	[PATCH] convert private ABS() to kernel's abs()
++	
++	Convert private ABS() defines and callers to use abs() from linux/kernel.h.
++	 Builds successfully.  stv0299, riva, & sstfb modules load.
++	
++	Signed-off-by: Randy Dunlap <rddunlap at osdl.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<adaplas at hotpop.com>
++	[PATCH] Rivafb fixes
++	
++	The patch below fixes the following to rivafb:
++	
++	1 Seems that nVidia hardware has a limit on clipping coordinates that is
++	  also dependent on the color depth of the framebuffer.
++	
++	2.From Pawel Goleniowski <pawelg at dabrowa.pl>: Fix for wrong colors at 16bpp
++	  (RGB565).  The fix has been submitted several times in lkml and this list
++	  but was never applied.
++	
++	3 Search all I2C/DDC busses for the EDID block instead of just the first
++	  bus.
++	
++	4 Updated request_mem_region/release_mem_region to
++	  pci_request_regions/pci_release_regions.
++	
++	Signed-off-by: Antonino Daplas <adaplas at pol.net>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<adaplas at hotpop.com>
++	[PATCH] Mode Switch in fbcon_blank()
++	
++	As we've discussed in another thread, below is a diff that will do a set_par()
++	as late as possible when there is KD_TEXT<->KD_GRAPHICS switch.  The set_par()
++	will be forced in fbcon_resize() instead.
++	
++	Not sure if this has repercussions with the other drivers, but this patch
++	fixed the X nv driver hanging when switching to the console.  (I believe the
++	crash is actually caused by an early set_par() -- while in fbcon_blank. 
++	Removing the set_par in fbcon_blank fixed the hang but caused cursor sprite
++	and display corruption).
++	
++	Signed-off-by: Antonino Daplas <adaplas at pol.net>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<adaplas at hotpop.com>
++	[PATCH] Another batch of fbcon fixes
++	
++	- Update display->vrows when fbset changes certain fields in var (such as
++	  color depth) but without changing the display resolution.  This might
++	  produce concommitant changes in other fields such as and especially
++	  var->yres_virtual.
++	
++	- Clear the FBINFO_MISC_MODECHANGEUSER flag _before_ issuing a
++	  notifier_call_chain().  Clearing it after the notifier_call_chain() will
++	  cause fbcon to go into an infinite loop.
++	
++	- Sanitized failure path of set_con2fb_map().
++	
++	Signed-off-by: Antonino Daplas <adaplas at pol.net>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bjorn.helgaas at hp.com>
++	[PATCH] pcdp.c needs io.h
++	
++	Include <asm/io.h> for ioremap() declaration.
++	
++	Signed-off-by: Bjorn Helgaas <bjorn.helgaas at hp.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<Natalie.Protasevich at UNISYS.com>
++	[PATCH] es7000 subarch update for target_cpus()
++	
++	This is ES7000 sub arch update.  The tiny patch below fixes a bug that
++	results in boot problem on all ES7000 partitions with numbers higher than
++	0.  Currently, target_cpus() returns incorrect cpumask value since it
++	indexes bits by the logical APIC ID, not by CPU number.  The patch affects
++	only ES7000 sub arch.  It was tested extensively on the system with
++	multiple partitions.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<eric at lammerts.org>
++	[PATCH] asiliantfb fix
++	
++	The init function is writing somewhere using a physical address instead of
++	a virtual address.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<schwidefsky at de.ibm.com>
++	[PATCH] 64 bit bug in radix-tree lookup.
++	
++	The radix tree functions __lookup and __lookup_tag uses (1 << shift) in
++	their index calculations.  On 64 bit systems the shift can be bigger than
++	32.  The shift of an integer by more than 32 bits evaluates to zero which
++	causes the lookup to fail.
++	
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<schwidefsky at de.ibm.com>
++	[PATCH] s390: core changes
++	
++	From: Arnd Bergmann <arndb at de.ibm.com>
++	From: Christian Bornträger <cborntra at de.ibm.com>
++	From: Michael Holzheu <holzheu at de.ibm.com>
++	From: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	
++	s390 core changes:
++	 - Fix cpu_idle loop if /proc/sys/kernel/hz_timer is set.
++	 - Store correct trap indication on 64 bit for call to do_debugger_trap
++	   in the single stepped svc code.
++	 - Avoid the use of alloca in the debug feature.
++	 - Remove extraneous includes of linux/version.h.
++	 - Regenerate default configuration.
++	 - Mention eServer z890 in Kconfig help text.
++	 - Prevent gcc 3.4 from removing statically defined per cpu variables.
++	
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<schwidefsky at de.ibm.com>
++	[PATCH] s390: comon i/o layer
++	
++	From: Utz Bacher <utz.bacher at de.ibm.com>
++	From: Cornelia Huck <cohuck at de.ibm.com>
++	
++	Common i/o layer changes:
++	 - Consolidate store channel subsystem characteristics from its three
++	   users (css, cmf and qdio) to a single location.
++	 - Always use new stipd format and move creation of global path group
++	   to channel subsystem init function. Add dummy init_IRQ to setup.c
++	   and remove requestirq.c.
++	 - Remove bogus CHPID_LONGS define.
++	 - Add more magic to catch chpids coming online again without generating
++	   machine checks.
++	 - Fix check for unsolicited interrupts. Deferred cc=1 indicates a
++	   solicited interrupt.
++	 - Fix progress indication in qdio summary bytes to avoid loosing interrupts.
++	 - Rename console_device to console_devno to avoid naming conflict.
++	
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<schwidefsky at de.ibm.com>
++	[PATCH] s390: dasd driver changes
++	
++	From: Horst Hummel <horst.hummel at de.ibm.com>
++	From: Carsten Otte <cotte at de.ibm.com>
++	From: Stefan Weinhuber <wein at de.ibm.com>
++	
++	dasd device driver changes:
++	 - Fix calculation of number of idal words needed for a channel program.
++	 - Fix race in i/o termination after request timeout.
++	 - Fix race in state change interrupt handling.
++	 - Fix call to BLKPG ioctl in dasd_destroy_partitions.
++	 - Integrate irb into dasd request to avoid kmalloc in the interrupt handler.
++	 - Store build clock for error recovery requests.
++	 - Remove unused cpu variable from dasd_ext_handler.
++	
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<schwidefsky at de.ibm.com>
++	[PATCH] s390: sclp console driver
++	
++	From: Peter Oberparleiter <peter.oberparleiter at de.ibm.com>
++	
++	sclp console driver changes:
++	 - Correct handling of busy and not operational states.
++	
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<schwidefsky at de.ibm.com>
++	[PATCH] s390: network driver changes
++	
++	From: Ursula Braun-Krahl <braunu at de.ibm.com>
++	From: Frank Pavlic <pavlic at de.ibm.com>
++	From: Thomas Spatzier <tspat at de.ibm.com>
++	From: Peter Tiedemann <ptiedem at de.ibm.com>
++	
++	s390 network driver changes:
++	 - ctc: replace snprintf by strlcpy.
++	 - lcs: change info text for lcs cards from "OSA2 card" to "OSA LCS card".
++	 - lcs: fix alignment of lcs_cmd structure to get multicast pings working.
++	 - lcs: first call in_dev_put then register multicast addresses.
++	 - netiucv: remove unused device timer and unused flags field.
++	 - netiucv: include interrupt type in pathid mismatch message.
++	 - qeth: don't start a new kernel thread for every new ip address.
++	 - qeth: fix IP assist command sequence numbers.
++	
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<schwidefsky at de.ibm.com>
++	[PATCH] s390: zfcp host adapter
++	
++	From: Heiko Carstens <heiko.carstens at de.ibm.com>
++	From: Andreas Herrmann <aherrman at de.ibm.com>
++	From: Maxim Shchetynin <maxim at de.ibm.com>
++	
++	zfcp host adapter changes:
++	 - Exploit FC transport class and autoselect SCSI_FC_ATTRS for zfcp.
++	 - Fix acl download to zfcp controller.
++	 - Change message loglevels to make zfcp less noisy.
++	 - Don't wait for SBAL to finish for command aborts after a timeout
++	   and for logical unit or target resets.
++	 - Force reopen of port if link test failed.
++	 - Fix race between qdio_shutdown and do_QDIO.
++	
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paul at allied-universal.com>
++	[PATCH] Telephony Driver ISAPNP fix
++	
++	I recently got an ISA Phonejack card and quickly found it wouldn't work
++	with a stock 2.6.7 kernel. 
++	
++	So found this bug in the ISAPNP part of the code, throughout the code it
++	use it's own data structure to reference it's base IO address, in the
++	ISAPNP code this was not being populated with any value hence it can't talk
++	to the card and so the driver fails.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<ralf at linux-mips.org>
++	[PATCH] mips: kconfig spelling fixes
++	
++	Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<ralf at linux-mips.org>
++	[PATCH] mips: update config symbols
++	
++	CONFIG_DECSTATION is now CONFIG_MACH_DECSTATION ...
++	
++	Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<ralf at linux-mips.org>
++	[PATCH] mips: MIPS updates
++	
++	 - Remove support for NEC Eagle which is a system that was produced in
++	   almost zero numbers.
++	 - Sort out the MV-64340 code a little more.
++	 - Fix computation of interrupts masks for the upper 32 interrupts of the
++	   MV-64340.
++	 - Gas was producing bad break codes for MIPS32/MIPS64 processors for a while.
++	   Add a workaround to the kernel trap handler.
++	 - Rewrite RM7000 cache code in a way where it's hopefully easier to read.
++	 - Handle 64-bit pointers right for the BCM1250.
++	 - Try to share code for GT-64240 and MV-64340.
++	 - Fix RM9000 definition of _CACHE_CACHABLE_NONCOHERENT.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<ralf at linux-mips.org>
++	[PATCH] mips: MAINTAINERS updates
++	
++	Update my email address.  Add Manish Lachwani as maintainer for the MV-64340
++	driver which has already been accepted by Jeff Garzik.
++	
++	Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<ralf at linux-mips.org>
++	[PATCH] mips: MIPS needs a 32-bit ioaddr_t
++	
++	Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<ralf at linux-mips.org>
++	[PATCH] mips: delete IRIX emul misc minors
++	
++	Remove the last leftovers of the compatibility code for running the IRIX X
++	server.
++	
++	Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<stsp at aknet.ru>
++	[PATCH] vm86: set IOPL to 3 on pushf
++	
++	The attached patch fixes the pushf under v86 to always set the IOPL field
++	to 3, as the Intel CPUs do.
++	
++	It was in 2.4 for year, but somehow missed 2.6.  It comes from here
++	(although now a bit shorter):
++	
++	http://lkml.org/lkml/2003/5/25/81
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mika at osdl.org>
++	[PATCH] Remaining sparse warnings in allnoconfig
++	
++	Attached is a smallish patch for couple trivial sparse warnings in
++	allnoconfig build and more importantly an "excuses" text file explaining
++	why the rest have not been fixed.
++	
++	Basically all of them (with the exception of the one in Andrews tree) need
++	some serious re-engineering.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] [err1-10] journal_extend() locking fix
++	
++	From the new Stanford locking checker
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] [err1-25] snd_ctl_read() locking fix
++	
++	From the new Stanford locking checker
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<stelian at popies.net>
++	[PATCH] sonypi driver update (PM and DMI VGN-)
++	
++	This updates the sonypi driver by:
++	 * fixing the power management handling, using the new device
++	   model PM scheme.
++	
++	 * adds "VGN-" as a DMI search pattern for a Sony Vaio laptop.
++	
++	Florian Lohoff reported the power management issue and tested the
++	patch.
++	
++	Many users reported the DMI name issue, including Till Busch who
++	made a patch for dmi_scan.c.
++	
++	Signed-off-by: Stelian Pop <stelian at popies.net>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<stelian at popies.net>
++	[PATCH] meye driver update (wait_ms -> msleep)
++	
++	This patch, originally from Daniel Drake, replaces the meye driver
++	'wait_ms()' function with calls to the kernel provided 'msleep()'
++	function.
++	
++	Signed-off-by: Daniel Drake <dsd at gentoo.org>
++	Signed-off-by: Stelian Pop <stelian at popies.net>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mingo at elte.hu>
++	[PATCH] i386 nx prefetch fix & cleanups
++	
++	 - fix possible prefetch-fault loop on NX page, based on suggestions
++	   from Jamie Lokier.
++	
++	 - clean up nx feature dependencies
++	
++	 - simplify detection of NX-violations when the kernel executes code
++	
++	 - introduce pte_exec_kern() to simplify the NX logic
++	
++	 - split the definitions out of pgtable-[23]level.h into
++	   pgtable-[23]level-defs.h, to enable the former to use generic
++	   pte functions from pgtable.h.
++	
++	Signed-off-by: Ingo Molnar <mingo at elte.hu>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<lxiep at us.ibm.com>
++	[PATCH] PCI: export pci_scan_child_bus for the pci hotplug drivers to use
++	
++	Signed-off-by: Linda Xie lxie at us.ibm.com
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<roland at topspin.com>
++	[PATCH] PCI: Add some PCI Express constants to pci.h
++	
++	This patch adds some PCI Express register constants to <linux/pci.h>
++	
++	For my device, setting the Max_Read_Request_Size value in the PCI
++	Express device control register makes a huge performance difference.
++	I wanted my driver code that does this to be a little more
++	self-documenting than:
++	
++		pci_read_config_word(mdev->pdev, cap + 8, &val);
++		val = (val & ~(5 << 12)) | (5 << 12);
++	
++	I went a little overboard and added all the basic device register
++	fields.  If desired I could go even further overboard and add the
++	link, slot and root registers as well.
++	
++	This patch is based on Matthew Wilcox's patch for pciutils, corrected
++	for some PCI Express spec 1.0a changes.
++	
++	Signed-off-by: Roland Dreier <roland at topspin.com>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<linas at austin.ibm.com>
++	[PATCH] PCI Hotplug: rpaphp null pointer deref
++	
++	This patch fixes a null-pointer dereference when hot-plug operations
++	are performed on a machine that has virtual-io devices in it.
++	Virtual i/o devices to not have pci bridges associated with them.
++	It also corrects an ordering problem during hotplug remove.
++	
++	This patch was previously reviewed/tested by Linda Xie, the current
++	rpaphp maintainer.
++	
++	Signed-off-by: Linas Vepstas <linas at linas.org>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<linas at austin.ibm.com>
++	[PATCH] PCI Hotplug: RPAPHP structure size/performance
++	
++	Please review and apply the following patch if you find it agreeable.
++	
++	This patch does not make any functional changes, but does improve
++	both performance and memory usage by rearranging structure elements.
++	
++	The need for these changes became appearent during a code review of
++	the disassembly involving this structure. The memory footprint of this
++	structure is made smaller by grouping the byte fields next to each other.
++	The access of the list_head can be simplified by making it the first element
++	of the structure, thus avoiding a needless add-immediate without negatively
++	impacting any of the other accesses.
++	
++	Signed-off-by: Linas Vepstas <linas at linas.org>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<buytenh at wantstofly.org>
++	[PATCH] PCI: New PCI vendor/device ID for Radisys ENP-2611 board
++	
++	Included is a patch for linux to add a PCI vendor/device ID for the
++	Radisys ENP-2611 board.  The ENP-2611 is a 64bit/66MHz PCI board which
++	hosts an Intel IXP2400 network processor, has three GigE interfaces,
++	runs linux and generally kicks ass.
++	
++	(see http://www.radisys.com/oem_products/ds-page.cfm?productdatasheetsid=1147)
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<chrisw at osdl.org>
++	[PATCH] check attr updates in /proc
++	
++	Any proc entry with default proc_file_inode_operations allow unauthorized
++	attribute updates.  This is very dangerous for proc entries that rely
++	solely on file permissions for open/read/write.
++	
++	Signed-off-by: Chris Wright <chrisw at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mika at osdl.org>
++	[PATCH] sparse: remaining integer zero / NULL fixes in allmodconfig & vmlinux
++	
++	This fixes the the remaining 0 to NULL things that were found with 'make
++	allmodconfig' and 'make C=1 vmlinux'.
++
++<Andries.Brouwer at cwi.nl>
++	[PATCH] fat/inode.c
++	
++	Two years ago, OGAWA Hirofumi removed some ugly code and
++	added a few simple tests to the FAT filesystem code,
++	intended to avoid recognizing non-FAT as FAT (for people who
++	fail to specify rootfstype=, forcing the kernel to guess).
++	
++	That worked fairly well, until this year.
++	
++	I have now seen a thread in Czech and a report from Holland that
++	involved the "FAT: bogus sectors-per-track value" error message.
++	
++	The patch below removes this test again. The advantage is that
++	some real-life FAT filesystems can be mounted again.
++	
++	The disadvantage that more non-FAT fss will be accepted as FAT.
++	
++	Ferry van Steen <freaky at bananateam.nl> reports "the patch Andries
++	Brouwer gave me seems to work".
++	
++	Signed-off-by: Andries Brouwer <aeb at cwi.nl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<torvalds at ppc970.osdl.org>
++	logo/logo.c needs <stddef.h> for NULL
++	
++	It's one of the rare files that has almost no includes
++	what-so-ever, so it actually never got NULL any other
++	way.
++
++<chrisw at osdl.org>
++	[PATCH] chown permission check fix for ATTR_GID
++	
++	SuSE discovered this problem with chown and ATTR_GID.  Make sure user
++	is authorized to change the group, CAN-2004-0497.
++
++<jgarzik at pobox.com>
++	[libata] add ->qc_issue hook
++	
++	This hook is used when an ATA controller wishes to use
++	hardware-specific methods of taskfile delivery, rather
++	than the standard method of bitbanging the ATA shadow
++	registers.
++
++<jgarzik at pobox.com>
++	[libata] add ata_queued_cmd completion hook
++
++<manfred at colorfullife.com>
++	[PATCH] natsemi 1: switch to netdev_priv()
++
++<manfred at colorfullife.com>
++	[PATCH] natsemi 2: support packets > 1518 bytes
++
++<manfred at colorfullife.com>
++	[PATCH] Gigabit Ethernet support for forcedeth
++	
++	- Lots of updates for the gigabit ethernet nic: New ring entry format,
++	support for RGMII phys, new pci ids.
++	- Silence interrupt source 0x01: it's rx error, no need to ask the end
++	user to report it.
++	- add support for vlan packets: The NvRegOffloadConfig register contains
++	the maximum packet size, it was set to 1518 which caused vlan to fail.
++	- fix bit flags for mii access: the wrong bit was polled and the mii
++	write implementation was just broken.
++	- Do not stop the rx/tx engines around mii accesses.
++	- reset and reinit the phy during probe.
++
++<jfbeam at bluetronic.net>
++	[libata sata_sil] add drive to mod15write quirk list
++
++<akpm at osdl.org>
++	[PATCH] ntfs build fix
++	
++	gcc-2.95 chokes on this.
++	
++	Cc: Anton Altaparmakov <aia21 at cantab.net>
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulus at samba.org>
++	[PATCH] ppc64: remove deprecated firmware API
++	
++	From: Linas Vepstas <linas at austin.ibm.com>
++	
++	This patch eliminates the usage of the deprecated ibm,fw-phb-id token for
++	idnetifying PCI bus heads in favor of the documented, offically supported
++	mechanism for obtaining this info.  Please note that some versions of
++	firmware may return incorrect values for the ibm,fw-phb-id token.
++	
++	Signed-off-by: Linas Vepstas <linas at linas.org>
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulus at samba.org>
++	[PATCH] ppc64: set ppc_md.log_error
++	
++	We have a platform-specific function pointer on ppc64 for a function to log
++	errors detected by the platform, but it was never getting set.  This patch
++	sets it on pSeries (the only ppc64 platform which has an error logging
++	function).
++	
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mporter at kernel.crashing.org>
++	[PATCH] ppc32: Redwood[56] support for smc91x Ethernet driver
++	
++	This patch enables the Redwood 5 and Redwood 6 platforms to use the smc91x
++	ethernet driver.
++	
++	Signed-off-by: Dale Farnsworth <dale at farnsworth.org>
++	Signed-off-by: Matt Porter <mporter at kernel.crashing.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mbligh at aracnet.com>
++	[PATCH] ia32 NUMA: physnode_map entries can be negative
++	
++	Based on work from Bill Irwin <wli at holomorphy.com>
++	
++	physnode_map[] needs to be signed so that pfn_to_nid() can return negative
++	values used to detect invalid pfn's.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<jack at suse.cz>
++	[PATCH] Fix minor quota race
++	
++	It fixes a possible race between quotaoff and prune_icache.  The race could
++	lead to some forgotten pointers to quotas in inodes leading later to BUG
++	when invalidating quota structures.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] i386 math emu build fix
++	
++	rmk's patch found a defined-but-unimplemented symbol
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bunk at fs.tum.de>
++	[PATCH] remove unused variable in esp.c
++	
++	Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bunk at fs.tum.de>
++	[PATCH] remove unused variable in mxser.c
++	
++	Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<adaplas at hotpop.com>
++	[PATCH] fbcon: optimization for accel_putcs()
++	
++	I did some simple benchmarking (time cat linux-2.6.7-mm5/MAINTAINERS)
++	between 2.4 and 2.6 and I am not satisfied with what I see (It's claimed
++	that fbdev-2.6 is faster than 2.4).  The reason for the claim:
++	
++	2.4 putcs - draw small amounts of data a lot of times
++	2.6 putcs - draw larger amounts of data a fewer times
++	
++	The way characters are drawn in 2.6 is optimal for accelerated drivers but
++	should also give a speed boost for drivers that rely on software drawing.
++	However the penaly incurred when preparing a large bitmap from a number of
++	small bitmaps is currently very high.  This is because of the following
++	reasons:
++	
++	1 fb_move_buf_{aligned|unaligned} uses pixmap->{out|in}buf.  This is very
++	  expensive since outbuf and inbuf methods process only a byte or 2 of data
++	  at a time.
++	
++	2 fb_sys_outbuf (the default method for pixmap->outbuf) uses memcpy().
++	  Not a good choice if moving only a few bytes.
++	
++	3 fb_move_buf_unaligned (used for fonts such as 12x22) also involves a
++	  lot of bit operations + a lot of calls to outbuf/inbuf which
++	  proportionately increases the penaly.
++	
++	So, I thought of separating fb_move_buf_* to fb_iomove_buf_* and
++	fb_sysmove_buf_*. 
++	
++		fb_iomove_buf_* - used if drivers specified outbuf and inbuf methods
++		fb_sysmove_buf_* - used if drivers have no outbuf or inbuf methods
++	
++		*Most, if not all drivers fall in the second category.
++	
++	Below is a table that show differences between 2.4, 2.6 and 2.6 +
++	abovementioned changes.  To reduce the effect of panning and
++	fillrect/copyarea, the scrollmode is forced to redraw.
++	
++	=================================================================
++	Test Hardware: P4 2G nVidia GeForce2 MX 64
++	Scrollmode: redraw
++	
++	time cat linux-2.6.7-mm5/MAINTAINERS
++	
++	1024x768-8		1024x768-16		1024x768-32
++	=================================================================
++	8x16 noaccel (2.4)
++	real    0m5.490s	real    0m8.535s	real    0m15.388s
++	user    0m0.001s	user    0m0.000s	user    0m0.001s
++	sys     0m5.487s	sys     0m8.535s	sys     0m15.386s
++	
++	8x16 noaccel (2.6)
++	real    0m5.166s	real    0m7.195s	real    0m12.177s
++	user    0m0.001s	user    0m0.000s	user    0m0.000s
++	sys     0m5.164s	sys     0m7.192s	sys     0m12.176s
++	
++	8x16 noaccel+patch (2.6)
++	real    0m3.474s	real    0m5.496s	real    0m10.460s
++	user    0m0.001s	user    0m0.001s	user    0m0.001s
++	sys     0m5.492s	sys     0m5.492s	sys     0m10.454s
++	=================================================================
++	8x16 accel (2.4)
++	real    0m4.368s	real    0m9.420s	real    0m22.415s
++	user    0m0.001s	user    0m0.001s	user    0m0.001s
++	sys     0m4.019s	sys     0m9.384s	sys     0m22.312s
++	
++	8x16 accel (2.6)
++	real    0m4.296s	real    0m4.339s	real    0m4.391s
++	user    0m0.001s	user    0m0.001s	user    0m0.000s
++	sys     0m4.280s	sys     0m4.336s	sys     0m4.389s
++	
++	8x16 accel+patch (2.6)
++	real    0m2.536s	real    0m2.649s	real    0m2.799s
++	user    0m0.000s	user    0m0.000s	user    0m0.001s
++	sys     0m2.536s	sys     0m2.645s	sys     0m2.798s
++	=================================================================
++	
++	1024x768-8		1024x768-16		1024x768-32
++	=================================================================
++	12x22 noaccel (2.4)
++	real    0m7.883s	real    0m12.175s	real    0m21.134s
++	user    0m0.000s	user    0m0.000s	user    0m0.001s
++	sys     0m7.882s	sys     0m12.174s	sys     0m21.129s
++	
++	12x22 noaccel (2.6)
++	real    0m10.651s	real    0m13.550s	real    0m21.009s
++	user    0m0.001s	user    0m0.001s	user    0m0.000s	
++	sys     0m10.617s	sys     0m13.545s	sys     0m21.008s
++	
++	12x22 noaccel+patch (2.6)
++	real    0m4.794s	real    0m7.718s	real    0m15.173s
++	user    0m0.002s	user    0m0.001s	user    0m0.000s
++	sys     0m4.792s	sys     0m7.715s	sys     0m15.170s
++	=================================================================
++	12x22 accel (2.4)
++	real    0m3.971s	real    0m9.030s	real    0m21.711s
++	user    0m0.000s	user    0m0.000s	user    0m0.000s
++	sys     0m3.950s	sys     0m8.983s	sys     0m21.602s
++	
++	12x22 accel (2.6)
++	real    0m9.392s	real    0m9.486s	real    0m9.508s
++	user    0m0.000s	user    0m0.000s	user    0m0.001s
++	sys     0m9.392s	sys     0m9.484s	sys     0m9.484s
++	
++	12x22 accel+patch (2.6)
++	real    0m3.570s	real    0m3.603s	real    0m3.848s
++	user    0m0.001s	user    0m0.000s	user    0m0.000s
++	sys     0m3.567s	sys     0m3.600s	sys     0m3.844s
++	=================================================================
++	
++	
++	Summary:
++	
++	1 2.6 unaccelerated is a bit faster than 2.4 when handling 8x16 fonts,
++	  with a higher speed differential at high color depths.
++	
++	2 2.4 unaccelerated is a bit faster than 2.6 when handling 12x22 fonts,
++	  with a smaller speed difference at high color depths (2.6 is actually a
++	  bit faster than 2.4 at 32bpp).
++	
++	3 2.4 rivafb accelerated suffers at high color depths, even becoming
++	  slower than unaccelerated, possibly because of the 'draw few bytes many
++	  times' method.
++	
++	4 2.6 rivafb accelerated has similar performance at any color depth,
++	  possibly because of 'draw lots of bytes a fewer times' method.
++	
++	5 With the changes, there is a speed gain of ~1.7 seconds and ~5.7
++	  seconds with 8x16 and 12x22 fonts respectively indepependent of the color
++	  depth or acceleration used.  The speed gain is constant but significant.
++	
++	Below is a patch against 2.6.7-mm5.  The effects will be very noticeable
++	with drivers that uses SCROLL_REDRAW, but one should still see some speed
++	gain even if SCROLL_YPAN/YWRAP is used.
++	
++	
++	Separated fb_sys_move_* into fb_iosys_move_* and fb_sysmove_* to reduce
++	penalty when constructing fb_image->data from character maps.  In my
++	testcase (1024x768 SCROLL_REDRAW), I get a ~1.7 second advantage with 'time
++	cat MAINTAINERS' using 8x16 fonts and ~5.7 seconds with 12x22 fonts.  The
++	speed gain is independent of acceleration or color depth.
++	
++	Signed-off-by: Antonino Daplas <adaplas at pol.net>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] err1-40: sysvfs locking fix
++	
++	Found by the new Stanford locking checker.
++	
++	Minimal fix for a deadlock in sysvfs: get_branch() can take
++	read_lock(&pointers_lock), but one caller already has a write_lock.
++	
++	Perhaps some of the "oh we raced, drop everything and try again" logic in
++	there can go away now, but this is enugh to fix the obvious deadlock.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] err1-2: sscape locking fix
++	
++	Fix deadlock identified by the Stanford locking checker.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] err1-14: sb_audio locking fix
++	
++	Lamely fix a straightforward deadlock in sb_audio.c.  Founf by the Stanford
++	locking checker.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] err2-1 dvb_register_i2c_device locking fix
++	
++	Fix deadlock identified by the Stanford locking checker.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] err2-25: dvb_register_i2c_bus() locking fix
++	
++	Found by the Stanford locking checker.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] err2-27: i2o_claim_device() locking fix
++	
++	Found by the Stanford locking checker
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] err2-29: ufs_new_fragments() locking fix
++	
++	Found by the Stanford locking checker
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<James.Bottomley at SteelEye.com>
++	[PATCH] dma_get_required_mask() build fix
++	
++	This new function fails to build on sparc64 due to nasty include
++	dependencies.
++	
++	Fix that by uninlining it - it was too big for inlining anyway.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paul at allied-universal.com>
++	[PATCH] telephony: support devfs
++	
++	Add devfs support to telephony devices.  Only tested with a single
++	telephony device.  Devices name phone/<minor>.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bunk at fs.tum.de>
++	[PATCH] s/2.5/2.6/ in MAINTAINERS
++	
++	s/2.5/2.6/ in MAINTAINERS
++	
++	Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] apm.c warning fix
++	
++	arch/i386/kernel/apm.c: In function `suspend':
++	arch/i386/kernel/apm.c:1221: warning: implicit declaration of function `save_processor_state'
++	arch/i386/kernel/apm.c:1223: warning: implicit declaration of function `restore_processor_state'
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<jgarzik at pobox.com>
++	[libata] create, and use, ->irq_clear hook
++	
++	This is more conservative in general, and so applies to multiple
++	controllers.  Specifically it attempts to address irq-related issues
++	on the Intel ICH5/6 hardware.  On Intel ICH5/6, the BMDMA 'interrupt'
++	status bit will be set even on non-DMA commands, which software
++	(and I) did not expect.
++	
++	This change clears pending interrupts once upon initialization,
++	and then each time ata_irq_on() is called.
++
++<jgarzik at pobox.com>
++	[ata] add ata_ok() inlined helper, and ATA_{DRDY,DF} bit to linux/ata.h
++
++<jgarzik at pobox.com>
++	[libata] split ATA_QCFLAG_SG into ATA_QCFLAG_{SG,SINGLE}
++	
++	In part of the effort to remove SCSI specifics from the libata
++	internals, remove references to cmd->use_sg.  cmd->use_sg
++	becomes ATA_QCFLAG_SG, and !cmd->use_sg becomes ATA_QCFLAG_SINGLE.
++	
++	Convenience constant ATA_QCFLAG_DMAMAP is created when the programmer
++	wishes to refer collectively to ATA_QCFLAG_{SG,SINGLE}.
++
++<jgarzik at pobox.com>
++	[libata] create, and use aga_sg_init[_one] helpers
++	
++	Move more SCSI-specific code out of libata core.
++
++<jgarzik at pobox.com>
++	[libata sata_promise] update driver to use new ->qc_issue hook
++	
++	The ->qc_issue hook was designed to allow drivers to override some
++	or all of the actual delivery of the taskfile to hardware.
++	
++	In the case of Promise, the hardware has its own packet format when doing
++	read/write DMA commands, but uses traditional ATA taskfile registers
++	for other types of commands.
++
++<pj at sgi.com>
++	[PATCH] remaining cpumask const qualifiers
++	
++	The remainder of the const qualifiers on cpumask ops.
++	
++	My cpumask overhaul missed specifying the const qualifiers
++	in cpumask.h.  Subsequently, Linus has added some.  The following
++	should provide the remainder of them.  It also fixes one src vs dst
++	variable misnaming.
++	
++	Using crosstool on 2.6.7-mm5, I have built the following
++	arch's with the following change included:
++	
++	  alpha ia64 powerpc-405 powerpc-750 sparc sparc64 x86_64
++	
++	Signed-off-by: Paul Jackson <pj at sgi.com>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<marcel at holtmann.org>
++	[Bluetooth] Change inquiry_cache to hci_inquiry_cache
++	
++	This patch changes the inquiry_* functions to be either local to hci_core.c
++	or change name from inquiry_cache_lookup to hci_inquiry_cache_lookup to try
++	and reduce the potential for namespace conflicts. There could be USB or SCSI
++	or other code that uses an inquiry_cache.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
++
++<marcel at holtmann.org>
++	[Bluetooth] Fix deadlock in the 3Com driver
++	
++	This patch fixes the deadlock problem when bt3c_interrupt() is calling
++	bt3c_write_wakeup() with info->lock held.
++	
++	Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
++
++<marcel at holtmann.org>
++	[Bluetooth] Fix kobject oops on firmware loading
++	
++	Allocate the memory for .kobj.k_name and make use of kobject_init() for
++	the fake device that is needed for firmware loading.
++	
++	Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
++
++<marcel at holtmann.org>
++	[Bluetooth] Add HID protocol support
++	
++	This patch adds support for the Bluetooth HID protocol to the
++	Bluetooth subsystem. Currently only the boot mode is supported.
++	
++	Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
++
++<jgarzik at pobox.com>
++	[BK] Selectively ignore drivers/video/logo/*.c
++	
++	These are generated from drivers/video/logo/*.ppm.
++	
++	For non-BK users, this is the same as .cvsignore.
++
++<jgarzik at pobox.com>
++	[BK] Ignore build-generated files Module.symvers, drivers/net/wan/wanxlfw.inc
++	
++	For non-BK users, this is similar to .cvsignore.
++
++<marcel at holtmann.org>
++	[Bluetooth] Allocate protocol number for AVDTP support
++	
++	This patch allocates the next free protocol number for the upcoming
++	AVDTP support.
++	
++	Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
++
++<hch at lst.de>
++	[PATCH] ppc32: compilation failure on ppc32
++	
++	This fixes compilation on ppc32.
++	
++	The power/smp.o file should be linked only if both SMP and SWSUSPEND
++	are configured in. It used to do it even without SWSUSPEND.
++
++<lethal at Linux-SH.ORG>
++	[PATCH] swap_unplug_io_fn() nommu update
++	
++	include/linux/swap.h changed the definition for swap_unplug_io_fn() awhile
++	back, but mm/nommu.c was never updated to reflect the new definition.
++	As such, mm/nommu.c presently fails to compile. This fixes it.
++	
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<airlied at starflyer.(none)>
++	typo..
++
++<airlied at starflyer.(none)>
++	typo in radeon_state.c
++
++<airlied at starflyer.(none)>
++	whitespace cleanup in radeon.h
++
++<nico at org.rmk.(none)>
++	[ARM PATCH] 1950/1: SIZEOF_MACHINE_DESC requires asm/constants.h
++	
++	Patch from Nicolas Pitre
++	
++	The change as seen here:
++	http://linux.bkbits.net:8080/linux-2.5/diffs/arch/arm/kernel/head.S@1.19?nav=index.html|ChangeSet@-4d|cset@1.1769.3.12
++	has this note:
++	"No need to include asm/mach/arch.h"
++	But it now requires asm/constants.h otherwise SIZEOF_MACHINE_DESC
++	is not defined.  Why compilation succeeds anyways still mystify me.
++
++<icampbell at com.rmk.(none)>
++	[ARM PATCH] 1953/1: Omit id for platform devices where only one can possibly exist.
++	
++	Patch from Ian Campbell
++	
++	Now that the BK tree allows platform devices to specify an id of -1
++	to get rid of the numbered suffix. 
++	
++	Following discussion on the l-a-k mailing list here is patch to do 
++	this for the pxafb, pxa2xx-udc and pxamci generic PXA2xx platform 
++	devices and the platform devices on the Lubbock.
++
++<jelenz at edu.rmk.(none)>
++	[ARM PATCH] 1938/1: Support for Collie device
++	
++	Patch from John Lenz
++	
++	Cleanup and forward port of patch 1850.
++	Add machine support for the Sharp Zaurus SL5500 PDA.
++	Does not include support for the collie serial port or
++	the sa1100fb_lcd_power function.
++
++<miles at lsi.nec.co.jp>
++	[PATCH] v850: Get rid of lvalue-casts in memset.c to make gcc happy
++	
++	Signed-off-by: Miles Bader <miles at gnu.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<miles at lsi.nec.co.jp>
++	[PATCH] v850: Use __volatile__ qualifier on test_bit asm statements
++	
++	Otherwise recent versions of gcc seem to optimize away some necessary tests.
++	
++	Signed-off-by: Miles Bader <miles at gnu.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<miles at lsi.nec.co.jp>
++	[PATCH] v850: Return value from no_action in irq.c
++	
++	Signed-off-by: Miles Bader <miles at gnu.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulus at samba.org>
++	[PATCH] ppc64: EEH fixes for POWER5 machines (1/2)
++	
++	From: Linas Vepstas <linas at austin.ibm.com>
++	
++	This patch allows ppc64 to boot on Power5 machines.  The new Power5 PCI
++	bridge design requires EEH (enhanced PCI error handling) to be enabled for
++	all PCI devices, not just some PCI devices.  In addition, this patch moves
++	the check for PCI to ISA bridges out of perf critical code, and into
++	initialization code.  This also avoids race conditions where the device
++	type might not have been set.  Also, some whitespace fixes, and some
++	error-message-printing beautification.
++	
++	Signed-off-by: Linas Vepstas <linas at linas.org>
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulus at samba.org>
++	[PATCH] ppc64: EEH fixes for POWER5 machines (2/2)
++	
++	From: Linas Vepstas <linas at austin.ibm.com>
++	
++	This patch fixes the usage of the slot-error-detail log buffer for the
++	Power5 architecture.  The size of the error buffer is variable, and the
++	correct size to use should have been obtained from firmware.  Failure to
++	use the correct buffer sizes will result in hard-to-debug system lockups
++	deep in firmware.  This patch is based on an earlier patch from Ben
++	Herrenschmidt, which essentially did the same thing.
++	
++	This patch also tweaks some of the subroutine documentation.
++	
++	Signed-off-by: Linas Vepstas <linas at linas.org>
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulus at samba.org>
++	[PATCH] ppc64: RTAS error log locking fix
++	
++	From: Linas Vepstas <linas at austin.ibm.com>
++	
++	When an RTAS call returns the "hardware error" code, we need to do another
++	RTAS call to find out what went wrong.  Previously we weren't doing that
++	inside the lock that serializes RTAS calls, and thus another cpu could get
++	in and do another RTAS call in the meantime.  This patch fixes it.  This
++	patch also includes some minor whitespace fixes.
++	
++	Signed-off-by: Linas Vepstas <linas at linas.org>
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<anton at samba.org>
++	[PATCH] ppc64: gcc 3.5 fixes
++	
++	gcc 3.5 ICEd on the ppc64 version of __ptep_set_access_flags, but it does
++	look like we want to use *ptep here.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<anton at samba.org>
++	[PATCH] ppc64: gcc 3.5 fixes #2
++	
++	Here are the ppc64 specific gcc 3.5 fixes.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<anton at samba.org>
++	[PATCH] ppc64: SPLPAR spinlock optimisation
++	
++	Currently our spinlocks can call into the hypervisor on dedicated processor
++	machines.  Doing this may slow our locks down, so avoid it where possible.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<olh at suse.de>
++	[PATCH] ppc32: biarch gcc support
++	
++	A native powerpc64-linux gcc can not compile a ppc32 kernel properly.  This
++	patch fixes it.  It was copied from ppc64.  The change to vmlinux.lds.S
++	fixes this error:
++	
++	ld: warning: powerpc:common architecture of input file `init/built-in.o' is
++	incompatible with powerpc:common64 output
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] ppc64: remove MachineCheck_Pseries
++	
++	rmk added a check to vmlinux for undefined symbols in -mm kernels.  ppc64
++	fails due to trying to export an unimplemented symbol from assembly code.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pazke at donpac.ru>
++	[PATCH] port reboot workarounds to new DMI probing
++	
++	This patch moves reboot related workarounds out of dmi_scan.c Please
++	consider applying.
++	
++	Signed-off-by: Andrey Panin <pazke at donpac.ru>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mika at osdl.org>
++	[PATCH] Fix sparse warnings in fs/udf/*
++	
++	  CHECK   fs/udf/dir.c
++	fs/udf/dir.c:240:13: warning: expected lvalue for member dereference
++	[...]
++	  CHECK   fs/udf/namei.c
++	fs/udf/namei.c:872:6: warning: expected lvalue for member dereference
++	fs/udf/namei.c:916:6: warning: expected lvalue for member dereference
++	fs/udf/namei.c:1189:14: warning: expected lvalue for member dereference
++	fs/udf/namei.c:1234:7: warning: expected lvalue for member dereference
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mbligh at aracnet.com>
++	[PATCH] fix up physnode_map
++	
++	At the moment, we initialise physnode_map from the various BIOS tables,
++	which can create problems, as holes inside an node return 1 for pfn_valid,
++	and yet pfn_to_nid is not correct for them.  I'd hacked around this in my
++	tree by defaulting the mapping to 0, not -1, but that's not the correct fix
++	...  this is.
++	
++	I consolidated all the code back into 1 place, and use node_start_pfn[] and
++	node_end_pfn[] to walk over it instead - that means it matches up perfectly
++	with lmem_map's as we're using the same data.  It also cleans up a lot of
++	the code.
++	
++	Tested on both NUMA-Q and x440 ...  and it only affects i386 NUMA boxen.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] wavefront_fx.c build fix
++	
++	With gcc from CVS:
++	
++	sound/isa/wavefront/wavefront_fx.c:697: error: static declaration of 'page_zero' follows non-static declaration
++	include/sound/yss225.h:4: error: previous declaration of 'page_zero' was here
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<davej at redhat.com>
++	[PATCH] MTRR __initdata fix
++	
++	smp_changes_mask is used by generic_set_all() which isn't __init
++	
++	Signed-off-by: Dave Jones <davej at redhat.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<chrisw at osdl.org>
++	[PATCH] selinux build fix
++	
++	With gcc-3.5 from CVS:
++	
++	security/selinux/avc.c:76: error: static declaration of 'avc_cache_stats' follows non-static declaration
++	security/selinux/include/avc.h:107: error: previous declaration of 'avc_cache_stats' was here
++	
++	Signed-off-by: Chris Wright <chrisw at osdl.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<chrisw at osdl.org>
++	[PATCH] selinux space saving
++	
++	Move inline avc_cache_stats helper functions alongside the statically declared
++	avc_cache_stats array.
++	
++	Signed-off-by: Chris Wright <chrisw at osdl.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<eger at havoc.gtf.org>
++	[PATCH] err1-7, err1-8: double locking fix for radeonfb
++	
++	radeonfb: the Stanford lock checker found us double-locking rinfo->reg_lock
++	via sequences like OUTPLL(foo, INPLL(bar) | baz ), as both OUTPLL and INPLL
++	grab the register lock.  This should fix the problem.
++	
++	Signed-off-by: David Eger <eger at havoc.gtf.org
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pj at sgi.com>
++	[PATCH] Fix ia64 UPF_RESOURCES pcdp.c 2.6.7-mm5 build
++	
++	It looks like someone removed UPF_RESOURCES in remove-upf_resources.patch
++	in parallel with someone adding drivers/firmware/pcdp.c that references
++	UPF_RESOURCES.
++	
++	In any event, trying to build a defconfig ia64 2.6.7-mm5 (which includes
++	CONFIG_SERIAL_8250=y in the .config) fails with:
++	
++	drivers/firmware/pcdp.c: In function `setup_serial_console':
++	drivers/firmware/pcdp.c:100: error: `UPF_RESOURCES' undeclared (first use in this function)
++	
++	Signed-off-by: Paul Jackson <pj at sgi.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pj at sgi.com>
++	[PATCH] sparc32 cpumask bitop build fix
++	
++	With the following changes, I was able to compile the "sparc" (32 bit)
++	arch, using defconfig and crosstool.  There were still plenty of warnings,
++	but nothing else relating to bitops or cpumasks that I noticed.  This is
++	working with 2.6.7-mm5.
++	
++	I have no way to boot test this, but these changes seem obvious enough that
++	I'd recommend including them.
++	
++	Signed-off-by: Paul Jackson <pj at sgi.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wli at holomorphy.com>
++	[PATCH] force O_LARGEFILE in sys_swapon() and sys_swapoff()
++	
++	For 32-bit, one quickly discovers that swapon() is not given an fd already
++	opened with O_LARGEFILE to act upon and the forcing of O_LARGEFILE for
++	64-bit is irrelevant, as the system call's argument is a path.  So this
++	patch manually forces it for swapon() and swapoff().
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<anton at samba.org>
++	[PATCH] gcc 3.5 fixes
++	
++	gcc 3.5 is warning about static vs non static function declarations.  The
++	following patch removes function prototypes in .h files where possible and
++	changes prototypes to be static elsewhere.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<anton at samba.org>
++	[PATCH] gcc 3.5 fixes #2
++	
++	gcc 3.5 is warning about unused static variables, add __attribute_unused__
++	to the 2 places to silence it.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<hch at infradead.org>
++	[PATCH] __bdevname leak fix
++	
++	The __bdevname library function is leaking module references due to
++	
++		__bdevname
++	 	->get_gendisk
++	 	  ->kobj_lookup
++	 	    ->ata_probe
++	 	      ->get_disk
++	 	        ->try_module_get
++	
++	What we're trying to do in there is too ambitious.  Change it to just print
++	the major and minor.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wli at holomorphy.com>
++	[PATCH] spurious remap_file_pages() -EINVAL
++	
++	As ->vm_private_data is used as a cursor for swapout of VM_NONLINEAR vmas,
++	the check for NULL ->vm_private_data or VM_RESERVED is too strict, and
++	should allow VM_NONLINEAR vmas with non-NULL ->vm_private_data.
++	
++	This fixes an issue on 2.6.7-mm5 where system calls to remap_file_pages()
++	spuriously failed while under memory pressure.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bunk at fs.tum.de>
++	[PATCH] remove allowdma0 documentation
++	
++	allowdma0 is gone in 2.6, the patch below removes the mentionings of this
++	option in the documentation.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] kyrofb warning fix
++	
++	drivers/video/kyro/fbdev.c: In function `kyrofb_probe':
++	drivers/video/kyro/fbdev.c:736: warning: passing arg 1 of `memset' makes pointer from integer without a cast
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<linux at de.rmk.(none)>
++	[PCMCIA] check for proper registration with device core
++	
++	Patch from Dominik Brodowski
++	
++	Fail if registration of socket with driver core failed. This is
++	necessary so that socket-related sysfs entries will appear always
++	if a socket thread is up and running.
++
++<hadi at znyx.com>
++	[PKT_SCHED]: Pass NET_XMIT_* status properly back through classifiers.
++
++<davem at nuts.davemloft.net>
++	[PKT_SCHED]: Rip out requeue stat addition, user ABI breaker.
++
++<jaap.keuter at xs4all.nl>
++	[IPV4]: Calculate default broadcast even when using SIOCSIGNETMASK.
++	
++	While getting hands-on with netkit (www.netkit.org), a networking
++	simulation environment based on UML, it struck me that ifconfig wasn't
++	capable of calculating the proper broadcast address for a subnetted
++	interface. Some browsing through newsgroups and on the Debian package
++	site (nettools), showed that this leads to misconfigured interfaces and
++	a couple of bugreports on ifconfig.
++	
++	Digging a bit deeper revealed that it actually is an issue with
++	SIOIFNETMASK. Once you bring up an interface with SIOIFADDR, a classfull
++	netmask and broadcast address is set (if applicable for the type of
++	interface), in order to get a properly configured interface. But if you
++	subnet the network using SIOIFNETMASK no proper broadcast address is
++	set. So you always have to calculate it yourself, obviously leading to
++	configuration errors.
++	
++	This patch takes care of this. First of all it doesn't change
++	existing functionality, eg. a command like 'ifconfig eth0 192.168.1.1
++	netmask 255.255.255.240 broadcast 192.168.1.0' still works. But if you
++	omit the broadcast address, a proper 'all ones' broadcast address for the
++	subnet is set. 'ifconfig eth0 192.168.1.1 netmask 255.255.255.240' gives
++	you 'eth0 inet addr:192.168.1.1 Bcast:192.168.1.15 Mask:255.255.255.240'
++	and this should solve some real life problems.
++	
++	Signed-off-by: Jaap Keuter <jaap.keuter at xs4all.nl>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[NETLINK]: Check connect address.
++
++<herbert at gondor.apana.org.au>
++	[NETLINK]: Return err in netlink_connect.
++	
++	This patch makes netlink_connect() return the value of err instead of 0.
++	It doesn't actually make any difference since the current implementation
++	of netlink_autobind() never fails.  But since we went to all this trouble
++	to check the return status of autobind, might as well return the correct
++	value :)
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[NET]: Allow large MTU on dummy net device.
++	
++	It is useful for testing to allow larger MTU value to be set on
++	the dummy network device. The current code limits it to valid Ether mtu's.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[TG3]: Delay both before and after PCI cfg space readback after reset.
++
++<davem at nuts.davemloft.net>
++	[TG3]: Bump driver version and reldate.
++
++<herbert at gondor.apana.org.au>
++	[ESP4]: Merge NAT-T code in esp_output().
++
++<akpm at osdl.org>
++	[ROSE]: rose_route locking fix
++	
++	Fix deadlock in rose_del_loopback_node().  Found by the Stanford locking
++	checker.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<akpm at osdl.org>
++	[AX25]: ax25_ds_idletimer_expiry() locking fix.
++	
++	Fix deadlock identified by the Stanford locking checker.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<akpm at osdl.org>
++	[LAPB]: lapb_unregister() locking fix.
++	
++	Fix deadlock identified by the Stanford locking checker.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<akpm at osdl.org>
++	[AX25]: ax25_rt_add() locking fix.
++	
++	Fix deadlock identified by the Stanford locking checker.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[AH4]: Harmonization of output function.
++	
++	This is another step towards the union of the tunnel mode encapsulation
++	between transforms.  As there are significant differences between the
++	tunnel encapsulation of IPv4 and IPv6, I'll be dealing with IPv4 only
++	for now.
++	
++	This particular patch rearranges the code in ah_output to isolate the
++	tunnel mode encapsulation.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<yoshfuji at linux-ipv6.org>
++	[IPV6] Bring lo up before setting other interface up.
++	
++	
++	IPv6 was not configured appropriately without lo.
++	Noticed by / tested by Russell King <rmk+lkml at arm.linux.org.uk>.
++	
++	Signed-off-by: Hideaki YOSHIFUJI <yoshfuji at linux-ipv6.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<akpm at osdl.org>
++	[SPARC64]: Kill silo_args bogus .globl
++
++<vandrove at vc.cvut.cz>
++	[VLAN]: Do not access released memory.
++
++<yoshfuji at linux-ipv6.org>
++	[IPV6]: Fix flags for ndisc dst.
++	
++	Because RTF_LOCAL is for local unicast address, 
++	it was wrong to set RTF_LOCAL to ndisc dst.
++	This patch also adds some comment on other fields.
++	
++	Signed-off-by: Hideaki YOSHIFUJI <yoshfuji at linux-ipv6.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<yoshfuji at linux-ipv6.org>
++	[TCP]: Inline message.
++	
++	D: [TCP] Diet using unknown
++
++<yoshfuji at linux-ipv6.org>
++	[NET]: Save space for dst underflow message.
++	
++	Save space for 'dst underflow' message.
++	
++	Signed-off-by: Hideaki YOSHIFUJI <yoshfuji at linux-ipv6.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[XFRM]: Convert XFRM_MSG_* macros to an enum.
++	
++	This way we will not forget to update XFRM_MSG_MAX in
++	the future.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[PKT_SCHED]: Do not embed spinlock in tc_stats structure.
++	
++	This makes it not get sized/copied around to/from
++	userspace correctly.  The real crux of the problem
++	comes from the rtnetlink attribute copying line which
++	read:
++		RTA_PUT(skb, TCA_STATS, (char*)&st->lock - (char*)st, st);
++	which is not necessarily sizeof(struct tc_stats) due
++	to alignment issues.
++
++<davem at nuts.davemloft.net>
++	[NETFILTER]: Fix initializer of ip6table.c:initial_table
++	
++	Just because gcc accepts [index] bar as
++	[index] = bar is no reason to make use of
++	that gross construct.
++	
++	Also fully C99ify
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Use platform_get_resource/platform_get_irq in sa1111.c
++
++<shaggy at austin.ibm.com>
++	JFS: Updated field isn't always written to disk during truncate
++	
++	There is a possibility that a change to header.next is not logged
++	or written to disk if it is the only change to an xtree leaf page.
++	
++	Signed-off-by: Dave Kleikamp <shaggy at austin.ibm.com>
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Usual mach-types update.
++
++<icampbell at com.rmk.(none)>
++	[ARM PATCH] 1954/2:  Make pxa platform device names more sensible
++	
++	Patch from Ian Campbell
++	
++	Update 1954/1 to use pxa2xx- as the platform device prefix 
++	instead of pxa2xx_. This changes pxamci to pxa2xx-mci, pxa2xx_udc 
++	to pxa2xx-udc and pxafb to pxa2xx-fb. pxa2xx-uart doesn't need changing.
++
++<kaos at sgi.com>
++	[PATCH] ia64: Rename local move_irq to sn_move_irq
++	
++	Rename SN local function move_irq to sn_move_irq to remove conflict
++	with global move_irq.  Needed since ashok.raj moved move_irq() from
++	iosapic.c to irq.c.
++	
++	Signed-off-by: Keith Owens <kaos at sgi.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<arun.sharma at intel.com>
++	[PATCH] ia64: IA-32 sigaltstack bug fix
++	
++	More code needs to be guarded by if (uss32) { ... }. Without this
++	patch, if (buf32..) may be checking uninitialized data and may result
++	in spurious ENOMEMs.
++	
++	Signed-off-by: Gordon Jin <gordon.jin at intel.com>
++	Signed-off-by: Arun Sharma <arun.sharma at intel.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<linux at de.rmk.(none)>
++	[PCMCIA] core socket sysfs support, export card type
++	
++	Patch from Dominik Brodowski
++	
++	Add a first socket-related sysfs entry; and to keep things ordered,
++	do so in a new file drivers/pcmcia/socket_sysfs.c. To keep things
++	easy, all files will be present all the time, even if no card is in
++	the socket at a specific moment -- however, accessing the file will
++	result in -ENODEV then, so that
++	
++	# cat /sys/class/pcmcia_socket/pcmcia_socket1/card_type
++	
++	will cause an error message like
++	
++	"cat: card_type: No such device"
++	
++	which is quite self-explanatory.
++	
++	
++	The attribute "card_type" will return either "16-bit" or "32-bit",
++	depending on whether the PCCard is a 16-bit PCMCIA card or a 32-bit
++	CardBus card. The result "invalid" should not happen, and if it
++	happens, something strange is going on.
++
++<linux at de.rmk.(none)>
++	[PCMCIA] card voltage
++	
++	Patch from Dominik Brodowski
++	
++	Add an attribute "card_voltage" which returns the card's voltage
++	requirements:
++	
++	"5.0V", "3.3V" or "X.XV".
++
++<linux at de.rmk.(none)>
++	[PCMCIA] card vpp / vcc
++	
++	Patch from Dominik Brodowski
++	
++	Add attributes "card_vpp" and "card_vcc" which return these voltages,
++	like "3.3V"
++
++<linux at de.rmk.(none)>
++	[PCMCIA] card insert / eject
++	
++	Patch from Dominik Brodowski
++	
++	Add two further attributes, "card_insert" and "card_eject". Reading
++	these files will fail; but writing _anything_ non-empty to these
++	files will execute an user insert/ejection request -- equivalent
++	to "cardctl insert", "cardctl eject".
++	
++	To ensure proper error values to userspace, transform the return
++	values from CS_ error codes to -E error codes.
++
++<sebek64 at post.cz>
++	[NETFILTER]: ip6t_LOG and packets with hop-by-hop options.
++	
++	Packet with IPPROTO_HOPOPTS extended header isn't logged properly by
++	ip6t_LOG.c. It only prints PROTO=0 and nothing more, because
++	IPPROTO_HOPOPTS=0 and in this file 0 is used to indicate last header.
++	This patch fix it by using IPPROTO_NONE to indicate last header.
++	
++	Signed-off-by: Marcel Sebek <sebek64 at post.cz>
++	Signed-off-by: Harald Welte <laforge at netfilter.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[PKT_SCHED]: Update to network emulation QOS scheduler.
++	
++	This patch updates the network emulation packet scheduler.
++		* name changed from delay to netem since it does more than just delay
++		* Catalin's merged code to do packet reordering
++		* uses a socket queue's directly rather than layering on qdisc(fifo)
++		  because this is used in performance tests.
++		* adds placeholder in API for future enhancements (rate and duplicate).
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[IPCOMP]: Exclude IPCOMP header from props.header_len
++	
++	This is another patch on the way towards a unified XFRM tunnel
++	encapsulation function.
++	
++	This patch changes the value of props.header_len for IPCOMP to
++	exclude the IPCOMP header.  The reason is that the IPCOMP header
++	is added only if the packet is compressible.  That is, if the
++	size of the compressed payload plus the size of the IPCOMP header
++	is less than that of the original payload.
++	
++	This means that the IPCOMP encapsulation does not impose any
++	overhead at all as far as the MTU is concerned.  The current
++	code incorrectly reduces the MTU by the size of the IPCOMP
++	header.
++	
++	As a side-effect, this means that we don't have to move the
++	IP header around when IPCOMP is used.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[PKT_SCHED]: Fix some missing qdisc_copy_stats() conversions.
++
++<shemminger at osdl.org>
++	[PKT_SCHED]: Two small netem fixes.
++	
++	- rtnetlink.h needs including
++	- optimize loss test so that net_random() call is not done
++	  when no-loss is indicated
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<kaos at sgi.com>
++	[PATCH] ia64: Correct invalid unwind data
++	
++	ASM_UNW_PRLG_GRSAVE(n) must match the number of input registers in the
++	following alloc statement.  Otherwise you get invalid backtraces :(
++	
++	Signed-off-by: Keith Owens <kaos at sgi.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<davem at nuts.davemloft.net>
++	[PKT_SCHED]: Another missed qdisc_copy_stats() conversion.
++
++<hadi at znyx.com>
++	[PKT_SCHED]: New version of u32 classifier hashing workaround.
++	
++	This version does not change user visible structures.
++	
++	Signed-off-by: Jamal Hadi Salim <hadi at znyx.com>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[PKT_SCHED]: Kill CONFIG_CLS_U32_PERF2 cruft code.
++
++<davem at nuts.davemloft.net>
++	[PKT_SCHED]: Kill fix_u32_bug ifdef tests in cls_u32.c
++
++<margitsw at t-online.de>
++	[PATCH] prism54 freq to channel incorrect for 5GHz
++	
++	2004-07-06 Margit Schubert-While <margitsw at t-online.de>
++	
++	* The frequency to channel conversion is wrong for the 5GHz band
++	* Although the (known) devices don't/can't use it,
++	  they do report it. (iwlist ethX freq)
++
++<davem at nuts.davemloft.net>
++	[IPV4]: Set UDP accept back to sock_no_accept.
++	
++	Setting it to inet_accept causes UDP accept attempts
++	to OOPS.  In particular, accept01 from LTP tries this.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<schwidefsky at de.ibm.com>
++	[PATCH] s390: dasd driver changes
++	
++	From: Horst Hummel <horst.hummel at de.ibm.com>
++	
++	dasd device driver changes:
++	 - Set and check the retry counter in start_IO for all requests.
++	
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<schwidefsky at de.ibm.com>
++	[PATCH] s390: common i/o layer
++	
++	From: Arnd Bergmann <arndb at de.ibm.com>
++	
++	Common i/o layer changes:
++	 - Reorder checking and setting of the ccw device id.
++	
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<schwidefsky at de.ibm.com>
++	[PATCH] s390: ctc driver changes
++	
++	From: Peter Tiedemann <ptiedem at de.ibm.com>
++	
++	ctc driver changes:
++	 - Make use of the debug feature to ease debugging.
++	 - ctctty: use dev_alloc_name to allocate a network device name.
++	 - ctctty: avoid deadlock of ctc_tty_close vs ctc_tty_flush_buffer.
++	
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<schwidefsky at de.ibm.com>
++	[PATCH] s390: cpu-idle notifier
++	
++	This patch introduces a notifier chain for cpu idle.  There are two events
++	CPU_IDLE and CPU_NOT_IDLE that are called just before the cpu goes to sleep
++	and right after the cpu woke up again.  The notifier is used to simplify the
++	no-hz-timer-in-idle feature and the virtual cpu timers.  In addition the
++	virtual cpu timer functions have been moved to arch/s390/kernel/vtime.c, which
++	gives a nice separation between the timer functions related to real time and
++	the timer functions related to virtual cpu time.
++	
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<schwidefsky at de.ibm.com>
++	[PATCH] s390: cpu hotplug support
++	
++	From: Ursula Braun-Krahl <braunu at de.ibm.com>
++	From: Heiko Carstens <heiko.carstens at de.ibm.com>
++	From: Gerald Schaefer <geraldsc at de.ibm.com>
++	From: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	
++	Add s390 architecture support for cpu hotplug.
++	
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<adaplas at hotpop.com>
++	[PATCH] fbcon mode switching fix
++	
++	Ugly workaround.  When switching from KD_GRAPHICS to KD_TEXT, the event is
++	captured at fbcon_blank() allowing fbcon to reinitialize the hardware.
++	However, some hardware requires the reinitialization to be done
++	immediately, others require it to be done later.  Others may need it to be
++	done immediately and later, this is the worst case.
++	
++	Signed-off-by: Antonino Daplas <adaplas at pol.net>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<adaplas at hotpop.com>
++	[PATCH] fbcon: refinements for fbcon
++	
++	1.  From Petr Vandrovec <vandrove at vc.cvut.cz>.
++	
++	Begin quote
++	
++	        yesterday I finally found why 2.6.x has problems with taking
++	        over vgacon.  Problem is that take_over_console does:
++	
++	  	if (IS_VISIBLE)
++	    	save_screen(i);
++	  	...
++	  	visual_init(i, 0);
++	  	...
++	
++	        so code nicely saves screen contents, and calls visual_init,
++	        which calls fbcon's init, which in turn can issue vc_resize.  And this
++	        vc_resize will trigger read from vc->vc_origin.  But vc_origin still
++	        points to videomemory, not to the buffer where save_screen() copied
++	        its data.
++	
++	End quote
++	
++	So updating vc->vc_origin to point to screenbuf after the previous console
++	deinitializes allows fbcon to correctly update the screen from the screen
++	buffer.  This change makes the clearing of vram (using fillrect) unnecessary.
++	
++	2.  If FBINFO_MISC_MODESWITCH flag is set in info, do the set_par() in
++	fbcon_switch() instead of piggy-backing the set_par() on fbcon_resize().  This
++	preserves the current var, skipping the unnecessary fb_find_mode() step.
++	
++	Signed-off-by: Antonino Daplas <adaplas at pol.net>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<adaplas at hotpop.com>
++	[PATCH] fbcon: new scrolling mode: YPAN + REDRAW
++	
++	Added a new scrolling mode (SCROLL_PAN_REDRAW) to fbcon that should greatly
++	benefit unaccelerated drivers such as VESA fbdev.  An increase of 3-10 times
++	in scrolling speed can be expected.
++	
++	Currently, fbcon has 4 different scrolling methods (1-4).  Potentially, we can
++	have 6.  This patch implements SCROLL_PAN_REDRAW (5).  SCROLL_WRAP_REDRAW (6)
++	is still unimplemented.
++	
++	Scroll Mode		Operation	YPan	YWrap
++	+++++++++++++++++++++++++++++++++++++++++++++++++++++
++	1. SCROLL_ACCEL		copyarea	No	No
++	2. SCROLL_REDRAW	imageblit	No	No
++	3. SCROLL_PAN		copyarea	Yes	No
++	4. SCROLL_WRAP		copyarea	No	Yes
++	5. SCROLL_PAN_REDRAW 	imageblit	Yes	No	
++	6. SCROLL_WRAP_REDRAW	imageblit	No	Yes
++	+++++++++++++++++++++++++++++++++++++++++++++++++++++
++	Note 1:  I've changed the nomenclature to increase clarity:
++	
++	SCROLL_ACCEL = SCROLL_MOVE
++	SCROLL_REDRAW = SCROLL_REDRAW
++	SCROLL_PAN = SCROLL_PAN_MOVE
++	SCROLL_WRAP = SCROLL_WRAP_MOVE
++	
++	To demonstrate the effect of each of the scrolling methods on
++	an unaccelerated PCI/AGP-based driver (vesafb), I used a simple
++	benchmark (time cat linux/MAINTAINERS - a 50K text file). The
++	framebuffer is set at:
++	
++	1024x768-8bpp, 8x16 font, yres_virtual = 2*yres
++	
++	1. SCROLL_MOVE:
++	real    5m50.277s
++	user    0m0.001s
++	sys     5m50.227s
++	
++	Almost 6 minutes for a 50K text file.  Using soft copyarea on a
++	PCI-based card is just too slow (because copyarea has to 
++	read from the framebuffer memory).
++	
++	2. SCROLL_PAN_MOVE
++	scrollmode: SCROLL_PAN
++	real    0m8.592s
++	user    0m0.000s
++	sys     0m8.586s
++	
++	Using ypan with copyarea dramatically improves the scrolling.  However, the
++	scrolling action is jerky (fast during the panning stages, slows down during
++	the copyarea stages).
++	
++	3. SCROLL_REDRAW (this is the default scrolling mode)
++	real    0m3.189s
++	user    0m0.000s
++	sys     0m3.170s
++	
++	Simply eliminating the copyarea, even without ypanning, makes it faster than
++	SCROLL_PAN_MOvE.  Plus, the scrolling action is smoother.
++	
++	So, if we combine YPanning with imageblit (PAN_REDRAW), we get this:
++	
++	4. SCROLL_PAN_REDRAW
++	real    0m0.520s
++	user    0m0.000s
++	sys     0m0.518s
++	
++	That's almost 6x faster than SCROLL_REDRAW.  Increasing the amount of video
++	RAM still increases the speed, but not very dramatically.  Higher than 16 MB,
++	the increase is negligible.
++	
++	Using an accelerated driver, we see almost the same effect but not as
++	dramatically:
++	
++	1. SCROLL_MOVE - accel
++	real    0m3.112s
++	user    0m0.000s
++	sys     0m3.112s
++	
++	2. SCROLL_REDRAW - accel
++	real    0m2.604s
++	user    0m0.000s
++	sys     0m2.603s
++	
++	Redraw is still faster than move, but not much.
++	
++	3. SCROLL_PAN_MOVE - accel
++	real    0m0.203s
++	user    0m0.000s
++	sys     0m0.202s
++	
++	4. SCROLL_PAN_REDRAW - accel
++	real    0m0.326s
++	user    0m0.002s
++	sys     0m0.323s
++	
++	This is one exception.  If panning is enabled, move is actually faster than
++	redraw.  As to why, I don't know.
++	
++	So based on the above, fbcon will choose the scrolling method based on the
++	following preference:
++	
++	Ypan/Ywrap > accel imageblit > accel copyarea >
++	soft imageblit > (soft copyarea)
++	
++	Note 2: Exception: accel copyarea > accel imageblit if Pan/Wrap is enabled.
++	
++	Note 3: soft copyarea will be avoided by fbcon as much as possible unless
++	there is a specific override, ie., FBINFO_READS_FAST flag is set.  If this
++	flag is set, fbcon will prefer copyarea over imageblit, accel or soft.
++	
++	As a final note, in order for fbcon to use the best scrolling method, the
++	low-level drivers must provide the correct hinting by setting the
++	FBINFO_HWACCEL_* flags.
++	
++	To vesafb users: boot vesafb like this for fastest scrolling action:
++	
++	video=vesafb:ypan,vram:16
++	
++	Signed-off-by: Antonino Daplas <adaplas at pol.net>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<adaplas at hotpop.com>
++	[PATCH] fbdev: set capabilities flag for vesafb and vga16fb
++	
++	This patch sets the correct capabilities flag for vesafb and vga16fb to
++	provide fbcon with the correct hints as to the best scrolling mode.
++	
++	Signed-off-by: Antonino Daplas <adaplas at pol.net>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<ak at muc.de>
++	[PATCH] NUMA API: fix use-after-free bug
++	
++	Move the memory policy freeing to later in exit to make sure the last
++	memory allocations don't use an uninitialized policy.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mika at osdl.org>
++	[PATCH] sparse: fix remaining three non-ANSI warnings
++	
++	  CHECK   fs/smbfs/smbiod.c
++	fs/smbfs/smbiod.c:68:25: warning: non-ANSI parameter list
++	  CHECK   drivers/isdn/tpam/tpam_crcpc.c
++	drivers/isdn/tpam/tpam_crcpc.c:57:15: warning: non-ANSI parameter list
++	  CHECK   drivers/scsi/aic7xxx/aic79xx_reg_print.c
++	drivers/scsi/aic7xxx/aic79xx_osm.h:791:19: warning: non-ANSI parameter list
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kraxel at bytesex.org>
++	[PATCH] saa5246a Videotext driver update
++	
++	From: Michael Geng <linux at MichaelGeng.de>
++	
++	The patch updates docs, comments + strings to also mention the SAA5281 chip
++	(which is compatible to the SAA5246A) as supported.
++	
++	Signed-off-by: Michael Geng <linux at MichaelGeng.de>
++	Signed-off-by: Gerd Knorr <kraxel at bytesex.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<trivial at rustcorp.com.au>
++	[PATCH] Remove include/{asm-i386,linux}/upd4990a.h
++	
++	From: Alexey Dobriyan <adobriyan at mail.ru>
++	
++	drivers/char/upd4990a.c was removed from 2.6.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<js189202 at zodiac.mimuw.edu.pl>
++	[PATCH] Fix memory leak in epoll
++	
++	There was a memory leak in epoll.
++	
++	The reference count (d_count) of the struct dentry of a new epoll-fd was
++	set to TWO.  (new_inode() assigned ONE, than ep_getfd() incremented it by
++	dget()).  There was only ONE reference to this dentry, so struct dentry and
++	struct inode were never freed.
++	
++	Signed-off-by: Davide Libenzi <davidel at xmailserver.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<jesse at cola.voip.idv.tw>
++	[PATCH] snd_ctl_read() fix fix
++	
++	hm, I had a brainfart here.  The recent "fix" to snd_ctl_read() actually
++	unfixed it.  Revert that, and fix the real bug.
++	
++	Cc: Jaroslav Kysela <perex at suse.cz>
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<torvalds at ppc970.osdl.org>
++	sparse: annotate signal handler and ss_sp as user pointers
++
++<stevef at steveft21.ltcsamba>
++	fix oops in build_wildcard_path_from_dentry
++
++<davej at redhat.com>
++	[AGPGART] VIA K8T890 Host Bridge support.
++	
++	Signed-off-by: Dave Jones <davej at redhat.com>
++
++<davej at redhat.com>
++	[AGPGART] VIA VT838x [K8T800/K8M800/K8N800] support
++	
++	Signed-off-by: Dave Jones <davej at redhat.com>
++
++<davej at redhat.com>
++	[AGPGART] VIA KT880 support.
++	
++	Signed-off-by: Dave Jones <davej at redhat.com>
++
++<davej at redhat.com>
++	[AGPGART] VIA VT83xx/VT87xx/KTxxx/Px8xx support.
++	
++	Signed-off-by: Dave Jones <davej at redhat.com>
++
++<davej at redhat.com>
++	[AGPGART] VIA P4M800 support.
++	
++	Signed-off-by: Dave Jones <davej at redhat.com>
++
++<shaggy at austin.ibm.com>
++	JFS: Protect active_ag with a spinlock
++	
++	Signed-off-by: Dave Kleikamp <shaggy at austin.ibm.com>
++
++<shaggy at austin.ibm.com>
++	JFS: prevent concurrent calls to txCommit on the imap inode
++	
++	Signed-off-by: Dave Kleikamp <shaggy at austin.ibm.com>
++
++<kaber at trash.net>
++	[NETFILTER]: Fix two broken checks for options in ipt_LOG
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: Harald Welte <laforge at netfilter.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[NET]: Deinline sock_i_uid, sock_i_ino
++	
++	The sock_i_uid and sock_i_ino functions are only called by
++	/proc type interfaces, so they don't need to be inlined.
++	
++	Also, the inline functions writeable, rcvtimeo, sndtimeo are test
++	for value functions that don't change their argument.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shaggy at austin.ibm.com>
++	JFS: Check for dmap corruption before using leafidx
++	
++	Signed-off-by: Dave Kleikamp <shaggy at austin.ibm.com>
++
++<hirofumi at mail.parknet.co.jp>
++	[IPV4]: IPMR fixes.
++	
++	- pim_protocol warning fix
++	
++	- ipmr_vif_open() and ipmr_mfc_open() allocates the memory, so it
++	  should use seq_release_private().
++	
++	- ipmr_mfc_seq_xxx is using it->cache, in order to control whether
++	  unlock should be do or not, but it->cache was not initialized in
++	  ipmr_mfc_seq_start(). So it can point the previous state if user
++	  did seek(). This become to the cause of twice unlock.
++	
++	Signed-off-by: OGAWA Hirofumi <hirofumi at mail.parknet.co.jp>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<hirofumi at mail.parknet.co.jp>
++	[NET]: Cleanup mis-usage of seq_release_private
++	
++	These doesn't allocate memory and doesn't use seq->private. However
++	kfree() ignores NULL, so these are not the problem.
++	
++	This patch just cleans these up.
++	
++	Signed-off-by: OGAWA Hirofumi <hirofumi at mail.parknet.co.jp>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davej at redhat.com>
++	[AGPGART] Intel I915 support.
++	From: Alan Hourihane <alanh at tungstengraphics.com>
++	Signed-off-by: Dave Jones <davej at redhat.com>
++
++<peter at chubb.wattle.id.au>
++	[PATCH] ia64: Fix OSDL BugMe report 2885: realtime process can't preempt low priority process in kernel
++	
++	Rearranged code to make it work. There were two problems:
++	
++	 1. The preempt flag was being tested only if code was leaving for
++	    user space (the logic should be: test for RESCHEDULE if we're
++	    switching to a kernel thread, test everything if switching to a
++	    user thread)
++	
++	 2. The check of the user space flags was being repeated even if the
++	    work had been done.
++	
++	There is one small change in semantics: when returning from a
++	preemption, the preemption flag will *not* be rechecked.  Otherwise, I
++	found that it was easy to get into a livelock situation where no
++	forward progress was made.
++	
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<davej at redhat.com>
++	[AGPGART] Add support for SiS 5591.
++	Untested, but from the looks of things (comparing with DragonFlyBSD's agp implementation)
++	this should work.  Strangely, we added the PCI ID for this a long time ago, back
++	in 2.0.34 (long before agpgart driver got merged) and then we never used it.
++	
++	Signed-off-by: Dave Jones <davej at redhat.com>
++
++<yoshfuji at linux-ipv6.org>
++	[NET] convert storage for MIB from struct member to array item.
++	
++	Signed-off-by: Hideaki YOSHIFUJI <yoshfuji at linux-ipv6.org>
++
++<hadi at znyx.com>
++	[PKT_SCHED]: Another missed tc_stats spinlock conversion.
++	
++	Signed-off-by: Jamal Hadi Salim <hadi at znyx.com>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[TCP]: Type qualifiers, such as const, are ignored on function return type.
++
++<jheffner at psc.edu>
++	[TCP]: Do not round window to MSS if window scaling.
++	
++	Signed-off-by: John Heffner <jheffner at psc.edu>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<yoshfuji at linux-ipv6.org>
++	[NET] use SNMP_MIB_ITEM for MIB description.
++	
++	Signed-off-by: Hideaki YOSHIFUJI <yoshfuji at linux-ipv6.org>
++
++<yoshfuji at linux-ipv6.org>
++	[NET] fold long comment lines.
++	
++	Signed-off-by: Hideaki YOSHIFUJI <yoshfuji at linux-ipv6.org>
++
++<yoshfuji at linux-ipv6.org>
++	[NET] use seq_puts() where appropriate.
++	
++	Signed-off-by: Hideaki YOSHIFUJI <yoshfuji at linux-ipv6.org>
++
++<davidm at tiger.hpl.hp.com>
++	ia64: Nuke two compiler warnings.
++
++<dsaxena at plexity.net>
++	[ARM] IXP4xx: platform_add_device() to platform_add_devices() conversion
++	
++	Signed-off-by: Deepak Saxena <dsaxena at plexity.net>
++
++<jelenz at edu.rmk.(none)>
++	[ARM PATCH] 1937/1: LoCoMo common device
++	
++	Patch from John Lenz
++	
++	Cleanup and forward port of patch 1849.
++	This patch provides support for the SHARP LoCoMo device, 
++	a companion chip similar to the sa1111 device.  It is present
++	in many of the SHARP Zaurus line of PDAs.
++
++<rmk at flint.arm.linux.org.uk>
++	Back out smc91x late collision "performance" hack.
++	
++	Apparantly, the reason for this change is that it gives "much less
++	NFS stalls with a SMC91C96 on a 10/100MB switch."
++	
++	Alan Cox's comments on this is:
++	"spec says 16 collision retries max _ever_.  I bet his 'broken
++	switch' is a case of half v full duplex" and a recommendation to
++	remove it.
++	
++	Also, since the change does not limit the number of times we may
++	retry to send the packet, I think this code opens a potential DoS
++	attack against network which has a machine connected running this
++	code.
++
++<alex at alexdalton.org>
++	[PATCH] I2C: ADM1030 and Co sensors chips support
++	
++	Here is a patch against linux-2.6.7-mm1 kernel that adds support for
++	adm1030 and adm1031 sensors chips.
++	
++	It has been reviewed several times by Jean Delvare, and he thinks it is
++	ready for inclusion into 2.6 kernel. So here it is.
++	
++	
++	Signed-off-by: Alexandre d'Alton <alex at alexdalton.org>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<ebs at ebshome.net>
++	[PATCH] I2C PPC4xx IIC driver: 0-length transactions bit-banging implementation
++	
++	IBM PPC 4xx i2c controller doesn't support 0-length transactions (e.g. used by
++	SMBUS_QUICK). This patch implements bit-banging emulation for such requests and
++	removes temporary kludge added earlier.
++	
++	Signed-off-by: Eugene Surovegin <ebs at ebshome.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<khali at linux-fr.org>
++	[PATCH] I2C: Class of scx200_acb
++	
++	This is needed for the scx200_acb to accept hardware monitoring chips.
++	
++	Signed-off-by: Jean Delvare <khali at linux-fr dot org>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<khali at linux-fr.org>
++	[PATCH] I2C: Add support for LM86, MAX6657 and MAX6658 to lm90
++	
++	This adds support for the LM86, MAX6657 and MAX6658 sensor chips to the
++	lm90 driver. These are less popular than the LM90 and ADM1032 but
++	several users have reported to use these, so I added support to the lm90
++	driver. All these chips are fully compatible so that's just a matter of
++	accepting the new chip ids. I also slightly simplified the detection
++	code.
++	
++	
++	Signed-off-by: Jean Delvare <khali at linux-fr dot org>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<lcapitulino at prefeitura.sp.gov.br>
++	[PATCH] I2C: i2c/i2c-dev.c::i2c_dev_init() cleanup.
++	
++	 This patch does the fallowing cleanup for
++	drivers/i2c/i2c-dev.c::i2c_dev_init():
++	
++	*) in a error condition, return the error code of register_chrdev()
++	insted of -EIO;
++	*) adds missing audit for class_register();
++	*) in a error condition, only prints "Driver Initialisation Failed",
++	insted printing the cause. (Note that the error will be printed by
++	the return of the error code, and the information about what function
++	caused the problem need to be done by a debug code).
++	
++	 Only compiled, lack of hardware.
++	
++	Signed-off-by: Luiz Capitulino <lcapitulino at prefeitura.sp.gov.br>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<khali at linux-fr.org>
++	[PATCH] I2C: Documentation for i2c-parport
++	
++	At least, the i2c-parport gets some documentation. I heard several
++	persons complaining that there was no sample electronics schema for
++	building their own i2c-over-parallel-port, so I did just that, with the
++	help of Sylvain Munaut. The documentation also includes the list of
++	supported adapters, and a short comparison with other drivers using the
++	parallel port to drive an i2c bus. At the end of the document I included
++	an updated version of the i2c-velleman doc file (which I then deleted).
++	
++	Signed-off-by: Jean Delvare <khali at linux-fr dot org>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<drewie at freemail.hu>
++	[PATCH] I2C: Add support for LM77
++	
++	This patch (against the current stack) adds support for the
++	LM77 sensor chips made by National Semiconductor. Formerly
++	this was claimed by the LM75 driver but when I got hold of an
++	embedded board (built around the National Geode SC1100 CPU),
++	which was equipped with an LM77, it turned out that the two
++	chips are not compatible.
++	
++	It has been developed with help of, reviewed and approved
++	by Jean Delvare.
++	
++	
++	Signed-off-by: Andras Bali <drewie at freemail.hu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<bcasavan at sgi.com>
++	[PATCH] ia64: Fix bug in ia64_atomic64_{add,sub}
++	
++	Hit this bug just yesterday.  I hope the problem and fix require no
++	explanation.  Patched kernel boots and runs just fine.
++	
++	Signed-off-by: Brent Casavant <bcasavan at sgi.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<davem at nuts.davemloft.net>
++	[IPV4]: Fix multicast socket hangs.
++	
++	If a multicast packet gets looped back, the sending
++	socket can hang if a local read just sits and does
++	not empty its receive queue.
++	
++	The problem is that when an SKB clone is freed up,
++	the destructor is only invoked for the head SKB when
++	there is a fraglist (which is created for fragmentation).
++	
++	The solution is to account the fragment list SKB lengths
++	in the top-level head SKB, then it all works out.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davidm at tiger.hpl.hp.com>
++	ia64: Define machvec_noop as "static inline"
++	
++	This way, non-GENERIC kernels can optimize away the no-op calls
++	while GENERIC kernels can still take the address of the function
++	to initialize the machvec vector.
++
++<dtor_core at ameritech.net>
++	[PATCH] Driver core: add platform_device_register_simple to register platform
++	
++	Add platform_device_register_simple to register platform devices
++	requiring minimal resource and memory management.  The device
++	will have standard release function that just frees memory
++	occupied by the platform device. By having release function in
++	the driver core modules using such devices can be unloaded
++	without waiting for the last reference to the device to be
++	dropped.
++	
++	
++	Signed-off-by: Dmitry Torokhov <dtor at mail.ru>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<dtor_core at ameritech.net>
++	[PATCH] Driver core: add default driver attributes to struct bus_type
++	
++	Signed-off-by: Dmitry Torokhov <dtor at mail.ru>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<dtor_core at ameritech.net>
++	[PATCH] Driver core: kset_find_obj should increment refcount of the found object
++	
++	kset_find_obj should increment refcount of the found object so users of
++	the function can safely use returned object
++	
++	Signed-off-by: Dmitry Torokhov <dtor at mail.ru>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<dtor_core at ameritech.net>
++	[PATCH] Driver core: add driver_find helper to find a driver by its name
++	
++	Signed-off-by: Dmitry Torokhov <dtor at mail.ru>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<eranian at hpl.hp.com>
++	[PATCH] ia64: fix various problems in pfm_check_task_state()
++	
++	Commands not requiring the monitored task to be stopped would spin in
++	wait_task_inactive() forever. After call to wait_task_inactive(),
++	state may have changed, therefore it needs to be rechecked.
++	
++	Signed-off-by: Stephane Eranian <eranian at hpl.hp.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<shaggy at austin.ibm.com>
++	JFS: jfs_dmap build fix
++	
++	fs/jfs/jfs_dmap.c: In function `dbAllocNear':
++	fs/jfs/jfs_dmap.c:1343: parse error before `*'
++	fs/jfs/jfs_dmap.c:1357: `leaf' undeclared (first use in this function)
++	fs/jfs/jfs_dmap.c:1357: (Each undeclared identifier is reported only once
++	fs/jfs/jfs_dmap.c:1357: for each function it appears in.)
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Dave Kleikamp <shaggy at austin.ibm.com>
++
++<rohit.seth at intel.com>
++	[PATCH] ia64: nointroute option needs to be parsed early
++	
++	This patch does an early parsing of kernel command line to check if
++	no_int_route is present. Sal_init code depends on this option to
++	enable/disable interrupt routing.
++	
++	Signed-off-by: Rohit Seth <rohit.seth at intel.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<tony.luck at intel.com>
++	[PATCH] ia64: allow module core code calls to module init code again
++	
++	Drop the prohibition for module core code calls to module init code
++	(this breaks netfilter).
++	
++	Signed-off-by: <tony.luck at intel.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<peterm at redhat.com>
++	[PATCH] ia64: add audit support
++	
++	This patch adds IA64 support to the audit infrastructure.  The IA64
++	audit patch complements the existing audit support for the i386,
++	PPC64, and x86_64 architectures.  This patch is based on work by Ray
++	Lanza.
++	
++	Signed-off-by: Peter Martuccelli <peterm at redhat.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<marcel at holtmann.org>
++	[Bluetooth] Respond to L2CAP info requests
++	
++	This patch adds the correct behavior when a L2CAP info request is sent
++	by the peer. The answer should be a L2CAP info response with the result
++	code set to "not supported".
++	
++	Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
++
++<kenneth.w.chen at intel.com>
++	[PATCH] ia64: fix interpolation-bug in fsys_gettimeofday()
++	
++	The order of reading ar.itc is incorrect with respect to all other
++	variables in fsys_gettimeofday.  All variables involved in time
++	interpolation need to be protected by the sequence lock xtime_lock for
++	consistency check.  However, the first time that fsys_gettimeofday()
++	takes a time stamp, it reads the count outside the seq lock leading to
++	the following possible time leap into the future scenario:
++	
++	fsys_gettimeofday:
++	  read ar.itc
++	
++	  .... <context switch> ....
++	
++	  read_seqbegin
++	    read all other variables (last_nsec_offset, jiffies, xtime)
++	    do time interpolation - elapsed_cycles become a large negative
++	       number and converting it to nsec overflows and make it a
++	       large positive number
++	  read_seqretry success
++	  updates last_nsec_offset (which is several seconds into the future).
++	
++	All subsequent gettimeofday() calls will be wrong as well because
++	monotonic property kicks in.  It only self-corrects once that future
++	time actually arrives.
++	
++	This patch fixes the problem (and moves one instruction to make some room).
++	
++	Signed-off-by: Ken Chen <kenneth.w.chen at intel.com>
++	Signed-off-by: Asit Mallick <asit.k.mallick at intel.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<marcel at holtmann.org>
++	[Bluetooth] Don't reset the USB halted bits
++	
++	The USB halted bits are useless and so there is no need to reset them
++	after changing the configuration.
++	
++	Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
++
++<khali at linux-fr.org>
++	[PATCH] I2C: remove Documentation for i2c-pport
++	
++	> > This also raises a question about Documentation/i2c/i2c-pport.
++	> > Should we keep a document about a driver which is not in the kernel
++	> > tree (and hasn't even been ported to 2.6 yet)?
++	>
++	> No we should not.
++	
++	Signed-off-by: Jean Delvare <khali at linux-fr dot org>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<khali at linux-fr.org>
++	[PATCH] I2C: adm1025 driver ported to 2.6
++	
++	This is my port of the adm1025 driver to 2.6. It has been tested by a
++	few users and reported to work OK.
++	
++	Signed-off-by: Jean Delvare <khali at linux-fr dot org>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<greg at kroah.com>
++	I2C: sparse cleanups for a few i2c drivers.
++
++<alex at alexdalton.org>
++	[PATCH] I2C: small ADM1030 fix
++	
++	Please find an incremental patch that applies on top of the previous one
++	(the one from the first message of the thread) and that adds parenthesis
++	to the macro as pointed out by Mark.
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<davem at nuts.davemloft.net>
++	[PKT_SCHED]: Remove CSZ scheduler.
++	
++	It was an experimental hack and never finished off.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[BRIDGE]: Support different MTU sizes.
++	
++	This patch adds support for different size MTU's to bridging.
++	It is useful for bridging Ethernet's with jumbo frames, etc.
++	
++	The mtu of the bridge pseudo-device is maintained as the minimum
++	of all the underlying ports.  And when forwarding a frame through
++	the bridge, it will drop the frame if the outgoing port's MTU
++	is less than the frame size (as per 802 standard).
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<greg at kroah.com>
++	1 Wire: add Dallas 1-wire protocol driver subsystem
++	
++	This was written and developed by Evgeniy Polyakov <johnpol at 2ka.mipt.ru>
++	with only very minor cleanups by me.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<shemminger at osdl.org>
++	[PKT_SCHED]: Add jitter support to netem.
++	
++	This patch adds jitter if desired to the delayed packets in the
++	netem scheduler.  I dropped the rate stuff out and reorganized so
++	that an underlying pfifo queue is used (next plan is to make it
++	have class ops).
++	
++	The jitter is given as sigma to a Gaussian normal distribution.  The actual
++	implementation is a reduced form of the table driven stuff in NISTnet
++	(free).
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<jmorris at redhat.com>
++	[CRYPTO]: Remove lazy allocation from deflate.
++	
++	Signed-off-by: James Morris <jmorris at redhat.com>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[XFRM]: Add FLUSHSA and FLUSHPOLICY.
++	
++	This patch adds FLUSHSA and FLUSHPOLICY to xfrm_user which are
++	analagous to SADB_FLUSH and SADB_X_SPDFLUSH in af_key.
++	
++	This is useful in KMs on startup/shutdown so that the system is
++	reset to a known state.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[IPSEC]: Fix uh->len when doing NATT with IP options.
++	
++	I just noticed that the UDP header length in esp4_output() is incorrect
++	when IP options are present (in transport mode).  This patch fixes exactly
++	that.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<tomd at csds.uidaho.edu>
++	[CRYPTO]: Set CRYPTO_TFM_RES_BAD_KEY_LEN in twofish.
++
++<davidm at tiger.hpl.hp.com>
++	ia64: Fix EFI physical-mode stubs to correctly calculate physical address
++	
++	This fixes a bug in which the Ski simulator ended up getting the wrong
++	time, since phys_get_time() ended up storing the correct time in the
++	wrong place if a region-5 virtual address was passed (as would happen
++	for stack variables of the init-task).  On real machines, this bug
++	likely would have caused a crash on machines which don't support
++	switching EFI into virtual mode.
++
++<davidm at tiger.hpl.hp.com>
++	ia64: Nuke a warning due to the syscall auditing patch.
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Remove asm/hardware.h from SMC91x ethernet driver.
++	
++	This include isn't required for ARM builds either.
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Fix allocation of 8390 ethernet device structure in etherh.
++
++<herbert at gondor.apana.org.au>
++	[IPSEC]: Move generic encap code into xfrm4_output
++	
++	I've finally finished merging the general encapsulation code for IPv4.
++	Here is the patch.
++	
++	The idea is basically to make x->type->output similar in structure to
++	x->type->input.  That means moving the tunnel encapsulation and other
++	generic code out.
++	
++	They have ended up in xfrm4_output.c.
++	
++	The advantage of this is that we have exactly one copy of the tunnel
++	encapsulation code.  So if we need to change it (e.g., set the TTL
++	according to the route) then it's easier and less error-prone.
++	
++	In fact, in doing so I've already noticed that the ECN wasn't being
++	copied correctly in everything except xfrm4_tunnel.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[IPCOMP6]: Exclude IPCOMP header from props.header_len
++	
++	Now that the IPv4 encap stuff is out of the way, I'll be sending you
++	the IPv6 versions.
++	
++	Here is the one to remove the unnecessary extra space reserved for
++	IPCOMP.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: Yoshifuji Hideaki <yoshfuji at linux-ipv6.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<yoshfuji at linux-ipv6.org>
++	[NET]: Fix dst_underflow_bug_msg printk args.
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Fix two bugs in Acorn expansion card subsystem
++	
++	- Setup synchronous expansion card resource.
++	- Fix order of IRQ and FIQ mask/offsets.
++
++<linux at de.rmk.(none)>
++	[PCMCIA] Use a class interface to provide sysfs attributes.
++	
++	Patch from Dominik Brodowski
++
++<rmk at flint.arm.linux.org.uk>
++	[PCMCIA] Clean up class device attribute registration and fix build error
++
++<jack at ucw.cz>
++	[PATCH] quota: inode->i_flags locking fixes
++	
++	The patch fixes locking of i_flags.  It removes S_QUOTA flag from i_flags
++	because it was almost unused and updating it on some places correctly
++	(under i_sem) would be tricky.  Note that accessing of S_NOQUOTA flag is
++	serialized by dqptr_sem and so we can reliably tested without i_sem.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<olh at suse.de>
++	[PATCH] ppc32: serial console autodetection
++	
++	We have something like this in our kernel since many months.  It sets the
++	console device to what OF uses.  ppc64 does the same, and it works ok.
++	serial is found on CHRP, ch-a is used on all powermacs.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<galak at somerset.sps.mot.com>
++	[PATCH] ppc32: CPM UART fixes
++	
++	Here is a patch to fix some bugs with the current CPM UART code, Tom Rini
++	has seen this and ok'd it.
++	
++	* Fixes need to config both SMC1 & SCC1
++	* Fixes buffer descriptor wrapping issue in set_termios
++	* Fixes confusion in Kconfig regarding CPM1 vs CPM2
++	
++	Signed-off-by: Kumar Gala <kumar.gala at freescale.com>
++	Signed-off-by: Pantelis Antoniou <panto at intracom.gr>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<anton at samba.org>
++	[PATCH] ppc64: uninline some user copy routines
++	
++	gcc 3.5 is complaining about the size of copy_from_user.  It turns out it
++	is rather large and putting it out of line saves us about 30kB on a default
++	kernel build.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulus at samba.org>
++	[PATCH] ppc64: fix unbalanced dev_get/put calls in EEH code
++	
++	This patch fixes some unbalanced usage of pci_dev_get()/pci_dev_put() calls
++	in the eeh code.  The old code had too many calls to dev_put, which could
++	cause memory structs to be freed prematurely, possibly leading to bad bad
++	pointer derefs in certain cases.
++	
++	Signed-off-by: Linas Vepstas <linas at linas.org>
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulus at samba.org>
++	[PATCH] ppc64: enable EEH on PCI host bridges
++	
++	On recent pSeries systems, EEH needs to be enabled even on PCI Host Bridges
++	(PHB's).  If not enabled, then ordinary PCI probing (config-space
++	reads/writes to the bridges) will generate firmware error messages,
++	possibly a very large number of messages for systems with large numbers of
++	pci slots.
++	
++	Signed-off-by: Linas Vepstas <linas at linas.org>
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulus at samba.org>
++	[PATCH] ppc64: update lparcfg to use seq_file
++	
++	From: Will Schmidt <willschm at us.ibm.com>
++	
++	This patch includes updates and cleanup for the PPC64 proc/lparcfg interface.
++	     - use seq_file's seq_printf for output
++	     - remove redundant e2a function. (use viopath.c's instead)
++	     - change to Kconfig to allow building as a module.
++	     - export required symbols from LparData.c
++	
++	    Pass # 2 updates..
++	      - Per Pauls request I've removed the vpurr references, and left
++		just a stub function get_purr().
++	      - this should apply clean to latest linus tree.  (test-applied against
++		2.6.7-rc3).
++	
++	    Pass # 3 updates...
++	      - Correcting my previously incorrect description of the
++		lparcfg_count_active_processors() function..
++		This is for the cases where we have some number of virtual
++		processors that are different than the total number of threads
++		in the system.  (i.e. systemcfg->processorcount isnt the desired
++		value for partition_active_processors)
++	      - moved e2a function into its own file in arch/ppc64/lib.
++	      - changed lparcfg_count_active_processors() to use a while loop
++		instead of a for loop.
++	      - removed redundant of_node_put in lparcfg_count_active_processors().
++	      - removed unneeded parms from get-system-parameter rtas_call.
++	
++	Signed-off-by: Will Schmidt <willschm at us.ibm.com>
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bgerst at didntduck.org>
++	[PATCH] kbuild: clean up module install rules
++	
++	Consolidate rules for installing internal and external modules.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bgerst at didntduck.org>
++	[PATCH] kbuild: sort modules for modpost and modinst
++	
++	Process modules in sorted order during modpost and modules install.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<dhowells at redhat.com>
++	[PATCH] intrinsic automount and mountpoint degradation support
++	
++	Here's a patch that I worked out with Al Viro that adds support for a
++	filesystem (such as kAFS) to perform automounting intrinsically without the
++	need for a userspace daemon.  It also adds support for such mountpoints to be
++	degraded at the filesystem's behest until they've been untouched long enough
++	that they'll be removed.
++	
++	I've a patch (to follow) that removes some #ifdef's from fs/afs/* thus
++	allowing it to make use of this facility.
++	
++	There are five pieces to this:
++	
++	 (1) Any interested filesystem needs to have at least one list to which
++	     expirable mountpoints can be added.
++	
++	     Access to this list is governed by the vfsmount_lock.
++	
++	 (2) When a filesystem wants to create an expirable mount, it calls
++	     do_kern_mount() to get a handle on the filesystem it wants mounting, and
++	     then calls do_add_mount() to mount that filesystem on the designated
++	     mountpoint, supplying the list mentioned in (1) to which the vfsmount
++	     will be added.
++	
++	     In kAFS's case, the mountpoint is a directory with a follow_link() method
++	     defined (fs/afs/mntpt.c). This uses the struct nameidata supplied as an
++	     argument as a determination of where the new filesystem should be
++	     mounted.
++	
++	 (3) When something using a vfsmount finishes dealing with it, it calls
++	     mntput(). This unmarks the vfsmount for immediate expiry.
++	
++	     There are two criteria for determining if a vfsmount may be expired - it
++	     mustn't be marked as in use for anything other than being a child of
++	     another vfsmount, and it must have an expiry mark against it already.
++	
++	 (4) The filesystem then determines the policy on expiring the mounts created
++	     in (2). When it feels the need to, it passes the list mentioned in (1) to
++	     mark_mounts_for_expiry() to request everything on the list be expired.
++	
++	     This function examines each mount listed. If the vfsmount meets the
++	     criteria mentioned in (3), then the vfsmount is deleted from the
++	     namespace and disposed of as for unmounting; otherwise the vfsmount is
++	     left untouched apart from now bearing an expiration mark if it didn't
++	     before.
++	
++	     kAFS's expiration policy is simply to invoke this process at regular
++	     intervals for all the mounts on its list.
++	
++	 (5) An expiration facility is also provided to userspace: by calling umount()
++	     with a MNT_EXPIRE flag, it can make a request to unmount only if the
++	     mountpoint hasn't been used since the last request and isn't in use now.
++	
++	     This allows expiration to be driven by userspace instead of by the
++	     kernel if that is desirable.
++	
++	     This also means that do_umount() has to use a different version of
++	     path_release() to everyone else... it can't call mntput() as that clears
++	     the expiration flag, thus rendering this unachievable; so it's version of
++	     path_release() calls _mntput(), which doesn't do the clear.
++	
++	My original idea was to give the kernel more knowledge of automounted
++	things. This avoids a certain problem with stat() on a mountpoint causing it
++	to mount (for example, do "ls -l /afs" on a machine with kAFS), but Al wanted
++	it done this way.
++	
++	> Why is autofs unsuitable?
++	
++	Because:
++	
++	 (1) Autofs is flat; AFS requires a tree - mounts on mounts on mounts on
++	     mounts...
++	
++	 (2) AFS holds the data as to what the mountpoints are and where they go, and
++	     these may be cross-links to subtrees beyond your control. It's also not
++	     trivial to extract a list of mountpoints as is required for autofs.
++	
++	 (3) Autofs is not namespace safe.
++	
++	 (4) Ducking back to userspace to get that to do the mount is pretty tricky if
++	     namespaces are involved.
++	
++	In fact, autofs may well want to make use of this facility.
++	
++	Signed-Off-By: David Howells <dhowells at redhat.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<dhowells at redhat.com>
++	[PATCH] kAFS automount support
++	
++	Here's a patch to allow the kAFS filesystem to use the automount facility
++	patch presented in a previous email.
++	
++	It allows me to mount an AFS root volume on /afs and then just walk through
++	the directory structure causing referenced volumes to be automounted and
++	autoumounted.
++	
++	For instance, if I do:
++	
++		[root at andromeda root]# mount -t afs \#root.afs. /afs
++		[root at andromeda root]# ls /afs
++		asd  cambridge  cambridge.redhat.com  grand.central.org
++		[root at andromeda root]# ls /afs/cambridge
++		afsdoc
++		[root at andromeda root]# ls /afs/cambridge/afsdoc/
++		ChangeLog  html  LICENSE  pdf  RELNOTES-1.2.2
++	
++	And then look in the mountpoint catalogue, I see:
++	
++		[root at andromeda root]# cat /proc/mounts
++		...
++		#root.afs. /afs afs rw 0 0
++		#root.cell. /afs/cambridge.redhat.com afs rw 0 0
++		#afsdoc. /afs/cambridge.redhat.com/afsdoc afs rw 0 0
++	
++	Then after waiting a few minutes:
++	
++		[root at andromeda root]# cat /proc/mounts
++		...
++		#root.afs. /afs afs rw 0 0
++	
++	Is all that remains.
++	
++	Signed-Off-By: David Howells <dhowells at redhat.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bunk at fs.tum.de>
++	[PATCH] Fix MCA_LEGACY dependencies
++	
++	The patch below against 2.6.7-mm5 fixes more compile errors with
++	MCA_LEGACY=n.
++	
++	Cc: Jeff Garzik <jgarzik at pobox.com>
++	Cc: James Bottomley <James.Bottomley at steeleye.com>
++	Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<neilb at cse.unsw.edu.au>
++	[PATCH] Use llseek instead of f_pos= for directory seeking
++	
++	nfsd currently just sets f_pos when seeking in a directory.  This bypasses
++	any checking and other handling that a filesystem might want to do.
++	
++	So instead, we define "vfs_llseek" to be an exported "llseek", and use
++	that, both to seek at the start, and the find the new position at the end.
++	
++	Thanks to
++	    "Derrick Schommer" <dschommer at acopia.com>
++	    "Trond Myklebust" <trond.myklebust at fys.uio.no>
++	
++	Signed-off-by: Neil Brown <neilb at cse.unsw.edu.au>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<hch at lst.de>
++	[PATCH] remove dead isdn pcmcia code
++	
++	The <driver>_config function called just before clear DEV_CONFIG, and
++	DEV_STALE_LINK isn't set anywhere else.  This is a copy & paste thing found
++	in all old pcmcia drivers.
++	
++	The patch has been sent to the isdn list ages ago but I didn't get any
++	response.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kaos at sgi.com>
++	[PATCH] kallsyms ppc32 fix
++	
++	PPC small data area base symbols shift between kallsyms phases 1 and 2, which
++	makes the kallsyms data unstable.  Exclude them from the kallsyms list.
++	
++	Signed-off-by: Keith Owens <kaos at sgi.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] update kernel-parameters.txt for the noexec option
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<axboe at suse.de>
++	[PATCH] cfq: bad allocation
++	
++	Arjan (sensibly) put a might_sleep() in mempool_alloc() and it caught a bad
++	cfq usage.
++	
++	Signed-off-by: Jens Axboe <axboe at suse.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<hirofumi at mail.parknet.co.jp>
++	[PATCH] FAT: update document
++	
++	Signed-off-by: OGAWA Hirofumi <hirofumi at mail.parknet.co.jp>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<chrisw at osdl.org>
++	[PATCH] Use NULL instead of integer 0 in security/selinux/
++	
++	Fixup another round of sparse warnings of the type:
++		warning: Using plain integer as NULL pointer
++	Acked by Stephen.
++	
++	From: Mika Kukkonen <mika at osdl.org>
++	Signed-off-by: Chris Wright <chrisw at osdl.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mika at osdl.org>
++	[PATCH] int return to unsigned in smb_proc_readdir_long() in fs/smbfs/proc.c
++	
++	  CC [M]  fs/smbfs/proc.o
++	fs/smbfs/proc.c: In function `smb_proc_readdir_long':
++	fs/smbfs/proc.c:2313: warning: comparison of unsigned expression < 0 is always false
++	fs/smbfs/proc.c:2467: warning: comparison of unsigned expression < 0 is always false
++	
++	The first one is pretty dangerous looking, as smb_proc_readdir_long() can
++	return several negative error values and all those are converted to
++	unsigned and then erronously pass the test on line 2313.  Chris Wright gave
++	it a quick look and we did not see immediately if this can be remotely
++	exploited, but it looks pretty scary.
++	
++	The second warning on line 2467 is just extra so I just removed it.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<trivial at rustcorp.com.au>
++	[PATCH] trivial: scripts_kernel-doc: ignoring embedded structs shouldn't be
++	
++	From:  <adobriyan at mail.ru>
++	
++	Imagine you have a code similar to
++	
++	  struct foo {
++	  	union {
++	  		struct tcphdr   *th;
++	  	} h;
++	  	union {
++	  		struct iphdr    *iph;
++	  	} nh;
++	  };
++	
++	kernel-doc in it's current state will happily eat everything from first '{' to
++	last '}' and nobody will see parameter 'h' in documentation (look at
++	include/linux/skbuff.h:struct sk_buff for real world example).
++	
++	So, fix the greedy regexp.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<trivial at rustcorp.com.au>
++	[PATCH] trivial: scripts_kernel-doc: missing bracket.
++	
++	From:  <adobriyan at mail.ru>
++	
++	Fix missing bracket when parameter to be documented is a pointer to function.
++	
++	int (* resume (struct usb_interface *intf);
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<trivial at rustcorp.com.au>
++	[PATCH] trivial: little arch_i386_kernel_timers_timer_none.c fix
++	
++	fixes a cut'n'paste error...
++	
++	Signed-off-by: Rusty Trivial Russell <trivial at rustcorp.com.au>
++	Signed-off-by: Adam Lackorzynski <adam at os.inf.tu-dresden.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<trivial at rustcorp.com.au>
++	[PATCH] trivial: RCS___IGNORE quilt backup files
++	
++	From:  David Gibson <david at gibson.dropbear.id.au>
++	
++	This patch excludes the .pc directory from the same things that
++	SCCS/BitKeeper/.svn/CVS files are excluded from.  The .pc directory is used
++	for backup/reference files by quilt, a patch mangling system conceptually
++	derived from akpm's patch scripts.  Excluding the .pc directory is handy,
++	because otherwise old versions of files found in there tend to end up at the
++	front of the TAGS index.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<trivial at rustcorp.com.au>
++	[PATCH] trivial: remove warning in ftape
++	
++	From:  Chris Heath <chris at heathens.co.nz>
++	
++	Here's a trivial patch that removes an unused-variable warning in ftape.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<trivial at rustcorp.com.au>
++	[PATCH] trivial: arch_i386_kernel_scx200.c: kill duplicate #include
++	
++	From:  <a.othieno at bluewin.ch> (Arthur Othieno)
++	
++	via scripts/checkincludes.pl:
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<trivial at rustcorp.com.au>
++	[PATCH] trivial: kill off CONFIG_PCI_CONSOLE
++	
++	(OK from maintainer  Geert Uytterhoeven <geert at linux-m68k.org>)
++	 From:  a.othieno at bluewin.ch (Arthur Othieno)
++	
++	  AFAICS, CONFIG_PCI_CONSOLE isn't used elsewhere:
++	
++	  hubb at mars:linux-2.6.2$ grep -r PCI_CONSOLE * | grep -v defconfig
++	  drivers/video/console/Kconfig:config PCI_CONSOLE
++	  hubb at mars:linux-2.6.2$
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<apw at shadowen.org>
++	[PATCH] convert uses of ZONE_HIGHMEM to is_highmem
++	
++	As the comments in mmzone.h indicate is_highmem() is designed to reduce the
++	proliferation of the constant ZONE_HIGHMEM.  This patch updates references
++	to ZONE_HIGHMEM to use is_highmem().  None appear to be on critical paths.
++	
++	Signed-off-by: Andy Whitcroft <apw at shadowen.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rddunlap at osdl.org>
++	[PATCH] smbfs compilation warning fix
++	
++	Use %Zd to eliminate a compiler warning in printk.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mika at osdl.org>
++	[PATCH] Remove always false check in mm/slab.c
++	
++	  CC      mm/slab.o
++	mm/slab.c: In function `kmem_cache_create':
++	mm/slab.c:1129: warning: comparison of unsigned expression < 0 is always false
++	
++	This comes from the fact that 'align' is size_t and so unsigned. Just to be
++	sure, I did
++		$ grep __kernel_size_t include/*/posix_types.h
++	and yes, every arch defines that to be unsigned.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mika at osdl.org>
++	[PATCH] Correct return type of hashfn() in fs/dquot.c
++	
++	  CC      fs/dquot.o
++	fs/dquot.c:208: warning: type qualifiers ignored on function return type
++	
++	Once again with extra gcc warnings enabled.  Every user of the function is
++	expecting unsigned value, not int in first place, and I think the const is
++	just misplaced.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mika at osdl.org>
++	[PATCH] Fix misplaced 'inline' in include/linux/iso_fs.h
++	
++	  CC [M]  fs/isofs/namei.o
++	In file included from fs/isofs/namei.c:10:
++	include/linux/iso_fs.h:280: warning: `inline' is not at beginning of declaration
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] pagefault readaround fix
++	
++	Mika Kukkonen <mika at osdl.org> says:
++	
++	  CC      mm/filemap.o
++	mm/filemap.c: In function `filemap_nopage':
++	mm/filemap.c:1161: warning: comparison of unsigned expression < 0 is always false
++	
++	The pagefault readaround code is currently doing purely readahead.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] slab: fix get_user inside spinlock
++	
++	This little debugging __get_user is in fact happening inside a spinlock.  It
++	was never very useful, and has caused problems for some architectures in the
++	past.  Let's just remove it.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<aneesh.kumar at gmail.com>
++	[PATCH] alpha: print the symbol name in Oops
++	
++	Cc: Richard Henderson <rth at twiddle.net>
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pazke at donpac.ru>
++	[PATCH] port ACPI sleep workaround to new DMI probing
++	
++	This patch moves Toshiba ACPI sleep workaround out of dmi_scan.c
++	
++	Signed-off-by: Andrey Panin <pazke at donpac.ru>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pazke at donpac.ru>
++	[PATCH] DMI isn't broken anymore
++	
++	This patch removes dmi_broken global variable which is not used anymore.
++	
++	Signed-off-by: Andrey Panin <pazke at donpac.ru>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pazke at donpac.ru>
++	[PATCH] fix CRC16 misnaming
++	
++	As pointed by Thomas Sailer, crc16.c module contains CRC16-CCITT (x^16 + x^12
++	+ x^5 + 1) implementation, not IBM CRC16 (x^16 + x^15 + x^2 + 1) one.  Looks
++	like we need to rename it accordingly and this patchset does exactly this.
++	
++	Signed-off-by: Andrey Panin <pazke at donpac.ru>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] crc16 kconfig touchups
++	
++	drivers/net/hamradio/Kconfig:116:warning: 'select' used by config symbol 'BAYCOM_SER_FDX' refer to undefined symbol 'CRC16'
++	drivers/net/hamradio/Kconfig:136:warning: 'select' used by config symbol 'BAYCOM_SER_HDX' refer to undefined symbol 'CRC16'
++	drivers/net/hamradio/Kconfig:154:warning: 'select' used by config symbol 'BAYCOM_PAR' refer to undefined symbol 'CRC16'
++	drivers/net/hamradio/Kconfig:169:warning: 'select' used by config symbol 'BAYCOM_EPP' refer to undefined symbol 'CRC16'
++	net/irda/Kconfig:8:warning: 'select' used by config symbol 'IRDA' refer to undefined symbol 'CRC16'
++	drivers/net/Kconfig:1749:warning: 'select' used by config symbol 'VIA_VELOCITY' refer to undefined symbol 'CRC16'
++	drivers/net/Kconfig:2465:warning: 'select' used by config symbol 'PPP_ASYNC' refer to undefined symbol 'CRC16'
++	drivers/isdn/hisax/Kconfig:403:warning: 'select' used by config symbol 'HISAX_ST5481' refer to undefined symbol 'CRC16'
++	drivers/isdn/hisax/Kconfig:7:warning: 'select' used by config symbol 'ISDN_DRV_HISAX' refer to undefined symbol 'CRC16'
++	drivers/isdn/tpam/Kconfig:7:warning: 'select' used by config symbol 'ISDN_DRV_TPAM' refer to undefined symbol 'CRC16'
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pazke at donpac.ru>
++	[PATCH] CRC16 renaming in AX25 drivers
++	
++	Signed-off-by: Andrey Panin <pazke at donpac.ru>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pazke at donpac.ru>
++	[PATCH] CRC16 renaming in IRDA drivers
++	
++	Signed-off-by: Andrey Panin <pazke at donpac.ru>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pazke at donpac.ru>
++	[PATCH] CRC16 renaming in ISDN drivers
++	
++	Signed-off-by: Andrey Panin <pazke at donpac.ru>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pazke at donpac.ru>
++	[PATCH] CRC16 renaming in PPP driver
++	
++	Signed-off-by: Andrey Panin <pazke at donpac.ru>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<lethal at Linux-SH.ORG>
++	[PATCH] sh64: cpumask cleanup.
++	
++	With the recent cpumask changes, some things ended up being broken on sh64.
++	This fixes them..
++	
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<lethal at Linux-SH.ORG>
++	[PATCH] sh64: Fix init_task.c build.
++	
++	resource.h was falling a bit behind, so we use the asm-sh version instead.
++	This exposed another compile issue with init_task.c, which in turn needed
++	linux/mqueue.h.
++	
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<lethal at Linux-SH.ORG>
++	[PATCH] sh64: Add asm-sh64/setup.h
++	
++	With the recent changes to init/main.c, we need an asm-sh64/setup.h.  This
++	pulls out the definitions from arch/sh64/kernel/setup.c and moves them to
++	setup.h instead.
++	
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<lethal at Linux-SH.ORG>
++	[PATCH] sh64: defconfig update.
++	
++	This just updates the defconfig against current BK.
++	
++	Signed-off-by: Paul Mundt <lethal at linux-sh.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<hugh at veritas.com>
++	[PATCH] tmpfs: scheduling-while-atomic fix
++	
++	Nick has tracked scheduling-while-atomic errors to shmem's fragile kmap
++	avoidance: the root error appears to lie deeper, but rework that fragility.
++	Plus I've been indicted for war crimes at the end of shmem_swp_entry: my
++	apologia scorned, so now hide the evidence.
++	
++	Signed-off-by: Hugh Dickins <hugh at veritas.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pluto at pld-linux.org>
++	[PATCH] ad1889 warning fix
++	
++	  CC [M]  sound/oss/ad1889.o
++	          sound/oss/ad1889.c: In function `ad1889_ac97_init':
++	          sound/oss/ad1889.c:854: warning: comparison is always false
++	                                  due to limited range of data type
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<andrea at suse.de>
++	[PATCH] writepage fs corruption fix
++	
++	Fix a data loss bug in mpage_writepages(), triggerable under extreme memory
++	pressure on ext2, JFS, hfs and hfsplus:
++	
++	The bug is the marking of the bh clean despite we could still run into the
++	"confused" path.  After that the confused path really becomes confused and it
++	writes nothing and fs corruption triggers silenty (the reugular writepage only
++	writes bh that are marked dirty, it never attempts to submit_bh anything
++	marked clean).  The mpage-writepage code must never mark the bh clean as far
++	as it wants to still fallback in the regular writepage which depends on the bh
++	to be dirty (i.e.  the "goto confused" path).  This could only triggers with
++	memory pressure (it also needs buffer_heads_over_limit == 0, and that is
++	frequent under mm pressure).
++	
++	Thanks a lot to Chris for his fine debugging that localized the problem in the
++	writepage code.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<andrea at suse.de>
++	[PATCH] __block_write_full_page() comment fixups
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<andrea at suse.de>
++	[PATCH] mpage_writepages() i_size reading fix
++	
++	I believe reading the i_size from memory multiple times can generate fs
++	corruption.  The "offset" and the "end_index" were not coherent.  this is
++	writepages and it runs w/o the i_sem, so the i_size can change from under
++	us anytime.  If a parallel write happens while writepages run, the i_size
++	could advance from 4095 to 4100.  With the current 2.6 code that could
++	translate in end_index = 0 and offset = 4.  That's broken because end_index
++	and offset could be not coherent.  Either end_index=1 and offset =4, or
++	end_index = 0 and offset = 4095.  When they lose coherency the memset can
++	zeroout actual data.  The below patch fixes that (it's at least a
++	theoretical bug).
++	
++	I don't really expect this tiny race to fix the bug in practice after the
++	more serious bugs we covered yesterday didn't fix it (more likely the
++	compiler will get involved into the equation soon ;).
++	
++	This is also an optimization for 32bit archs that needs special locking to
++	read 64bit i_size coherenty.
++	
++	This patch also arranges for mpage_writepages() to always zero out the file's
++	final page between i_size and the end of the file's final block.  This is a
++	best-effort correctness thing to deal with errant applications which write
++	into the mmapped page beyond the underlying file's EOF.
++	
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<schwidefsky at de.ibm.com>
++	[PATCH] s390: signals & exceptions
++	
++	From: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	From: Ulrich Weigand <uweigand at de.ibm.com>
++	
++	s390 core changes:
++	 - Add signo between signal frame and the signal return instruction on the
++	   user stack for backtrace over signal handlers.
++	 - Add hfp floating point exceptions.
++	 - Use a single function for region, segment and page translation exceptions.
++	 - Discard SIGTRAP for single stepped instructions if the trapping instruction
++	   is repeated (normal memory faults) or if another signal is delivered anyway.
++	
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<schwidefsky at de.ibm.com>
++	[PATCH] s390: cpu hotplug bugs
++	
++	[PATCH] s390: cpu hotplug bugs.
++	
++	From: Ursula Braun-Krahl <braunu at de.ibm.com>
++	From: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	
++	iucv driver changes:
++	 - Fix iucv declare/retrieve buffer which the cpu hotplug patch has broken.
++	 - Make smp_call_function_on call func(info) in non-smp kernels.
++	 - Use a spinlock to get smp_get_cpu/smp_put_cpu race free.
++	
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bunk at fs.tum.de>
++	[PATCH] fix (UDF_FS=y && NLS=m) compile error
++	
++	The patch below fixes Bugzilla #3030 ((UDF_FS=y && NLS=m) results in a
++	compile error).
++	
++	Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bunk at fs.tum.de>
++	[PATCH] remove outdated ext2 help text parts
++	
++	The patch below solves Bugzilla #3014 by removing much outdated information
++	from the ext2 help text.
++	
++	The help text is now very short, but few correct information is better than
++	outdated information - and if you think it's too short, feel free to send a
++	patch that adds more current information.
++	
++	Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bunk at fs.tum.de>
++	[PATCH] remove drivers/char/h8.{c,h}
++	
++	CONFIG_H8 in drivers/char/ depends in both 2.4 and 2.6 on
++	CONFIG_OBSOLETE which is never enabled.
++	
++	To remove this driver, the following is required additionally to the 
++	patch below:
++	  rm drivers/char/h8.c
++	  rm drivers/char/h8.h
++	
++	This patch was already ACK'ed by Richard Henderson.
++	
++	Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bunk at fs.tum.de>
++	[PATCH] kill IKCONFIG_VERSION
++	
++	The patch below (already ACK'ed by Randy Dunlap) kills the unused
++	IKCONFIG_VERSION from kernel/configs.c .
++	
++	This patch is based on a previous patch by Anton Blanchard and an idea of
++	Bartlomiej Zolnierkiewicz.  (I hope I haven't forgotten anyone who contributed
++	to this patch.  ;-) )
++	
++	Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<torvalds at ppc970.osdl.org>
++	ppc64: export the user copy functions.
++	
++	When Anton uninlined them, he didn't remember to export them
++	to modules..
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: removal of iovec use in mtd
++	
++	mtd, jffs and jffs2 switched from iovec to kvec
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: NULL noise is mtd
++	
++	0->NULL conversions in mtd
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: NULL noise in jffs
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: NULL noise in jfs
++
++<torvalds at ppc970.osdl.org>
++	Linux 2.6.8-rc1
++
++<torvalds at ppc970.osdl.org>
++	Remove obsoleted drivers/char/h8.c drivers/char/h8.h.
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] ohci-omap does not need asm/mach-types.h
++
++<stevef at smfhome.smfdom>
++	clean up NULL vs. 0 warnings generated by sparse tool
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Add CMT register defines.
++
++<bunk at fs.tum.de>
++	[IPV4]: Remove no longer available URL.
++	
++	This patch solves Bugzilla #2445 by removing a no longer available URL 
++	from the help text for NET_IPIP.
++	
++	Noted by Nils Hammar <m4341 at bedug.com>.
++	
++	Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<akpm at osdl.org>
++	[SPARSE]: Fix warnings in net/sctp/
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<gandalf at netfilter.org>
++	[NETFILTER]: Add timestamping to ipt_ULOG
++	
++	After Andi's timestamp optimizations we don't have any timestamps on the
++	packets unless someone requested them. Here's a patch for 2.6 to
++	explicitly timestamp the packets before we log them.
++	
++	Harald approved it some time ago, he's pretty busy so I'm sending it
++	instead.
++	
++	Signed-off-by: Martin Josefsson <gandalf at netfilter.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<torvalds at ppc970.osdl.org>
++	x86: fix stackframe ownership confusion in sys_sigaltstack()
++	
++	gcc doesn't understand that "asmlinkage" routines have the
++	argument stack owned by the assembly-language caller, and the
++	recent sparse cleanup made gcc think it owns enough stack
++	frame space to make a tailcall by overwriting "struct pt_regs"
++	that is set up by the low-level system call code.
++	
++	Hide that problem again.
++	
++	The real fix would be to tell gcc that the caller owns the
++	stack frame that it set up, but we don't have any such
++	interfaces, so for now the best we can do is to hide it.
++
++<wesolows at foobazco.org>
++	[SPARC32]: Don't allow the kernel to read PAGE_NONE pages.
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Update defconfig.
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: NULL noise in fs/reiserfs
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: misc NULL noise in fs/*
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: aacraid annotation
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: megaraid inline fixes
++	
++		inlined functions moved, a couple of heavy-weight ones (issue_scb()
++	and meg_cmd_done()) uninlined.
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: megaraid annotation
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: NULL noise in drivers/isdn
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: misc NULL noise in drivers/*
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: ISDN ->readstat() and ->writecmd() annotation
++	
++		->readstat() and ->writecmd() are always getting a userland pointer;
++	marked argument as such, killed "user" flag, killed dead code.
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: blind dereference of userland pointers in divasproc
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: drivers/isdn/* annotation
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: dvb_ringbuffer_pkt_write()/dvb_ringbuffer_write() annotation
++	
++	copy_from_user() moved from dvb_ringbuffer_{write,pkt_write}() to callers;
++	these functions are always getting kernel pointer now.  "usermem" argument
++	killed, code annotated.
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: blind dereference of userland pointers in ac7110
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: drivers/media/* annotation
++
++<shaggy at austin.ibm.com>
++	JFS: Add d_hash and d_compare operations for case-insensitive names
++	
++	JFS supports OS/2-compatibility with case-insensitive file names.
++	To avoid multiple dentries for these names, jfs needs to provide
++	the d_hash and d_compare dentry_operations.  The operations are
++	only used when the volume was created in OS/2 or with the -O flag.
++
++<kaos at sgi.com>
++	[PATCH] ia64: build fixes for IA64_MCA_DEBUG_INFO
++	
++	Make mca.c build again with debug enabled.
++	
++	Signed-off-by: Keith Owens <kaos at sgi.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<steiner at sgi.com>
++	[PATCH] ia64: Reduce TLB flushing during process migration
++	
++	This patch adds an architecture-specific callout after explicit
++	processor migrations.  The callout allows architectures (or platforms)
++	to update TLB specific information (ex., cpu_vm_mask).
++	
++	Signed-off-by: Jack Steiner <steiner at sgi.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<jelenz at edu.rmk.(none)>
++	[ARM PATCH] 1958/1: make collie use INIT_MACHINE
++	
++	Patch from John Lenz
++	
++	make collie use the new INIT_MACHINE macro instead of arch_initcall.
++
++<ben-linux at org.rmk.(none)>
++	[ARM PATCH] 1961/1: S3C2410 - fix for UART FIFO size calculation
++	
++	Patch from Ben Dooks
++	
++	Fixes calculation of how many bytes in the RX/TX FIFOs.
++	
++	Previous code failed to check wether the full flags 
++	where set before returning the byte counter. This
++	should ensure that the serial driver behaves correctly
++	when the FIFO fills, and not just ignore the input
++	data
++
++<ben-linux at org.rmk.(none)>
++	[ARM PATCH] 1962/1: S3C2410 - Rename MACH_VR1000 to Thorcom-VR1000
++	
++	Patch from Ben Dooks
++	
++	Place correct machine name for VR1000 in machine
++	support file.
++
++<stevef at smfhome1.smfdom>
++	Set Type field when creating block/char/pipe e.g. via mknod.  
++	Fixing problem mentioned by Jeremy Allison
++	
++	remove spurious warning message logged on mount with credentials file (pointed 
++	out by Richard Hughes)
++	
++	Signed-off-by: Steve French (sfrench at us.ibm.com)
++
++<stevef at smfhome.smfdom>
++	Set DevMajor/DevMinor when querying info on remote char/block devices
++	
++	Signed-off-by: Steve French (sfrench at us.ibm.com)
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: switching afs to kvec
++	
++	 - afs and rxrpc switched to kvec; definition of kvec moved to uio.h (duh).
++	 - afs/mntpt.c got missing cast added.
++	
++	at that point afs is sparse-clean and rxrpc has only one remaining warning
++	(setsockopt from local variable, protected by set_fs()).
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: VIDIOCSWIN compat_ioctl fixes
++	
++	In handling of VIDIOCSWIN for 32bit on 64bit platforms:
++		* switched to compat_alloc_user_space()
++		* fixed memory corruption in copying arguments from userland
++		* fixed arithmetic overflows
++		* added missing checks for get_user() results
++		  and corresponding returns with -EFAULT.
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: usb ioctl cleanups
++	
++		usb ioctls in compat_ioctl.c switched to compat_alloc_user_space()
++	and cleaned up; ioctl structures annotated.
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: isdn compile fix for platforms with HZ > 1000
++	
++		Division by zero is an ugly thing...  We are safe wrt overflows,
++	since the maximal value we ever pass is 10000 - not enough to overflow
++	unless you've got a platform with HZ > 200000.
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: saa fix
++	
++	direct write to userland pointer.
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: compile fix for rrunner on big-endian platforms
++	
++	bitrot strikes again...
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: tms380tr.c fix
++	
++		tms380tr is used both by ISA and PCI drivers.  Enabling/disabling
++	DMA is done only for ISA ones (it's protected by if (dev->dma > 0) and
++	PCI ones leave it 0), but it's compiled unconditionally.  Which breaks
++	on platforms that don't have that ISA crap at all, but support PCI just
++	fine.  Code in question placed under ifdef CONFIG_ISA.
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: NULL noise removal in drivers/sbus
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: drivers/sbus fixes
++	
++		a) vfc is not 64bit-clean, marked as such in Kconfig
++		b) aurora is simply broken - still uses tqueues.  Marked as broken.
++		c) vfc does dereferencing of userland pointer, right after having
++	carefully copied the data to kernel space ;-)  Fixed.
++		d) vfc ->mmap() had missed prototype change.  Fixed.
++		e) BPP ioctls are misdeclared - they should've been _IO(...) instead
++	of _IOR(..., void).  Too late to fix, but we can at least make them
++	_IOR(..., char) - same value, but doesn't try to find sizeof(void).
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: drivers/sbus annotation
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: alpha NULL noise removal
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: alpha sparse infrastructure
++	
++		* added usual CHECK assignment in Makefile
++		* switched uaccess.h to __check_uptr()
++		* added L on long constants (ones missed earlier)
++		* added __user in osf_sys.c (duh - I've added __user to cast in
++	the initializer, but forgot to add it in declaration)
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: alpha topology.h compile fix
++	
++		Missing bits of cpumask_t conversion
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: signal annotation
++	
++		ss_sp in struct sigaltstack made __user
++		->si_addr and ->sival_ptr made __user
++		your ->sa_restorer and ->sa_handler changes propagated
++		users of these guys annotated on i386/amd64/alpha/sparc/sparc64
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: arch/* NULL noise removal
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: ipc compat annotations and cleanups
++	
++		ipc compat code switched to compat_alloc_user_space() and annotated.
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: gemtek ioctl fix
++	
++		Dumb Typo(tm) - the first bug caught by 0/NULL checks (arg is
++	really a kernel pointer there, so memset() is actually OK - results
++	will be copied to userland by caller.  Or would be, if we would not
++	oops  ;-)
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: drivers/media NULL noise removal
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: drivers/net partial NULL noise removal
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: drivers/usb NULL noise removal
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: net/* NULL noise removal
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: assorted drivers/* NULL noise removal
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: more fs/* NULL noise removal
++	
++	(partially based on patch from Mika Kukkonen)
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] __vfs_follow_link() made inline again
++	
++	__vfs_follow_link() really should be inline; that's a special case since
++	we are in the middle of recursion and really want to conserve stack
++	space.  Moved before the first use, made inline again.
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] compat_fillonedir() warning fix
++	
++		access_ok() expects a pointer, not unsigned long.  It's not a
++	problem on platforms that have this guy done as a macro (or ones that
++	do not use fs/compat.c at all), but that's still wrong and on some
++	platforms that care we actually have access_ok() as inlined function.
++	Bogus cast removed.
++
++<torvalds at ppc970.osdl.org>
++	ppc64: fix up si_addr usage
++	
++	Al's last changes mean that it is now annotated as a user
++	pointer, and we want to avoid warnings.
++
++<eger at havoc.gtf.org>
++	[PATCH] pmac_zilog: initialize port spinlock on all init paths
++	
++	pmac_zilog: initialize the serial ports' spinlocks even if console over 
++	   serial is not enabled; disable this driver by default for ppc
++	
++	This lock not being initialized was Oopsing my TiBook :-P
++	
++	Signed-off-by: David Eger <eger at havoc.gtf.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<petri.koistinen at iki.fi>
++	[PATCH] Fix 3c59x.c uses of plain integer as NULL pointer
++	
++	This patch will fix 3Com "Vortex" and "Boomerang" ethernet driver sparse
++	warnings about using plain integer as NULL pointer.
++	
++	Signed-off-by: Petri T. Koistinen <petri.koistinen at iki.fi>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<hch at lst.de>
++	[PATCH] small style fixups for the new automount code
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bunk at fs.tum.de>
++	[PATCH] #ifndef guard percpu_counter.h and blockgroup_lock.h
++	
++	Insert header guards to allow possible multiple inclusion for
++	include/linux/percpu_counter.h and include/linux/blockgroup_lock.h
++	
++	Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bunk at fs.tum.de>
++	[PATCH] floppy.c: remove superfluous variable initialization
++	
++	From: Kam Leo <A1tmblwd at netscape.net>
++	
++	Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pluto at pld-linux.org>
++	[PATCH] `unknown symbol' in sound/oss/kahlua.ko needs unknown symbol udelay
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] remove struct_cpy()
++	
++	Only two architectures implement it, so afs broke the build.
++	
++	Remove struct_cpy() altogether, and use structure assignments.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<hirofumi at mail.parknet.co.jp>
++	[PATCH] autoselect FAT_FS in config
++	
++	Signed-off-by: OGAWA Hirofumi <hirofumi at mail.parknet.co.jp>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<hunold at convergence.de>
++	[PATCH] fix saa7146 compilation
++	
++	From: Colin Leroy <colin at colino.net>
++	
++	This patch fixes a compilation error on 2.6.8-rc1.  Here's the error:
++	drivers/media/common/saa7146_video.c:3: conflicting types for `memory'
++	include/asm-m68k/setup.h:365: previous declaration of `memory' make[3]: ***
++	[drivers/media/common/saa7146_video.o] Error 1
++	
++	Signed-off-by: Colin Leroy <colin at colino.net>
++	Signed-off-by: Michael Hunold <hunold at linuxtv.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<hunold at convergence.de>
++	[PATCH] fix return codes after i2c_add_driver() in tea6415c and tea6420
++	
++	In two of my i2c helper drivers the return value of i2c_add_driver() is
++	ignored.  Thanks to Arthur Othieno for finding these bugs.
++	
++	Signed-off-by: Arthur Othieno <a.othieno at bluewin.ch>
++	Signed-off-by: Michael Hunold <hunold at linuxtv.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bunk at fs.tum.de>
++	[PATCH] remove outdated Stallion contact information
++	
++	The patch below (applies against both 2.4 and 2.6) removes the bouncing 
++	email address from all files and removes the outdated MAINTAINERS entry.
++	
++	Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bjorn.helgaas at hp.com>
++	[PATCH] fix ia64 early_printk build problem
++	
++	Rename PCDP_TABLE_GUID back to HCDP_TABLE_GUID to get the file to compile
++	again.  This change is against current 2.6 BK and is under
++	CONFIG_IA64_EARLY_PRINTK_UART.
++	
++	Signed-off-by: Bjorn Helgaas <bjorn.helgaas at hp.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: read_descriptor_t annotation
++	
++	We have a fun situation with read_descriptor_t - all its instances end
++	up passed to some actor; these actors use desc->buf as their private
++	data; there are 5 of them and they expect resp:
++	
++	        struct lo_read_data *
++	        struct svc_rqst *
++	        struct file *
++	        struct rpc_xprt *
++	        char __user *
++	
++	IOW, there is no type safety whatsoever; the field is essentially untyped,
++	we rely on the fact that actor is chosen by the same code that sets ->buf
++	and expect it to put something of the right type there.
++	
++	Right now desc->buf is declared as char __user *.  Moreover, the last
++	argument of ->sendfile() (what should be stored in ->buf) is void __user *,
++	even though it's actually _never_ a userland pointer.
++	
++	If nothing else, ->sendfile() should take void * instead; that alone removes
++	a bunch of bogus warnings.  I went further and replaced desc->buf with a
++	union of void * and char __user *.
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: missing cpumask_t bits on sparc
++	
++		(no, it still doesn't fix sparc32-smp - just partial compile
++	fixes ;-/)
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: aout32 sparse fixes for compat
++	
++		this basically repeats the stuff done to fs/binfmt_aout.c for amd64
++	and sparc64 aout32.
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: __forced added to casts in arch-specific code
++	
++		Casts from __user to address-space-agnostic in amd64 and i386
++	made explicit (__force added; in these places we pass userland pointer
++	to arch-specific code that handles kernel and userland pointers the
++	same way).
++		csum_partial_copy_*() annotated properly
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] pointer-to-int done the canonical way
++	
++		Extraction of int from pointer is slightly broken in several places.
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: more drivers/scsi annotations
++	
++		Almost all are trivial, aacraid/linit.c annotations had caught a bug -
++	copy_from_user() where copy_in_user() should've been.
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: a couple of inline fixes in drivers'/scsi
++	
++		Usual "inline used before definition" fixes in nsp32.c and sg.c
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: more drivers/usb/* annotations
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: #if where #ifdef should've been (saa7146)
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: (ipv6/netfilter) initializer fix
++	
++		Missing '=' in C99 initializer
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: sound compat ioctls annotations
++	
++		Trivial annotations + typo fix in _snd_ioctl32_hwdep_dsp_image()
++	(we want to copy 32bit structure from userland, convert it to native one
++	and do normal ioctl on it; see the first changed line below for what's
++	really happening...)
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] mcdx irq handling cleanup
++	
++	mcdx has different IRQ numbers for all drives; irq handler needs a
++	pointer to structure describing the drive in question.  However, instead
++	of passing such pointer at request_irq() time and having it passed to
++	mcdx_intr() for free, mcdx.c sticks the pointer in question into an
++	array indexed by IRQ number and has mcdx_intr() go look it up there. 
++	
++	Cleaned up, array killed.
++
++<jbglaw at lug-owl.de>
++	[PATCH] mconf.c: Honor $LINES and $COLUMNS if TIOCGWINSZ failed
++	
++	While reading code, I found this buglet.  If the TIOCGWINSZ fails,
++	mconf.c assumes 24/80 as screen size, without honoring the LINES and
++	COLUMNS environment variables.  This is the shorter and IMHO more
++	correct version.
++	
++	Signed-off-by: Jan-Benedict Glaw <jbglaw at lug-owl.de>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mika at osdl.org>
++	[PATCH] Fix 'unsigned' < 0 checks
++	
++	Using "-W" found a few places that should probably use signed
++	variables since they can contain (and check for) negative error
++	values.
++
++<proski at gnu.org>
++	[netdrvr pci-skeleton] refresh
++	
++	Here it is.  The patch fixes all compile errors and warnings in
++	pci-skeleton.c.  The "debug" parameter lacks corresponding variable,
++	so I removed it to avoid a warning on module load.  Obsolete
++	pci_power_on() and pci_power_off() have been replaced with the new
++	code using pci_set_power_state(), pci_save_state() and
++	pci_restore_state().  The driver has been tested by compiling it as
++	module and as part of the kernel.
++
++<trivial at rustcorp.com.au>
++	[PATCH] [TRIVIAL 2.6] sk98lin: kill dup include
++	
++	 From:  a.othieno at bluewin.ch (Arthur Othieno)
++
++<jgarzik at pobox.com>
++	[netdrvr dmfe] remove ALi pci id
++	
++	It's tulip driver, and tulip driver performs better than dmfe
++	(yet some distro installers pick this driver to use).
++	
++	Requested by ALi.
++
++<margitsw at t-online.de>
++	[PATCH] prism54 Fix wrong type for BSSID
++	
++	2004-07-12 Margit Schubert-While <margitsw at t-online.de>
++	
++	* The OID type for BSSID was incorrectly set to type SSID.
++	  It should be type RAW. This lead to interesting reporting
++	  by "iwpriv ethX g_bssid".
++	  (Which caused garbage output and possibly an out of bound)
++	
++	* Be ultra-cautious in reporting SSID by changing the "%s"
++	  to "%.*s" and passing the length. (Prompted by the false
++	  type above, whereby length = 0 and a %s on a garbage field)
++
++<akpm at osdl.org>
++	[PATCH] fix airo oops-on-removal
++	
++	From: Bill Nottingham <notting at redhat.com>
++	
++	airo creates /proc/driver/aironet/<device name> on device activation.
++	However, the device can be renamed - then on teardown it tries to remove
++	the wrong directory.  The removal of /proc/driver/aironet then runs afoul
++	of the BUG_ON() in remove_proc_entry.
++	
++	This fixes it by keeping a copy of the name of the directory it created.
++	
++	(It doesn't actually solve the problem of the stats directory still being
++	/proc/driver/aironet/eth0 when you rename the device to, say, 'joe'.  But
++	that patch would be a little less trivial.)
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++
++<mhoffman at lightlink.com>
++	[PATCH] I2C: Remove extra inits from lm78 driver
++	
++	This patch is from the lm_sensors project CVS, from this revision:
++	
++		1.63 (mds) remove initialization of limits by driver
++	
++	It is better to set these limits by a combination of /etc/sensors.conf
++	and 'sensors -s'; "mechanism not policy."  Please apply.
++	
++	Signed-off-by: Mark M. Hoffman <mhoffman at lightlink.com>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<khali at linux-fr.org>
++	[PATCH] I2C: Refine detection of LM75 chips
++	
++	The LM75 detection method was a bit loose so far and would accept
++	non-LM75-compatible chips from times to times. It should be better now.
++	Additionally, the help for the lm75 driver was reworked because we now
++	know that the LM75 and the LM77 are not compatible.
++	
++	
++	Signed-off-by: Jean Delvare <khali at linux-fr dot org>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<anton at samba.org>
++	[PATCH] tg3 bug
++	
++	During receive processing, the tg3 card updates rx_producer (the
++	hardware position in the receive ring) and the opaque cookie. Due to PCI
++	rules the stores happen in order. However the cpu may reorder the reads.
++	
++	In these sort of cases there is usually a data dependency between
++	reading the index and looking up the data (since we use the index to
++	load the data). I think all cpus except alpha guarantee the reads
++	happen in order in this case.
++	
++	However in this particular case we load hw_idx, compare it to sw_idx and
++	then use sw_idx to locate the opaque cookie. There is no data dependency
++	in this case. We need a read memory barrier between the read of
++	rx_producer and the opaque cookie to enforce ordering.
++	
++	Thanks to Olof Johansson, Michael Chan and Broadcom for their assistance
++	in finding this bug.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++
++<jgarzik at pobox.com>
++	[netdrvr tg3] bump version and reldate
++
++<g.liakhovetski at gmx.de>
++	[wireless airo] fix alignment problem (particularly on ARM)
++	
++	Bugzilla #2905
++
++<janiceg at us.ibm.com>
++	[netdrvr acenic] fix RX descriptor memory ordering
++
++<Sergio.Gelato at astro.su.se>
++	[PATCH] libata: fix kunmap() of incorrect page, in PIO data xfer
++	
++	Obvious bug.  Fixes highmem oops.
++
++<jgarzik at pobox.com>
++	[PCI, libata] Fix "combined mode" PCI quirk for ICH6
++	
++	The hardware vendor, in their infinite wisdom, make the combined
++	mode configuration register different between ICH5 and ICH6.
++	
++	Take this into account.
++
++<greg at kroah.com>
++	[PATCH] USB: add 3 Phidget device ids to the HID blacklist.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Add usb_kill_urb()
++	
++	This patch is a slightly revised version of as277c, updated to match the
++	current source.  The only difference from the older version is that this
++	makes urb->use_count into an atomic_t, to avoid the overhead of an extra
++	locking step each time an URB is submitted and given back.  The important
++	features of this patch are:
++	
++		-EPERM added to Documentation/usb/error-codes.txt.
++	
++		Failure to use URB_ASYNC_UNLINK with usb_unlink_urb() is
++		deprecated in the documentation.
++	
++		New ->reject and ->use_count fields added to struct urb.
++		The reject field is protected by urb->lock, and locking is
++		required only in usb_kill_urb() which doesn't have to be fast.
++	
++		Single wait_queue used for all processes waiting inside
++		usb_kill_urb().  The wait queue is woken up only when an URB
++		is given back with ->reject set.
++	
++		usb_rh_status_dequeue() changed to return int.  It looks like
++		this function should be declared static; it's not used outside
++		the hcd.c file.
++	
++		Prototype for unlink_urb() in struct usb_operations is changed
++		to include a status code argument.  This is necessary so that
++		the different unlink paths can return -ENOENT and -ECONNRESET
++		as appropriate.
++	
++		Support for synchronous usb_unlink_urb() has been removed;
++		such calls are passed to usb_kill_urb().
++	
++		Kerneldoc for usb_unlink_urb() is updated.
++	
++		usb_kill_urb() added to urb.c.
++	
++		hc_simple() host driver is partially updated -- it should
++		compile but it won't really work right.
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Make hub driver use usb_kill_urb()
++	
++	This is a rerun of as278, updated to match the current source.  It changes
++	the hub driver, replacing calls to synchronous usb_unlink_urb() with
++	usb_kill_urb() and removing the machinery formerly needed to synchronize
++	the status URB handler with the rest of the driver.
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Don't ask for string descriptor lengths
++	
++	Okay, here's a revised patch (as332b).  This tries first to ask for 255
++	bytes, and if that fails then it asks for the length and the full
++	descriptor.  Hopefully nobody will object to applying this version...
++	
++	You know, it occurs to me that the have_langid field in usb_device could
++	easily be eliminated.  Just set string_langid to -1 during initialization
++	and test for whether or not it is >= 0.  I'll do that some other time.
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Store pointer to usb_device in private hub structure
++	
++	This patch adds a pointer to the hub's usb_device into the usb_hub private
++	structure.  It's a small change, and permits a small amount of
++	simplification in a few spots, i.e., avoid calling interface_to_usbdev().
++	This doesn't really do much in itself, but it's a prerequisite for the
++	next patch.  (A situation arises where we can't use the interface pointer
++	to find the usb_device because the interface might not exist.)
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<greg at kroah.com>
++	[PATCH] USB: fix up the wording in the emi26 firmware file to match the other kernel firmware files.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<greg at kroah.com>
++	[PATCH] USB: more sparse cleanups (all pretty much NULL usages.)
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<olh at suse.de>
++	[PATCH] USB: fix lockup with 2.6 keyspan_pda driver
++	
++	I suggest to put the pointer to port instead of the pointer to the
++	pointer to port to the workqueue data.
++	Did that driver ever work with 2.6?
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<mika at osdl.org>
++	[PATCH] USB: Trivial fix to include/linux/usb.h
++	
++	Hi Greg!
++	
++	I am compiling allmodconfig with some extra gcc warnings enabled
++	(-W -Wno-unused -Wno-sign-compare -Winline -Wundef) and got this one:
++	
++	  CC [M]  security/root_plug.o
++	In file included from security/root_plug.c:30:
++	include/linux/usb.h:358: warning: `inline' is not at beginning of declaration
++	
++	Patch is trivial:
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Fix endianness bug in UHCI driver
++	
++	This patch fixes a byte-swapping error in the UHCI driver.  It has been
++	present since 2.6.6 and only got tracked down just now!  Thanks a lot to
++	Michel Roelofs for all his help and testing.
++	
++	This should be pushed through to Linus in time to appear in 2.6.8, if
++	possible.
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<greg at kroah.com>
++	[PATCH] USB: more sparse fixups that found a real bug in the se401 driver
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<ddstreet at ieee.org>
++	[PATCH] USB: fix usbfs mount options ignored bug
++	
++	Ok here is a patch to make the mount options work.  In addition to
++	implementing the remount function, it removes the parse_options() call
++	from usb_fill_super and adds a "ignore" flag around the mounting that gets
++	done in create_special_files.  The parse_options call in usb_fill_super is
++	removed because it is not needed when remount is implemented.  The
++	ignore_mount flag is needed because the simple_pin_fs function calls
++	remount with no mount options - i.e. it's not a real mount.  So the mount
++	options would be cleared out.  The ignore_mount flag causes the remount
++	function to only act on real mounts.
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<lcapitulino at prefeitura.sp.gov.br>
++	[PATCH] USB: usb/core/file.c::usb_major_init() cleanup.
++	
++	 This patch does a cleanup for usb/core/file.c::usb_major_init(), which
++	 is:
++	
++	*) in error condition, returns the error code from register_chrdev(),
++	   insted returning -EBUSY;
++	
++	*) adds missing audit for class_register();
++	
++	*) only calls devfs_mk_dir() if the prior calls have success.
++	
++	
++	Signed-off-by: Luiz Capitulino <lcapitulino at prefeitura.sp.gov.br>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<stern at rowland.harvard.edu>
++	[PATCH] USB: Allow NULL argument in usb_unlink_urb() and usb_kill_urb()
++	
++	It makes sense for APIs involved in cleanup activities (like kfree()) to
++	accept NULL arguments.  Doing so frees drivers from the responsibility of
++	checking whether each resource was actually acquired before trying to
++	release it.  Accordingly, this patch makes usb_unlink_urb() and
++	usb_kill_urb() accept a NULL pointer (which used to be acceptable until I
++	changed it) and notes explicitly in the kerneldoc that such arguments are
++	permitted.
++	
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<dhollis at davehollis.com>
++	[PATCH] USB: usbnet:ax8817x - use interrupt URB for link detection
++	
++	This patch uses the interrupt URB on the ax8817x for link detection.
++	This allows the driver to notify userspace when link drops/comes back
++	so it can take action such as run dhclient, etc.
++	
++	I was also able to reduce the bind function by using some of the stock
++	mii_xxx calls as well as my own for handling initial link negotiation.
++	
++	Signed-off-by: David Hollis <dhollis at davehollis.com>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<dhollis at davehollis.com>
++	[PATCH] USB: ax8817x_unbind does not free the interrupt URB after unlinking
++	
++	ax8817x_unbind does not free the interrupt URB after unlinking.
++	
++	Noticed that the net->status already has a flag for link so my
++	private structure variable for link was redundant.  Worked around
++	this and was able to kill off the unique ax8817x_get_link() function
++	in the process.
++	
++	Signed-off-by: David Hollis <dhollis at davehollis.com>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: usbnet, Sitecom LN-029
++	
++	ID for another AX8817x based usb2 Ethernet adapter.
++	
++	From:          Tim Chick <Tim.Chick at Conexant.com>
++	Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: misc ohci tweaks
++	
++	Various minor OHCI tweaks;
++	
++	    - Fix osdl bugid=2503 by:
++		* Change needlessly-scarey message (WARN_ON dumps stack)
++		* Tries cleaning up, as if it's just IRQ lossage.
++	
++	    - Force IRQs off when shutting down a controller that was
++	      already stopped ... just in case.
++	
++	    - Allow suspending OHCI during driver initialization, to
++	      support more aggressive power management.
++	
++	    - Fix some misleading/wrong debug messages.
++	
++	Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<greg at kroah.com>
++	USB: oops, revert hub patch that wasn't supposed to make it into this patch series yet.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: usb serial gadget, add omap_udc
++	
++	This lets the serial gadget work with another controller.
++	
++	Tell serial about omap_udc.  This driver still needs updating to
++	use the endpoint autoconfig suppport; like Gadget Zero, it
++	really shouldn't need _any_ hardware-specific #ifdeffery.
++	
++	Signed-off-by:	David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: usb gadgetfs, handle omap_udc
++	
++	Tell gadgetfs about omap_udc.
++	Add some missing __user annotations.
++	
++	Signed-off-by:	David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: usb gadget API updates
++	
++	Gadget API updates, including new features:
++	
++	    -	Adds several new optional calls that can be made to the
++		USB peripheral controller:
++	
++		    * VBUS session reporting, for use mostly by external
++		      transcievers (such as isp1301).  Detection of VBUS
++		      power is the first step in enumeration, and usually
++		      corresponds to a device being plugged into a hub.
++	
++		    * "Soft Connect" feature, wherein the D+ pullup is under
++		      gadget driver control.  This is a second step during
++		      enumeration, which lets the hub see the new device.
++		      (Based on a patch by Alex Sanks <alex at netchip.com>.)
++	
++		    * Control over VBUS current draw.  So for example this is
++		      what a gadget driver uses during SET_CONFIGURATION to
++		      say "it's OK to draw 300 mA from VBUS to recharge".
++	
++	    -	Basic interfaces to support device-side USB OTG.  Feature
++		flags and descriptors are in <linux/usb_ch9.h> already.
++	
++		    * Reports whether the device has a Mini-AB port, so
++		      that OTG support (desriptors etc) is required.
++	
++		    * Reports OTG device feature flags for HNP.  (The OTG
++		      spec requires user interfaces to report this stuff.)
++		      Say if this is a B-Peripheral or an A-Peripheral.
++	
++		    * Says that usb_gadget_wakeup() is how to access SRP,
++		      and usb_gadget_disconnect() is how to access HNP.
++	
++	    -	Minor updates/cleanups to comments (Linux 2.5-->2.6 etc)
++	
++	Currently there's no support for SRP-only OTG devices.
++	
++	Signed-off-by:	David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: usb gadget zero, basic OTG updates
++	
++	This patch teaches "gadget zero" enough about OTG to pass simple USBCV
++	tests, mostly by including OTG descriptors in each configuration.  It
++	tests and reports OTG status, as reported by the USB controller driver.
++	
++	It also adds an option to build gadget zero to act as the designated
++	OTG "HNP Test Device", which exists primarily to trigger HNP.  However,
++	it won't currently request HNP.
++	
++	Includes other minor tweaks:  delete a timer on disconnect, reset
++	the req->zero flag, don't autoresume after disconnect.
++	
++	Signed-off-by:	David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: usb ethernet gadget, minor fixes + basic OTG support
++	
++	Update CDC Ethernet/RNDIS gadget driver to the latest:
++	
++	    -	Basics of OTG support: providing the OTG descriptor
++		in each configuration (as needed).   No HNP yet.
++	
++	    -	Stop issuing partial-packet reads.  There's some hardware that
++		only counts reads in packets, not bytes, so let's not bother.
++		There are still software checks to catch framing gone wild.
++	
++	    -	Fix a small bug that crept in with a memory leak fix: after
++	        RNDIS requests, ep0 responses would use the RNDIS completion
++		handler even for non-RNDIS requests.
++	
++	Signed-off-by:	David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<luca.risolia at studio.unibo.it>
++	[PATCH] Updates for W99[87]CF and new SN9C10[12] driver
++	
++	This single patch contains some updates and cleanups for
++	the W996[87]CF driver and a new experimental V4L2 driver
++	for SONiX SN9C10[12] PC Camera Controllers connected to various
++	image sensors. I have not divided the patch in two logical
++	sub-patches becouse of two independent changes in one common
++	file, KConfigure.
++	
++	More informations about the SN9C10[12] can be found below in the
++	documentation. The driver is marked as "EXPERIMENTAL", meaning
++	that there are no known bugs, but further testing is necessary
++	before considering it stable. This the first driver using the new
++	SBGGR8 video format, which has been recently added to the mainline
++	kernel, so there are no available user application at the moment:
++	this is one more reason why it should be in the kernel now.
++	
++	Changes in W996[87]CF:
++	- remove w9968cf_externaldef.h now that ovcamchip.h is in the kernel;
++	- mark user pointers with __user in a cleaner way to avoid sparse
++	  warnings;
++	- use appropriate exclusive wait macro during open();
++	- replace info(), err(), warn() with dev_info(), dev_err(), dev_warn(),
++	  pr_debug(), pr_info();
++	- replace usb_unlink_urb() + wait_for_completion() with usb_kill_urb();
++	- fix memory offsets for buffers in the chip to be used with generic
++	  image sensors;
++	- 'vppmod_load', 'debug', 'specific_debug' and 'simcams' module
++	  parameters are now writeable by default;
++	- fix possible race conditions between disconnect() and open();
++	- add automatic 'ovcamchip' module loading option with 'ovmod_load'
++	  module parameter;
++	- get rid of deprecated intermodule communication routines and use the
++	  correct module registration/unregistration approach;
++	- remove period at the end of kernel messages;
++	- fix several typos;
++	- use MODULE_VERSION() macro;
++	- other small internal cleanups;
++	- documentation updates.
++	
++	Signed-off-by: Luca Risolia <luca.risolia at studio.unibo.it>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<greg at kroah.com>
++	[PATCH] USB: change all usbserial drivers to use module_param()
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<greg at kroah.com>
++	[PATCH] USB: remove CONFIG_USB_SERIAL_DEBUG
++	
++	This involved reworking the usb_serial_debug_data() function too.
++	Based on a request from SuSE, and numerous user confusions with how
++	to enable this option.  Now that all usb-serial drivers are using
++	module_param() it can be set from the boot command line if the drivers
++	are built into the kernel.
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<greg at kroah.com>
++	[PATCH] USB: sort the order in which the usb-serial drivers get built
++	
++	all other usb drivers get built in alphabetical order, why not these?
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<olh at suse.de>
++	[PATCH] USB: fix SN9C10[12] driver for ia64
++	
++	 On Sun, Jul 11, Luca Risolia wrote:
++	
++	> This single patch contains some updates and cleanups for
++	> the W996[87]CF driver and a new experimental V4L2 driver
++	> for SONiX SN9C10[12] PC Camera Controllers connected to various
++	> image sensors. I have not divided the patch in two logical
++	> sub-patches becouse of two independent changes in one common
++	> file, KConfigure. Since this mailing list refused the patch,
++	> due to its size, I have uploaded it here, as
++	> Documentation/SubmittingPatches suggests:
++	
++	I need this patch for x86_64.
++	
++	
++	  CC [M]  drivers/usb/media/sn9c102_core.o
++	In file included from drivers/usb/media/sn9c102.h:34,
++	                 from drivers/usb/media/sn9c102_core.c:43:
++	include/asm/rwsem.h:55: error: redefinition of `struct rw_semaphore'
++	In file included from drivers/usb/media/sn9c102.h:34,
++	                 from drivers/usb/media/sn9c102_core.c:43:
++	include/asm/rwsem.h:79:1: warning: "__RWSEM_INITIALIZER" redefined
++	In file included from include/linux/rwsem.h:25,
++	                 from include/asm/semaphore.h:43,
++	                 from include/linux/sched.h:18,
++	                 from include/linux/module.h:10,
++	                 from drivers/usb/media/sn9c102_core.c:21:
++	include/linux/rwsem-spinlock.h:49:1: warning: this is the location of the previous definition
++	include/asm/rwsem.h:87: warning: static declaration for `init_rwsem' follows non-static
++	include/asm/rwsem.h:100: warning: `__down_read' declared inline after being called
++	include/asm/rwsem.h:100: warning: static declaration for `__down_read' follows non-static
++	include/asm/rwsem.h:122: warning: `__down_read_trylock' declared inline after being called
++	include/asm/rwsem.h:122: warning: static declaration for `__down_read_trylock' follows non-static
++	include/asm/rwsem.h:146: warning: `__down_write' declared inline after being called
++	include/asm/rwsem.h:146: warning: static declaration for `__down_write' follows non-static
++	include/asm/rwsem.h:171: warning: `__down_write_trylock' declared inline after being called
++	include/asm/rwsem.h:171: warning: static declaration for `__down_write_trylock' follows non-static
++	include/asm/rwsem.h:184: warning: `__up_read' declared inline after being called
++	include/asm/rwsem.h:184: warning: static declaration for `__up_read' follows non-static
++	include/asm/rwsem.h:208: warning: `__up_write' declared inline after being called
++	include/asm/rwsem.h:208: warning: static declaration for `__up_write' follows non-static
++	include/asm/rwsem.h:233: warning: `__downgrade_write' declared inline after being called
++	include/asm/rwsem.h:233: warning: static declaration for `__downgrade_write' follows non-static
++	make[3]: *** [drivers/usb/media/sn9c102_core.o] Error 1
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<frankie at cse.unsw.edu.au>
++	[PATCH] USB: unusual_devs.h update
++	
++	added another device to unusual_devs.h. Its a Sony Clie PEG-675C. Now I
++	can mount the memory stick.
++	
++	cat /proc/bus/usb/devices
++	
++	T:  Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 18 Spd=12  MxCh= 0
++	D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=16 #Cfgs=  1
++	P:  Vendor=054c ProdID=0099 Rev= 1.00
++	S:  Manufacturer=Sony
++	S:  Product=Sony PEG Mass Storage
++	C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  6mA
++	I:  If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=05 Prot=00 Driver=usb-storage
++	E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=1ms
++	E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
++	E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<aj at net-lab.net>
++	[PATCH] USB: usbserial/ipaq update
++	
++	However, attached I provide you a patch against 2.6.7 which should add
++	the ASUS A620 PDA to the ipaq Kernel module.
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<lcapitulino at prefeitura.sp.gov.br>
++	[PATCH] USB: usb/core/hcd.c::usb_init() missing audit.
++	
++	Signed-off-by: Luiz Capitulino <lcapitulino at prefeitura.sp.gov.br>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<abbotti at mev.co.uk>
++	[PATCH] USB: ftdi_sio debug trace for TIOCMSET
++	
++	Someone spotted that ftdi_sio outputs a debug trace for TIOCMGET,
++	but not for TIOCMSET, so this patch adds a debug trace for TIOCMSET
++	too.
++	
++	Signed off by: Ian Abbott <abbotti at mev.co.uk>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<abbotti at mev.co.uk>
++	[PATCH] USB: ftdi_sio VID/PID updates
++	
++	Greg,
++	
++	This patch adds various VID/PIDs to the ftdi_sio driver that I've
++	accumulated from the ftdi-usb-sio-devel mailing list, and one from
++	the 2.4 kernel sources:
++	
++	* Interbiometrics USB I/O boards VID/PIDs from 2.4 kernel (Rudolf
++	  Gugler).
++	* Intrepid Control Systems ValueCAN and NeoVI VID/PIDs from Scott
++	  Wolchok.
++	* Falcom Twist USB GPRS modem VID/PID from Justin Schoeman.
++	* Suunto Sports instrument PID from Panu Kekalainen.
++	
++	Also a few minor clean-ups:
++	
++	* Removed a stray PID macro constant FTDI_GUDEADS_889_PID.
++	* Copied the Inside Accesso VID/PID into the FT232BM ID table so
++	  that the "combined" table is a proper union of the others (unless I've
++	  missed something else).
++	* Added a comment that the OCT US101 is also rebadged as a SIIG Inc.
++	  US2308.
++	
++	Signed-off-by: Ian Abbott <abbotti at mev.co.uk>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: usb host side updates, mostly for suspend
++	
++	This adds some of the infrastructure needed to support some more
++	USB capabilities:
++	
++	 -  CONFIG_USB_SUSPEND, so Linux can put individual devices
++	    into the USB "suspend" state.  They can (sometimes) use
++	    "remote wakeup" to resume the host; or they can each be
++	    resumed by the host.
++	
++	      + New usbcore device selective suspend/resume APIs
++		* Define them, as stubs for now
++		* Call them on the paths sysfs uses (renamed functions)
++	      + HCD support
++		* Define root hub suspend calls; delegate them to HCDs.
++		* OHCI and EHCI can suspend/resume root hubs that way.
++		* Not called yet, until suspend/resume calls exist
++	
++	 -  CONFIG_USB_OTG, which depends on the selective suspend APIs
++	    to allow devices to switch roles (host to peripheral, etc).
++	    This patch just adds a few key flags in usb_bus, needed by
++	    usbcore (during enumeration) and by HCD and OTG controllers
++	    on OTG-capable boards.
++	
++	 -  Related bugfix:  power budgeting is supposed to place a
++	    100mA per port (non-OTG) for bus-powered devices.
++	
++	This patch changes no behavior; later patches will do that,
++	and they'll be smaller because of this.
++	
++	Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<luca.risolia at studio.unibo.it>
++	[PATCH] USB: W99[87]CF fix
++	
++	Signed-off-by: Luca Risolia <luca.risolia at studio.unibo.it>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<david-b at pacbell.net>
++	[PATCH] USB: usb hub, don't check speed before reset
++	
++	Signaling (even D- vs D+ pullup) may not be stable
++	for a while.
++	
++	At least one OTG root hub won't reliably (<10%) report device speed until
++	after reset (and the OTG state transitions have quiesced for a while).
++	
++	This patch makes that not matter.
++	
++	Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<bunk at fs.tum.de>
++	[PATCH] USB:  USB w9968cf compile error
++	
++	On Tue, Jul 13, 2004 at 06:25:59PM -0700, Andrew Morton wrote:
++	>...
++	> All 252 patches:
++	>...
++	> bk-usb.patch
++	>...
++	
++	This patch marks w9968cf_valid_depth as inline, although it's used
++	before it's defined.
++	
++	gcc 3.4 therefore correctly fails with:
++	
++	<--  snip  -->
++	
++	...
++	  CC      drivers/usb/media/w9968cf.o
++	drivers/usb/media/w9968cf.c: In function `w9968cf_set_picture':
++	drivers/usb/media/w9968cf.c:487: sorry, unimplemented: inlining failed
++	in call to 'w9968cf_valid_depth': function body not available
++	drivers/usb/media/w9968cf.c:1722: sorry, unimplemented: called from here
++	make[3]: *** [drivers/usb/media/w9968cf.o] Error 1
++	
++	<--  snip  -->
++	
++	
++	This patch moves w9968cf_valid_depth above it's first user (it also uses
++	two other functions to keep the ordering of functions a bit more
++	consistent).
++	
++	
++	
++	Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<orange at fobie.net>
++	[PATCH] I2C: patch quirks.c - SMBus hidden on hp laptop
++	
++	This patch unhides the SMBus on the hp nc8000 and nc6000 laptops. The
++	patch has been co-written by Jean Delvare and Rudolf Marek. I've only
++	tested this on nc8000, but it should work for the nc6000 too.
++	
++	Unfortunatley, we had to little information to fix the problem described
++	in the reported bug below, as is probably the same problem. But if we're
++	very lucky it might solve it too.
++	http://bugzilla.kernel.org/show_bug.cgi?id=2976
++	
++	
++	Signed-off-by: Örjan Persson <orange at fobie.net>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<dtor_core at ameritech.net>
++	[PATCH] Driver core: Fix OOPS in device_platform_unregister
++	
++	Driver core: platform_device_unregister should release resources first
++	             and only then call device_unregister, otherwise if there
++	             are no more references to the device it will be freed and
++	             the fucntion will try to access freed memory.
++	
++	Signed-off-by: Dmitry Torokhov <dtor at mail.ru>
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<mika at osdl.org>
++	[PATCH] Upgrade security/root_plug.c to new module parameter syntax
++	
++	Hi again,
++	
++	Still doing my compile, and got this:
++	
++	 CC [M]  security/root_plug.o
++	security/root_plug.c:39: warning: missing initializer
++	security/root_plug.c:39: warning: (near initialization for `__parm_vendor_id.addr')
++	security/root_plug.c:42: warning: missing initializer
++	security/root_plug.c:42: warning: (near initialization for `__parm_product_id.addr')
++	security/root_plug.c:48: warning: missing initializer
++	security/root_plug.c:48: warning: (near initialization for `__parm_debug.addr')
++	
++	Simply upgrading root_plug to use the new module parameter syntax seemed to do
++	the trick. I made the debug writable, the others just readable to root.
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<olh at suse.de>
++	[PATCH] add removeable sysfs block device attribute
++	
++	This patch adds a /block/*/removeable sysfs attribute. A value of 1
++	indicates the media can change anytime. This is a hint for userland
++	to poll such devices for possible media changes, and leave all others alone.
++	There is currently no way to see if a connected usb-storage device is a
++	disk or a card reader. It will also show 1 for CD and ZIP drives.
++	
++	It was done by Patrick Mansfield a while ago. I can probably not
++	sigh-off his work. ;)
++	
++	
++	Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
++
++<kaos at sgi.com>
++	[PATCH] ia64: Extend oem section types for SN mca records
++	
++	SN mca records now contain oem data for platform memory errors.
++	
++	Signed-off-by: Keith Owens <kaos at sgi.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: PIO-out fixes for ide-taskfile.c (CONFIG_IDE_TASKFILE_IO=n)
++	
++	 - in task_out_intr() fix off-by-1 bug and (stat & DRQ_STAT) check,
++	   previously "if" was always true for rq->current_nr_sectors == 1
++	 - fail request if DRQ_STAT is not set and rq->current_nr_sectors != 0
++	   (instead of setting handler and waiting for the next IRQ) or if DRQ_STAT
++	   is set but !rq->current_nr_sectors (in task_mulout_intr() this was OK)
++	 - in task_mulout_intr() check also DRIVE_READY and WRERR_STAT status bits
++	
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: PIO-out ->prehandler() fixes (CONFIG_IDE_TASKFILE_IO=y)
++	
++	Setup handler and output first data block directly from ->prehandler()
++	instead of calling ->handler().  The only change in functionality is that
++	we no longer check DRIVE_READY status bits (there is no need to do it).
++	
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: PIO-out error handling fixes (CONFIG_IDE_TASKFILE_IO=y)
++	
++	We shouldn't ever get into ->handler() if drive is busy so
++	just call ->error() unconditionally if status check fails.
++	
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: remove BUSY check from task_in_intr() (CONFIG_IDE_TASKFILE_IO=n)
++	
++	We shouldn't ever get there if drive is busy and we can't start transfer
++	in this case.  ide-disk.c:read_intr() also doesn't check for BUSY_STAT bit.
++	
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] remove pre_task_out_intr() comment (CONFIG_IDE_TASKFILE_IO=n)
++	
++	disable_irq_nosync() in ide-io.c:ide_do_request() protects
++	pre_task_out_intr() from racing with the task_out_intr().
++	
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: pre_task_mulout_intr() cleanup (CONFIG_IDE_TASKFILE_IO=n)
++	
++	drive_is_ready() reads STATUS register if CONFIG_IDEPCI_SHARE_IRQ is not
++	defined and ALTSTATUS register if it is defined.  Therefore drive_is_ready()
++	in pre_task_mulout_intr() only makes sense if we can't trust STATUS register
++	(because we call ide_wait_stat() which reads STATUS register earlier).
++	
++	Remove this "workaround" for now as it is not present in ide-disk.c
++	and whole multi PIO-out code (CONFIG_IDE_TASKFILE_IO=n) was buggy before.
++	
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: no partial completions for PIO (CONFIG_IDE_TASKFILE_IO=y)
++	
++	Don't do partial completions but instead acknowledge already transferred
++	sectors with verified good status on error.  This allows us to complete
++	"good" sectors to block layer even if bio they belong to wasn't finished
++	and simplifies code.
++	
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: merge CONFIG_IDE_TASKFILE_IO=y|n PIO handlers together
++	
++	This fixes a couple of CONFIG_IDE_TASKFILE_IO=n issues:
++	 - check status after last sector for PIO-in transfers
++	 - handle drive->unmask properly in PIO-out prehandlers
++	 - use rq->[hard]_nr_sectors where appropriate
++	
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<B.Zolnierkiewicz at elka.pw.edu.pl>
++	[PATCH] ide: use "normal" handlers for "flagged" taskfiles (ide-taskfile.c)
++	
++	This fixes following issues for PIO-in:
++	 - shared PCI IRQs handling
++	 - fail request if the last status is bad
++	and PIO-out:
++	 - set hwgroup->handler/timer in prehandlers
++	 - handle drive->unmask in prehandlers
++	 - check for !rq->nr_sectors and DRQ_STAT bit set
++	 - use drive->bad_wstat instead of BAD_W_STAT
++	
++	Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier at elka.pw.edu.pl>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<axboe at suse.de>
++	[PATCH] CFQ: allocation under lock, missing memset on allocation
++	
++	This fixes two issues in the CFQ IO-scheduler:
++	
++	o Still a bad allocation under the queue lock
++	o We need to clear crq after mempool_alloc(), otherwise the rbtree
++	  pointers can contain garbage if slab poisoning is enabled. This causes
++	  crashes on front/back merges because rb_next() returns crap.
++	
++	Signed-off-by: Jens Axboe <axboe at suse.de>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<dwmw2 at shinybook.infradead.org>
++	NAND flash driver updates.
++	
++	Update the core NAND code:
++	 - support multiple chips
++	 - support bad block tables
++	 - improved generic ECC support and 'spare area' usage.
++	 - 16-bit NAND
++	 - Large-block NAND devices
++	 - Renesas AG-AND devices
++	 - M-Systems DiskOnChip devices
++	 - Other new board support wrappers
++	
++	Most of the work was done by Thomas Gleixner.
++	
++	Signed-Off-By: David Woodhouse <dwmw2 at infradead.org>
++
++<dwmw2 at shinybook.infradead.org>
++	JFFS2 file system update
++	
++	 - Improved support for NAND flash
++	 - More generic compression support, allowing for extra compressors
++	 - Fix potential deadlock with kupdated
++
++<dwmw2 at shinybook.infradead.org>
++	MTD core include and device code cleanup
++	
++	 - Move user-visible bits from headers to include/mtd/ directory.
++	 - Update old DiskOnChip drivers for newer hardware.
++	 - Switch NFTL and INFTL support to work with new DiskOnChip/NAND code.
++	 - New phram driver, reimplenting the ugly slram driver.
++	 - Bug fixes in partitioning code
++
++<dwmw2 at shinybook.infradead.org>
++	NOR flash drivers update
++	
++	 - Handle cached access to flash chips on supporting platforms
++	 - Handle arrangements of chips larger than a single bus width
++	 - Clean up the AMD/Fujitsu chip driver
++	 - Update board 'mapping' drivers to match
++	 - New mapping drivers for new platforms.
++
++<josha at sgi.com>
++	[PATCH] ia64: fix obsolete and now misleading comment
++	
++	Signed-off-by: Josh Aas <josha at sgi.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<rth at kanga.twiddle.home>
++	[ALPHA] Pass pt_regs as pointer to execve and sigprocmask syscalls.
++
++<hugh at veritas.com>
++	[PATCH] tmpfs preempt count panic
++	
++	Just unearthed another of my warcrimes: reading a 17-page sparse file,
++	I mean holey file, hits the in_interrupt panic in do_exit on a current
++	highmem kernel (but 2.6.7 is okay).  Fix mismatched preempt count from
++	shmem_swp_alloc's swapindex hole case by mapping an empty_zero_page.
++	
++	Signed-off-by: Hugh Dickins <hugh at veritas.com>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<dwmw2 at shinybook.infradead.org>
++	WindRiver SBC8560: Set all internal IRQs level-triggered.
++
++<dwmw2 at shinybook.infradead.org>
++	Fix UART detection on WindRiver SBC8560
++	
++	The UART is detected as a ST16650V2 but its FIFO doesn't behave nicely.
++	Disable autoprobe and hard-code it to be a ST16650 instead.
++
++<dwmw2 at shinybook.infradead.org>
++	Fix UART initialisation on WindRiver SBC8560.
++	
++	The UART tristates its IRQ output when the OUT2 bit in the MCR isn't
++	set. For reasons not known to civilised man, the hardware engineers
++	stopped it from floating by pulling it _high_ instead of low, so if
++	anybody requests that IRQ before OUT2 is turned on, we die in an IRQ
++	storm. The serial8250 driver does precisely that thing, with precisely
++	that effect.
++	
++	ALPHA_KLUDGE_MCR was designed to fix exactly this kind of problem, so we
++	use it here as intended. Ideally ALPHA_KLUDGE_MCR would go away and be
++	replaced with something like UPF_FORCE_OUT2 and UPF_FORCE_OUT1 flags,
++	but now is not the time to get me started on a cleanup of everything
++	about serial8250 that offends me.
++
++<dhowells at redhat.com>
++	PPC openpic driver cpumask_t changes
++	
++	Fix the PPC openpic driver to use cpumask_t where appropriate.
++
++<galak at blarg.somerset.sps.mot.com>
++	ppc32: reworked cpm alloc functions
++	
++	* Unified function names between CPM1 & CPM2
++	* changed rheap to use ERR_PTR
++	* fixed drivers to use new functions and names
++	
++
++<galak at blarg.somerset.sps.mot.com>
++	ppc32: reworked CPM uart driver to work for properly for all CPMs
++
++<dsaxena at plexity.net>
++	[ARM] Export ixp42xx_pci_read/write so PCI driver modules load
++	
++	Originally found by Thomas Winkler <winkler at iti.tu-graz.ac.at>
++	
++	Signed-off-by: Deepak Saxena <dsaxena at plexity.net>
++
++<dwmw2 at redhat.com>
++	[PATCH] ppc32: Fix UART detection on WindRiver SBC8560
++	
++	The UART is detected as a ST16650V2 but its FIFO doesn't behave nicely.
++	Disable autoprobe and hard-code it to be a ST16650 instead.
++
++<dwmw2 at redhat.com>
++	[PATCH] ppc32: Fix UART initialisation on WindRiver SBC8560.
++	
++	The UART tristates its IRQ output when the OUT2 bit in the MCR isn't
++	set. For reasons not known to civilised man, the hardware engineers
++	stopped it from floating by pulling it _high_ instead of low, so if
++	anybody requests that IRQ before OUT2 is turned on, we die in an IRQ
++	storm. The serial8250 driver does precisely that thing, with precisely
++	that effect.
++	
++	ALPHA_KLUDGE_MCR was designed to fix exactly this kind of problem, so we
++	use it here as intended. Ideally ALPHA_KLUDGE_MCR would go away and be
++	replaced with something like UPF_FORCE_OUT2 and UPF_FORCE_OUT1 flags,
++	but now is not the time to get me started on a cleanup of everything
++	about serial8250 that offends me.
++
++<dwmw2 at infradead.org>
++	[PATCH] ppc32: Fix IRQ setup on WindRiver SBC8560
++	
++	The internal interrupts are hardcoded to be level-triggered, but we need
++	to make sure the OpenPIC code knows that...
++
++<dhowells at redhat.com>
++	[PATCH] ppc32: openpic driver cpumask_t changes
++	
++	This fixes the PPC openpic driver to use cpumask_t where appropriate.
++	
++	Signed-Off-By: David Howells <dhowells at redhat.com>
++	Signed-Off-By: Linus Torvalds <torvalds at osdl.org>
++
++<marcel at holtmann.org>
++	[Bluetooth] Add support for another ALPS module
++	
++	This patch adds the specific vendor and product id's for another
++	ALPS module which don't uses the USB Bluetooth class id.
++	
++	Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
++
++<marcel at holtmann.org>
++	[Bluetooth] Make use of usb_kill_urb()
++	
++	Now that usb_kill_urb() is in the main kernel tree it should
++	be used. This patch makes the needed modifications to the USB
++	Bluetooth driver.
++	
++	Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
++	Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
++
++<marcel at holtmann.org>
++	[Bluetooth] Add missing entry for the HIDP support
++	
++	This small patch adds the missing entry about the HIDP support
++	to the main Kconfig file of the Bluetooth subsystem.
++	
++	Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
++
++<marcel at holtmann.org>
++	[Bluetooth] Use a signed integer for the RSSI value
++	
++	The RSSI value in the inquiry response with RSSI must be a signed
++	integer and not an unsigned one.
++	
++	Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
++
++<dwmw2 at shinybook.infradead.org>
++	Remove /proc/fs/jffs2 support.
++	
++	It wants reimplementing sanely, preferably in sysfs instead.
++
++<dwmw2 at shinybook.infradead.org>
++	M-Systems DiskOnChip driver: fix DiskOnChip Millennium ECC support
++	and fix a few compiler warnings while we're at it.
++
++<dwmw2 at shinybook.infradead.org>
++	Make obsolete NOR flash chip drivers depend on BROKEN.
++	
++	If nobody shouts soon about why the new, shiny, generic chip drivers 
++	don't work where the old ones do, they can be removed entirely.
++
++<p.lavarre at ieee.org>
++	[PATCH] fix cdrom mt rainier probe
++	
++	Writing to RAM capable media was broken by the moving of write flag
++	detection from probe to drive open time.  The media would stay
++	terminally RO due to the set_disk_ro() call. 
++	
++	This fixes the code to do the right thing - the detection stays at open
++	time (which it must, since it depends on the media), and we fail with
++	-EROFS if the media can't be written.
++	
++	Signed-off-by: Jens Axboe <axboe at suse.de>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mika at osdl.org>
++	[PATCH] Remove all uses of '#ifdef MODULE_PARM' from kernel
++	
++	I got sidetracked (I do that a lot ;-) and noticed that there are only
++	eight files in 2.6 that have code like:
++	
++	#ifdef MODULE_PARAM
++	MODULE_PARAM(foo, "i");
++	#endif
++	
++	which I think is old cruft from 2.1.x times.  Following patch removes
++	all those eight (six in netfilter, one net driver and one SCSI driver).
++
++<daniel at osdl.org>
++	[PATCH] mmap PROT_NONE fix for NX patch
++	
++	This works around the current PROT_NONE problem from elf binaries that
++	do not have the PT_GNU_STACK so that the do not have execute permission.
++	
++	The problem was that setting "def_flags" to include the VM_EXEC bit for
++	compatibility reasons would also make PROT_NONE pages executable, which
++	is obviously not correct.
++	
++	Signed-off-by: Daniel McNeil <daniel at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] remove bogus casts of pointers to unsigned int in sound/*
++
++<viro at www.linux.org.uk>
++	[PATCH] au88x0: use proper field of snd_kcontrol_t and don't try to store pointer in int
++	
++	The au88x0 driver tries to use the wrong private field - there are two,
++	one of them int and another void *.
++	
++	While it's not a problem on 32bot boxen, it breaks on 64bit ones. 
++	
++	Fixed.
++
++<viro at www.linux.org.uk>
++	[PATCH] ic31712: when storing a bitmask in pointer field, use unsigned long
++
++<viro at www.linux.org.uk>
++	[PATCH] annotated sound/pci/nm256/nm256.c
++
++<viro at www.linux.org.uk>
++	[PATCH] NULL noise removal in sound/usb/*
++
++<viro at www.linux.org.uk>
++	[PATCH] mark broken stuff as such in Kconfig
++	
++	A bunch of drivers are broken on sparc64; mark them as such in Kconfig.
++	arlan and smctr are not 64bit-clean; again, markes as such.
++
++<viro at www.linux.org.uk>
++	[PATCH] misc sparse cleanups
++	
++	 - missing ; between default: and } in sun4setup.c
++	 - cast of pointer to unsigned long long instead of unsigned long in
++	   x86_64 signal.c
++	 - missed annotations for ioctl structure in sparc64 openpromio.h
++	   (should've been in the same patch as the rest of drivers/sbus/*
++	   annotations)
++	 - 0->NULL in list.h and pmdisk.c
++
++<viro at www.linux.org.uk>
++	[PATCH] switch sys32_timer_create() to compat_alloc_user_space()
++	
++	switched to compat_alloc_user_space(), cleaned up.
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: beginning of iovec cleanups - infrastructure
++	
++	Beginning of iovec cleanups - added two helpers (kernel_{send,recv}msg)
++	that do sock_sendmsg/sock_recvmsg with kvec instead of iovec; basically,
++	they were abstracted from earlier afs patch.  They take kvec/length of
++	kvec as separate arguments, do set_fs(), stick kvec into msghdr and call
++	sock_...msg(). 
++	
++	The next group of patches will switch network filesystems to use of kvec
++	for kernel data + use of these helpers.  Basically, the same thing we'd
++	done for afs.
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: iovec cleanups - smbfs
++	
++	smbfs switched to kvec and kernel_...msg()
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: iovec cleanups - ncpfs
++	
++	ncpfs switched to kvec and kernel_...msg()
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: iovec cleanups - cifs
++	
++	cifs switched to kvec and kernel_...msg()
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: iovec cleanups - rxrpc
++	
++	rxrpc (low-level part of afs) switched to kernel_...msg(); it already was
++	using kvec instead of iovec.
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: iovec cleanups - sunrpc, nfs and nfsd
++	
++	sunrpc, nfs and nfsd switched to use of kvec and kernel_...msg()
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: iovec cleanups - the rest
++	
++	the rest of iovec cleanups: nbd, dvb-net, sock.c::sock_no_sendpage(),
++	econet over udp and ip_vs switched to use of kvec and kernel_...msg().
++
++<viro at www.linux.org.uk>
++	[PATCH] annotations and NULL noise removal in drivers/char/drm
++	
++	Massive, but trivial - drm annotated and got 0->NULL where needed.  That
++	patch kills ~2200 lines of warnings - out of 5400 that remained at that
++	point.
++
++<torvalds at ppc970.osdl.org>
++	It's a pointer, dummy. Use NULL, not 0.
++
++<torvalds at ppc970.osdl.org>
++	ppc64: More NULL/0 confusion in prom.c
++
++<viro at www.linux.org.uk>
++	[PATCH] 3w-9xxx.c annotated
++
++<viro at www.linux.org.uk>
++	[PATCH] fbmem.c partially annotated
++	
++	partially annotated, fixed dereferencing of userland pointer (trivial,
++	since we'd just copied the entire structure).
++
++<viro at www.linux.org.uk>
++	[PATCH] hfs and hfsplus switched to use of ffs(3) instead of homegrown versions
++
++<viro at www.linux.org.uk>
++	[PATCH] more annotations in binfmt_aout.c
++
++<viro at www.linux.org.uk>
++	[PATCH] pointer-to-number cast in binfmt_elf.c done right
++
++<dsaxena at plexity.net>
++	[ARM] Fix _find_next_bit_be prototype to use 'const' qualifier
++	
++	_find_next_bit_be() does not have a 'const' qualifier for the first 
++	argument, so we get the following warning for a very large number
++	of files:
++	
++	In file included from include/linux/sched.h:15,
++	                 from include/linux/module.h:10,
++	                 from drivers/mtd/maps/ixp2000.c:24:
++	include/linux/cpumask.h: In function `__next_cpu':
++	include/linux/cpumask.h:216: warning: passing arg 1 of `_find_next_bit_be' 
++	discards qualifiers from pointer target type
++	
++	Signed-off-by: Deepak Saxena <dsaxena at plexity.net>
++
++<jbarnes at engr.sgi.com>
++	[PATCH] ia64: make madt parsing quieter
++	
++	We already get this info in other forms from other boot messages, so kill the 
++	printing of the MADT entries as they're parsed.  This patch significantly 
++	reduces the amount of output from a boot of a 512p system.
++	
++	Signed-off-by: Jesse Barnes <jbarnes at sgi.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<davidm at tiger.hpl.hp.com>
++	ia64: Nuke two compiler-warnings.
++
++<pfg at sgi.com>
++	[PATCH] Altix serial driver updates
++	
++	Patch for our console driver.  We converted the driver to use the serial
++	core functions.  Also some changes to use sysfs/udev and a new major
++	number.
++	
++	Cc: Jesse Barnes <jbarnes at engr.sgi.com>
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<miklos at szeredi.hu>
++	[PATCH] fix inode state incoherency
++	
++	This patch fixes a hard-to-trigger condition, where the inode is on the
++	inode_in_use list while it's state is dirty.  In this state dirty pages are
++	not written back in sync() or from kupdate, only from direct page reclaim. 
++	And this causes a livelock in balance_dirty_pages after a while.
++	
++	The actual sequence of events required to get into this state is:
++	
++	thread   function                             inode state         inode list
++	----------------------------------------------------------------------------
++	1 __sync_single_inode (background)            I_DIRTY             sb->s_io
++	1 do_writepages ...                           I_LOCKED
++	2 __writeback_single_inode (sync) sleeps      I_LOCKED
++	1 __sync_single_inode (background) finish     0                   inode_in_use
++	2 __writeback_single_inode (sync) wakeup      0
++	2 __sync_single_inode (sync)                  0 
++	2 do_writepages ...                           I_LOCKED
++	3 __mark_inode_dirty                          I_LOCKED | I_DIRTY
++	2 __sync_single_inode (sync) finish           I_DIRTY             left on
++	                                                                  inode_in_use
++	
++	Signed-off-by: Miklos Szeredi <miklos at szeredi.hu>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<eranian at hpl.hp.com>
++	[PATCH] ia64: fix perfmon bug that could result in kernel hang
++	
++	This patch fixes a potential kernel hang in perfmon during
++	PFM_UNLOAD_CONTEXT.  This commands requires that the monitored task be
++	stopped (except when self-monitoring). The task state tests in
++	check_task_state() were incorrect and an actively running task was
++	accepted for PFM_UNLOAD_CONTEXT. This eventually leads to a kernel
++	hang.
++	
++	Signed-off-by: Stephane Eranian <eranian at hpl.hp.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<ak at muc.de>
++	[PATCH] Fix memory corruption at x86-64 SMP bootup
++	
++	This fixes a long standing corruption bug in the x86-64 code. The SMP
++	trampoline would corrupt page 2, which was sometimes used for other
++	data.  This corrupted the ioport/iomem list in some cases and causes
++	oopses while read /proc/iomem.
++	
++	Fix is to check the correct location and don't zero it afterwards
++	because it gets reinitialized for the next CPU anyways.
++	
++	Thanks to Alexander Nyberg for tracking it down.
++
++<ak at muc.de>
++	[PATCH] Fix i386 bootup with HIGHMEM+SLAB_DEBUG+NUMA and no real
++	
++	For some reason I booted a NUMA and SLAB_DEBUG i386 kernel on a non
++	NUMA 512MB machine.  This caused an oops at bootup in change_page_attr.
++	The reason was that highmem_start_start page ended up zero and 
++	that triggered the highmem check in change_page_attr when the
++	slab debug code would unmap a kernel mapping.
++	
++	Fix is straightforward: if there is no highmem set highmem_start_page
++	to max_low_pfn+1
++
++<torvalds at ppc970.osdl.org>
++	Clean up ptrace child exit case.
++	
++	This also fixes it for when the real parent is ignoring
++	SIGCHLD - noted by David Mosberger.
++
++<torvalds at ppc970.osdl.org>
++	Linux 2.6.8-rc2
++	
++	Ready for the kernel summit in Ottawa...
++
++<eger at havoc.gtf.org>
++	[PATCH] pmac_zilog: serial minors taken failure path fix
++	
++	I've tracked down the core issue giving me the oops wrt pmac_zilog.
++	
++	When you have two serial drivers, (e.g. 8250 and PMAC_ZILOG) they both say
++	
++	"I want to reserve X ports starting with major TTY_MAJOR and minor 64".
++	
++	By the time pmac_zilog gets there, the ports it requests are already
++	reserved.  Unfortunately, init_pmz() doesn't check for pmz_register()
++	failure, and so it merrily goes on to register the half-initialized
++	pmac_zilog driver with the power management subsystem.
++	
++	This path provides a proper failure path.
++	
++	Also: 
++	
++	Restore ppc configs now that I know people use AT Keyboards on CHRP and PReP
++	machines, and the zilog driver is no longer Oops'ing.
++	
++	Signed-off-by: David Eger <eger at havoc.gtf.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mingo at elte.hu>
++	[PATCH] NX: clean up legacy binary support
++	
++	This cleans up legacy x86 binary support by introducing a new
++	personality bit: READ_IMPLIES_EXEC, and implements Linus' suggestion to
++	add the PROT_EXEC bit on the two affected syscall entry places,
++	sys_mprotect() and sys_mmap().  If this bit is set then PROT_READ will
++	also add the PROT_EXEC bit - as expected by legacy x86 binaries.  The
++	ELF loader will automatically set this bit when it encounters a legacy
++	binary.
++	
++	This approach avoids the problems the previous ->def_flags solution
++	caused.  In particular this patch fixes the PROT_NONE problem in a
++	cleaner way (http://lkml.org/lkml/2004/7/12/227), and it should fix the
++	ia64 PROT_EXEC problem reported by David Mosberger.  Also,
++	mprotect(PROT_READ) done by legacy binaries will do the right thing as
++	well. 
++	
++	the details:
++	
++	- the personality bit is added to the personality mask upon exec(),
++	  within the ELF loader, but is not cleared (see the exceptions below). 
++	  This means that if an environment that already has the bit exec()s a
++	  new-style binary it will still get the old behavior.
++	
++	- one exception are setuid/setgid binaries: these will reset the
++	  bit - thus local attackers cannot manually set the bit and circumvent
++	  NX protection. Legacy setuid binaries will still get the bit through
++	  the ELF loader. This gives us maximum flexibility in shaping
++	  compatibility environments.
++	
++	- selinux also clears the bit when switching SIDs via exec().
++	
++	- x86 is the only arch making use of READ_IMPLIES_EXEC currently. Other
++	  arches will have the pre-NX-patch protection setup they always had.
++	
++	I have booted an old distro [RH 7.2] and two new PT_GNU_STACK distros
++	[SuSE 9.2 and FC2] on an NX-capable CPU - they work just fine and all
++	the mapping details are right. I've checked the PROT_NONE test-utility
++	as well and it works as expected. I have checked various setuid
++	scenarios as well involving legacy and new-style binaries.
++	
++	an improved setarch utility can be used to set the personality bit
++	manually:
++	
++		http://redhat.com/~mingo/nx-patches/setarch-1.4-3.tar.gz
++	
++	the new '-X' flag does it, e.g.:
++	
++		./setarch -X linux /bin/cat /proc/self/maps
++	
++	will trigger the old protection layout even on a new distro.
++	
++	Signed-off-by: Ingo Molnar <mingo at elte.hu>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<stevef at smfhome.smfdom>
++	CIFS: Add missing mount option for optionally cifs perm checks when uids on server and client do not match and for optionally overriding 
++	server setting default uid/gid of new cifs files and directories.
++	
++	Signed-off-by: Steve French (sfrench at us.ibm.com)
++
++<stevef at smfhome.smfdom>
++	[CIFS] remove unneeded, unused prototypes.  Suggested by Carl Spalletta
++	
++	Signed-off-by: Steve French (sfrench at us.ibm.com)
++
++<yoshfuji at linux-ipv6.org>
++	[IPV4] Look up route with appropriate protocol when we connect().
++	
++	Signed-off-by: Hideaki YOSHIFUJI <yoshfuji at linux-ipv6.org>
++
++<yoshfuji at linux-ipv6.org>
++	[IPV6] remove rather pointless comment.
++	
++	Signed-off-by: Hideaki YOSHIFUJI <yoshfuji at linux-ipv6.org>
++
++<trini at kernel.crashing.org>
++	PPC32: Typo fix in m8xx serial driver.
++
++<jbarnes at engr.sgi.com>
++	[PATCH] ia64:  update sn2_defconfig to include new console
++	
++	Now that Linus' tree has the new sn2 console driver, make sn2_defconfig enable 
++	it by default.  The device is major 204, minor 40.  Note that you'll probably 
++	have to update your elilo.conf and inittab to use the new driver, as it's 
++	called ttySG0 rather than ttyS0.
++	
++	Signed-off-by: Jesse Barnes <jbarnes at sgi.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<bunk at fs.tum.de>
++	MTD: remove some kernel 2.0 and 2.2 #ifdef's
++	
++	The patch below (applies against 2.6.8-rc2) removes some #ifdef's for 
++	kernel 2.0 and 2.2 from the MTD code.
++	
++	Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
++	Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
++
++<bunk at fs.tum.de>
++	MAINTAINERS: update MTD list
++	
++	Trying to send an email to mtd at infradead.org gives you the answer that 
++	you should use linux-mtd at lists.infradead.org instead.
++	
++	So let's update the entry in MAINTAINERS.
++	
++	Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
++	Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
++
++<kronos at kronoz.cjb.net>
++	Fix JFFS2_COMPRESSION_OPTIONS in Kconfig
++	
++	Hi,
++	It seems to me that JFFS2_COMPRESSION_OPTIONS depends on JFFS2_FS:
++	
++	Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
++
++<dwmw2 at shinybook.infradead.org>
++	NAND support in JFFS2 isn't experimental any more.
++
++<jbarnes at sgi.com>
++	[PATCH] ia64: sn2 requires a 3.40 or better PROM
++	
++	The SGI 3.40 PROM includes a fix for the move of the init_task to
++	region 5, so specify that in sn_sal.h.  Unfortunately, the check for
++	the minimum required version happens *after* the hang/MCA that is
++	symptomatic of the bug, so this message also acts as an announcement
++	of the requirement.
++	
++	Signed-off-by: Jesse Barnes <jbarnes at sgi.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<edwardsg at sgi.com>
++	kbuild: build binary rpm from pre-built tree
++	
++	Many times it would be nice to quickly package up a kernel tree you're
++	working on, without having to rebuild the whole thing again from a clean
++	source tree (like the current rpm-pkg target does).  The patch below
++	adds an "binrpm-pkg" target which uses your existing (already built)
++	tree.
++	Modified by me to always do a make and use binrpm-pkg.
++	
++	Signed-off-by: Greg Edwards <edwardsg at sgi.com>
++	Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
++
++<gdavis at mvista.com>
++	kbuild: Allow `make O=<obj> {cscope,tags}` to work
++	
++	Allow `make O=<obj> {cscope,tags}` to work
++
++<sam at mars.ravnborg.org>
++	kbuild: Rebuild .spec file when kernel version changes
++	
++	Make a dependency in scripts/package/Makefile to top-level Makefile forcing
++	.spec file to be generated when kernel version changes.
++	
++	Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Export __copy_in_user to modules.
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Update defconfig.
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Fix allnoconfig build, based upon a patch from Roland Dreier.
++	
++	- Make SUNOS_EMUL depend upon BINFMT_AOUT32
++	- Make SOLARIS_EMUL depend upon SPARC32_COMPAT
++	- Add CONFIG_COMPAT guards, where necessary.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<dave at thedillows.org>
++	[SPARC64]: Handle SBUS dma allocations larger than 1MB.
++	
++	Signed-off-by: David Dillow <dave at thedillows.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[PKT_SCHED]: Make sch_netem classful.
++	
++	Simple enhancement to netem packet scheduler that makes it classful so
++	that the underlying pfifo default discipline can be substituted with something
++	else (tbf, red, ...)
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[PKT_SCHED]: Missing qdisc destroy in sch_netem.
++	
++	The underlying qdisc was not being properly destroyed, shows up as
++	assertion failure on device removal.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[PKT_SCHED]: Need delayed packet limit in sch_netem.
++	
++	The netem scheduler needs to limit its delayed packet queue to prevent
++	a application burst from chewing up too much memory.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[IPV6]: Missing sparse annotation in addrconf.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<tcallawa at redhat.com>
++	[SPARC]: Fix copy_user.S with gcc 3.3
++	
++	Signed-off-by: Tom Callaway <tcallawa at redhat.com>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<tcallawa at redhat.com>
++	[SPARC]: Add pci_dma_mapping_error to pci.h
++	
++	Signed-off-by: Tom Callaway <tcallawa at redhat.com>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<Samuel.Thibault at ens-lyon.fr>
++	[UDP]: Return true length if user specifies MSG_TRUNC.
++
++<wli at holomorphy.com>
++	[SPARC32]: Mark William Lee Irwin III as maintainer.
++
++<herbert at gondor.apana.org.au>
++	[CRYPTO]: Fix stack overrun in crypt().
++	
++	The stack allocation in crypt() is bogus as whether tmp_src/tmp_dst
++	is used is determined by factors unrelated to nbytes and
++	src->length/dst->length.
++	
++	Since the condition for whether tmp_src/tmp_dst are used is very
++	complex, let's allocate them always instead of guessing.
++	
++	This fixes a number of weird crashes including those AES crashes
++	that people have been seeing with the 2.4 backport + ipt_conntrack.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: James Morris <jmorris at redhat.com>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<chas at relax.cmd.nrl.navy.mil>
++	[ATM]: use try_module_get appropriately (from Stephen Hemminger <shemminger at osdl.org>)
++
++<davem at nuts.davemloft.net>
++	[IPV4]: Make raw sockets behave like udp wrt. MSG_TRUNC.
++
++<davem at nuts.davemloft.net>
++	[ATM]: Update Marko Kiiskila's email address.
++
++<herbert at gondor.apana.org.au>
++	[IPSEC]: Fix IPCOMP6 ICMP type check.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[INET]: Create enum of ECN bits
++	
++	This patch is a preparation for an update of the ECN encap/decap
++	code with respect to RFC3168.
++	
++	It creates an enum of the four code-points defined by RFC3168
++	and uses them throughout the inet_ecn.h file.
++	
++	The only non-trivial bit is in IP_ECN_set_ce/IP6_ECN_set_ce where
++	the patch uses INET_ECN_CE instead of 1.  This is OK as those
++	functions assume that the ECT bit is already set.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[TCP]: Do not overflow 16-bit window field in tcp_select_window().
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<sam at mars.ravnborg.org>
++	kbuild: Less intrusive LANG override, fixes menuconfig
++	
++	The locale override caused problems for some people with locale setiings
++	different from 'C'. make menuconfig was looking bad / unuseable.
++	This patch limit the override of locales to the part where we actually descend the kernel
++	doing the full build of the kernel.
++	The speed improvement is the same.
++	
++	make menuconfig should now be useable for all locale settings again.
++	Thanks to Marcel Sebek <sebek64 at post.cz> for pointing out this problem and being
++	paitent in testing.
++	
++	Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
++
++<schwab at suse.de>
++	kbuild: scripts/genksyms/parse.c_shipped needs to be rebuilt
++	
++	parse.c_shipped has never been regenerated after parse.y has been modified
++	4 months ago.
++	
++	Signed-off-by: Andreas Schwab <schwab at suse.de>
++	Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
++
++<bgerst at didntduck.org>
++	kbuild: Move modpost files to a new subdir scripts/mod
++	
++	Move modpost and support files to scripts/mod.
++	Directory named mod by Sam.
++	
++	From: Brian Gerst <bgerst at didntduck.org>
++	Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
++
++<sam at mars.ravnborg.org>
++	kbuild: Fix up moving of modpost
++	
++	A few small issues to fix the moving of modpost.
++	A few files was missing in the commit and one change needed.
++	Also bk ignored the files in their new location.
++	
++	Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
++
++<kkourt at cslab.ece.ntua.gr>
++	kbuild: Two simple kbuild patches
++	
++	foo1.patch:   spelling correction in Makefile
++	foo2.patch:   replace SUBDIRS with M in Documentation/kbuild/modules.txt
++	
++	From: Kornilios Kourtis <kkourt at cslab.ece.ntua.gr>
++	Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] Missing mnt_namespace update in copy_namespace()
++	
++	copy_namespace() forgets to switch the new 'mnt_namespace' field in the
++	vfsmounts of the new namespace.
++
++<kaber at trash.net>
++	[PKT_SCHED]: Remove dead timer code.
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<linux at dominikbrodowski.de>
++	[PATCH] Asus M2N notebook hides SMBus device
++	
++	Asus also "hides" the LPC bridge on M2N notebooks. Add it to
++	the asus_hides_smbus PCI quirk.
++	
++	Fixes bug #2976 @ http://bugme.osdl.org/show_bug.cgi?id=2976
++	
++	Signed-off-by: Dominik Brodowski <linux at brodo.de>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<Roman.Fietze at telemotive.de>
++	[PATCH] clean up n_tty alloc_buf()
++	
++	Don't bother zeroing the allocated memory inside alloc_buf() in the
++	n_tty line discipline.  alloc_buf() is static inline and is only
++	referenced by n_tty_open() which always clears the memory (once more).
++	
++	No bug, just a minor cleanup
++
++<kaber at trash.net>
++	[PKT_SCHED]: Use get_cycles() for PSCHED_CPU clock source
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<apw at shadowen.org>
++	[PATCH] is_highmem() and WANT_PAGE_VIRTUAL
++	
++	Add is_highmem_idx() and is_normal_idx() to determine whether
++	a zone index is a highmem or normal zone.  Use this for
++	memmap_init_zone().
++	
++	Signed-off-by: Andy Whitcroft <apw at shadowen.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<torvalds at ppc970.osdl.org>
++	Make "install_page()" able to handle truncated pages.
++	
++	This makes it much easier on the callers, no need to
++	worry about races with vmtruncate() and friends, since
++	"install_page()" will just cleanly handle that case
++	and tell the caller about it.
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Uninline _raw_spin_lock too, saves ~30K in defconfig image.
++
++<sri at us.ibm.com>
++	[SCTP] Set/Get default SCTP_PEER_ADDR_PARAMS for endpoint when associd
++	and peer address are 0.
++	
++	Signed-off-by: Anand R. Setlur <asetlur at lucent.com>
++	Signed-off-by: Sridhar Samudrala <sri at us.ibm.com>
++
++<sri at us.ibm.com>
++	[SCTP] Fix data not being delivered to user in SHUTDOWN_SENT state.
++	   
++	Also cleaned up sctp_sf_eat_data_6_2() and sctp_sf_eat_data_fast_4_4()
++	as they have a lot of common code.
++	
++	Signed-off-by: Jorge Hernandez <jhh at lucent.com>
++	Signed-off-by: Sridhar Samudrala <sri at us.ibm.com>
++
++<sri at us.ibm.com>
++	[SCTP] Fix issues with handling stale cookie error over multihoming
++	associations.
++	
++	Signed-off-by: Jorge Hernandez <jhh at lucent.com>
++	Signed-off-by: Sridhar Samudrala <sri at us.ibm.com>
++
++<sri at us.ibm.com>
++	[SCTP] Use idr_get_new_above() with a starting id of 1 to avoid returning
++	an associd of 0.
++	
++	Signed-off-by: Sridhar Samudrala <sri at us.ibm.com>
++
++<sri at us.ibm.com>
++	[SCTP] Fix missing '+' in the computation of sack chunk size in
++	sctp_sm_pull_sack().
++	
++	Signed-off-by: Jorge Hernandez <jhh at lucent.com>
++	Signed-off-by: Sridhar Samudrala <sri at us.ibm.com>
++
++<domen at coderock.org>
++	remove unused #include <linux/version.h>
++	
++	From: Domen Puncer <domen at coderock.org>
++	Signed-off-by: Maximilian Attems <janitor at sternwelten.at>
++	Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
++
++<davidm at napali.hpl.hp.com>
++	[PATCH] NX: allow architectures to select legacy mode dynamically
++	
++	On some platforms, you'll want to support READ_IMPLIES_EXEC differently
++	depending on personality (e.g, native binary vs. x86 binary).
++	
++	This supports that (and makes the code more readable while at it) by
++	replacing the old architecture-specific fixed LEGACY_BINARIES macro
++	define with a architecture-specific "elf_read_implies_exec_binary()"
++	helper function.
++	
++	For now, x86 is the only user, and sets the "read implies exec" bit for
++	legacy apps.  ia64 and x86-64 are likely to want to do their own thing.
++	
++	Acked by Ingo.
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<herbert at gondor.apana.org.au>
++	[IPSEC]: Missing unlock in policy timer.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[AH6]: Disallow mutable bits after AH header.
++	
++	As we discussed before, mutable headers should not be allowed after
++	the AH header.  In fact, this appears to be the intention of RFC 2402.
++	It is further clarified in section 3.1.1 of
++	
++	http://www.ietf.org/internet-drafts/draft-ietf-ipsec-rfc2402bis-07.txt
++	
++	This allows us to simplify the code in ah6.c.  As a result, this also
++	fixes the following issues:
++	
++	* Dependence on skb->h in ah6_output().
++	* Bogus clearing of auth_data of 2nd AH header in ipv6_clear_mutable_options().
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<kaber at trash.net>
++	[PKT_SCHED]: Make clock source configurable
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[PKT_SCHED]: Alpha not studly enough for SCH_CLK_CPU.
++	
++	The cycle counter it provides overflows very quickly,
++	on the order of 10 minutes, so it is not suitable for
++	this purpose.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[IPVS]: Convert to module_param.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[NET]: eql sparse cleanup.
++	
++	Minor 0 vs NULL cleanup
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<steiner at sgi.com>
++	[PATCH] ia64: Update function prototype for sn_io_addr
++	
++	Add "const" to function prototype for sn_io_addr. Cuts boot time
++	on simulator in half.
++	
++	Signed-off-by: Jack Steiner <steiner at sgi.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<sri at us.ibm.com>
++	[SCTP] Mark chunks as ineligible for fast retransmit after they are
++	retransmitted. Also mark any chunks that could not be fit in the
++	PMTU sized packet as ineligible for fast retransmit.
++	
++	Signed-off-by: Sridhar Samudrala <sri at us.ibm.com>
++
++<anton at samba.org>
++	[PATCH] Fix ppc64 max_pfn issue
++	
++	I noticed excessive time in the pid hash functions on a ppc64 box. It
++	turns out the pid hash is being sized way too small, eg on a 16GB box:
++	
++	PID hash table entries: 16 (order 4: 256 bytes)
++	
++	The reason is that the pid hash init function uses max_pfn before it was
++	setup on ppc64. With the following patch things are good again:
++	
++	PID hash table entries: 4096 (order 12: 65536 bytes)
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<stevef at steveft21.ltcsamba>
++	[CIFS] xattr suport part 2: add listxattr support
++	
++	Signed-off-by: Steve French (sfrench at us.ibm.com)
++
++<anton at samba.org>
++	[PATCH] Fix ppc64 max_pfn issue - again
++	
++	It turns out in the non NUMA case, max_low_pfn doesnt get initialised
++	until init_bootmem so we need to move initialisation of max_pfn below
++	it.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<anton at samba.org>
++	[PATCH] ppc64: exception path optimisations
++	
++	- We were statically predicting syscalls would be 32bit which meant every
++	  64bit syscall was guaranteed to be mispredicted. Just let the hardware
++	  predict this one.
++	
++	- We shouldnt use blrl for indirect function calls, it is unlikely to be
++	  predicted correctly and corrupts the link prediction stack. We should
++	  use bctrl instead.
++	
++	- Statically predict a branch in the system call path, favouring calls from
++	  userspace.
++	
++	- Remove static prediction in pagefault path, hardware prediction should do
++	  a better job here.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<torvalds at ppc970.osdl.org>
++	ppc64: fix more 0/NULL confusion
++
++<kaber at trash.net>
++	[IPV4/IPV6]: Add myself to MAINTAINERS.
++
++<davem at nuts.davemloft.net>
++	Cset exclude: shemminger at osdl.org|ChangeSet|20040722205059|21273
++
++<herbert at gondor.apana.org.au>
++	[AH4]: Save daddr iff options are present.
++	
++	This is a little optimisation for AH4.  When I moved the tunnel code out,
++	I put the daddr copying code on the main path which is unnecessary since
++	daddr is only mutable if IP options are present.
++	
++	This patch moves the saving and restoring of daddr under the check for
++	the existence of IP options.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[AH6]: Replace skb by iph in clear_mutable_options.
++	
++	This patch replaces the skb argument in ipv6_clear_mutable_options() by
++	an ipv6hdr.  Doing so allows us to point skb->nh elsewhere when calling
++	this function.
++	
++	I've also thrown in some obvious clean-ups for that function.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<anton at samba.org>
++	[NET]: Use NET_IP_ALIGN in acenic.
++	
++	Use NET_IP_ALIGN in acenic driver. Also remove the 16 byte padding,
++	caches can be anywhere from 16 to 256 bytes and the skb should be
++	cacheline aligned already.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[SCTP]: Fix mis-merge.
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] sparse: simplify and tighten sparse typechecking
++	
++	This takes advantage of the simplified typeof semantics of sparse
++	address spaces, (should be enough for alpha, i386, ppc, ppc64, sparc,
++	sparc64, x86_64 - most of them didn't actually need anything to be done)
++	and couple of missing annotations that got caught by that.
++
++<davem at nuts.davemloft.net>
++	Cset exclude: davem at nuts.davemloft.net|ChangeSet|20040723204655|22654
++
++<kaber at trash.net>
++	[XFRM]: Wake up km_waitq once per gc-run instead of once per state.
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<kernel at kolivas.org>
++	[IPV6]: Fix route.c gcc-3.4.x inlining error.
++	
++	Fixes the inline error when compiling net/ipv6/route.c with gcc-3.4.1
++	
++	Signed-off-by: Con Kolivas <kernel at kolivas.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<oleg at tv-sign.ru>
++	[PATCH] populate nonlinear mappings unconditionally
++	
++	filemap_populate and shmem_populate must install even a linear file_pte,
++	in case there was a nonlinear page or file_pte already installed there:
++	could only happen if already VM_NONLINEAR, but no need to check that.
++	
++	Acked by Ingo and Hugh.
++	
++	Signed-off-by: Hugh Dickins <hugh at veritas.com>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kaneshige.kenji at jp.fujitsu.com>
++	[PATCH] ia64: fix bug in irq_affinity_write_proc()
++	
++	Writing 'R' or 'r' character to /proc/irq/<IRQ#>/smp_affinity
++	cause a kernel Oops. The following patch fixes this issue.
++	
++	Signed-off-by: Kenji Kaneshige <kaneshige.kenji at jp.fujitsu.com>
++	Signed-off-by: David Mosberger <davidm at hpl.hp.com>
++
++<davidm at tiger.hpl.hp.com>
++	ia64: Clean up arch/ia64/kernel/irq.c a bit.
++
++<stevef at steveft21.ltcsamba>
++	[CIFS] xattr support part 3 add query EA support to retrieve individual xattr values
++	
++	Signed-off-by: Steve French (sfrench at us.ibm.com)
++
++<davidm at tiger.hpl.hp.com>
++	ia64: Oops, SN2 needs pending_irq_cpumask to be global.
++
++<viro at www.linux.org.uk>
++	[PATCH] size_t portability fixes
++	
++	A lot of places assumed that size_t == unsigned; on 64bit boxen that is not
++	true.
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] appletalk SIOCADDRT fix
++	
++	blind dereferencing of userland pointer in appletalk SIOCADDRT handling.
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] rndis fix
++	
++	blind dereferencing of userland pointers in procfs ->write() in rndis.c
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] bluetooth annotations
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] more NULL noise removal in sound/*
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] #if abuse is sound/*
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] tea575 fix
++	
++	Very confused ioctl in tea575x - it is called via video_usercopy(), but
++	assumes that it still has userland pointers.  Fixed.
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] check_region fixes
++	
++	A couple of old ISA drivers had trivial to fix check_region() uses.
++	Sanitized.
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] dmasound annotation
++	
++	dmasound (core + ppc-specific parts) annotated
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] misc sound/* fixes
++	
++	a) ALSA variant of wavefront didn't compile on gcc 2.x with debugging
++	turned on - authors heard something about variadic macros on gcc 2.x,
++	but screwed it up.  Fixed.
++	b) au88x0 relied on char being signed in non-trivial ways.  On ppc it's
++	not true.  Fixed by explicit use of s8 (which is what that code really
++	wants).
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] broken stuff in sound/* marked as such in Kconfig
++	
++	a) OSS is broken on sparc64 (as in "won't compile")
++	b) sb16_csp is broken on ppc
++	marked as such in Kconfig
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] security/selinux/hooks.c compile fix
++	
++	added missing #include
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] openpromfs annotation
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] more NULL noise removal in fs/*
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] bpck6 compile fix on ppc
++	
++	bpck6 was b0rken on ppc in rather amusing way - it used
++	typedef struct ... PPC;
++	which doesn't mix with having PPC (pre)defined to 1.  Fixed by renaming private
++	typedef in question.
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] impi annotation
++	
++	drivers/char/ipmi/* annotated, structure shared between kernel and
++	userland (ioctls) split in two.
++	ACPI callback in the same code used to have wrong type - it should've been
++	void (...), not u32 (...).  Fixed.
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] mtd fixes
++	
++	Assorted mtd fixes.
++		a) NULL noise removal
++		b) %p pointer instead of %x (int)pointer in printks
++		c) missed iovec->kvec replacements (basically, fixing merge problems)
++		d) fixed type for (unused) last argument in doc_{read,write}_ecc()
++		e) sanitized some comparisons.
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] NULL noise removal in drivers/net/*
++	
++	That definitely duplicates a bunch of stuff in pending patches from various
++	folks, but since it's all trivial 0->NULL replacements and patches are still
++	not submitted and/or merged...
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] #if abuse in drivers/net/*
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] solaris emulation annotated
++	
++	trivial annotations and cleanups + proper use of vfs_...stat().
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] sparc32 emulation annotated
++	
++	annotated, a bunch of ioctls switched to compat_alloc_user_space() and
++	cleaned up.
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] NULL noise removal on ppc
++	
++	0->NULL in arch/ppc and include/asm-ppc.
++	
++	[That's it for this series - there's still ~200Kb to merge, but I'd rather
++	take a break for a couple of hours before dealing with the rest]
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] drm/gamma_old_dma.h fix
++	
++	blind dereferencing of userland pointer
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] NULL noise removal in drivers/*
++	
++	it could be split (all chunks are obviously independent), but I don't think
++	that it's worth doing.
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] CONFIG_MCOUNT fix for sparc64
++	
++	CONFIG_MCOUNT on sparc64 is currently broken; we have both mcount and _mcount
++	declared (and aliased to each other), but end up exporting the wrong one.  As
++	the result, with that option all modules get unresolved symbol.
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] #if abuses in drivers/*
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] annotations for arch/ppc and include/asm-ppc
++	
++	Usual set - explicit -D<arch>=1 for sparse, __sighandler_t / __sigrestore_t
++	annotated, annotations in arch/ppc/kernel/*, etc. - same as for other platforms
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] cciss compat ioctl fix
++	
++	cciss compat ioctls were broken (mixing kernel and userland pointers);
++	fixed (and cleaned up) by switch to compat_alloc_user_space() and elimination
++	of set_fs().
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] zoran switched to seq_file
++	
++	zoran procfs code switched to seq_file and cleaned up; a bunch of homegrown
++	procfs glue eliminated.
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] dpt_i2o annotations
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] via-velocity switched use of to if_mii()
++	
++	Either it got missed back when if_mii() was introduced, or it got merged
++	that way later.
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] drivers/macintosh annotations
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] pointer-to-int conversion fixes
++	
++	Assorted pointer-to-int fixes:
++		a) some places want to take pointer modulo alignment or extract
++	integer that was cast to pointer (which is legitimate), but do that via
++	wrong cast, triggering sparse warnings.
++		b) usual %x (int)ptr -> %p ptr fixes
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] ffb_context annotation
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] asm-ppc/reg.h namespace pollution fixes
++	
++		asm-ppc/reg.h defines pollutes namespace like there's no tomorrow;
++	among other things there are
++		LR
++		SR0...SR15
++		DEC
++	etc.
++	
++	That breaks quite a few drivers that should otherwise work on ppc.  SR...
++	and LR were never used by ppc code; commented out in reg.h (note that
++	they are just aliases for SPRN_SR... and SPRN_LR).  RPA commented out and
++	its instances in ppc code (all four of them) replaced with SPRN_RPA.  Ditto
++	for DEC.  The rest of the offenders (DAR and PVR) are left alone for now and
++	#undef'ed in drivers in question.
++	
++	We probably want to rip all these guys out of reg.h and convert ppc users
++	to SPRN_... forms - file ends up included in alot of places and namespace
++	pollution like that is a Bad Thing(tm).
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] missing (void) in reiserfs on big-endian boxen
++	
++	Usual foo ? void : non-void  in reiserfs; gets triggered on big-endian
++	platforms.
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] broken stuff marked as such in Kconfig
++	
++		a) ppc KGDB builds only on two subarch; say so in Kconfig
++		b) ide-pmac.c can't be a module; make it dependent on IDE=y.
++		c) a bunch of isdn drivers is broken on ppc; marked as such
++		d) oaknet is broken; marked as such (includes on files that do not
++	exist, etc.)
++		e) buslogic and cyber2000 are broken on sparc64
++		f) s3trio framebuffer is broken
++		g) usual 8250-based serial is broken on sparc64; in principle it might
++	be worth supporting (there are PCI cards of that sort), for now marked as
++	broken (no asm/serial.h, to start with).
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] drivers/ieee1394 annotation
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] signed char fixes in drivers/*
++	
++		a couple of "replace char with explicit s8 to make sure it's really
++	signed" fixes.
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] inline reordering in drivers/*
++	
++		usual "shift definition of inlines before their uses" in a couple of
++	places in drivers/*
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] cpumask updates in open_pic.c (ppc)
++	
++		compile fixes in open_pic.c - it missed cpumask conversion in several
++	places.
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] wrong ifdef in ppc/kernel/setup.c (nvram)
++	
++		Wrong ifdef around ppc nvram_read_byte() - it should be
++	CONFIG_GENERIC_NVRAM.
++	
++	[that's it for today; there's more (fb stuff), but I'd rather make that
++	a separate series]
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<davidm at tiger.hpl.hp.com>
++	ia64: Update defconfig
++
++<davidm at tiger.hpl.hp.com>
++	ia64: Update for elf_read_implies_exec() macro changes in mainline tree.
++
++<stevef at steveft21.ltcsamba>
++	[CIFS] xattr support part 4   add set EA support
++	
++	Signed-off-by: Steve French (sfrench at us.ibm.com)
++
++<margitsw at t-online.de>
++	[PATCH] prism54 Fix reference to uninitialized pointer
++	
++	* oid_mgt.c is calling islpci_mgt_transaction passing the address
++	  of a pointer to the management frame. This is not being
++	  initialized by the caller. The callee only updates this
++	  pointer when successful. When not, boom.
++	
++	* Being ultracautious again, not only initialize in the caller,
++	  also null out the pointer unconditionally in the callee.
++
++<margitsw at t-online.de>
++	[PATCH] prism54 Refix TRDY/RETRY_TIMEOUT
++	
++	* Reintroduce pushing 0 into the TRDY_TIMEOUT and RETRY_TIMEOUT
++	  registers. Make this configurable with module parameter
++	  init_pcitm.
++	
++	* We now have the ludicrous situation that some hardware setups
++	  require this (not even pushing 0xFF helps), whilst others
++	  don't care either way (the majority), and yet others bork
++	  if anything is pushed into these regs.
++	  If anybody can explain this (including Conexant :-) ), my ears
++	  are open.
++
++<margitsw at t-online.de>
++	[PATCH] prism54 Fix initialization with older firmware
++	
++	* In the card initialization routine, we try to set the
++	  output power. For firmware < 1.0.4.3, this leads to a
++	  worrying "mgt_commit has failed .." in the log although
++	  the device continues to react normally.
++	  Fix is simple, do not try to configure output power.
++	  (which I believe we should not be doing anyway as it is
++	   probably against local country regulations)
++
++<margitsw at t-online.de>
++	[PATCH] prism54 Fix null pointer reference (Bug 100)
++	
++	* prism54_get/set_debug_oid are missing checks for a null pointer.
++	  Reported in Bugzilla number 100.
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Kill all this silly inline memcpy handling.
++	
++	GCC does this well enough.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<marcel at holtmann.org>
++	[Bluetooth] Replace BCSP retransmitting message with BT_DBG
++	
++	The message "Timeout, retransmitting 1 pkts" is not an error and so
++	change this into a debug message.
++	
++	Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
++
++<sam at mars.ravnborg.org>
++	drivers: move STANDALONE to drivers/base/Kconfig
++	
++	Move STANDALONE from init/Kconfig to drivers/base/Kconfig .
++	This way, it's besides PREVENT_FIRMWARE_BUILD.
++	                                                                                
++	Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
++	Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
++
++<marcel at holtmann.org>
++	[Bluetooth] Replace schedule_timeout() with msleep()
++	
++	Use msleep() instead of schedule_timeout() to guarantee the task
++	delays at least the desired time amount.
++	
++	Signed-off-by: Nishanth Aravamudan <nacc at us.ibm.com>
++	Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
++
++<trini at kernel.crashing.org>
++	PPC32: Finish support for the EmbeddedPlanet RPX8260 board.
++	From Dan Malek <dan at embeddededge.com> and myself.
++
++<sam at mars.ravnborg.org>
++	kbuild: Create Makefile in output directory if != kernel tree
++	
++	When building a kernel using the O= syntax to save output
++	files in a separate output directory now create a small Makefile in
++	that same dir.
++	This Makefile allow one to use make in the output directory without
++	the hassle of going back to the kernel source tree.
++	The O= option is added by this Makefile stub.
++	Please note that the Makefile silently overwrite an old one, so changes
++	will be lost if modified.
++	If there is a need to tweak a Makefile in the output directory it is recommended
++	to use the filename 'makefile', which GNU Make will try first.
++	
++	Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
++
++<sam at mars.ravnborg.org>
++	kbuild: Introduce source symlink in /lib/modules/.../
++	                                                                                                     
++	Traditionally when building a kernel the source and the
++	output files are mixed.
++	                                                                                                     
++	When building a kernel using the O= syntax to save output
++	files in a separate directory a way is needed to locate
++	the kernel source.
++	The implemented solution is a new symlink 'source' being
++	added to /lib/modules/.../
++	used to locate source for an installed kernel.
++	The original symlink build points to the directory
++	containing the output files.
++	                                                                                                     
++	Please note that when the kernel is build with source and
++	output files mixed the two symlinks 'build' and 'source'
++	will point to the same directory, thus no changes
++	compared to before.
++	                                                                                                     
++	Two options was considered:
++	                                                                                                      a) Adding a new symlink pointing to the output files "object"
++	        => All external modules have to specify O= to build
++	        => External modules grepping in .config or .h files
++	           in include/asm needs to be updated
++	        => External modules that do grep in source code and
++	           ordinary header files just works
++	                                                                                                     
++	b) Let the build symlink point to the output files and introduce a new
++	   symlink "source" pointing to the kernel source
++	        => External module can be build without specifying O=
++	        => External modules grepping in .config or .h files
++	           in include/asm just works
++	        => External modules that do grep in source code and
++	           ordinary header files needs to be updated
++	                                                                                                     
++	Based on the above option b) is considered the least painfull alternative.
++	                                                                                                     
++	So to sum up:
++	- If a distro does not use separate output dir => no change
++	- If a distro uses separate output dir =>
++	        - Trivial external module just builds
++	        - Non-trivial (build-wise) external modules are probarly broken
++	                                                                                                     
++	Without this patch
++	- If a distro does not use separate output dir => no change
++	- If a distro uses separate output dir =>
++	        - Trivial external modules had to specify O= to build,
++	          and the directory being pointed at was not obvious
++	        - grep in .config or include files in asm/ required
++	          knowledge where to locate output files
++	                                                                                                     
++	Preferred syntax for building external modules are the following:
++	
++	       make -C /lib/modules/`uname -r`/build M=`pwd`
++	
++	[Substituting 'M=...' with 'SUBDIRS=... modules' give same effect].
++	                                                                                                     
++	When the kernel is built using separate output directory the above
++	invocation of make will invoke the generated Makefile located in the output
++	directory - that again will invoke the Makefile located in the kernel
++	source tree root.
++	                                                                                                     
++	Patch includes contributions from:
++	        Andreas Gruenbacher <agruen at suse.de>
++	                                                                                                     
++	Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
++
++<ak at suse.de>
++	[PATCH] x86-64 fixes
++	
++	This fixes several small but serious x86-64 bugs in 2.6.8rc2:
++	
++	 - Fix array overflow in PCI bus checking (Travis Betak) 
++	 - Fix broken pci_map_sg in swiotlb (Suresh B. Siddha)
++	 - Remove bogus bus check in IOMMU code
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<ahaas at airmail.net>
++	[SPARC32]: Remove duplicate pci_dma_mapping_error().
++
++<kernel at kolivas.org>
++	[IPV6]: Fix gcc-341 inlining for real.
++	
++	Signed-off-by: Con Kolivas <kernel at kolivas.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<nacc at us.ibm.com>
++	[SPARC]: bbc_envctrl: Replace schedule_timeout() with msleep().
++	
++	Signed-off-by: Nishanth Aravamudan <nacc at us.ibm.com>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<nacc at us.ibm.com>
++	[SPARC]: envctrl: Replace schedule_timeout() with msleep().
++	
++	Signed-off-by: Nishanth Aravamudan <nacc at us.ibm.com>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<chas at cmf.nrl.navy.mil>
++	[ATM]: [lec] remove unnecessary inlines (from Adrian Bunk <bunk at fs.tum.de>)
++	
++	Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
++	Signed-off-by: Chas Williams <chas at cmf.nrl.navy.mil>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[AH6]: Get things working again.
++	
++	Re: [AH6] Disable mutable bits after AH header
++	
++	Unfortunately I broke ah6_input() in that patch.  Thanks to Miyazawa-san
++	for notifying me of the problem.
++	
++	In that patch I removed the nh_offset parameter to ipv6_clear_mutable_options.
++	That broke ah6_input() because it relies on that variable to set the nexthdr.
++	
++	The following patch fixes this by moving this work out to the caller
++	xfrm6_rcv() where the information is already available.  It also removes
++	an unnecessary call to ip6_find_1stfragopt() in xfrm6_rcv() since nhoffp
++	already points to the nexthdr preceding the current header.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[SPARC]: bbc_envctrl.c needs linux/delay.h
++
++<yoshfuji at linux-ipv6.org>
++	[IPV6] fix typoes in macro definitions.
++	
++	Signed-Off-By: Hideaki YOSHIFUJI <yoshfuji at linux-ipv6.org>
++
++<yoshfuji at linux-ipv6.org>
++	[IPV6] remove unused macro.
++
++<yoshfuji at linux-ipv6.org>
++	[IPV6] fix the order of icmpv6 definitions for consistency.
++	
++	Signed-off-by: Hideaki YOSHIFUJI <yoshfuji at linux-ipv6.org>
++
++<yoshfuji at linux-ipv6.org>
++	[IPV6] add missing known icmpv6 types.
++	
++	Signed-off-by: Hideaki YOSHIFUJI <yoshfuji at linux-ipv6.org>
++
++<p.lavarre at ieee.org>
++	[PATCH] SATAPI despite no data
++	
++	I see we lost this source line in the changes since 2.6.7.  But if I try
++	SATAPI expecting no data without this source line, then my ata_piix.ko
++	promptly dies with such complaints as:
++	
++	kernel: irq 18: nobody cared!
++	
++	With this source line, I find I can expect no data, though I still have
++	to add auto sense to overcome:
++	
++	kernel: ata2: BUG: timeout without command
++
++<achew at nvidia.com>
++	[ata] fix reversed bit definitions in linux/ata.h
++	
++	The macros ata_id_has_lba() and ata_id_has_dma() seem to have their bits
++	reversed.  LBA support is bit 9 of word 49 in the identify page, whereas
++	DMA support is bit 8 of word 49 in the identify page.
++
++<linville at redhat.com>
++	[sound/oss i810] add MMIO DSP support
++	
++	Enclosed is a patch for the i810_audio OSS driver to support using
++	memory-mapped I/O for those chipsets that support it.
++	
++	 o Added a family of macros -- I810_IOREADx() and I810_IOWRITEx() -- that
++	key off the existing card->use_mmio flag to select between using readx/writex
++	or inx/outx for I/O operations.
++	
++	 o Converted existing inx/outx invocations to use
++	I810_IOREADx/I810_IOWRITEx instead.
++	
++	 o Changed GET_CIV(), GET_LVI, and CIV_TO_LVI() not only to use
++	I810_IOREADx/I810_IOWRITEx but also to take "card" (i.e. struct i810_card)
++	paramter.
++	
++	 o Removed check for "Pure MMIO interfaces" in i810_probe() -- replaced w/
++	(relocated) check for no I/O resources available.
++
++<linville at redhat.com>
++	[sound/oss i810] misc small changes
++	
++	Attached is a second patch to account for (most of) Herbert Xu's
++	comments.
++	
++	I have left-out the part about changing state->card to a
++	local variable where it is used a lot.  Unfortunately, that usage is
++	somewhat pervasive and I would prefer to make those changes in a separate
++	patch -- after I have had a chance to do some testing.
++	
++	If you'd prefer one patch to account for the original plus these
++	changes, let me know and I'll be happy to provide it.
++
++<aegl at agluck-lia64.sc.intel.com>
++	#   Signed-off-by: Gordon Jin <gordon.jin at intel.com>
++	#   Signed-off-by: Arun Sharma <arun.sharma at intel.com>
++	#   Signed-off-by: Tony Luck <tony.luck at intel.com>
++
++<rmk+lkml at arm.linux.org.uk>
++	[PATCH] cirrusfb: discarded in section `.exit.text' from drivers/built-in.o
++	
++	This patch fixes the error in the subject line.
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Simplify and optimize ultra3 memory copies.
++	
++	- Use one unrolled loop instead of two
++	- Improve performance for well aligned
++	  copies smaller than 256 bytes
++	- Use better named local label names so
++	  that diffing between the various instances
++	  is much easier to read
++	- Reverify exception handling
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Update defconfig.
++
++<shemminger at osdl.org>
++	[PKT_SCHED]: de-inline qdiscipline locking functions
++	
++	This qdisc code has several inline functions for locking that is only
++	used when adding/deleting queuing disciplines; so make them functions
++	instead.  The new qdisc_lock_tree encapsulates the locking used throughout
++	this code.
++	
++	Also qdisc_run() is only called from net/core/dev.c so it should be
++	defined there.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[NET]: Kill rtnl_exlock stubs.
++	
++	Rtnetlink has some macro's that are relics from earlier locking.
++	They are only used a couple of places so are easy to kill.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<kaber at trash.net>
++	[NET]: Remove useless variable in rtnetlink_rcv_msg
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<tv at tv.debian.net>
++	[BRIDGE]: Fix typo in br_stp.c
++	
++	Signed-off-by: Tommi Virtanen <tv at tv.debian.net>
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<nacc at us.ibm.com>
++	[NET]: Use msleep() in sungem driver.
++	
++	Signed-off-by: Nishanth Aravamudan <nacc at us.ibm.com>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<nakam at linux-ipv6.org>
++	[IPSEC]: xfrm_user code forgets to call xfrm_probe_algs()
++	
++	Signed-off-by: Masahide Nakmura <nakam at linux-ipv6.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[NET]: Convert ethertap to use module_param
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[NET]: Convert pktgen to use module_param
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<stevef at smfhome1.smfdom>
++	[CIFS] xattr support for cifs filesystem part 5 of 5, add removexattr capability
++	
++	Signed-off-by:  Steve French (sfrench at us.ibm.com)
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Do not duplicate compat dirent code.
++
++<stevef at smfhome1.smfdom>
++	[CIFS] Resize cifs request buffer mempools as tcp sessions are added to avoid potential deadlocks.
++	
++	Signed-off-by: Steve French (sfrench at us.ibm.com)
++
++<nathanl at austin.ibm.com>
++	[PATCH] fixes for rcu_offline_cpu, rcu_move_batch
++	
++	rcu_offline_cpu and rcu_move_batch have been broken since the list_head's
++	in struct rcu_head and struct rcu_data were replaced with singly-linked
++	lists:
++	
++	  CC      kernel/rcupdate.o
++	kernel/rcupdate.c: In function `rcu_move_batch':
++	kernel/rcupdate.c:222: warning: passing arg 2 of `list_add_tail' from
++	incompatible pointer type
++	kernel/rcupdate.c: In function `rcu_offline_cpu':
++	kernel/rcupdate.c:239: warning: passing arg 1 of `rcu_move_batch' from
++	incompatible pointer type
++	kernel/rcupdate.c:240: warning: passing arg 1 of `rcu_move_batch' from
++	incompatible pointer type
++	kernel/rcupdate.c:236: warning: label `unlock' defined but not used
++	
++	Kernel crashes when you try to offline a cpu, not surprisingly.
++	
++	It also looks like rcu_move_batch isn't preempt-safe so I touched that up,
++	and got rid of an unused label in rcu_offline_cpu.
++	
++	Signed-off-by: Nathan Lynch <nathanl at austin.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<master at sectorb.msk.ru>
++	[PATCH] Fix UNIX98 pty indices leak
++	
++	I noticed that our PPPoE/PPtP access concentrator leaks pty devices.
++	When all 4096 indices are leaked, there was need to reboot it.
++	
++	The following patch fixes this problem.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<steiner at sgi.com>
++	[PATCH] sched: initialize sched domain table
++	
++	Here is a trivial patch that is required to boot the latest 2.6.7 tree
++	on the SGI 512p system.
++	
++	Initialize the busy_factor in the sched_domain_init table.  Otherwise,
++	booting hangs doing excessive load balance operations.
++	
++	Signed-off-by: Jack Steiner <steiner at sgi.com>
++	Signed-off-by: Ingo Molnar <mingo at elte.hu>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<arun.sharma at intel.com>
++	[PATCH] compat_clock_getres shouldn't return -EFAULT if res == NULL
++	
++	For clock_getres(clockid_t clock_id, struct timespec *res), the specification
++	says "If res is NULL, the clock resolution is not returned." So this kind of
++	call should succeed.  The current implementation returns -EFAULT.
++	
++	The patch fixes the bug in compat_clock_getres().
++	
++	Signed-off-by: Gordon Jin <gordon.jin at intel.com>
++	Signed-off-by: Arun Sharma <arun.sharma at intel.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<axboe at suse.de>
++	[PATCH] BIO page refcounting fix
++	
++	Hopefully fixes the free-of-a-freed-page BUG caused during CDRW writing.
++	
++	This also fixes a problem in the bouncing for io errors (it needs to free
++	the pages and clear the BIO_UPTODATE flag, not set it.  it's already set.
++	passing -EIO to bio_endio() takes care of that).
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<sds at epoch.ncsc.mil>
++	[PATCH] selinux: fix clearing of new personality bit on security transitions
++	
++	This patch moves the clearing of the new personality bit from
++	selinux_bprm_apply_creds (called from compute_creds) to
++	selinux_bprm_set_security (called from prepare_binprm).  This ensures that the
++	bit is cleared at the same point in exec processing as for setuid/setgid
++	binaries, prior to setting up the new image.
++	
++	Signed-off-by:  Stephen Smalley <sds at epoch.ncsc.mil>
++	Signed-off-by: Ingo Molnar <mingo at elte.hu>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<hugh at veritas.com>
++	[PATCH] install_page vs. vmtruncate
++	
++	BK is still missing one piece for Oleg's install_page/vmtruncate races. 
++	Oleg didn't explicitly ACK this, but I think he did implicitly: Oleg?
++	
++	The previous patch to install_page, returning an error if !page_mapping
++	once page_table_lock is held, is not enough to guard against vmtruncate.
++	
++	When unmap_mapping_range already did this vma, but truncate_inode_pages has
++	not yet done this page, page->mapping will still be set, but we must now
++	refrain from inserting the page into the page table.
++	
++	Could check truncate_count, but that would need caller to read and pass it
++	down.  Instead, recheck page->index against i_size, which is updated before
++	unmap_mapping_range.  Better check page->mapping too: not really necessary,
++	but it's accidental that index is left when mapping is reset.
++	
++	Also, callers are expecting -EINVAL for beyond end of file, not -EAGAIN.
++	
++	Signed-off-by: Hugh Dickins <hugh at veritas.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<hugh at veritas.com>
++	[PATCH] swapoff mmap_sem deadlock
++	
++	Updating the mm lock ordering documentation drew attention to the fact that
++	we were wrong to blithely add down_read(&mm->mmap_sem) to swapoff's
++	unuse_process, while it holds swapcache page lock: not very likely, but it
++	could deadlock against, say, mlock faulting a page back in from swap.
++	
++	But it looks like these days it's safe to drop and reacquire page lock if
++	down_read_trylock fails: the page lock is held to stop try_to_unmap
++	unmapping the page's ptes as fast as try_to_unuse is mapping them back in;
++	but the recent fix for get_user_pages works to prevent that too.
++	
++	Signed-off-by: Hugh Dickins <hugh at veritas.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<alan at redhat.com>
++	[PATCH] DVB major number
++	
++	The DVB merge forgot an important change - DVB is currently using 
++	major 250, which is "local" while devices.txt (and thus FSSTND/LSB) require
++	it uses the officially allocated 212 major.
++	
++	Fortunately most 2.6 users don't currently use DVB and vendors ship devfs
++	or versions of makedev that do the right thing and generate 212 majors.
++	
++	Fix below, original author: Red Hat <alan at redhat.com>, OSDL certificate
++	of authorship included by reference.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<js at convergence.de>
++	[PATCH] dvb_usercopy() fix
++	
++	Fix some breakage in dvb_usercopy() introduced by sparse cleanups in -rc2.
++	
++	Signed-off-by: Johannes Stezenbach <js at convergence.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<david at gibson.dropbear.id.au>
++	[PATCH] page align emergency stack
++	
++	The PPC64 ABI requires the stack to be 128 byte aligned (and that can
++	become important if AltiVec registers are saved there).  In the kernel,
++	that's usually dealt with by the fact that the stack has a page
++	more-or-less to itself.  However, the emergency stacks (used in SMP bringup
++	and when we detect a bad stack pointer) aren't necessarily page aligned, or
++	anything aligned for that matter.  This patch applies the necessary
++	alignement constraint to them.
++	
++	Signed-off-by: David Gibson <dwg at au.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<anton at samba.org>
++	[PATCH] ppc64: remove multiple IRQ optimisation
++	
++	ppc64 has an optimisation where it loops on get_irq until there are no more
++	interrupts to be handled.  Mark Hack notes that this optimisation hardly
++	ever hits and costs us a potentially expensive extra read of an interrupt
++	register every interrupt.
++	
++	Also make do_IRQ void, the callers never use the return value.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<jschopp at austin.ibm.com>
++	[PATCH] ppc64: cpu hotplug fix
++	
++	On Power4 and earlier hardware there is no need to clear the CPPR (see RPAp
++	479 section 18.5.4.7.2 for what little info there is on the CPPR) when
++	stopping a cpu.  On hardware that uses Power5 an undocumented change has
++	been made that requires the CPPR to be cleared if an isolate is to be done
++	on the stopped cpu.  So the following patch lets cpu hotplug work on the
++	recent hardware.
++	
++	I sent this patch to the ppc64-dev list back in mid April and Suse picked
++	it up then for SLES9 so it has been well tested for several months.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulus at samba.org>
++	[PATCH] ppc64: Fix RAS irq handlers
++	
++	On pSeries systems, the firmware tells us a list of interrupt numbers
++	that we should enable in order to detect various error conditions.
++	When we get one of these interrupts we are supposed to call the
++	firmware, which will work out and tell us what the error was and
++	possibly also fix it.
++	
++	We were not correctly parsing the property values that tell us which
++	interrupts need to be handled in this fashion.  This patch fixes it.
++	It exports prom_n_intr_cells from prom.c since that is needed to do
++	the parsing properly.
++	
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulus at samba.org>
++	[PATCH] ppc64: whitespace cleanup in prom.c
++	
++	This patch, originally from Linas Vepstas, cleans up some wonky indentation
++	and other formatting issues in arch/ppc64/kernel/prom.c.  It does not change
++	any actual code.
++	
++	Signed-off-by: Linas Vepstas <linas at linas.org>
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<jschopp at austin.ibm.com>
++	[PATCH] ppc64 SMT bugfix
++	
++	This patch is fairly straightforward.  maxcpus should be per SMT thread and
++	not per physical processor.  SUSE picked this up back in May (was discussed
++	on ppc64 mailing list) and has had no trouble with it.
++	
++	Signed-off-by: Joel Schopp <jschopp at austin.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rsa at us.ibm.com>
++	[PATCH] ppc64: HVCS driver
++	
++	* include/asm-ppc64/hvcserver.h
++	
++	  New file added to wrap ppc64 architecture specific firmware calls for
++	  use by HVCS.  This file provides a struct hvcs_partner_info definition,
++	  headers for partner info gathering and vterm connection and termination
++	  interfaces.
++	
++	* arch/ppc64/kernel/Makefile
++	
++	  Added build directive for hvcserver.o when HVCS is configured.
++	
++	* arch/ppc64/kernel/hvconsole.c
++	
++	  Exported hvc_put_chars() and hvc_get_chars() for use by HVCS.
++	
++	* arch/ppc64/kernel/hvcserver.c
++	
++	  Body of hvcserver module which accompanies the hvcs module and provides
++	  ppc64 architecture firmware calls for use by HVCS.  This file provides
++	  function bodies for partner info gathering and vterm connection and
++	  termination interfaces.
++	
++	* drivers/char/Kconfig
++	
++	  Added CONFIG_HVCS option for both built-in version and module version
++	  of hvcs.
++	
++	* drivers/char/Makefile
++	
++	  Added build directive for hvcs.o when CONFIG_HVCS is configured.
++	
++	* drivers/char/hvcs.c
++	
++	  This is the device driver for the IBM Hypervisor Virtual Console
++	  Server, "hvcs".  The IBM hvcs provides a tty driver interface to allow
++	  Linux user space applications access to the system consoles of logically
++	  partitioned operating systems, e.g.  Linux, running on the same
++	  partitioned Power5 ppc64 system.  Physical hardware consoles per
++	  partition are not practical on this hardware so system consoles are
++	  accessed by this driver using inter-partition firmware interfaces to
++	  virtual terminal devices.
++	
++	* Documentation/powerpc/hvcs.txt
++	
++	  HVCS installation and usage documentation.
++	
++	Thanks everyone for all the help with this driver [Andrew Morton, Paul
++	Mackerras, Ben Herrenschmidt, Dave Hansen, Paul Mackerras, Dave Boutcher,
++	Hollis Blanchard, Santiago Leon, Brian King, Randy Dunlap].
++	
++	Signed-off-by: Ryan S. Arnold <rsa at us.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mporter at kernel.crashing.org>
++	[PATCH] ppc32: Fix PPC44x early uart setup
++	
++	Fix a bug introduced in the PPC44x early uart setup from the last set of
++	44x fixes.
++	
++	Signed-off-by: Matt Porter <mporter at kernel.crashing.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mporter at kernel.crashing.org>
++	[PATCH] ppc32: export some DMA API symbols
++	
++	Exports some DMA API symbols so module clients work.
++	
++	Signed-off-by: Matt Porter <mporter at kernel.crashing.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<nikai at nikai.net>
++	[PATCH] ppc32: fix comment in arch/ppc/platforms/pmac_pci.c
++	
++	Typos.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<trini at kernel.crashing.org>
++	[PATCH] ppc32: add gcc-3.4+binutils-2.14 check
++	
++	Add a build-time check for gcc-3.4 and binutils-2.14.  They don't play well
++	together.
++	
++	Signed-off-by: Tom Rini <trini at kernel.crashing.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<nacc at us.ibm.com>
++	[PATCH] macintosh/adb: replace schedule_timeout() with msleep()
++	
++	Use msleep() instead of schedule_timeout() to guarantee the task delays the
++	desired time.
++	
++	Signed-off-by: Nishanth Aravamudan <nacc at us.ibm.com>
++	Cc: Benjamin Herrenschmidt <benh at kernel.crashing.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<nacc at us.ibm.com>
++	[PATCH] ide/pmac: replace schedule_timeout() with msleep()
++	
++	Use msleep() instead of schedule_timeout() to guarantee the desired delay.
++	
++	Signed-off-by: Nishanth Aravamudan <nacc at us.ibm.com>
++	Cc: Benjamin Herrenschmidt <benh at kernel.crashing.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<nacc at us.ibm.com>
++	[PATCH] macintosh/mediabay: replace schedule_timeout() with msleep()
++	
++	Use msleep() instead of schedule_timeout() to guarantee the task delays the
++	desired time.
++	
++	Signed-off-by: Nishanth Aravamudan <nacc at us.ibm.com>
++	Cc: Benjamin Herrenschmidt <benh at kernel.crashing.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<janitor at sternwelten.at>
++	[PATCH] drivers/macintosh/macserial.c MIN/MAX removal
++	
++	Removes unnecessary min/max macros and changes calls to use kernel.h macros
++	instead.
++	
++	Signed-off-by: Maximilian Attems <janitor at sternwelten.at>
++	Cc: <benh at kernel.crashing.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<davidm at napali.hpl.hp.com>
++	[PATCH] Make get_user_pages() work again for ia64 gate area
++	
++	Changeset
++	
++	  roland at redhat.com[torvalds]|ChangeSet|20040624165002|30880
++	
++	inadvertently broke ia64 because the patch assumed that pgd_offset_k() is
++	just an optimization of pgd_offset(), which it is not.  This patch fixes
++	the problem by introducing pgd_offset_gate().  On architectures on which
++	the gate area lives in the user's address-space, this should be aliased to
++	pgd_offset() and on architectures on which the gate area lives in the
++	kernel-mapped segment, this should be aliased to pgd_offset_k().
++	
++	This bug was found and tracked down by Peter Chubb.
++	
++	Signed-off-by: <davidm at hpl.hp.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<agx at sigxcpu.org>
++	[PATCH] Fix rivafb's NV_ARCH_, cleanup DEBUG, backlight control on ppc
++	
++	- fixes the PCI-IDs (needed to get it to work on at least the NV17)
++	
++	- cleans up the DEBUG option (similar to the new radeonfb).  This also
++	  makes it easy to replace printk by btext_printf() (on ppc) or similar to
++	  ease debugging of the fb code when all else fails.
++	
++	- adds backlight control for Apple powerbooks
++	
++	Signed-off-by: Guido Guenther <agx at sigxcpu.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<oleg at tv-sign.ru>
++	[PATCH] hugetlbfs vm_pgoff bugs
++	
++	1. hugetlbfs_file_mmap() must check that vm_pgoff is hugepage aligned.
++	
++	2. hugetlb_vmtruncate_list() confuses << with >> while converting
++	   vm_pgoff to huge page offset, and zaps wrong area.
++	
++	Signed-off-by: Oleg Nesterov <oleg at tv-sign.ru>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pluto at pld-linux.org>
++	[PATCH] fdomain_cs needs ISA
++	
++	drivers/scsi/pcmcia/fdomain_cs.ko needs unknown symbol isa_memcpy_fromio
++	drivers/scsi/pcmcia/fdomain_cs.ko needs unknown symbol isa_readb
++	
++	iirc the isa bus isn't available on ppc.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<miles at gnu.org>
++	[PATCH] v850: Define find_first_bit
++	
++	Signed-off-by: Miles Bader <miles at gnu.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pavel at suse.cz>
++	[PATCH] radeonfb x86_64 fix
++	
++	Fix radeonfb and aty128fb on x86_64 by using the correct ifdef.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mika at osdl.org>
++	[PATCH] sign fix in swapfile.c
++	
++	  CC      mm/swapfile.o
++	mm/swapfile.c: In function `scan_swap_map':
++	mm/swapfile.c:114: warning: comparison between signed and unsigned
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rhim at cc.gatech.edu>
++	[PATCH] Remove dead comment in mm/filemap.c
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<eranian at hpl.hp.com>
++	[PATCH] fix for buffer limit for long in sysctl.c
++	
++	Fix a bug in do_proc_doulongvec_minmax() where the the string buffer was
++	too short to parse a 64-bit number expressed in decimal.  That was causing
++	problems with entries in /proc/sys using long and allowing large number
++	(such as -1)
++	
++	Signed-off-by: Stephane Eranian <eranian at hpl.hp.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<khalid_aziz at hp.com>
++	[PATCH] ipmi_msghandler module load failure fix
++	
++	On a 2.6.7 kernel, when I try to modprobe ipmi_msghandler, it fails to load
++	with following message:
++	
++	FATAL: Error inserting ipmi_msghandler (/lib/modules/2.6.7/kernel/drivers/char/ipmi/ipmi_msghandler.ko): Invalid module format
++	
++	And there is an error message in dmesg:
++	
++	ipmi_msghandler: init symbol 0xa000000200058080 used in module code at a000000200031b32
++	
++	What I have been able to determine is that ipmi_msghandler.c defines
++	ipmi_init_msghandler() as the module_init() routine and then it also calls
++	ipmi_init_msghandler() diretcly from couple of other places.  This does not
++	seem to be okay in 2.6.7 kernel.  I was able to fix this by defining a new
++	module_init routine which in turn calls ipmi_init_msghandler().  I also
++	removed __init from ipmi_init_msghandler() since it gets called from
++	ipmi_open() on an open of the ipmi device file.  So I would think we want
++	to keep ipmi_init_msghandler() around even after initialization.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bgerst at didntduck.org>
++	[PATCH] remove scripts/mkconfigs
++	
++	This script is no longer used after the patch to consolidate the stored
++	configs.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<miklos at szeredi.hu>
++	[PATCH] fix readahead breakage for sequential after random reads
++	
++	Current readahead logic is broken when a random read pattern is followed by
++	a long sequential read.  The cause is that on a window miss ra->next_size
++	is set to ra->average, but ra->average is only updated at the end of a
++	sequence, so window size will remain 1 until the end of the sequential
++	read.
++	
++	This patch fixes this by taking the current sequence length into account
++	(code taken from towards end of page_cache_readahead()), and also setting
++	ra->average to a decent value in handle_ra_miss() when sequential access is
++	detected.
++	
++	Signed-off-by: Miklos Szeredi <miklos at szeredi.hu>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<osst at riede.org>
++	[PATCH] MAINTAINERS: update mailing list for osst
++	
++	This list has been on sourceforge for a while now, please apply this patch
++	to make MAINTAINERS reflect that.
++	
++	Signed-off-by: Willem Riede <osst at riede.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] M68k 68060 errata I14
++	
++	M68k: gcc lately manages to generate the code sequence described in the 060
++	errata I14, so use the described workaround (from Roman Zippel)
++	
++	Signed-off-by: Roman Zippel <zippel at linux-m68k.org>
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] M68k ifpsp060
++	
++	68060 Integer Support Package: Fix _060_real_lock_page(): test %d0 before
++	actually using it (from Roman Zippel)
++	
++	Signed-off-by: Roman Zippel <zippel at linux-m68k.org>
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] m68k sparse missing void
++	
++	M68k: Add missing `void' parameters (found by sparse)
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] m68k sparse #if vs. #ifdef
++	
++	M68k: Use #ifdef instead of #if (found by sparse)
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] m68k sparse void return
++	
++	M68k: Don't return anything in functions returning void (found by sparse)
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] m68k sparse extern
++	
++	M68k: Remove `extern' at function definition (found by sparse)
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] m68k sparse inline
++	
++	M68k: Define inline functions before use (found by sparse)
++	Affected drivers:
++	  - Atari floppy
++	  - Amiga A2232 serial
++	  - Amiga Fastlane SCSI
++	  - Mac/PowerMac Valkyrie frame buffer
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] dsp56k sparse const
++	
++	Atari dsp56k: Add missing `const' keywords (found by sparse)
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] m68k sparse floating point
++	
++	M68k: Replace floating point by integer constants (found by sparse)
++	Affected drivers:
++	  - Amiga frame buffer
++	  - ATI Mach64 frame buffer
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] dnfb sparse struct init
++	
++	Apollo Frame buffer: Fix C99 struct initializers (found by sparse)
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] amifb sparse &=
++	
++	Amiga Frame buffer: Use `&' instead of `&=' (found by sparse, present since at
++	least 2.0.x)
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] m68k hardirq.h
++	
++	M68k: Add missing #include <linux/config.h>
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] dmasound paths
++	
++	Dmasound was moved to sound/oss/ a while ago
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] M68k bitops
++	
++	M68k: Add `volatile' to some bitops parameters, as this is required by the
++	cpumask code in 2.6.8-rc1.
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] M68k checksum include
++	
++	M68k: Add missing include, showing up due to include reshuffling in 2.6.8-rc1
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] M68k pgalloc fixup
++	
++	M68k: Fix build after <asm/pgalloc.h> surgery in 2.6.8-rc1:
++	  - Add missing include on machines with a standard m68k MMU
++	  - Convert __pte_free_tlb() to a macro (like it is on most other archs) on
++	    Sun-3, to avoid include hell
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] M68k Maintainership
++	
++	M68k maintainership update:
++	  - Transfer maintainership to Roman and me (ack'ed by Jes and Roman)
++	  - Update main website URL
++	  - Add Linux/m68k CVS repository website
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] depends on PCI: Multi-Tech, SyncLink, Applicom serial
++	
++	Multi-Tech, Microgate SyncLink, and Applicom serial unconditionally depend on
++	PCI
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] !PCI warnings: Moxa serial
++	
++	Kill warnings in MOXA Intellio and Smartio multiport serial drivers when !PCI.
++	Also kill warnings about unused variables in the non-modular case.
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] !PCI warnings: Specialix serial
++	
++	Kill warnings in Specialix serial driver when !PCI.
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] depends on PCI: VIA686A i2c
++	
++	VIA686A i2c unconditionally depends on PCI
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] depends on PCI DMA API: IEEE1394 core and SBP-2
++	
++	IEEE1394 core and SBP-2 unconditionally depend on the PCI DMA API, so mark
++	them broken if !PCI
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] depends on PCI: Fritz!PCI/PCIv2/PnP and HYSDN
++	
++	Fritz!PCI/PCIv2/PnP and HYSDN unconditionally depend on PCI
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] !PCI warnings: Hisax ISDN
++	
++	Kill warnings in Hisax ISDN drivers when !PCI.
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] depends on PCI: Guillemot MAXI Radio FM 2000
++	
++	Guillemot MAXI Radio FM 2000 unconditionally depends on PCI
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] depends on PCI: Technisat Skystar2 PCI
++	
++	Technisat Skystar2 PCI unconditionally depends on PCI
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] depends on PCI DMA API: Cisco/Aironet 34X/35X/4500/4800
++	
++	Cisco/Aironet 34X/35X/4500/4800 unconditionally depends on the PCI DMA API, so
++	mark it broken if !PCI
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] depends on PCI: Toshiba and VIA FIR
++	
++	Toshiba and VIA FIR unconditionally depend on PCI
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] depends on PCI: Matrox 1-wire
++	
++	Matrox 1-wire unconditionally depends on PCI
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geert at linux-m68k.org>
++	[PATCH] Dallas 1-wire delay.h
++	
++	Dallas 1-wire: never include <asm/delay.h> directly
++	
++	Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<eger at havoc.gtf.org>
++	[PATCH] cirrusfb: update for amiga (zorro)
++	
++	Cirrusfb updates:
++	  - Cirrusfb depends on Zorro or PCI
++	  - Revive Zorro support, using new Zorro driver framework
++	  - Merge PCI and Zorro code where possible
++	  - Use C99 initializers
++	  - Kill superfluous whitespace
++	  - #undef I/O ops before redefining them on Amiga
++	
++	From: Geert Uytterhoeven <geert at linux-m68k.org>
++	Signed-off-by: David Eger <eger at havoc.gtf.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<shrybman at aei.ca>
++	[PATCH] page_cache_readahead unused variable
++	
++	Removal of unused variable in mm/readahead.c.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<domen at coderock.org>
++	[PATCH] remove faulty __init's from drivers/video/fbmem.c
++	
++	From: Geert Uytterhoeven <geert at linux-m68k.org>
++	
++	These four are called from fb_show_logo, which is exported symbol, called
++	by fbcon_switch.
++	
++	From: Domen Puncer <domen at coderock.org>
++	Signed-off-by: Maximilian Attems
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<roland at topspin.com>
++	[PATCH] Export all functions in lib/string.c
++	
++	Quite a few functions in lib/string.c are not exported.  I ran into this
++	trying to use strnchr() in a module.
++	
++	This patch
++	 - exports every function defined in lib/string.c
++	 - adds some missing __HAVE_ARCH_xxx defines for i386
++	 - gets rid of the exports of functions from lib/string.c in arch/s390
++	   (BTW, why is s390 exporting things NOVERS?)
++	
++	Signed-off-by: Roland Dreier <roland at topspin.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<shemminger at osdl.org>
++	[PATCH] hlist_for_each_safe cleanup
++	
++	Make code for hlist_for_each_safe use better code (same as
++	hlist_for_each_entry_safe).  Get rid of comment about prefetch, because
++	that was fixed a while ago.  Only current use of this is in the bridge
++	code, that I maintain.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<samuel.thibault at ens-lyon.org>
++	[PATCH] front buttons wouldn't mute ESS Maestro
++	
++	Here is a small fix to enable muting ESS Maestro sound card thanks to the
++	up/down buttons: when has reached the driver's minimum (!  this is
++	something like -dB value), just mute.  (It was working in OSS driver, but
++	not in ALSA)
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bart at samwel.tk>
++	[PATCH] Config file for laptop mode.
++	
++	From: Dax Kelson <dax at gurulabs.com>
++	
++	Add support for a external configuration file for /sbin/laptop_mode, and
++	/etc/acpi/actions/battery.sh.  Convert battery.sh to use CPUFreq (off by
++	default) instead of CPU throttling (that was off by default).
++	
++	Cleanup some formating for 80 columns. 
++	
++	All changes were written by me on a plane flight from Philadelphia to Salt
++	Lake City on July 9th.  :)
++	
++	(Note from Bart Samwel: was submitted to Linus earlier, this patch is
++	unchanged from that.  I needed to submit this into -mm for now because my
++	other changes are dependent on Dax's changes.)
++	
++	Signed-off-by: Bart Samwel <bart at samwel.tk>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bart at samwel.tk>
++	[PATCH] Add documentation about /proc/sys/vm/laptop_mode to various docs.
++	
++	From: Bart Samwel <bart at samwel.tk>
++	
++	A bunch of small laptop mode updates:
++	
++	* Mention the laptop_mode and block_dump sysctls in the relevant docs,
++	  referring to the laptop-mode.txt. Improve description of what the
++	  laptop_mode knob means (i.e. seconds between last I/O and automatic
++	  sync).
++	
++	* Document the most relevant config file options.
++	
++	* Change the installation instructions in the laptop mode doc to describe
++	  the ACPI-bound version first, because this is the easiest. Explain
++	  the non-ACPI version afterwards. Added a reference to my "packaged
++	  version" of the scripts.
++	
++	* Move the setting of hdparm and cpu frequency out of the ACPI script
++	  and into the core laptop mode script. Add config option DO_HD to
++	  enable hdparm. Add config setting HD to set device to do hdparm on.
++	  Rename Dax's CPU_MANAGE to DO_CPU, with 0/1 instead of yes/no, to
++	  improve consistency.
++	
++	* Fix a problem where the root filesystem wouln't be remounted when
++	  /etc/mtab listed its type as "unknown". Deduce the type of "unknown"
++	  filesystems from /etc/fstab.
++	
++	This depends on the patch that adds config files, which was submitted
++	to Linus by Dax Kelson on July 10.
++	
++	Signed-off-by: Bart Samwel <bart at samwel.tk>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bart at samwel.tk>
++	[PATCH] Automatically disable laptop mode when battery almost runs out.
++	
++	From: Jan Topinski <simcha at chatka.org>
++	
++	Add support to automatically disable laptop mode when the battery almost
++	runs out.  This prevents data loss when the battery actually runs out.
++	
++	Signed-off-by: Bart Samwel <bart at samwel.tk>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<olh at suse.de>
++	[PATCH] ppc32: snd-powermac requires i2c
++	
++	The alsa driver for powermacs requires i2c support.
++	
++	Signed-off-by: Olaf Hering <olh at suse.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<j.blunck at tu-harburg.de>
++	[PATCH] ext2_readdir() return value fix
++	
++	ext2_readdir() is ignoring the set error return values and always returns
++	0.
++	
++	Signed-off-by: Jan Blunck <j.blunck at tu-harburg.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] ncpfs: setattr return value fix
++	
++	Arjan's new warning found a bug!
++	
++	fs/ncpfs/inode.c: In function `ncp_notify_change':
++	fs/ncpfs/inode.c:960: warning: ignoring return value of `inode_setattr', declared with attribute warn_unused_result
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<zwane at fsmlabs.com>
++	[PATCH] Recommend 'noapic' when timer via IOAPIC fails
++	
++	We might as well recommend the user boot with the noapic kernel parameter
++	instead of filling poor Ingo's mailbox.
++	
++	Signed-off-by: Zwane Mwaikambo <zwane at fsmlabs.com>
++	Signed-off-by: Ingo Molnar <mingo at elte.hu>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<schwidefsky at de.ibm.com>
++	[PATCH] s390: core changes
++	
++	s390 core changes:
++	 - Rework system call entry cleanup code to fix a potential asynchronous
++	   interrupt stack overflow if the user stack pointer happens to be in
++	   the same range as the asynchronous stack.
++	 - Replace broken schedule_timeout call with msleep.
++	 - Regenerate default configuration
++	
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<schwidefsky at de.ibm.com>
++	[PATCH] s390: zfcp host adapter.
++	
++	From: Heiko Carstens <heiko.carstens at de.ibm.com>
++	From: Maxim Shchetynin <maxim at de.ibm.com>
++	
++	zfcp host adapter changes:
++	 - Get rid of ZFCP_WAIT_EVENT_TIMEOUT macro.
++	 - Correct an error log mesage.
++	
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<schwidefsky at de.ibm.com>
++	[PATCH] s390: network driver changes
++	
++	From: Ursula Braun-Krahl <braunu at de.ibm.com>
++	From: Thomas Spatzier <tspat at de.ibm.com>
++	From: Peter Tiedemann <ptiedem at de.ibm.com>
++	
++	network driver changes.
++	 - iucv: add missing symbolic links between /sys/bus/iucv/drivers/netiucv
++	   and /sys/class/net.
++	 - iucv: make use of the debug feature.
++	 - iucv: 0 vs. NULL cleanup, avoid build warnings.
++	 - iucv: remove unnecessary -ENODEV check after call to iucv_declare_buffer.
++	 - ctc: adjust debug feature log levels.
++	 - lcs: replace broken schedule_timeout call with msleep.
++	 - qeth: add missing link type.
++	 - qeth: treat add_hhlen attribute as decimal value.
++	
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mbp at sourcefrog.net>
++	[PATCH] lost error code in rescan_partitions
++	
++	This fixes a path where an error from reloading the partition table could be
++	lost.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mbp at sourcefrog.net>
++	[PATCH] trivial doc patch for partitions
++	
++	It's slightly hard to see how these variables are used; this patch adds a
++	short description.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<alan at redhat.com>
++	[PATCH] Subject: PATCH: fix bogus ioctl return in mtrr
++	
++	This is fairly self explanatory - ENOIOCTLCMD is an internal code outside
++	of the -1 to -511 range.  The correct return for an unknown ioctl is
++	-ENOTTY although some Linux devices return the incorrect -EINVAL result.
++	
++	Patch-By: Alan Cox <alan at redhat.com>
++	OSDL Developer Certificate of Origin 1.0 included herein by reference
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bgerst at quark.didntduck.org>
++	[PATCH] remove boot98
++	
++	Remove the orphaned PC9800 boot code.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<andrea at suse.de>
++	[PATCH] writepages drops bh on not uptodate page
++	
++	I think I understood why some ext2 fs corruption still happens even after
++	the last i_size fix.
++	
++	what happened I believe is that the writepages layer got a not a fully
++	uptodate page (in turn with bh mapped on top of it), and then right before
++	unlocking the page and entering the writeback mode, it freed all the bh.
++	Without bh a not uptodate page will trigger a full readpage from disk, that
++	overwrites the pagecache before the multi-bio gets submitted, generating fs
++	corruption.
++	
++	I believe the below patch should fix it (untested) against kernel CVS.
++	
++	The testcases developed by Kurt showed the pagecache being overwritten with
++	on-disk data at block offsets, and Chris as well was wondering about races
++	between wait_on_page_writeback and readpage.  the below fix just explains
++	everything we've seen since not-fully-uptodate pages must have always bh on
++	them and the below patch enforces just that invariant, and it should fix
++	our pagecache-overwritten-by-disk-data problem.
++	
++	Signed-off-by: Andrea Arcangeli <andrea at suse.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<arekm at pld-linux.org>
++	[PATCH] convert ipmi_watchdog to use module option nowayout
++	
++	Convert ipmi_watchdog to also use module option `nowayout' as is done in
++	other watchdog drivers.
++	
++	From: Corey Minyard <cminyard at mvista.com>
++	
++	   The patch is good (same style as other watchdogs), but needs to have
++	   some documentation updated.  I've tacked that on.
++	
++	Signed-off-by: Arkadiusz Miskiewicz <arekm at pld-linux.org>
++	Signed-off-by: Corey Minyard <minyard at acm.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<olh at suse.de>
++	[PATCH] mark swim3 floppy controller as removable device
++	
++	Mark the mac floppy controller driver as removable media.  This prevents an
++	entry in /proc/partitions.  Several tools will not try to access the floppy
++	anymore with this change.
++	
++	Signed-off-by: Olaf Hering <olh at suse.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<davidm at napali.hpl.hp.com>
++	[PATCH] comment "ptrace_list" and "children" members
++	
++	Document the purpose of the "ptrace_list/ptrace_children" and
++	"children/sibling" lists.
++	
++	Signed-off-by: <davidm at hpl.hp.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<dsaxena at plexity.net>
++	[PATCH] Watchdog driver for Intel IXP2000 Network Processor
++	
++	Following patch adds support for the watchdog driver embedded in Intel's
++	IXP2000 family of network processors.  The architecture-specific bits of
++	IXP2000 support will be merged upstream via the ARM tree once all the
++	various drivers have been merged.
++	
++	Signed-off-by: Deepak Saxena <dsaxena at plexity.net>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bjorn.helgaas at hp.com>
++	[PATCH] Fix up HP copyright & license text
++	
++	Fix up HP copyrights and add licensing terms (GPL v2) for hp-agp.c and
++	pcdp.
++	
++	Signed-off-by: Bjorn Helgaas <bjorn.helgaas at hp.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<lcapitulino at prefeitura.sp.gov.br>
++	[PATCH] remove dead code from copy_process()
++	
++	Don't assign to `retval' twice in a row.
++	
++	Signed-off-by: Luiz Capitulino <lcapitulino at prefeitura.sp.gov.br>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pavel at ucw.cz>
++	[PATCH] swsusp: documentation update
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<tnt at 246tNt-laptop.lan.ayanami.246tNt.com>
++	[ppc] Add basic support for the Freescale MPC52xx embedded CPU and the LITE5200 platform
++	
++	Signed-off-by: Sylvain Munaut <tnt at 246tNt.com>
++
++<tnt at 246tNt-laptop.lan.ayanami.246tNt.com>
++	[serial/ppc] Add support for MPC52xx PSCs.
++	
++	Can be used as serial port and console. Compliant with the OCP driver model.
++	
++	Signed-off-by: Sylvain Munaut <tnt at 246tNt.com>
++
++<stevef at stevef95.austin.ibm.com>
++	[CIFS] fix smb return code
++	
++	Signed-off-by: Steve French (sfrench at us.ibm.com)
++
++<shemminger at osdl.org>
++	[BRIDGE]: Propagate bridge internal MTU changes
++	
++	Need to propagate MTU changes that the bridge does to it's pseudo interface
++	up to others. There ends up being a double call to br_min_mtu() but that's
++	harmless.
++	
++	Cleans up the EXPORT_SYMBOLS including dev_change_flags which is used by vlan.
++	Shouldn't be basing exports on kernel config options like this.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[BRIDGE]: dev_xmit cleanup
++	
++	The br_dev_xmit function was broken in two pieces (needlessly).
++	Put it back together.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[BRIDGE]: linkstate handling
++	
++	This makes bridge port status reflect both the state of the interface
++	from software (up/down) and the carrier.  It makes STP handle link failure
++	(cable breakage, etc).  The original concept comes from a 
++	Mark Ruijter <bridge at siennax.com> who implemented it differently.
++	My way is simpler and requires no polling.
++	
++	Obviously, this link state detection will only work if the network card
++	handles the events properly.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[BRIDGE]: forwarding table RCU
++	
++	Convert the bridge forwarding database over to using RCU.
++	This avoids a read_lock and atomic_inc/dec in the fast path
++	of output.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[BRIDGE]: RCU fix
++	
++	Follow up to earlier RCU patch.  Since now using RCU, need to use
++	deferred free.  
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<akpm at osdl.org>
++	[PATCH 1/8] gcc-3.5 fixes
++	
++	From: Andi Kleen <ak at muc.de>
++	
++	Trivial gcc-3.5 build fixes.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<akpm at osdl.org>
++	[PATCH 2/8] gcc-3.5 fixes
++	
++	From: Andi Kleen <ak at muc.de>
++	
++	Trivial gcc-3.5 build fixes.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<akpm at osdl.org>
++	[PATCH 3/8] gcc-3.5 fixes
++	
++	From: Andi Kleen <ak at muc.de>
++	
++	Trivial gcc-3.5 build fixes.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<akpm at osdl.org>
++	[PATCH 4/8] gcc-3.5 fixes
++	
++	From: Andi Kleen <ak at muc.de>
++	
++	Trivial gcc-3.5 build fixes.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<akpm at osdl.org>
++	[PATCH 5/8] gcc-3.5 fixes
++	
++	From: Andi Kleen <ak at muc.de>
++	
++	Trivial gcc-3.5 build fixes.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<akpm at osdl.org>
++	[PATCH 6/8] gcc-3.5 fixes
++	
++	From: Andi Kleen <ak at muc.de>
++	
++	Trivial gcc-3.5 build fixes.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<akpm at osdl.org>
++	[PATCH 7/8] gcc-3.5 fixes
++	
++	From: Andi Kleen <ak at muc.de>
++	
++	Trivial gcc-3.5 build fixes.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<akpm at osdl.org>
++	[PATCH 8/8] gcc-3.5 fixes
++	
++	From: Andi Kleen <ak at muc.de>
++	
++	Trivial gcc-3.5 build fixes.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<akpm at osdl.org>
++	[PATCH 1/1]: net/sunrpc/xprt.c gcc341 inlining fix
++	
++	From: Mikael Pettersson <mikpe at csd.uu.se>
++	
++	gcc-3.4.1 errors out in 2.6.8-rc1-mm1 at net/sunrpc/xprt.c:
++	
++	net/sunrpc/xprt.c: In function 'xprt_reserve':
++	net/sunrpc/xprt.c:84: sorry, unimplemented: inlining failed in call to 'do_xprt_reserve': function body not available
++	net/sunrpc/xprt.c:1307: sorry, unimplemented: called from here
++	make[2]: *** [net/sunrpc/xprt.o] Error 1
++	make[1]: *** [net/sunrpc] Error 2
++	make: *** [net] Error 2
++	
++	do_xprt_reserve() is marked inline but used defore its function
++	body is available. Moving it before its only caller fixes the problem.
++	
++	Signed-off-by: Mikael Pettersson <mikpe at csd.uu.se>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<hadi at cyberus.ca>
++	[PKT_SCHED]: Fix pkt_cls.h incompatabilities.
++	
++	Signed-off-by: Jamal Hadi Salim <hadi at cyberus.ca>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[NET]: Allow MD5 to be a module
++	
++	I found that recent 2.6 kernels no longer allowed me to build MD5 as
++	a module even though everything that used it were modules (including
++	ipv6 and sctp).  It turns out that there were boolean options
++	selecting MD5 in the Kconfig files.  Due to limitations in the current
++	kconfig implementation, this forces MD5 to be a boolean as well.
++	
++	The usual workaround in these cases is to move the selection up
++	to the closest tristate.  This is what the following patch does.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[NET]: Convert ROSE to use module_param.
++	
++	Switch to module_param and the hash list can be local.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[NET]: Convert netrom to use module_param.
++	
++	Convert Netrom to use module_param
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[SPARC]: sparc64 openpromio.h needs compiler.h, sync sparc32
++
++<davem at nuts.davemloft.net>
++	[NET]: Decrease skb->cb[] to 40 bytes.
++	
++	No control block usage, even on 64-bit, needs
++	the full current 48 bytes.  This brings sk_buff
++	size down to 256 bytes on 64-bit platforms and
++	fixes some performance regressions due to the
++	addition of the input_dev member.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[AH6]: Rearrange routing headers
++	
++	This patch rearranges the IPv6 routing header so that the destination
++	addresses appear in the order as they would on the destination.  This
++	is specified in Appendix A2 of RFC 2402.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[IPSEC]: Move generic encap code into xfrm6_output.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[XFRM]: Declare xfrm6_output in net/xfrm.h
++
++<davem at nuts.davemloft.net>
++	[DMA]: Fix example code in DMA-mapping.txt
++	
++	Spotted by Jack Spaar <jspaar at myrealbox.com>
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<benh at kernel.crashing.org>
++	[PATCH] ppc64: hash table races fixes
++	
++	This fixes some possible rare issues with the hash code beeing called
++	with interrupts enabled from update_mmu_cache, and fixes some races in
++	the iSeries low level htab code by adding an array of spinlocks
++	
++	This is actually an old patch already present in SLES kernel and that
++	got "missed" somewhat in the main tree, adapted to recent changes.
++	
++	Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<benh at kernel.crashing.org>
++	[PATCH] ppc64: fix memcpy_to/from_io
++	
++	The ppc64 implementation of memcpy_to/from_io was bogus (used memcpy
++	which uses cache hints and thus is broken on non cacheable IO space).
++	
++	This re-implements them with some simple/gross C code doing 32 bits
++	accesses when aligned and bytes accesses when not. 
++	
++	Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] con_font_op split
++	
++	Preparations for cleanups: con_font_op() is turned into a switch calling
++	con_font_{get,set,default,copy} depending on the operation required;
++	method ->con_font_op() also split, with NULL resulting in -ENOSYS on
++	operation in question.
++	
++	Code that used to be in con_font_op() got slightly cleaned up after move
++	into new helpers (we are beginning to untangle the mess; there will be
++	more cleanups in the next patches).
++	
++	Methods are currently using exact same arguments as old ->con_font_op().
++	That will change in subsequent patches, method by method (right now there's
++	a hell of a scary field reuse between them, making impossible to do any
++	static checks and practically begging for bugs).
++	
++	Signed-off-by: Al Viro <viro at parcelfarce.linux.org.uk>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] con_font_default sanitized
++	
++	->con_font_default() sanitized.  We copy font name (if any) from userland
++	in the caller and pass it explicitly.  We are also beginning to get rid
++	of console_font_op in method arguments.
++	
++	Signed-off-by: Al Viro <viro at parcelfarce.linux.org.uk>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] con_font_copy sanitized
++	
++	->con_font_copy() sanitized.  We extract the number of console to copy the
++	font from in the caller (it's taken from the field of console_font_op that
++	is normally used for font height - messy even for an ioctl, but that animal
++	used to be passed all the way down into console drivers).
++	
++	With decoding done in con_font_copy(), we simply pass source console number
++	into the method.
++	
++	Signed-off-by: Al Viro <viro at parcelfarce.linux.org.uk>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] con_set_font sanitized
++	
++	con_font_set() sanitized.  We are passing console_font and flags into
++	the method in separate arguments and we are not messing with
++	console_font_op->data anymore - it's a userland pointer (to be annotated
++	several patches later in the series, due to another abuse of console_font_op
++	that needs to be fixed first), while console_font->data is kernel one
++	and they don't mix anymore.
++	
++	We also do a sanity check (font width > 0) in the caller instead of
++	method instances, since we are already checking for width <= 32 and
++	height <= 32 there; doesn't make sense leaving that one in method
++	instances.
++	
++	Signed-off-by: Al Viro <viro at parcelfarce.linux.org.uk>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] fbcon_do_set_font() sanitized
++	
++		fbcon internal cleanup.  Instead of passing console_font_op into
++	fbcon_do_set_font() we pass width/height directly.  Amusing (but harmless)
++	bug fixed there:
++		if (!w > 32) {
++			bogus code that fortunately never got triggered
++		}
++	Fixed by removal of the junk in question (and yes, it's verifiable junk -
++	it would not do anything even if we replaced the check with intended
++	!(w > 32)).
++	
++	Signed-off-by: Al Viro <viro at parcelfarce.linux.org.uk>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] con_get_font sanitized
++	
++	->con_font_get() sanitized.  We pass console_font * to method instead of
++	console_font_op * and do not mess with mixing ->data in these guys.
++	
++	Signed-off-by: Al Viro <viro at parcelfarce.linux.org.uk>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] console_font_op annotated
++	
++	->vc_font switched to console_font (from console_font_op, of all things!)
++	console_font_op annotated (->data is finally makred __user).
++	
++	Signed-off-by: Al Viro <viro at parcelfarce.linux.org.uk>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] fb_cursor() fixes
++	
++	Massive leaks fixed in fb_cursor().
++	
++	Signed-off-by: Al Viro <viro at parcelfarce.linux.org.uk>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] cmap annotations
++	
++	fb_set_cmap() and fb_copy_cmap() split into kernel and userland versions.
++	fb_cmap, fb_image and fb_cursor split and annotated.
++	fixed bug in sbuslib.c that used to call "userland" version of fb_set_cmap()
++	when kernel one was need (RGB data was already copied into kernel space).
++	
++	Signed-off-by: Al Viro <viro at parcelfarce.linux.org.uk>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pfg at sgi.com>
++	sn_console.c:
++	  move sn_debug_printf to only compile for DEBUG
++	  early printk needs to handle missing carriage returns
++	  Signed-off-by: Pat Gefre <pfg at sgi.com>
++	  Signed-off-by: Tony Luck <tony.luck at intel.com>
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Update defconfig.
++
++<holt at sgi.com>
++	bte_error.c:
++	bte.c:
++	  After working with the chip designer some more, we have determined one
++	  more hardware register we were supposed to write to ensure the SHUB
++	  chip was ready for future transfers.  This patch fixes that.  This also
++	  allowed us to eliminate a udelay which was working around the problem.
++	
++	  During retesting, we uncovered a race condition where transfer status
++	  was changed by a different cpu after we were expecting one value which
++	  cascaded to additional problems.  This patch uses a local variable to
++	  also eliminate that race.
++	
++	  Signed-off-by: Robin Holt <holt at sgi.com>
++	  Signed-off-by: Tony Luck <tony.luck at intel.com>
++
++<davem at nuts.davemloft.net>
++	[NET]: Kill NET_FASTROUTE, does nothing and suffers from major bitrot.
++	
++	Based up suggestion/changes from Jeff Garzik.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<stevef at smfhome.smfdom>
++	[CIFS] remove sparse pointer warning
++	
++	Signed-off-by: Steve French (sfrench at us.ibm.com)
++
++<viro at www.linux.org.uk>
++	[PATCH] inline fixes in net/*
++	
++	* in ipv6/route.c: made ipv6_advmss() inlined again (and moved it up)
++	* in sunrpc/xprt.c: inlining fix: moved do_xprt_reserve() up
++	
++	Signed-off-by: Al Viro <viro at parcelfarce.linux.org.uk>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] annotations in drivers/video
++	
++	Signed-off-by: Al Viro <viro at parcelfarce.linux.org.uk>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: ftape
++	
++	ftape got annotations and NULL noise removals.
++	Propagated the dependency on alpha/i386/amd64 to Kconfig (it's already
++	enforced by #error)
++	
++	Signed-off-by: Al Viro <viro at parcelfarce.linux.org.uk>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: istallion
++	
++	istallion annotated, cleaned up, a bunch of useless verify_area()
++	removed.
++	
++	Signed-off-by: Al Viro <viro at parcelfarce.linux.org.uk>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: stallion
++	
++	stallion annotated, cleaned up, a bunch of useless verify_area()
++	removed.
++	
++	Signed-off-by: Al Viro <viro at parcelfarce.linux.org.uk>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: drivers/char/*
++	
++	the rest of BROKEN_ON_SMP drivers in drivers/char sparsified.
++	
++	Signed-off-by: Al Viro <viro at parcelfarce.linux.org.uk>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] NULL noise removal in skfp
++	
++	Signed-off-by: Al Viro <viro at parcelfarce.linux.org.uk>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] #if abuses
++	
++	Signed-off-by: Al Viro <viro at parcelfarce.linux.org.uk>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] ARM initial annotations
++	
++	Usual set of initial annotations for a platform.
++	
++	Signed-off-by: Al Viro <viro at parcelfarce.linux.org.uk>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: more in isdn
++	
++	annotations and NULL noise removals in drivres/isdn (more BROKEN_ON_SMP
++	stuff)
++	
++	Signed-off-by: Al Viro <viro at parcelfarce.linux.org.uk>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: more in drivers/net
++	
++	drivers/net BROKEN_ON_SMP annotations and NULL noise removals.
++	
++	Signed-off-by: Al Viro <viro at parcelfarce.linux.org.uk>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] size_t portability fixes
++	
++	more size_t fixes (%d -> %zd)
++	
++	Signed-off-by: Al Viro <viro at parcelfarce.linux.org.uk>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] signed char portability fix
++	
++	code using atm_cirange fields assumes that they are signed; make that
++	explicit by s/char/signed char/.
++	
++	Signed-off-by: Al Viro <viro at parcelfarce.linux.org.uk>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at www.linux.org.uk>
++	[PATCH] sparse: misc cleanups
++	
++	all sorts of minor stuff - basically, all chunks are independent here,
++	but IMO that one is not worth splitting.  Contains:
++		* pmac_cpufreq.c: declaration in the middle of a block.
++		* sys_ia32.c: couple of trivial annotations.
++		* ipmi_si_intf.c: should be using asm/irq.h instead of linux/irq.h
++		* synclink_cs.c: assignment-in-conditional with nobody ever looking
++	at the variable we are assigning to afterwards; variable removed.
++		* sbni.c: s/__volatile/__volatile__
++		* matroxfb_base.h: got rid of ((u32 *)p)++
++		* asm-ppc/checksum.h and asm-sparc64/floppy.h: NULL noise removal
++		* amd64 compat.h: missing L in long constant.
++		* mtd-abi.h: annotated ioctl structure
++		* sysctl.c: corrected annotations in extern
++	
++	Signed-off-by: Al Viro <viro at parcelfarce.linux.org.uk>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<marcel at holtmann.org>
++	[Bluetooth] Send HCI_Reset for ISSC USB dongles
++	
++	For the USB dongles from ISSC the first command must be a HCI_Reset,
++	because otherwise the inquiry procedures won't work.
++	
++	Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
++
++<marcel at holtmann.org>
++	[Bluetooth] Fix resetting to default filters
++	
++	The problem is that after a successful connection between the Windows
++	Bluetooth stack and the Linux Bluez stack, no packets from the device
++	ever reach the PC running Windows XP Service Pack 2. That is, a ping
++	from the PC never receives a response, and a ping from BlueZ never
++	reaches the PC. Linux packet statistics show that the PC packets are
++	received, but all return traffic seems to be routed over the loopback
++	interface.
++	
++	Immediately after creating the BNEP connection with BlueZ, the Windows
++	Bluetooth stack sends a BNEP_FILTER_NET_TYPE_SET_MSG with an effective
++	length of zero. BlueZ interprets this message to mean that no filter
++	ranges should be allowed. The code zeros the first entry in the filter
++	list, which is than interpreted as meaning that no ranges of acceptable
++	packets are available. This interpretation is wrong and leads to all
++	packets being rejected by BNEP.
++	
++	The Bluetooth BNEP specification clearly states the following:
++	
++	The length (in octets) of this message is 4+4*N, where N is the number
++	of disjoint ranges of Networking protocol types that form the complete
++	set. Note that N=0 (empty set) denotes a reset to default filters (if
++	any) supported by the remote device.
++	
++	Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
++
++<trini at kernel.crashing.org>
++	[PATCH] ppc32: fix compilation with binutils-2.15
++	
++	Currently, ppc32 will not always compile with binutils-2.15.  The issue
++	is that binutils has become even more strict about which opcodes can be
++	used with which CPU flags.  The problem is that we have a number of
++	cases where we compile with altivec instructions (with runtime checks to
++	make sure we can actually run them) in code that's not altivec specific.
++	
++	The fix for this is to always pass in -maltivec on CONFIG_6xx.  To do
++	this cleanly, we split our AFLAGS definition up into
++	aflags-$(CONFIG_FOO).
++	
++	Signed-off-by: Tom Rini <trini at kernel.crashing.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] slab memory shrinking balancing fix
++	
++	The logic in shrink_slab tries to balance the proportion of slab which it
++	scans against the proportion of pagecache which the caller scanned.  Problem
++	is that with a large number of highmem LRU pages and a small number of lowmem
++	LRU pages, the amount of pagecache scanning appears to be very small, so we
++	don't push slab hard enough.
++	
++	The patch changes things so that for, say, a GFP_KERNEL allocation attempt we
++	only consider ZONE_NORMAL and ZONE_DMA when calculating "what proportion of
++	the LRU did the caller just scan".
++	
++	This will have the effect of shrinking slab harder in response to GFP_KERNEL
++	allocations than for GFP_HIGHMEM allocations.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<alan at redhat.com>
++	[PATCH] PATCH: Fix HPT366 crash and support HPT372N
++	
++	On a board containing the HPT372N IDE controller the 2.6.x series kernels will
++	misbehave. If the HPT372N is set up with the newer PCI identifier it is 
++	ignored. If it is set up with the HPT372 identifier then the kernel crashes
++	on boot.
++	
++	This patch is a forward port of my 2.4 driver fixes that have been in 2.4
++	for a year but somehow escaped 2.6. Ronny Buchmann caught a couple
++	of merge details I missed and those are fixed in this diff too.
++	
++	As well as adding 372N support this also fixes the unknown revision case
++	to avoid crashes should any future 37x variants with weird class_rev's appear
++	
++	Signed-off-by: Alan Cox <alan at redhat.com>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<stevef at steveft21.ltcsamba>
++	[CIFS] Update readme and todo lists for cifs vfs
++	
++	Signed-off-by: Steve French (sfrench at us.ibm.com)
++
++<jmorris at redhat.com>
++	[CRYPTO]: Add i586 optimized AES
++	
++	Below is an updated version of patch from Fruhwirth which integrates the 
++	Gladman AES code into the crypto API.
++	
++	I've tried to ensure that this is done as simply as possible: the user 
++	gets the asm version by default if it's suitable.
++	
++	I've also now added the alternate GPL licensing provided by Brian Gladman, 
++	and licensed the code as GPL.
++	
++	Signed-off-by: James Morris <jmorris at redhat.com>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[IPSEC]: Fix SPI generation by netlink_get_spi()
++	
++	The issue is that two successive calls to netlink_get_spi is returning
++	the same SA.  Since netlink_get_spi is meant to be a creation operation
++	this is incorrect.
++	
++	The netlink_get_spi operation is modelled off the PFKEY SADB_GETSPI
++	command which is specified in RFC 2367.  The purpose of SADB_GETSPI
++	is to create a new larval SA that can then be filled in by SADB_UPDATE.
++	
++	Its semantics does not allow two SADB_GETSPI calls to return the same
++	SA, even if there is no SADB_UPDATE call in between.
++	
++	The reason the second netlink_get_spi is returning the same SA is
++	because in find_acq(), the code is looking at all larval states as
++	opposed to only larval states with an SPI of zero.
++	
++	Since the only other caller of find_acq() -- xfrm_state_add() intentionally
++	ignores all return values with a non-zero SPI, it is safe to not look at
++	SAs with non-zero SPIs at all in find_acq().
++	
++	The following patch does exactly that.
++	
++	In fact, the find_acq() call in xfrm_state_add() is a remnant from
++	the days when we had xfrm_state_replace() instead of xfrm_state_add()
++	and xfrm_state_update().  It can now be safely removed.
++	
++	I'll post a separate patch for that.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[IPSEC]: Remove redundant check in xfrm_state_add()
++	
++	This is the patch referred to in the netlink_get_spi thread.
++	
++	I was actually wrong about the reason for this patch though.  Firstly
++	it's the SPI check that is redundant and not the find_acq() call.
++	And it's redundant because of the find_acq() patch, not because
++	of the fact that this is in xfrm_state_add().
++	
++	Now that find_acq() only returns SAs with SPIs, we don't need to
++	check this in xfrm_state_add() anymore.
++	
++	We do still need the call though to clean up leftover larval states.
++	
++	Another side-effect of the change is that we can move the existence
++	check above find_acq() since find_acq() will never return any SAs
++	matching the SPI we're trying to add (It doesn't need to because if
++	an SA with a matching SPI existed, it would've been returned by
++	state_lookup() already).
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[IPSEC]: xfrm_alloc_spi always succeeds on non-trivial range
++	
++	xfrm_alloc_spi will always succeed if minspi < maxspi, even if
++	minspi + 1 == maxspi.  If the range is already occupied this
++	will obviously lead to breakage.
++	
++	Of course this is very unlikely to occur in reality due to the
++	size of the range.  Although with IPCOMP it might actually happen
++	on a very large server.
++	
++	The fix is obivous.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[PF_KEY]: spirange should be in host byte order.
++	
++	I'm looking through the xfrm_alloc_spi stuff and noticed that the
++	netlink alloc_spi function takes the range in host order while the
++	PFKEY alloc_spi function takes them in network order.
++	
++	First I thought that I stuffed up since I was the one who changed
++	the code in the netlink interface to take them in host order :)
++	
++	But reading RFC 2367 seems to indicate otherwise.  It says that all
++	fields are host order unless specified otherwise.  And the spirange
++	fields are not specified to be network order at all.
++	
++	Looking at the existing PFKEY users:
++	
++	User Space
++	----------
++	Openswan - Doesn't use PFKEY for this.
++	Racoon - Puts zeros in there so it doesn't care.  However its test-pfkey
++		 program stores things in host order.
++	ISAKMPD - Stores things in host order.
++	
++	So the conclusion is that we can and should change our PFKEY
++	implementation to use host order for these fields.
++	
++	This patch does exactly that.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<ahu at ds9a.nl>
++	[IPSEC]: Fix UDP decap code.
++	
++	The missing break causes the packet to be tested against
++	both encapsulation types, one will always fail.
++	
++	Signed-off-by: bert hubert <ahu at ds9a.nl>
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<chrisw at osdl.org>
++	[PATCH] ethtool_get_regs copy right number of bytes to user
++	
++	If regs.len is smaller than reglen it's possible to copy more bytes out
++	than the user asked for.
++	
++	Signed-off-by: Chris Wright <chrisw at osdl.org>
++
++<bunk at fs.tum.de>
++	[NET]: Update NET_SCH_NETEM Kconfig help text.
++	
++	Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<laforge at netfilter.org>
++	[NETFILTER]: Fix compilation of ip_nat_snmp_basic.c
++	
++	Please sumbit before 2.6.8-final, this just moves some code in order to
++	make gcc happy.
++	
++	Thanks!
++	
++	Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
++	Signed-off-by: Harald Welte <laforge at netfilter.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<benh at kernel.crashing.org>
++	[PATCH] ppc32: Workaround new MPC745x CPU erratas
++	
++	The latest versions of Motorola erratas for the MPC745x CPUs (and 744x)
++	adds a couple of nasty ones for which we really want workarounds in the
++	kernel. One is to disable the BTIC branch target cache on some revs
++	(too bad for performances...) and the other one is to force cacheable
++	memory pages to always be marked as SMP coherent even on UP systems (I
++	didn't measure significant perfs impact with this one).
++	
++	Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<anton at samba.org>
++	[PATCH] sched: use for_each_cpu
++	
++	The per cpu schedule counters need to be summed up over all possible cpus. 
++	When testing hotplug cpu remove I saw the sum of the online cpu count for
++	nr_uninterruptible go negative which made the load average go nuts.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<tim at physik3.uni-rostock.de>
++	[PATCH] Fix BSD accounting cross-platform compatibility
++	
++	BSD accounting cross-platform compatibility is a new feature of 2.6.8 and
++	thus not crucial, but it'd be nice not to have kernels writing wrong file
++	formats out in the wild.
++	
++	The endianness detection logic I wanted to suppose for userspace turned out
++	to be bogus.  So just do it the simple way and store endianness info
++	together with the version number.
++	
++	Signed-off-by: Tim Schmielau <tim at physik3.uni-rostock.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<haveblue at us.ibm.com>
++	[PATCH] ppc64: __make_room() warning fix
++	
++	arch/ppc64/kernel/prom.c: In function `__make_room':
++	arch/ppc64/kernel/prom.c:1415: warning: unused variable `offset'
++	
++	Signed-off-by: Dave Hansen <haveblue at us.ibm.com>
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<haveblue at us.ibm.com>
++	[PATCH] ppc64: fix off-by-one in mem_init()
++	
++	lmb_end_of_DRAM() returns the address of the end of RAM, not the starting
++	address of the last page.  We've been accessing mem_map[] out of bounds for
++	quite a while.  But, it's just a read, so it's probably never caused a real
++	problem.
++	
++	But, during my port of CONFIG_NONLINEAR to ppc64, I have a check to make
++	sure that all __va() calls are given with valid physical addresses.  This
++	code tripped that check.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<johnrose at austin.ibm.com>
++	[PATCH] ppc64: struct pci_controller cleanup
++	
++	The patch below removes the unused member "pci_io_offset" from struct
++	pci_controller.  If there are no problems, please apply.
++	
++	Signed-off-by: John Rose <johnrose at austin.ibm.com>
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulus at samba.org>
++	[PATCH] ppc64: ISA device tree node refcount fix
++	
++	Moves a misplaced of_node_put().  In the existing code, the node in
++	question is used just after its refcount is decremented.
++	
++	Signed-off-by: John Rose <johnrose at austin.ibm.com>
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<david at gibson.dropbear.id.au>
++	[PATCH] ppc64: fix RAS irq handlers
++	
++	Both arch/ppc64/kernel/ras.c and arch/ppc64/kernel/rtasd.c have a spinlock
++	variable declared static called "log_lock".  Since the code in these files
++	interact quit a lot, having two different locks with identical names is
++	manifestly confusing.  This patch renames both locks to something a little
++	clearer.  In the case of ras.c it also renames the buffer protected by the
++	lock to a more usefullly greppable name.
++	
++	Signed-off-by: David Gibson <dwg at au.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<anton at samba.org>
++	[PATCH] ppc64: fix hotplug irq migration code
++	
++	In migrate_irqs_away we werent converting a virtual irq to a real one.  We
++	ended up passing the wrong irq numbers to the hypervisor and migration of
++	affinitised irqs on cpu hot unplug didnt work.
++	
++	Also clarify the rtas_stop_self printk.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<vatsa at in.ibm.com>
++	[PATCH] ppc64: Fix cpu_up race
++	
++	Patch below fixes a cpu_up race in PPC64.
++	
++	Signed-off-by: Srivatsa Vaddagiri <vatsa at in.ibm.com>
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulus at samba.org>
++	[PATCH] ppc64: improve SLB reload
++	
++	Rewrite/cleanup of the SLB management code.  This removes nearly all the
++	SLB related code from arch/ppc64/kernel/stab.c and puts a rewritten version
++	in arch/ppc64/mm, where it better belongs.  The main SLB miss path is in
++	assembler and the other routines have been cleaned up and streamlined.
++	
++	Notable changes:
++	
++	- Ugly bitfields no longer used for generating SLB entries.
++	
++	- slb_allocate() (the main SLB miss routine) is now in assembler, and all
++	  the data it uses is stored in the PACA.
++	
++	- The mm context is now copied into the PACA at context switch time, to
++	  avoid looking up the thread struct on SLB miss.
++	
++	- An SLB miss will now never (directly) result in a call to
++	  do_page_fault.  If we get a miss on a totally bogus address the handler
++	  will now put in an SLB referencing VSID 0.  This will never have any
++	  pages, so we'll get the (fatal) page fault shortly afterwards.  This
++	  simplifies the SLB entry and exit paths.
++	
++	- The round-robin pointer in the PACA now references the last-used
++	  instead of next-to-use SLB slot, which simplifies the asm for updating it
++	  slightly.
++	
++	- Unify do_slb_bolted with the general SLB miss path.  There is now one
++	  SLB miss handler, in assembler, and called with only the low-level
++	  exception prolog (EXCEPTION_PROLOG_[PI]SERIES rather than
++	  EXCEPTION_PROLOG_COMMON) and minimal extra save/restore logic.
++	
++	- Streamlines the exception entry/exit path of the SLB miss handler to
++	  shave a few cycles off.  The most significant change is that the RI bit
++	  is left off throughout the whole handler, which avoids an extra mtmsrd to
++	  turn it back off on the exit path.
++	
++	Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<david at gibson.dropbear.id.au>
++	[PATCH] ppc64: remove #include processor.h from div64.S
++	
++	This patch removes a redundant #include of processor.h from
++	arch/ppc64/boot/div64.S.  I came across this because, at least with the
++	binutils versions I have currently installed, the 32-bit assembler used for
++	the bootstrap code objects to the // comments that recently went into
++	processor.h.
++	
++	Signed-off-by: David Gibson <dwg at au.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<galak at somerset.sps.mot.com>
++	[PATCH] ppc32: Support for MPC8560 CPU and boards
++	
++	The following patch adds completes the CPU support for the MPC8560 PowerPC.
++	 Additionally, it adds support for the MPC8560 ADS reference board and
++	fixes up some build issues with the SBC8560 board.
++	
++	Signed-off-by: Kumar Gala <kumar.gala at freescale.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<galak at somerset.sps.mot.com>
++	[PATCH] ppc32: support for MPC8555 CPU and board
++	
++	The following patch adds completes the CPU support for the MPC8555 PowerPC.
++	 Additionally, it adds support for the MPC8555 CDS reference board.  This
++	is another PowerPC in the Freescale MPC85xx family.
++	
++	* Add support for MPC8555 CPU and reference board
++	
++	Signed-off-by: Kumar Gala <kumar.gala at freescale.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] oom-killer: call show_free_areas
++	
++	Change the oom-killer so that it spits a sysrq-m output into the logs, and
++	shows the gfp_mask of the failing allocation attempt.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<adobriyan at mail.ru>
++	[PATCH] Fix menuconfig partial inability to show help texts.
++	
++	Fix menuconfig inability to show help texts when there is menu item with
++	letter "H" highlighted on the screen.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<jbarnes at engr.sgi.com>
++	[PATCH] quieten down per-zone memory stats
++	
++	On a system with a lot of nodes, 4 lines of output per node is a lot to
++	have to sit through as the system comes up, especially if you're on the
++	other end of a slow serial link.  The information is valuable though, so
++	keep it around for the system logger.  This patch makes the printks for the
++	memory stats use KERN_DEBUG instead of the default loglevel.
++	
++	Signed-off-by: Jesse Barnes <jbarnes at sgi.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<roland at topspin.com>
++	[PATCH] MSI: stop using dev->bus->ops directly in msi.c
++	
++	First half of the MSI rewrite: pure cleanup.  Use proper
++	pci_read_config_xxx() and pci_write_config_xxx() functions instead of
++	accessing raw dev->bus->ops.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<roland at topspin.com>
++	[PATCH] MSI: MSI/MSI-X API updates
++	
++	Second half of MSI rewrite: fix the API and update documentation.  Split
++	enabling MSI and MSI-X to separate pci_enable_msi()/pci_disable_msi() and
++	pci_enable_msix()/pci_disable_msix() functions.  free_irq() no longer has
++	the side effect of freeing interrupt vectors (so a device driver can do
++	multiple request_irq()/free_irq() cycles on the same MSI/MSI_X vector).
++	
++	From: Tom L. Nguyen <tom.l.nguyen at intel.com>
++	Signed-off-by: Roland Dreier <roland at topspin.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bjorn.helgaas at hp.com>
++	[PATCH] rename CONFIG_PCI_USE_VECTOR to CONFIG_PCI_MSI
++	
++	The "vector" terminology is architecture-dependent.  The PCI MSI interface
++	actually deals with Linux IRQ numbers (i.e., things you can pass to
++	request_irq()), and we shouldn't confuse things by calling them "vectors" just
++	because we're using MSI rather than an IOSAPIC.
++	
++	Signed-off-by: Bjorn Helgaas <bjorn.helgaas at hp.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<macro at linux-mips.org>
++	[PATCH] MAINTAINERS update
++	
++	Maciej has moved.
++	
++	Signed-off-by: Maciej W. Rozycki <macro at linux-mips.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<alan at lxorguk.ukuu.org.uk>
++	[PATCH] fdomain_cs ISA fix
++	
++	Revert the recent fdomain_cs config dependency "fix" and fix the linkage
++	error with ifdeffery instead.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<hch at lst.de>
++	[PATCH] modular swim3
++	
++	ACKed by the pmac folks a while ago.  Also moves the Kconfig entry to where
++	it belongs.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<hch at lst.de>
++	[PATCH] Fix modular anscd
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulus at samba.org>
++	[PATCH] PPC8xx Maintainer patch
++	
++	Tom is looking after PPC8xx and the PPC boot code.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<arnd at arndb.de>
++	[PATCH] DVB: "errno" undefined
++	
++	Actually, the problem has its origin in my removal of all in-kernel
++	syscalls (except execve, which is non-trivial) earlier this year.  This
++	change was blindly reverted by the maintainer, while at the same time the
++	local errno variable was removed.  See also
++	http://linux.bkbits.net:8080/linux-2.5/hist/drivers/media/dvb/frontends/tda=
++	1004x.c
++	
++	This patch is the one that was already merged earlier.  I'm now also
++	removing the definitions for the kernel syscalls on i386 to make it harder
++	to reintroduce them again.  This was already done for ppc64, the others
++	should probably follow.
++	
++	Signed-off-by: Arnd Bergmann <arnd at arndb.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<ak at suse.de>
++	[PATCH] Documentation fix for NMI watchdog
++	
++	Sync nmi_watchdog.txt with reality on x86-64.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bjorn.helgaas at hp.com>
++	[PATCH] HPET copyrights, cleanup
++	
++	This patch
++		- adds copyright and license info
++		- changes sense of mmap config option (setting option enables mmap
++		  instead of disabling it, to avoid the double negative)
++		- removes an #ifdef CONFIG_IA64 now that acpi_register_gsi()
++		  is generic.
++	
++	Signed-off-by: Bjorn Helgaas <bjorn.helgaas at hp.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bunk at fs.tum.de>
++	[PATCH] remove outdated reference to Documentation/arm/SA1100/PCMCIA
++	
++	This file does not exist in 2.6.
++	
++	Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bunk at fs.tum.de>
++	[PATCH] Canonically reference files in Documentation/ code comments part
++	
++	Below is a patch by Hans Ulrich Niedermann
++	<linux-kernel at n-dimensional.de> to change all references in comments to 
++	files in Documentation/ to start with Documentation/
++	
++	Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<bgerst at quark.didntduck.org>
++	[PATCH] Remove symbol_is()
++	
++	Remove the unused symbol_is() macro.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<SteveD at redhat.com>
++	[PATCH] nsf4 oops fixes
++	
++	Here are some oops I found in error paths in the mounting pathes while
++	debugging something else...  I sent it out a while ago, but it didn't seem
++	to get any traction....
++	
++	The nfs_fill_super() fix is obvious and in nfs4_fill_super(), the
++	server->client ptr needs to be set before the cl_idmap check, since
++	rpc_shutdown_client() needs it when the check fails.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<axboe at suse.de>
++	[PATCH] fix cdrom cdda rip single frame dma fall back
++	
++	There's a stupid error in the fall back logic, it fails to increment the
++	user pointer so the wave file is corrupt. We should also clear
++	last_sense just to be sure.
++	
++	Signed-off-by: Jens Axboe <axboe at suse.de>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<armin at melware.de>
++	[PATCH] ISDN Eicon driver: use msleep()
++	
++	Author: Armin Schindler, Nishanth Aravamudan
++	
++	Use kernel provided msleep() instead of own sleep
++	implementation.
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<michael.kerrisk at gmx.net>
++	[PATCH] Off-by-one error for SIGXCPU / RLIMIT_CPU checking
++	
++	There is a lonstanding off-by-one error that results from an incorrect
++	comparison when checking whether a process has consumed CPU time in
++	excess of its RLIMIT_CPU limits. 
++	
++	This means, for example, that if we use setrlimit() to set the soft CPU 
++	limit (rlim_cur) to 5 seconds and the hard limit (rlim_max) to 10 seconds, 
++	then the process only receives a SIGXCPU signal after consuming 6 seconds
++	of CPU time, and, if it continues consuming CPU after handling that
++	signal, only receives SIGKILL after consuming 11 seconds of CPU time.
++	
++	The fix is trivial.
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[BRIDGE]: Build fix for gcc-2.95.x
++	
++	gcc-2.95.c does not support anonymous unions.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<suckfish at ihug.co.nz>
++	[IPV6]: Trivial fix for ipv6_addr_hash()
++	
++	ipv6_addr_hash doesn't do what it's comment says.  The comment was
++	probably what was intended, not that it'll make much difference in
++	practice.
++	
++	Signed-off-by: Ralph Loader <suckfish at ihug.co.nz>
++	Signed-off-by: Yoshifuji Hideaki <yoshfuji at linux-ipv6.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[IPSEC]: Remove unnecessary inet_ecn.h inclusions
++	
++	This is a couple of clean-ups stemming from the xfrm_output change.
++	
++	I should've removed the inet_ecn.h inclusions in that change as the
++	ECN code has been moved to xfrm[46]_output.c.  This patch does exactly
++	that.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<herbert at gondor.apana.org.au>
++	[IPSEC]: Move xfrm[46]_tunnel_check_size into xfrm[46]_output.c
++	
++	This patch moves xfrm[46]_tunnel_check_size() into xfrm[46]_output.c
++	where it can be made static since it's only used there.
++	
++	While moving the icmp.h inclusions over I also discovered that the
++	tunnel files are missing an inclusion of net/protocol.h.  So I've
++	added them as well.
++	
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[TCP]: BIC tcp congestion calculation timestamp
++	
++	Small change to bictcp based on the BIC 1.1 patches for web100.
++	Keep track of last time congestion was computed, and recompute
++	if cwnd changes or every 1/32 of a second.
++	
++	Also changes the initialization location for the parameters.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<rusty at rustcorp.com.au>
++	[NET]: Add skb_iter functions.
++	
++	There's no convenient function to walk the data of an skbuff; provide
++	one.  Netfilter extensions in particular can use this to examine
++	packet contents without needing an entire copy.
++	
++	I originally wrote an 'skb_walk(skb, fn, data)' function, but open
++	iterators are easier to use for complex cases.
++	
++	Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<galak at somerset.sps.mot.com>
++	[PATCH] ppc32: fix e500 SPE saving of context
++	
++	Fix the fact that we were not the signal processing engine status and
++	control register (SPEFSCR) on giveup_spe.  Causes problems when the kernel
++	tries to read or modify the SPEFSCR.
++	
++	Signed-off-by: Kumar Gala <kumar.gala at freescale.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<axboe at suse.de>
++	[PATCH] bio_copy_user() cleanups and fixes
++	
++	blk_rq_map_user() is a bit of a hack currently, since it drops back to
++	kmalloc() if bio_map_user() fails.  This is unfortunate since it means we
++	do no real segment or size checking (and the request segment counts contain
++	crap, already found one bug in a scsi lld).  It's also pretty nasty for >
++	PAGE_SIZE requests, as we attempt to do higher order page allocations.
++	Even worse still, ide-cd will drop back to PIO for non-sg/bio requests. 
++	All in all, very suboptimal.
++	
++	This patch adds bio_copy_user() which simply sets up a bio with kernel
++	pages and copies data as needed for reads and writes.  It also changes
++	bio_map_user() to return an error pointer like bio_copy_user(), so we can
++	return something sane to the user instead of always -ENOMEM.
++	
++	Signed-off-by: Jens Axboe <axboe at suse.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<benh at kernel.crashing.org>
++	[PATCH] ppc32: Fix problem with spurrious edge interrupts on old
++	
++	On old powermacs, it's possible that we get a stale edge interrupt when
++	doing request_irq(), that typically happens with the DBDMA controller
++	interrupts when the device was used by the firmware for booting.
++	
++	I just tracked down a nasty memory corruption problem where that was
++	causing the bmac driver to try to process packets before the driver
++	internal data structures were properly initialized.
++	
++	While I agree that the driver should (and will) be made more robust to
++	such things, Paulus and I decided that it makes little sense to keep
++	track of an "old" edge interrupt that happens before a driver does
++	request_irq.  (On those powermacs, those are only the DBDMA interrupts
++	anyway, and none of the DBDMA users will care). 
++	
++	This patch implements a "startup" handler for the old Apple PIC that
++	will "ack" pending edge interrupts before unmasking, thus preventing
++	those stale interrupts to be delivered.
++	
++	It also "fixes" the ppc32 irq core to call the startup() callback when
++	available instead of just calling enable().
++	
++	Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<benh at kernel.crashing.org>
++	[PATCH] ppc64: Start the FCU in therm_pm72.c
++	
++	Some G5 recent powermacs start with the fan control unit (FCU) disabled,
++	by the firmware, causing the thermal control driver to break. We have to
++	enable it before starting the feedback loops that set the fan speeds.
++	This patch adds the code to start the FCU.
++	
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<torvalds at ppc970.osdl.org>
++	Linux 2.6.8-rc3
++
++<shemminger at osdl.org>
++	[PKT_SCHED]: netem limit not returned correctly
++	
++	Minor leftover from earlier code.  Netem scheduler is not reporting
++	correct limit (ie for 'tc qdisc ls') because it is returning devices limit
++	not it's own.
++	
++	Should apply to 2.4 as well (with fuzz)
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<bjorn.helgaas at hp.com>
++	machvec.h:
++	irq.c:
++	  Fix IRQ type in platform irq_to_vector functions.  Should be
++	  "unsigned int", but some places were "u8".
++	
++	  Signed-off-by: Bjorn Helgaas <bjorn.helgaas at hp.com>
++	  Signed-off-by: Tony Luck <tony.luck at intel.com>
++
++<bjorn.helgaas at hp.com>
++	cyclone.h, cyclone.c, acpi.c, Kconfig:
++	  Make cyclone_setup() take no args, rather than an ignored "char *"
++	  and return void.  Fix typos and whitespace.
++	
++	  Signed-off-by: Bjorn Helgaas <bjorn.helgaas at hp.com>
++	  Signed-off-by: Tony Luck <tony.luck at intel.com>
++
++<bjorn.helgaas at hp.com>
++	sba_iommu.c:
++	  REO/Grande defect AR2305 can cause TLB fetch timeouts if entries
++	  are purged while in use.  Round up IOVA allocations to power-of-two
++	  boundaries to prevent this.  This is originally due to Alex Williamson.
++	
++	  Signed-off-by: Bjorn Helgaas <bjorn.helgaas at hp.com>
++	  Signed-off-by: Tony Luck <tony.luck at intel.com>
++
++<jbarnes at sgi.com>
++	sgi_io_init.c:
++	  Mark per_hub_init as __init and remove an unnecessary extern declaration of it
++	  in sgi_io_init.c.  This has the effect of killing a warning in the compile of
++	  that file.
++	
++	  Signed-off-by: Jesse Barnes <jbarnes at sgi.com>
++	  Signed-off-by: Tony Luck <tony.luck at intel.com>
++
++<kaber at trash.net>
++	[PKT_SCHED]: Fix locking in __qdisc_destroy rcu-callback
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<kaber at trash.net>
++	[PKT_SCHED]: Refcount qdisc->dev for __qdisc_destroy rcu-callback
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<kaber at trash.net>
++	[PKT_SCHED]: remove unneccessary checks for qdisc->dev
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<kaber at trash.net>
++	[PKT_SCHED]: Remove useless noop_qdisc assignments in destroy functions
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[BRIDGE]: rmmod device while bridge is down fails
++	
++	The changes to bridge notifier to handle link state changes introduced
++	a bug. The case of device unregistering while bridge is down was no
++	longer being handled. Add comment so maintainer doesn't forget.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<seto.hidetoshi at jp.fujitsu.com>
++	Set up CMC/CPE polling *before* enabling CMCI/CPEI interrupts to avoid
++	situation where a flood of errors prevents boot.
++	
++	Signed-off-by: Hidetoshi Seto <seto.hidetoshi at jp.fujitsu.com>
++	Signed-off-by: Tony Luck <tony.luck at intel.com>
++
++<tony.luck at intel.com>
++	Provide comand line keyword "nomca" to turn off mca processing in kernel.
++	Initial patch by Jesse Barnes, fixed by Ken Chen, rescued from
++	obscurity by Sourav Sen.
++	
++	Signed-off-by: Tony Luck <tony.luck at intel.com>
++
++<[alex.williamson at hp.com>
++	Using CONFIG_IA64_HP_ZX1 on an sx1000 system setup w/ multiple NUMA
++	nodes (configured for cell local memory) currently crashes because
++	MAX_NUMNODES defaults to 1.  The patch below sets up things to make this
++	work.
++	
++	Signed-off-by: Alex Williamson <alex.williamson at hp.com>
++	Signed-off-by: Tony Luck <tony.luck at intel.com>
++
++<jbarnes at sgi.com>
++	generic_defconfig update.  I just ran 'make oldconfig' against the existing
++	one and turned on a few new options (some of which Altix needs).
++	 
++	Signed-off-by: Jesse Barnes <jbarnes at sgi.com>
++	Signed-off-by: Tony Luck <tony.luck at intel.com>
++
++<kaber at trash.net>
++	[PKT_SCHED]: Use double-linked list for dev->qdisc_list
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<kaber at trash.net>
++	[PKT_SCHED]: Fix q_idx calculation in tc_dump_qdisc.
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[PKT_SCHED]: Cache align qdisc data.
++	
++	This patch has qdisc code use the same interface as the
++	netdevice code to cache align the object private data.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[PKT_SCHED]: Move sch_atm over to qdisc_priv().
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	Cset exclude: davem at nuts.davemloft.net|ChangeSet|20040804202342|60209
++
++<jmorris at redhat.com>
++	[PATCH] Drop asm i586 AES code.
++	
++	This patch reverts the i586 AES module.  A new one should be ready soon.
++	
++	Signed-off-by: James Morris <jmorris at redhat.com>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<heiko.carstens at de.ibm.com>
++	[PATCH] md multipathing fixes
++	
++	I tried to get multipathing failover running and failed. It seems to be
++	that there are two bugs in multipath.c :
++	
++	- If a path/request fails mp_bh->path doesn't get updated to the new
++	  path.  Thus multipath_end_request will access a NULL pointer if a
++	  redirected request returns.
++	
++	- After fixing this I experienced several other errors.  First of all in
++	  bio->bi_flags the BIO_UPTODATE flag is not set when redirecting a
++	  request.
++	
++	  Causing the md driver to think that every redirected request failed
++	  when it returns.  Since that alone didn't fix the problems, I simply
++	  copied the master_bio again and it looks like everything seems to work.
++	
++	Cc: <neilb at cse.unsw.edu.au>
++	Cc: Jens Axboe <axboe at suse.de>
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<axboe at suse.de>
++	[PATCH] multipath readahead fix
++	
++	For requests marked read-ahead, it can legitimately fail without it being a
++	path problem.  So don't fail a path just because this happens (can be the
++	atomic request allocation going nuts, for instance), or all paths will
++	quickly go away.
++	
++	Cc: <neilb at cse.unsw.edu.au>
++	Signed-off-by: Jens Axboe <axboe at suse.de>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<catalin.marinas at com.rmk.(none)>
++	[ARM PATCH] 1964/1: Wrong cache block operations checking
++	
++	Patch from Catalin Marinas
++	
++	The "err" is rotated in the blockops_check() function and all the error bits are cleared, the subsequent conditions being always true.
++
++<catalin.marinas at com.rmk.(none)>
++	[ARM PATCH] 1965/1: gas only generates the c and f field bits for the "msr [cs]psr, rN" instruction
++	
++	Patch from Catalin Marinas
++	
++	Gas translates the "msr [cs]psr, rN" instruction to "msr [cs]psr_cf, rN". This may cause problems on the ARMv6 architecture where the A and E bits can leak into the SVC mode from the USR mode via the exception handlers. The reverse can happen when returning to user mode. The patch adds _cxsf to all the msr instruction without the field specifier.
++
++<ben-linux at org.rmk.(none)>
++	[ARM PATCH] 1966/1: S3C2410 - Fix for serial driver compile error
++	
++	Patch from Ben Dooks
++	
++	Remove compile error with gcc-3.4 and empty part of case statememnt
++
++<ben-linux at org.rmk.(none)>
++	[ARM PATCH] 1968/1: S3C2410 - GPIO updates and access functions
++	
++	Patch from Ben Dooks
++	
++	Added more definitions for GPIO registers
++	
++	New functions for modifying pin configuration and
++	bit-status (see include/asm-arm/arch-s3c2410/hardware.h)
++
++<ben-linux at org.rmk.(none)>
++	[ARM PATCH] 1971/1: BAST - default configuraiton update
++	
++	Patch from Ben Dooks
++	
++	Patch for default configuration
++
++<ben-linux at org.rmk.(none)>
++	[ARM PATCH] 1972/1: IPAQ H1940 - fix serial clock base
++	
++	Patch from Ben Dooks
++	
++	Fixed clock base for the H1940
++	
++	thanks to Gerald Schneider <gerald at gerald-online.de>
++	for fixing this.
++
++<jelenz at edu.rmk.(none)>
++	[ARM PATCH] 1974/1: add INITTIME macro to collie machine structure
++	
++	Patch from John Lenz
++	
++	Add INITTIME macro to collie machine structure.
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] simple_read_buffer() helper function
++	
++	A number of drivers or special virtual devices really just want their
++	"read()" function to populate user space from some internal buffer.
++	
++	This adds such a helper function - "simple_read_from_buffer()" - and
++	converts several ->read() instances to use it.
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<roland at redhat.com>
++	[PATCH] fix /proc printing of TASK_DEAD state
++	
++	I just stumbled across this patch that's been sitting in my tree for ages.
++	
++	I thought I'd sent this in before.  It's a trivial fix for the printing
++	of task state in /proc and sysrq dumps and such, so that TASK_DEAD shows
++	up correctly.  This state is pretty much only ever there to be seen when
++	there are exit/reaping bugs, but it's not like that hasn't come up.
++	
++	Signed-off-by: Roland McGrath <roland at redhat.com>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] imm.c oops fix
++	
++	Fix bug #3125:
++	
++	This should fix the problem; however, we will need to repeat that for all
++	PIO SCSI drivers (another immediate victim is ppa.c).
++	
++	We should start looking for sane solution; I _really_ don't like the kludge
++	with using ->slave_alloc() for fixups after scsi_alloc_queue().
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<trini at kernel.crashing.org>
++	[PATCH] ppc32: Fix 'mktree' on 64bit hosts
++	
++	The following patch changes some 'unsigned long's into 'uint32_t's in
++	mktree (a program that runs on the host to frob the kernel image for
++	some firmwares).  Without it, the program is not correct when run
++	on/compiled on a 64bit host.
++	
++	Signed-off-by: Dan Zink <dan.zink at hp.com>
++	Signed-off-by: Tom Rini <trini at kernel.crashing.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<torvalds at ppc970.osdl.org>
++	Fix shrink_dcache_anon() LRU list accesses.
++	
++	It would potentially remove dentries from the LRU list
++	without re-initializing the d_lru fields, causing later
++	accesses to that dentry to do bad things to the LRU list.
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] ppc64: Fix rtas file mess
++	
++	This does the seq_file conversion + annotation + cleanup + race fixes
++	for arch/ppc64/kernel/rtas-proc.c.
++	
++	How the fuck did that file manage to get anywhere near the tree, anyway?
++	Take a look at guy's "implementation" of sprintf(buf, "%04d", num), for
++	example:
++	
++	<vomit>
++		/* construct the sensor number like 0003 */
++		/* fill with zeros */
++		n = sprintf(tmp, "%d", s.token);
++		len = strlen(tmp);
++		while (strlen(tmp) < 4)
++			n += sprintf (tmp+n, "0");
++	
++		/* invert the string */
++		while (tmp[i]) {
++			if (i<len)
++				tmp2[4-len+i] = tmp[i];
++			else
++				tmp2[3-i] = tmp[i];
++			i++;
++		}
++		tmp2[4] = '\0';
++	</vomit>
++	
++	And it's full of that level of lusing ;-/
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] ppc: seq_file conversion for ppc_htab
++	
++	This converts the 32-bit ppc htab code to use the seq_file interfaces.
++	
++	Less code means fewer bugs..
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] Fix ppc htab seq_file conversion
++	
++	*grrrrrrrr*
++	
++	Wrong diff sent.  Sorry - normally the tree I'm working in is cp -rl'ed
++	from the -current, but right now it's a big mess.
++	
++	This is the incremental fix.
++
++<torvalds at ppc970.osdl.org>
++	Make the new simple_read_from_buffer() take a const src
++	buffer without complaints.
++
++<kevin at org.rmk.(none)>
++	[ARM PATCH] 1986/1: bootpImage/ARM: add ability to run from non-zero address
++	
++	Patch from Kevin Hilman
++	
++	The following patch allows the bootpImage to be loaded and executed
++	from a non-zero address.  On OMAP platforms for example, the physical
++	address for SDRAM is 0x10000000 and not zero.
++
++<ben-linux at org.rmk.(none)>
++	[ARM PATCH] 1988/1: S3C2410 - defconfig update to include all boards
++	
++	Patch from Ben Dooks
++	
++	Updated default configuration file to include all the
++	boards possible with this architecture
++
++<ben-linux at org.rmk.(none)>
++	[ARM PATCH] 1989/1: S3C2410 - rename owner of VR1000 board and update help
++	
++	Patch from Ben Dooks
++	
++	Rename to Thorcom, and added extra lines to help
++
++<ben-linux at org.rmk.(none)>
++	[ARM PATCH] 1990/1: S3C2410 - fix mis-spelled time initialisation calls
++	
++	Patch from Ben Dooks
++	
++	Fixed mis-spelled time initialisation calls and
++	a bad prototype in the time header
++	
++	Fixes for patch 1962/1
++
++<rmk at flint.arm.linux.org.uk>
++	[SERIAL] replace schedule_timeout() with msleep()
++	
++	Patch from: Nishanth Aravamudan
++	
++	Use msleep() instead of schedule_timeout() to
++	guarantee the task delays for the desired time.
++	
++	Signed-off-by: Nishanth Aravamudan
++	Signed-off-by: Russell King
++
++<jmorris at redhat.com>
++	[PATCH] Re-implemented i586 asm AES
++	
++	This code is a rework of the original Gladman AES code, and does not
++	include any supposed BSD licensed work by Jari Ruusu. 
++	
++	Linus converted the Intel asm to Gas format, and made some minor
++	alterations.
++	
++	Fruhwirth's glue module has also been retained, although I rebased the
++	table generation and key scheduling back to Gladman's code.  I've tested
++	this code with some standard FIPS test vectors, and large FTP transfers
++	over IPSec (both locally and over the wire to a system running the
++	generic AES implementation).
++	
++	Signed-off-by: James Morris <jmorris at redhat.com>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rmk at flint.arm.linux.org.uk>
++	[FB] replace schedule_timeout() with msleep()
++	
++	Patch from: Nishanth Aravamudan
++	
++	Use msleep() instead of schedule_timeout() to
++	guarantee the task delays for the desired time.
++	
++	Signed-off-by: Nishanth Aravamudan
++	Signed-off-by: Russell King
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Remove unnecessary CONFIG_CPU_32 preprocessor conditional.
++	
++	We're only 32-bit ARMs, so testing this symbol in 32-bit only code
++	is unnecessary.
++
++<paulus at samba.org>
++	[PATCH] Remove ppc32 proc_rtas.c
++	
++	This patch removes proc_rtas.c and error_log.[ch] from
++	arch/ppc/platforms.  It turns out that the code in error_log.[ch] is
++	completely unused, and the code in proc_rtas.c is buggy, almost
++	impossible to understand, and rarely used.
++	
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<trini at kernel.crashing.org>
++	[PATCH] ppc32: Fix building of certain CPU types
++	
++	The following corrects how we pass CPU flags to gas.  Previous, AFLAGS
++	was incorrectly assumed to be pased directly to $(AS), which is not the
++	case.
++	
++	Concept ack'd by Sam Ravnborg.
++	
++	Signed-off-by: Tom Rini <trini at kernel.crashing.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<davem at nuts.davemloft.net>
++	[NET]: Move sndmsg_page destruction back into TCP for now.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Eliminate costly sdivx from gettimeofday.
++	
++	Also use non-irq read seqlocking on xtime_lock.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Implement tlb flush batching just like ppc64.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<torvalds at ppc970.osdl.org>
++	Add infrastructure for the VFS layer to mark files seekable.
++	
++	We use a FMODE_LSEEK flag to match the existing read/write
++	bits. This allows us to check for seekability on a VFS level
++	for lseek/pread/pwrite, and cleans things up.
++	
++	Update some sites that used the numeric constants to use 
++	the symbolic values instead.
++
++<sam at ravnborg.org>
++	[PATCH] kbuild: Remove LANG preset in top-level Makefile
++	
++	In the top-level Makefile a number of locale related environment
++	variables were preset to give a small speed up when building the kernel.
++	
++	Unfortunately this had the bad sideeffect that the variable
++	CFLAGS_vmlinux.lds.o lost the exported vaule in some setups (obviously
++	not mine).  This smells like a make issue - but the best solution is
++	simply to drop presetting the locale related variables.
++	
++	Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulus at samba.org>
++	[PATCH] Restore PPP filtering
++	
++	Karsten Keil's patch entitled "[ISDN]: Fix kernel PPP/IPPP active/passiv
++	filter code" that went in back in April was an attempt to solve a real
++	problem - namely that the libpcap maintainers have removed useful
++	functionality that pppd was using - but his fix broke existing pppd
++	binaries and IMO didn't end up actually solving the problem.
++	
++	This patch reverts the change to ppp_generic.c so that existing pppd
++	binaries work again.  I am going to have to work out a proper fix, which
++	may involve further changes to ppp_generic.c, but I will make sure existing
++	pppd binaries still work.
++	
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] jbd: journal_head unmapping race fix
++	
++	Fix a race identified by Chris Mason <mason at suse.com>
++	
++	journal_unmap_buffer -> __dispose_buffers has the j_list_lock and the
++	jbd_lock_bh_state held.
++	
++	journal_get_write_access calls journal_put_journal_head, which takes
++	jbd_lock_bh_journal_head(bh) and doesn't seem to have any other locks held.
++	
++	Since journal_unmap_buffers trusts the buffer_jbd bit to see if we need to
++	call __dispose_buffer, and nobody seems to test buffer_jbd after taking
++	jbd_lock_bh_journal_head.  The kernel dereferences a null jh pointer in
++	__journal_remove_journal_head.
++	
++	
++	The patch fixes this by using journal_grab_journal_head() in
++	journal_unmap_buffer().  It ensures that we either grab and pin the
++	journal_head if the bh has one, or we bale out if the bh doesn't have a
++	journal_head.
++	
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wli at holomorphy.com>
++	[PATCH] sparc32: turbosparc flush warnings
++	
++	FLUSH_BEGIN() is a nop at the moment, so the mm variable for its argument
++	trips a warning.  Pass vma->vm_mm directly instead.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wli at holomorphy.com>
++	[PATCH] sparc32: sparc32 init_idle()
++	
++	An analysis of the code determined that AP initialization called init_idle()
++	no less than three times, 2 out of the three with incorrect numbers of
++	arguments.  This patch removes the superfluous calls.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wli at holomorphy.com>
++	[PATCH] sparc32: sun4d cpu_present_map is a cpumask_t
++	
++	cpu_present_map is a cpumask_t.  Sweep arch/sparc/kernel/sun4d_smp.c so that
++	it is treated as such.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wli at holomorphy.com>
++	[PATCH] sparc32: smp_processor_id() BITFIXUP fixes
++	
++	The SMP initialization functions try to do btfixups on the wrong symbols for
++	smp_processor_id(), which is now implemented in terms of
++	current_thread_info()->cpu.  hard_smp_processor_id() etc.  are now in use
++	where smp_processor_id() was once used.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wli at holomorphy.com>
++	[PATCH] sparc32: reinstate smp_reschedule_irq()
++	
++	smp_reschedule_irq() mysteriously vanished sometime after 2.4.  This patch
++	reinstates it so that the kernel will link properly and so cpus will set
++	TIF_NEED_RESCHED when it's asked of them.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wli at holomorphy.com>
++	[PATCH] sparc32: remove references to start_secondary()
++	
++	Remove leftover references to now-unused start_secondary()
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wli at holomorphy.com>
++	[PATCH] sparc32: define cache_decay_ticks
++	
++	cache_decay_ticks needs to be defined in order for the kernel to link.  This
++	placeholder is inaccurate, however, other, more grave SMP issues need to be
++	addressed first.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wli at holomorphy.com>
++	[PATCH] sparc32: remove unused variable in dvma.c
++	
++	This variable is unused and causes noisy compiles.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wli at holomorphy.com>
++	[PATCH] sparc32: sun4 does not support SMP
++	
++	The sun4 port does not support SMP.  Disable it via Kconfig.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wli at holomorphy.com>
++	[PATCH] sparc32: make CONFIG_SMP depend on CONFIG_BROKEN
++	
++	SMP support is in need of a great deal of work to port it from 2.2 and 2.4.
++	Add a dependency on BROKEN in the Kconfig to warn the unwary.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<wli at holomorphy.com>
++	[PATCH] sparc32: gcc-3.3 macro parenthesization fix for memcpy.S
++	
++	From: Art Haas <ahaas at airmail.net>
++	
++	The 1.3->1.4 changes to the arch/sparc/lib/copy_user.S file added parenthesis
++	to a number of macros within that file.  The BK changlog associated with this
++	change indicate the change was to make the file work with gcc-3.3.
++	
++	When looking at the changes made, I see that similar macros exist in memcpy.S
++	as well, so would a patch adding parens to that file be worthwhile?  Also,
++	just what was the problem with gcc-3.3 that was resolved by adding the
++	parenthesis?  Macro mis-expansion I'm guessing.
++	
++	Signed-off-by: Art Haas <ahaas at airmail.net>
++	Signed-off-by: William Irwin <wli at holomorphy.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<schwidefsky at de.ibm.com>
++	[PATCH] s390: core changes.
++	
++	From: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	
++	s390 core changes:
++	 - Add 32 bit compat code for ptrace requests PTRACE_GETEVENTMSG,
++	   PTRACE_GETSIGINFO and PTRACE_SETSIGINFO.
++	 - Make non-smp kernel compile.
++	 - Regenerate default configuration.
++	
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<cohuck at de.ibm.com>
++	[PATCH] s390: common i/o layer changes.
++	
++	common i/o layer changes:
++	 - Set state of a disconnected device to offline before calling
++	   ccw_device_online, otherwise the device doesn't come up again.
++	 - Check for channel end when trying to find out if basic sense
++	   was successful.
++	 - Fix error handling in new_channel_path.
++	
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<nacc at us.ibm.com>
++	[PATCH] s390: msleep vs. schedule_timeout.
++	
++	Use msleep() instead of schedule_timeout() to guarantee the task
++	delays for the desired time.
++	
++	Signed-off-by: Nishanth Aravamudan <nacc at us.ibm.com>
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<ptiedem at de.ibm.com>
++	[PATCH] s390: ctc driver changes.
++	
++	Prefix debug feature variables with ctc to avoid name space problems.
++	
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<schwidefsky at de.ibm.com>
++	[PATCH] s390: zfcp host adapater.
++	
++	From: Heiko Carstens <heiko.carstens at de.ibm.com>
++	From: Andreas Herrmann <aherrman at de.ibm.com>
++	
++	zfcp host adapater change:
++	 - Fix call to close_physical_port to prevent devices going offline
++	   after error recovery.
++	 - Fix return value of sysfs port_remove attribute store function.
++	 - Replace reboot notifier with device driver shutdown function.
++	
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<tspat at de.ibm.com>
++	[PATCH] s390: qeth performance.
++	
++	qeth network driver performance improvements. The ping time on the
++	HiperSockets interface drops from 250 usecs to 50 usecs and the 1 bytes
++	request/response test improves from 70000 to 110000 transactions.
++	
++	Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<pazke at donpac.ru>
++	[PATCH] ppc64: fix free_irq()
++	
++	Fix ppc64 free_irq.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<paulus at samba.org>
++	[PATCH] ppc64: pci_dn cleanups
++	
++	This patch just cleans up arch/ppc64/kernel/pci_dn.c a bit, including:
++		- remove it from the iSeries build completely
++		- small changes to Makefile
++		- remove the "post" parameter from traverse_pci_devices as
++		  noone used it
++		- make traverse_all_pci_devices static
++		- remove CONFIG_PPC_PSERIES tests as we no longer build for iSeries
++		- some reformatting (closer to "standard")
++		- remove some of pointer casts
++	
++	This has been built (with default config) on pSeries and pmac and built and
++	run on iSeries.
++	
++	Signed-off-by: Stephen Rothwell <sfr at canb.auug.org.au>
++	Signed-off-by: Paul Mackerras <paulus at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<jhe at us.ibm.com>
++	[PATCH] ppc64: 32-bit ptrace geteventmsg fix
++	
++	Here's a fix for the 32-bit PTRACE_GETEVENTMSG ptrace call that handles the
++	passing of a 32-bit user address.  Please apply, thanks.
++	
++	Signed-off-by: John Engel <jhe at us.ibm.com>
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<anton at samba.org>
++	[PATCH] ppc64: various XICS fixes
++	
++	- Remove unused includes.
++	- Be consistent about printing irq numbers, avoid a mix of decimal and
++	  hexadecimal.
++	- Remove prototypes from xics.c, they should be in xics.h.
++	- Remove infinite loop on failure, and instead use panic. Panic has a chance to
++	  log the error message on the LED panel and reboot the box, a while(1) loop
++	  does not.
++	- xics isnt compiled for iseries any more, so no need for the
++	  CONFIG_PPC_PSERIES hack.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<anton at samba.org>
++	[PATCH] ppc64: fix PCI allocation warning
++	
++	Print the correct domain when a PCI resource allocation fails.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<anton at samba.org>
++	[PATCH] ppc64: avoid speculative execution after rfid
++	
++	Due to speculative execution, a CPU may execute some instructions after the
++	rfid.  This makes profiles confusing, since profiling ticks could end up in
++	those instructions following the rfid that are never executed.
++	
++	Add a branch to self after each rfid to avoid this.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<anton at samba.org>
++	[PATCH] ppc64: set SMT thread priority to medium for all exceptions
++	
++	We need to set the thread priority to medium when entering all exceptions. 
++	We may have been executing in low priority (eg the idle loop), but
++	definitely do not want to remain in that priority for the duration of the
++	exception (eg a device interrupt).
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<anton at samba.org>
++	[PATCH] ppc64: fix chrp_progress mismerge
++	
++	Due to a mismerge, some code in chrp_progress appears twice. While here,
++	clean up some formatting issues.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<anton at samba.org>
++	[PATCH] ppc64: suppress 'store_purr' unused warning
++	
++	Some new sysfs macros declare a store_purr() function that never gets used,
++	which makes a compiler warning happen.  Suppress the warning with the used
++	attribute.
++	
++	Signed-off-by: Dave Hansen <haveblue at us.ibm.com>
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<haveblue at us.ibm.com>
++	[PATCH] ppc64: move SPINLINE out of global menu
++	
++	This somehow ended up out in the global Kconfig menu.  Move it back inside
++	debugging where it belongs.
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<haveblue at us.ibm.com>
++	[PATCH] ppc64: suppress unused var warning in get_irq_server()
++	
++	When normal IRQ balancing is used, the following warnings appear:
++	
++	arch/ppc64/kernel/xics.c: In function `get_irq_server':
++	arch/ppc64/kernel/xics.c:242: warning: unused variable `cpumask'
++	arch/ppc64/kernel/xics.c:243: warning: unused variable `tmp'
++	
++	Simply move the variables inside the #ifdef
++	
++	Signed-off-by: Anton Blanchard <anton at samba.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mporter at kernel.crashing.org>
++	[PATCH] ppc32: clean up PPC44x mmu_mapin_ram()
++	
++	Remove some old cruft in the kernel lowmem mapping code and save some
++	memory in the process.
++	
++	Signed-off-by: Matt Porter <mporter at kernel.crashing.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<geoffrey.levand at am.sony.com>
++	[PATCH] ppc32: fix ebony uart clock
++	
++	This patch corrects the Ebony board's uart clock value to the rate of the
++	external Epson SG-615P clock source.  Now good to 115Kbps.
++	
++	Signed-off-by: Geoff Levand <geoffrey.levand at am.sony.com> for CELF
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mporter at kernel.crashing.org>
++	[PATCH] ppc32: remove pci-dma.c
++	
++	Remove pci-dma.c.  It is cruft left over from the DMA API changes.
++	
++	Signed-off-by: Matt Porter <mporter at kernel.crashing.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<mporter at kernel.crashing.org>
++	[PATCH] ppc32: add PPC4xx DMA engine library
++	
++	Adds a cleaned up version of the PPC4xx DMA engine library.  Converted to
++	new DCR access method and DMA API.
++	
++	Signed-off-by: Matt Porter <mporter at kernel.crashing.org>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<torvalds at ppc970.osdl.org>
++	Add pread/pwrite support bits to match the lseek bit.
++	
++	This also removes the ESPIPE logic from pipes and seq_files,
++	since the VFS layer now supports it. 
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Need flush_tlb_pending() in switch_to(). 
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Kill TLB rtrap debug code.
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Update defconfig.
++
++<torvalds at ppc970.osdl.org>
++	Add "nonseekable_open()" helper functions for nonseekable
++	file descriptors.
++
++<torvalds at ppc970.osdl.org>
++	Teach sendfile() to honour non-seekable source files.
++	
++	Remove the test from the socket code, now that it's no
++	longer necessary.
++
++<torvalds at ppc970.osdl.org>
++	Mark tty's as being non-seekable, and remove the now
++	unnecessary tests at read/write time.
++
++<torvalds at ppc970.osdl.org>
++	Character device tape drivers are non-lseekable.
++	
++	You can seek the tape, but you do it with the magic tape
++	control ioctl's, not with lseek/pread/pwrite.
++
++<torvalds at ppc970.osdl.org>
++	Mark the sunrpc cache control file nonseekable, and
++	remove the run-time tests for it.
++
++<torvalds at ppc970.osdl.org>
++	The seq_file code already disabled pread/pwrite access,
++	no need for the mtrr code to check any more.
++
++<torvalds at ppc970.osdl.org>
++	Fix up a couple of drivers - notable sg - for nonseekability.
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] Teach sscanf about 'hh' and 'll'
++	
++	Adds support for 'hh' (store number in char *) and 'll' (proper C99 for
++	long long) modifiers to sscanf().
++
++<viro at parcelfarce.linux.theplanet.co.uk>
++	[PATCH] mpoa patch done right
++	
++	 - conversion to seq_file, overflow fixes
++	 - qos_parse sanitized (3 sscanf calls instead of insane manual parsing)
++		leaks plugged
++		code cleaned up
++	
++	We still have serious races, but they are general problem in atm code - it
++	has no locking whatsoever for any of the lists (mpcs, qos_head, per-client
++	lists).
++
++<torvalds at ppc970.osdl.org>
++	Make sysctl pass the pos pointer around properly.
++	
++	Nobody ever fixed the big FIXME in sysctl - but we really need
++	to pass around the proper "loff_t *" to all the sysctl functions
++	if we want them to be well-behaved wrt the file pointer position.
++	
++	This is all preparation for making direct f_pos accesses go
++	away.
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Fix sparse warnings in nwfpe.
++	
++	This fixes sparse warnings in fpa11_cpdt (coprocessor data transfer)
++	instruction emulation.  Note that pointers need to be cast to unsigned
++	long not unsigned int, so convert user registers to be unsigned long
++	type.
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Eliminate io.c sparse warnings/ gcc 3.4 errors.
++	
++	arch/arm/kernel/io.c:15:5: warning: generating address of non-lvalue
++	arch/arm/kernel/io.c:15:5: warning: loading unknown expression
++	arch/arm/kernel/io.c:29:5: warning: generating address of non-lvalue
++	arch/arm/kernel/io.c:29:5: warning: loading unknown expression
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Fix sparse warnings in ds1620.c
++	
++	drivers/char/ds1620.c:230:19: warning: incorrect type in argument 1 (different address spaces)
++	drivers/char/ds1620.c:230:19:    expected void [noderef] *to<asn:1>
++	drivers/char/ds1620.c:230:19:    got char *buf
++	drivers/char/ds1620.c:230:19: warning: incorrect type in initializer (different address spaces)
++	drivers/char/ds1620.c:230:19:    expected void [noderef] *to<asn:1>
++	drivers/char/ds1620.c:230:19:    got char *buf
++	...
++	drivers/char/ds1620.c:383:52: warning: Using plain integer as NULL pointer
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Fix nwbutton sparse warnings
++	
++	drivers/char/nwbutton.c:177:24: warning: incorrect type in argument 1 (different address spaces)/home/rmk/bk/linux-2.6-rmk/drivers/char/nwbutton.c:177:24:    expected void [noderef] *to<asn:1>
++	drivers/char/nwbutton.c:177:24:    got char *buffer
++	drivers/char/nwbutton.c:177:24: warning: incorrect type in initializer (different address spaces)
++	drivers/char/nwbutton.c:177:24:    expected void [noderef] *to<asn:1>
++	drivers/char/nwbutton.c:177:24:    got char *buffer
++	drivers/char/nwbutton.c:189:11: warning: incorrect type in initializer (incompatible argument 2 (different address spaces))
++	drivers/char/nwbutton.c:189:11:    expected int [usertype] ( *read )( ... )
++	drivers/char/nwbutton.c:189:11:    got int ( static [addressable] [toplevel] *<noident> )( ... )
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Fix nwflash sparse warnings
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Fix wdt977 sparse warnings
++	
++	drivers/char/watchdog/wdt977.c:291:9: warning: incorrect type in initializer (different address spaces)
++	drivers/char/watchdog/wdt977.c:291:9:    expected char const [noderef] *register __p<asn:1>
++	drivers/char/watchdog/wdt977.c:291:9:    got char const *buf
++	...
++
++<torvalds at ppc970.osdl.org>
++	Remove ESPIPE logic from drivers, letting the VFS layer handle it instead.
++	
++	This cleans up and simplifies drivers, and also allows us future
++	simplification in the VFS layer, since it removes knowledge about
++	internal VFS layer handling of "f_pos".
++
++<torvalds at ppc970.osdl.org>
++	ppc64: add user annotations to rtc driver
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Always record actual PC when kernel profiling.
++	
++	We used to play games reporting the callers
++	PC in certain functions such as the rwlock
++	and atomic_t routines.  If anything, somethin
++	like this should be optional, not by default.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Make clear_user_page more leight weight.
++	
++	- Do not save/restore existing TLB entries, that is
++	  expensive, complicated, and does not really help
++	  performance much at all.
++	- Only one block store per loop iteration, doing more
++	  does not make things run any faster.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<yanmin.zhang at intel.com>
++	init.c, pgalloc.h:
++	  Disable pre-emption around access to pgtable_cache_size, pgd_quicklist,
++	  and pmd_quicklist.
++	
++	  Signed-off-by: Zhang Yanmin <yanmin.zhang at intel.com>
++	  Signed-off-by: Zou Nanhai <nanhai.zou at intel.com>
++	  Signed-off-by: Tony Luck <tony.luck at intel.com>
++
++<rmk at flint.arm.linux.org.uk>
++	[ARM] Fix two makefile problems
++	
++	- bootp.lds is a source file not a target
++	- vmlinux.lds doesn't need to depend on the top level Makefile
++
++<axboe at suse.de>
++	[PATCH] adjust SG reserved size automatically
++	
++	The block layer SG should have the identical behaviour as SCSI sg when
++	it comes to SG_SET_RESERVED_SIZE - allow caller to specify a large
++	amount, truncate to largest we support, and return that with
++	SG_GET_RESERVED_SIZE.  Currently we fail with -EINVAL if the value is
++	too large, I think the SCSI sg behaviour is more sane to use.  This
++	one-liner fixes it up, please apply for 2.6.8.
++	
++	Signed-off-by: Jens Axboe <axboe at suse.de>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<axboe at suse.de>
++	[PATCH] Export blk_queue_resize_tags
++	
++	Exports blk_queue_resize_tags since it is an exported interface.
++	
++	Signed-off-by: Brian King <brking at us.ibm.com>
++	Signed-off-by: Jens Axboe <axboe at suse.de>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<axboe at suse.de>
++	[PATCH] allow broken apps to include kernel header
++	
++	Include compiler.h from sg.h as it uses the __user notation, and change
++	the types in scsi.h to use user exportable types.
++	
++	Signed-off-by: Jens Axboe <axboe at suse.de>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<alan at redhat.com>
++	[PATCH] HPT IDE update
++	
++	This part got missed in the earlier merge, not sure where it escaped.
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Fix up copy_page just like clear_page.
++	
++	- Do not save/restore existing TLB entries, that is
++	  expensive, complicated, and does not really help
++	  performance much at all.
++	- Only one unrolled loop for cheetah copy code.
++	- For spitfire, use %asi register for block commit
++	  handling so we do not need two copies of the code.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<anton at samba.org>
++	[PATCH] [ppc64] Fix SLB castout issue
++	
++	The SLB rewrite removed a fix for a hard to hit bug, but the SFS guys
++	managed to hit it straight away. We need to check both r1 and PACAKSAVE
++	or else we could cast our kernel segment out when on the irq or softirq
++	stack.
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Remove memcpy Ultra3 PCACHE patching trick.
++	
++	It could never be enabled safely, so just toss
++	the code.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Use saner local label names in Ultra3 copies.
++	
++	This makes the kernel profiles look much more
++	meaningful.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<torvalds at ppc970.osdl.org>
++	Fix up sound driver proc-reading interfaces.
++	
++	The old ones were not only hard to use, they were in fact
++	impossible or a low-level sound driver to get right, since
++	the core sound code didn't even export all the necessary
++	information.
++	
++	Add the file offset to the /proc read interfaces, and make
++	them simpler to use. The core now does a offset updates, and
++	sanity-checks the values so that the low-level drivers don't
++	need to worry.
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: More entropy in add_timer_randomness.
++	
++	Based upon a patch from Richard Mortimer.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[VLAN]: Propagate ethtool/mii ioctls to the real device.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[VLAN]: Mirror real devices carrier and hotplug state.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[VLAN]: Use RCU for group operations.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[VLAN]: Fix device refcount bug.
++	
++	If you rmmod a network device that is in a vlan, the system hangs waiting
++	for the refcount to go to zero, because it is -1.  The problem is that the
++	vlan notifier does an extra dev_put in NETDEV_UNREGISTER case of notifier.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<neilb at cse.unsw.edu.au>
++	[PATCH] knfsd: fix some signed ints that should be unsigned
++	
++	Signed-off-by: Neil Brown <neilb at cse.unsw.edu.au>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<ebs at ebshome.net>
++	[IPSEC]: Add missing flow_cache_genid update to xfrm_policy_delete()
++	
++	Signed-off-by: Eugene Surovegin <ebs at ebshome.net>
++	Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<shemminger at osdl.org>
++	[BRIDGE]: Fix problems with filtering and defragmentation.
++	
++	Dave, this patch from Bart De Schuymer <bdschuym at pandora.be> fixes problems
++	when using filtering and defragmentation.  The bridge needs to enforce the
++	MTU restriction after going through the filtering chain not before, because
++	the incoming filter may have reassembled an IP packet, that then needs to
++	be fragmented on the output chain.
++	
++	Signed-off-by: Stephen Hemminger <shemminger at osdl.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<pluto at pld-linux.org>
++	[NET]: Kill stray NET_FASTROUTE references.
++	
++	Signed-off-by: Pawel Sikora <pluto at pld-linux.org>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<ajgrothe at yahoo.com>
++	[CRYPTO]: Add Khazad algorithm.
++	
++	Signed-off-by: Aaron Grothe <ajgrothe at yahoo.com>
++	Signed-off-by: James Morris <jmorris at redhat.com>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<devik at cdi.cz>
++	[PKT_SCHED]: Fix borrowing fairness in htb.
++
++<davej at redhat.com>
++	[PATCH] boolean typo in DVB
++	
++	This looks like what was intended here..
++	
++	Signed-off-by: Dave Jones <davej at redhat.com>
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<js at convergence.de>
++	[PATCH] dvb: missing includes
++	
++	Although the current DVB stuff compiles fine, for correctness the following
++	patch adds the necessary include for __user annotations.
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<kaber at trash.net>
++	[PKT_SCHED]: Disable local bh's when grabbing qdisc_tree_lock in tc_dump_tfilter.
++	
++	I missed this one when fixing locking in __qdisc_destroy.
++	
++	Signed-off-by: Patrick McHardy <kaber at trash.net>
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<torvalds at ppc970.osdl.org>
++	Revert FAT NLS changes.
++	
++	It's causing massive user confusion, and breaks installers by
++	mounting the filesystem read-only.
++	
++	Cset exclude: hirofumi at mail.parknet.co.jp[torvalds]|ChangeSet|20040802210150|02337
++
++<torvalds at ppc970.osdl.org>
++	mips: fix up some straggling sysctl functions 
++
++<torvalds at ppc970.osdl.org>
++	Fix up drivers that access file->f_pos directly.
++	
++	Use the proper "pointer to pos" that is passed down instead.
++
++<torvalds at ppc970.osdl.org>
++	read/write: pass down a copy of f_pos, not f_pos itself.
++	
++	This allows the VFS layer to the update rather than the
++	low-level drivers. 
++
++<torvalds at ppc970.osdl.org>
++	Linux 2.6.8-rc4
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Fix spitfire bugs in tlb flush and copy_page changes.
++	
++	- VISEntry clobbers %g3, so have to do %asi stuff
++	  after we invoke it.
++	- Need to or in 0x10 to TLB flush addresses when
++	  flushing in secondary context
++	- Context register restore using wrong address register
++	- Spitfire not so tolerant of membar in delay slot.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<dwmw2 at shinybook.infradead.org>
++	Fix use-after-free bug in MTD partitioning code.
++	
++	Define callback wrapper function mtd_erase_callback() to handle 
++	partition offsets during the callback, rather than attempting to 
++	fix them up in the freed erase_info structure after the callback 
++	has already happened.
++
++<dwmw2 at shinybook.infradead.org>
++	Cosmetic MTD changes -- update email address and idents.
++
++<dwmw2 at shinybook.infradead.org>
++	M-Systems DiskOnChip driver update.
++	
++	- Add Millennium Plus support.
++	- Add advanced probe configuration options
++	- Fix abuse of buffer space in scan for Media Header.
++
++<jwboyer at infradead.org>
++	Restore physmap configure-time settings according to user requests.
++	Patch from Jun Sun.
++	
++	Signed-Off-By: David Woodhouse <dwmw2 at infradead.org>
++
++<dwmw2 at shinybook.infradead.org>
++	RedBoot flash partitioning: use vmalloc for buffer.
++
++<axboe at suse.de>
++	[PATCH] export kblockd_schedule_work()
++	
++	This is used by some IBM vscsi driver. It was using schedule_work(), but
++	should be using the block layer queue.
++	
++	Signed-off-by: Jens Axboe <axboe at suse.de>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rl at hellgate.ch>
++	[PATCH] via-rhine: Really call rhine_power_init()
++	
++	Without this patch, mainline via-rhine cannot wake the chip if some other
++	driver puts it to D3. The problem has hit quite a few people already.
++	
++	This is a fix for the heisenbug with via-rhine refusing to work
++	sometimes. Patch "[9/9] Restructure reset code" contained a change made
++	necessary by patch [8/9]. Mainline merged [8/9] for 2.6.8 and is still
++	missing the fix, while -mm got it with [9/9].
++	
++	Jesper Juhl provided crucial test data when no one else was able to
++	reproduce the symptoms.
++	
++	Signed-off-by: Roger Luethi <rl at hellgate.ch>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<dwmw2 at shinybook.infradead.org>
++	Export new mtd_erase_callback() function.
++
++<haveblue at us.ibm.com>
++	[PATCH] 4kstacks: fix compile with gcc 2.95
++	
++	Investigation of why the build is failing due to bogus detection of
++	undefined symbols: We're getting this warning:
++	
++	arch/i386/kernel/irq.c
++	{standard input}: Assembler messages:
++	{standard input}:3565: Warning: setting incorrect section type for
++	.bss.page_aligned
++	
++	Which comes from this code in the 4k stacks code:
++	
++	static char softirq_stack[NR_CPUS * THREAD_SIZE]  __attribute__((__aligned__(THREAD_SIZE), __section__(".bss.page_aligned")));
++	static char hardirq_stack[NR_CPUS * THREAD_SIZE]  __attribute__((__aligned__(THREAD_SIZE), __section__(".bss.page_aligned")));
++	
++	Removing the __section__() fixes it, as does moving to gcc 3.2 or 3.3,
++	but gcc 2.95 and 3.0 still exhibit the problem.  It seems the 4k stack
++	developers like newer compilers than I do :) 
++	
++	The gcc 2.95 section declaration looks like this:
++		.section        .bss.page_aligned,"aw", at progbits
++	while the 3.1 section looks like this:
++		.section        .bss.page_aligned,"aw", at nobits
++	
++	It's definitely a bug that's been fixed:
++	http://sources.redhat.com/ml/binutils/2002-10/msg00507.html
++	
++	I've been told that I can fix it with a carefully crafted assembly file and
++	maybe a change to the linker script, but all that it buys us is a little
++	space in the uncompressed kernel image.  Plus, the warning will still be
++	there at compile-time.  
++	
++	I say, put them back in plain old BSS. 
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++	Signed-off-by: Adrian Bunk <bunk at fs.tum.de>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<achew at nvidia.com>
++	[libata sata_nv] support for hardware, bug fixes
++
++<achew at nvidia.com>
++	[libata] unmap MMIO region _after_ last possible usage
++
++<margitsw at t-online.de>
++	[PATCH] prism54 Clarification to Viro's patch
++	
++	* It seems that Viro patched prism54 with the following patch set :
++	http://www.kernel.org/pub/linux/kernel/v2.6/testing/cset/
++	cset-viro at www.linux.org.uk[torvalds]|ChangeSet|20040727040034|54764.txt
++	
++	* I do not see any indication in any mailing list of this.
++	  It would be nice if we could be informed of such changes :-)
++	
++	* (Changes committed to our CVS)
++
++<margitsw at t-online.de>
++	[PATCH] prism54 URGENT - Fix IRQ handling
++	
++	* We are handing back HANDLED even though the IRQ is not for us.
++	  We also change device state.
++	  This is plainly wrong.
++	  AFAICT we also need to take the spin lock early.
++	  Tested/running on UP/SMP for about a week now.
++	  (Discovered on one of my lappies that had the X driver on the same IRQ)
++	  (Proposed on Prism54 Devel with no objections)
++
++<margitsw at t-online.de>
++	[PATCH] prism54 Fix memory leaks
++	
++	* Change the "version" OID to what it should be.
++	* Fix memory leaks - mgt_get_request always returns
++	* allocated memory for non-int OIDS (with an exception -
++	* keep reading). If the caller checks the return and itself
++	* returns, then it must free memory.
++	* However, it is possible to return from mgt_get_request
++	* early (!priv->mib). In this case, weird things can happen
++	* in isl_ioctl. Quick fix, at least to force an oops, is
++	* to set the union value to NULL. The real fix is to
++	* recode all mgt_get_request calls in isl_ioctl.
++
++<margitsw at t-online.de>
++	[PATCH] prism54 Fix supported rates reporting
++	
++	* We are not correctly reporting supported bit rates.
++	* Fix it.
++
++<simon at thekelleys.org.uk>
++	[PATCH] Atmel wireless bigendian fix.
++	
++	The following patch adds a couple of missing byteswaps and allows the
++	Atmel wireless driver to work in WEP mode on big-endian CPUs. (tested
++	on powerPC).
++
++<akpm at osdl.org>
++	[PATCH] bk-netdev-axnet_cs-fix
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] wrong mac address with netgear FA311 ethernet card
++	
++	From: Mathieu LESNIAK <maverick at eskuel.net>
++	
++	
++	This patch corrects a problem with Netgear FA311
++	ethernet card (a cheap one). Without it, the MAC address is byte swapped
++	ie :
++	HWaddr 02:00:07:E3:E9:F5
++	instead of :
++	HWaddr 00:02:E3:07:F5:E9
++	
++	(the correct MAC address vendor code for Netgear/LiteOn is 00:02:E3)
++	
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++
++<akpm at osdl.org>
++	[PATCH] bk-netdev-hp-plus-fix
++	
++	Signed-off-by: Andrew Morton <akpm at osdl.org>
++
++<dwmw2 at dwmw2.baythorne.internal>
++	Fix MTD partitioning modular build.
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Kill swapper_space test in arch/sparc64/mm/tlb.c
++	
++	It is bogus, plus it breaks the build with
++	CONFIG_SWAP disabled.
++	
++	Based upon a patch from Ben Collins (bcollins at debian.org)
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Change TIF_BLKCOMMIT into a fault code.
++	
++	Eliminates costly atomic bitops in do_sparc64_fault.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Update defconfig.
++
++<neilb at cse.unsw.edu.au>
++	[PATCH] Fix unsigned underflow in xdr decoding.
++	
++	With 'len' being unsigned now, we must make sure it never tries
++	to go negative...
++	
++	Thanks: griffon26 at kfk4ever.com (Maurice van der Pot)
++	
++	Signed-off-by: Neil Brown <neilb at cse.unsw.edu.au>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<trini at kernel.crashing.org>
++	[PATCH] Remove CONFIG_SERIAL_8250_MANY_PORTS from Ebony / Ocotea
++	
++	CONFIG_SERIAL_8250_MANY_PORTS should not be set for these boards, as
++	they only have 2 serial ports.
++	
++	Signed-off-by: Tom Rini <trini at kernel.crashing.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<rmk at flint.arm.linux.org.uk>
++	[PCMCIA] pd6729: add MODULE_DESCRIPTION and MODULE_AUTHOR, fix comment style
++
++<catalin.marinas at com.rmk.(none)>
++	[ARM PATCH] 2012/1: Use -malignment-traps instead of -mshort-load-bytes if gcc supports it
++	
++	Patch from Catalin Marinas
++	
++	This patch replaces the -mshort-load-bytes option with $(call
++	check_gcc,-malignment-traps,-mshort-load-bytes) in the CFLAGS
++	setting in arch/arm/Makefile.
++
++<axboe at suse.de>
++	[PATCH] setup queue before elevator_init()
++	
++	We must setup the queue before calling elevator_init(), otherwise the
++	elevator cannot use the queue members. This really hurts cfq since it
++	checks ->nr_requests, which is zero at that time.
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<torvalds at ppc970.osdl.org>
++	Be a bit more anal about allowing SCSI commands to be sent.
++	
++	Normal users shouldn't have access to the raw device anyway
++	unless they are in the trusted "disk" group, but let's require
++	RAWIO capabilities. That's what the original SCSI interfaces
++	did anyhoo.
++	
++	We probably _should_ just require write access, but that will
++	need more of a code change to pass down the file descriptor.
++
++<davem at nuts.davemloft.net>
++	[SPARC64]: Fix non-SMP build.
++	
++	Signed-off-by: David S. Miller <davem at redhat.com>
++
++<elf at com.rmk.(none)>
++	[ARM PATCH] 2001/1: lh7a40x IDE cleanup
++	
++	Patch from Marc Singer
++	
++	This patch aligns the lh7a40x port with the updated structure of IDE
++	drivers.  It also removes an unused FIQ handler.  This patch is made
++	in order to get the lh7a40x port to build.
++	
++
++<elf at com.rmk.(none)>
++	[ARM PATCH] 2002/1: lh7a40x Timer fixup
++	
++	Patch from Marc Singer
++	
++	The work already done to rectify the timer code initialization missed
++	a necessary change.  This patch adds a timer initialization function
++	to the LPD7A400 machine type.  It also makes a small correction to the
++	kernel configuration that is out of step with the machine specific
++	Kconfig.
++	
++	
++
++<torvalds at ppc970.osdl.org>
++	Pass done file pointer to block device ioctl's
++	
++	They'll need it for permission checking.
++
++<torvalds at ppc970.osdl.org>
++	Allow non-root users certain raw commands if they are deemed safe.
++	
++	We allow more commands if the disk was opened read-write.
++
++<trini at kernel.crashing.org>
++	[PATCH] ppc32: Fix warning on CONFIG_PPC32 && CONFIG_6xx
++	
++	In the *ppos cleanups, proc_dol2crvec was updated, but the prototype
++	found at the top of kernel/sysctl.h was not, generating warning.  This
++	corrects the prototype to match the code.
++	
++	(I'm gonna take a stab at moving these into arch/ppc shortly)
++	
++	Signed-off-by: Tom Rini <trini at kernel.crashing.org>
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<willy at debian.org>
++	[PATCH] Remove fcntl f_op
++	
++	The newly introduced ->fcntl file_operation is badly thought out,
++	not to mention undocumented.  This patch replaces it with two better
++	defined operations -- check_flags and dir_notify.  Any other fcntl()s
++	that filesystems are interested in can have their own properly typed
++	f_op method when they need it.
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<willy at debian.org>
++	[PATCH] PA-RISC update
++	
++	 - __PAGE_OFFSET is 0x10000000 (Randolph Chung)
++	 - PA8800 support (Grant Grundler)
++	 - debuglocks (Thibaut Varene)
++	 - PDC chassis disabling (Thibaut Varene)
++	 - Distinguish between Dinos in request_irq (Thibaut Varene)
++	 - Document interrupt registers (Randolph Chung)
++	 - Revamp CONFIG_DISCONTIGMEM support (Randolph Chung)
++	 - Remove STI console warning and special casing (Randolph Chung)
++	 - n4000 defconfig (Randolph Chung)
++	 - iosapic fixes (Bjorn Helgaas)
++	 - Fix a bug in entry.S where pa_dbit_lock was being trashed (Randolph Chung)
++	 - SMP support (Randolph Chung, Grant Grundler, James Bottomley)
++	 - Clear the pte in the fault handler (Joel Soete)
++	 - Change _exit prototype (Carlos O'Donell)
++	 - Better unwinding support (Randolph Chung)
++	 - GCC 3.4 fixes (Carlos O'Donell, Randolph Chung)
++
++<sm0407 at nurfuerspam.de>
++	[PATCH] cdrom: MO-drive open write fix
++	
++	This trivial fix allows mounting MO-drives readwrite.
++	
++	Acked by Jens.
++	
++	Signed-off-by: Linus Torvalds <torvalds at osdl.org>
++
++<willy at debian.org>
++	[PATCH] lasi_82596 update
++	
++	Update lasi 82596 driver:
++	 - Fix boot messages (Helge Deller)
++	 - Whitespace and __FILE__ usage (Joel Soete)
++	 - 64-bit compile warning fixes (James Bottomley)
++
++<torvalds at ppc970.osdl.org>
++	Linux 2.6.8
++

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/cmsg-compat-signedness-fix-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/cmsg-compat-signedness-fix-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/cmsg-compat-signedness-fix-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,33 @@
+#! /bin/sh -e
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix cmsg_len checks in 32bit compat mode
+## DP: Patch author: Olaf Kirch <okir at suse.de>
+## DP: Upstream status: submitted and accepted, but not in mainline yet
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+From: Olaf Kirch <okir at suse.de>
+Subject: Fix cmsg_len checks in 32bit compat mode
+References: 49517 - LTC13227
+
+The recent fixes for cmsg_len handling seem to break 32bit compatibility
+at least on x86_64. The new CMSG_COMPAT_OK macro requires that cmsg_len
+is greater or equal the size of struct cmsghdr, which is the 64bit
+version of the struct.  The code should really check against the size
+of struct compat_cmsghdr.
+
+Signed-off-by: Olaf Kirch <okir at suse.de>
+
+--- linux-2.6.10/net/compat.c.orig	2005-01-04 13:51:49.000000000 +0100
++++ linux-2.6.10/net/compat.c	2005-01-04 16:53:38.000000000 +0100
+@@ -125,7 +125,7 @@
+ 	 (struct compat_cmsghdr __user *)NULL)
+ 
+ #define CMSG_COMPAT_OK(ucmlen, ucmsg, mhdr) \
+-	((ucmlen) >= sizeof(struct cmsghdr) && \
++	((ucmlen) >= sizeof(struct compat_cmsghdr) && \
+ 	 (ucmlen) <= (unsigned long) \
+ 	 ((mhdr)->msg_controllen - \
+ 	  ((char *)(ucmsg) - (char *)(mhdr)->msg_control)))

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/copy_to_high_bio_irq-leak-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/copy_to_high_bio_irq-leak-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/copy_to_high_bio_irq-leak-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,40 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix leak in copy_to_high_bio_irq
+## DP: Patch author: Jens Axboe <axboe at suse.de>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- 1.51/mm/highmem.c	2004-07-29 06:58:32 +02:00
++++ edited/mm/highmem.c	2004-09-08 21:18:57 +02:00
+@@ -284,7 +284,7 @@
+ 	struct bio_vec *tovec, *fromvec;
+ 	int i;
+ 
+-	bio_for_each_segment(tovec, to, i) {
++	__bio_for_each_segment(tovec, to, i, 0) {
+ 		fromvec = from->bi_io_vec + i;
+ 
+ 		/*
+@@ -316,7 +316,7 @@
+ 	/*
+ 	 * free up bounce indirect pages used
+ 	 */
+-	bio_for_each_segment(bvec, bio, i) {
++	__bio_for_each_segment(bvec, bio, i, 0) {
+ 		org_vec = bio_orig->bi_io_vec + i;
+ 		if (bvec->bv_page == org_vec->bv_page)
+ 			continue;
+
+-- 
+Jens Axboe
+
+-
+To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
+the body of a message to majordomo at vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+Please read the FAQ at  http://www.tux.org/lkml/

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/dell-dbda-bios-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/dell-dbda-bios-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/dell-dbda-bios-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,153 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [ACPI] reserve EBDA for Dell BIOS that neglects to.  (David Shaohua Li) 
+## DP: Patch author: len.brown (BitKeeper)
+## DP: Upstream status: accepted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: len.brown (BitKeeper)
+# cset: 1.1731.1.8 (2.6) key=40ec3899SHh6vR4lsWkKtRhKVbnqew
+# inclusion: upstream
+# descrition: [ACPI] reserve EBDA for Dell BIOS that neglects to. (David Shaohua Li)
+# revision date: Thu, 04 Nov 2004 16:14:29 +0900
+#
+# rset: ChangeSet|1.1731.1.7..1.1731.1.8
+# rset: arch/x86_64/kernel/setup.c|1.41..1.41.1.1
+# rset: arch/i386/kernel/setup.c|1.119..1.119.1.1
+# rset: arch/i386/mm/discontig.c|1.16..1.16.1.1
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/07/07 13:53:29-04:00 len.brown at intel.com 
+#   [ACPI] reserve EBDA for Dell BIOS that neglects to. (David Shaohua Li)
+#   http://bugme.osdl.org/show_bug.cgi?id=2990
+# 
+# arch/x86_64/kernel/setup.c
+#   2004/06/30 23:30:27-04:00 len.brown at intel.com +17 -0
+#   reserve EBDA for Dell BIOS that neglects to.
+# 
+# arch/i386/mm/discontig.c
+#   2004/06/30 22:51:37-04:00 len.brown at intel.com +15 -0
+#   reserve EBDA for Dell BIOS that neglects to.
+# 
+# arch/i386/kernel/setup.c
+#   2004/06/30 22:51:37-04:00 len.brown at intel.com +15 -0
+#   reserve EBDA for Dell BIOS that neglects to.
+# 
+diff -Nru a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
+--- a/arch/i386/kernel/setup.c	2004-11-04 16:14:28 +09:00
++++ b/arch/i386/kernel/setup.c	2004-11-04 16:14:29 +09:00
+@@ -49,6 +49,7 @@
+ #include <asm/ist.h>
+ #include <asm/std_resources.h>
+ #include "setup_arch_pre.h"
++#include <bios_ebda.h>
+ 
+ /* This value is set up by the early boot code to point to the value
+    immediately after the boot time page tables.  It contains a *physical*
+@@ -808,6 +809,17 @@
+ 	}
+ }
+ 
++/*
++ * workaround for Dell systems that neglect to reserve EBDA
++ */
++static void __init reserve_ebda_region(void)
++{
++	unsigned int addr;
++	addr = get_bios_ebda();
++	if (addr)
++		reserve_bootmem(addr, PAGE_SIZE);	
++}
++
+ static unsigned long __init setup_memory(void)
+ {
+ 	unsigned long bootmap_size, start_pfn, max_low_pfn;
+@@ -853,6 +865,9 @@
+ 	 * enabling clean reboots, SMP operation, laptop functions.
+ 	 */
+ 	reserve_bootmem(0, PAGE_SIZE);
++
++	/* reserve EBDA region, it's a 4K region */
++	reserve_ebda_region();
+ 
+     /* could be an AMD 768MPX chipset. Reserve a page  before VGA to prevent
+        PCI prefetch into it (errata #56). Usually the page is reserved anyways,
+diff -Nru a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c
+--- a/arch/i386/mm/discontig.c	2004-11-04 16:14:29 +09:00
++++ b/arch/i386/mm/discontig.c	2004-11-04 16:14:29 +09:00
+@@ -31,6 +31,7 @@
+ #include <asm/e820.h>
+ #include <asm/setup.h>
+ #include <asm/mmzone.h>
++#include <bios_ebda.h>
+ 
+ struct pglist_data *node_data[MAX_NUMNODES];
+ bootmem_data_t node0_bdata;
+@@ -227,6 +228,17 @@
+ 	return reserve_pages;
+ }
+ 
++/*
++ * workaround for Dell systems that neglect to reserve EBDA
++ */
++static void __init reserve_ebda_region_node(void)
++{
++	unsigned int addr;
++	addr = get_bios_ebda();
++	if (addr)
++		reserve_bootmem_node(NODE_DATA(0), addr, PAGE_SIZE);
++}
++
+ unsigned long __init setup_memory(void)
+ {
+ 	int nid;
+@@ -300,6 +312,9 @@
+ 	 * trampoline before removing it. (see the GDT stuff)
+ 	 */
+ 	reserve_bootmem_node(NODE_DATA(0), PAGE_SIZE, PAGE_SIZE);
++
++	/* reserve EBDA region, it's a 4K region */
++	reserve_ebda_region_node();
+ 
+ #ifdef CONFIG_ACPI_SLEEP
+ 	/*
+diff -Nru a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
+--- a/arch/x86_64/kernel/setup.c	2004-11-04 16:14:28 +09:00
++++ b/arch/x86_64/kernel/setup.c	2004-11-04 16:14:28 +09:00
+@@ -422,6 +422,20 @@
+ #define copy_edd() do {} while (0)
+ #endif
+ 
++#define EBDA_ADDR_POINTER 0x40E
++static void __init reserve_ebda_region(void)
++{
++	unsigned int addr;
++	/** 
++	 * there is a real-mode segmented pointer pointing to the 
++	 * 4K EBDA area at 0x40E
++	 */
++	addr = *(unsigned short *)phys_to_virt(EBDA_ADDR_POINTER);
++	addr <<= 4;
++	if (addr)
++		reserve_bootmem_generic(addr, PAGE_SIZE);
++}
++
+ void __init setup_arch(char **cmdline_p)
+ {
+ 	unsigned long low_mem_size;
+@@ -485,6 +499,9 @@
+ 	 * enabling clean reboots, SMP operation, laptop functions.
+ 	 */
+ 	reserve_bootmem_generic(0, PAGE_SIZE);
++
++	/* reserve ebda region */
++	reserve_ebda_region();
+ 
+ #ifdef CONFIG_SMP
+ 	/*

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/dm_io-ENOMEM-goof.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/dm_io-ENOMEM-goof.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/dm_io-ENOMEM-goof.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,93 @@
+# origin: Debian (joshk) -> LKML
+# cset: n/a
+# inclusion: n/a
+# revision date: 2004-11-08
+
+Path: main.gmane.org!not-for-mail
+From: Nigel Cunningham <ncunningham at linuxmail.org>
+Newsgroups: gmane.linux.kernel
+Subject: PATCH (Trivial): Fix dm_io.c oops in low memory conditions.
+Date: Tue, 09 Nov 2004 14:44:45 +1100
+Lines: 34
+Approved: news at gmane.org
+Message-ID: <1099971769.10988.6.camel at desktop.cunninghams>
+Reply-To: ncunningham at linuxmail.org
+NNTP-Posting-Host: deer.gmane.org
+X-Trace: sea.gmane.org 1099972242 16923 80.91.229.6 (9 Nov 2004 03:50:42
+	GMT)
+X-Complaints-To: usenet at sea.gmane.org
+NNTP-Posting-Date: Tue, 9 Nov 2004 03:50:42 +0000 (UTC)
+Original-X-From:
+	linux-kernel-owner+glk-linux-kernel=40m.gmane.org-S261210AbUKIDrY at vger.kern
+	el.org Tue Nov 09 04:50:31 2004
+Return-path:
+	<linux-kernel-owner+glk-linux-kernel=40m.gmane.org-S261210AbUKIDrY at vger.ker
+	nel.org>
+Original-Received: from vger.kernel.org ([12.107.209.244])
+	by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian))
+	id 1CRN1b-0007fY-00
+	for <glk-linux-kernel at gmane.org>; Tue, 09 Nov 2004 04:50:31 +0100
+Original-Received: (majordomo at vger.kernel.org) by vger.kernel.org via
+	listexpand
+	id S261210AbUKIDrY (ORCPT <rfc822;glk-linux-kernel at m.gmane.org>);
+	Mon, 8 Nov 2004 22:47:24 -0500
+Original-Received: (majordomo at vger.kernel.org) by vger.kernel.org id
+	S261229AbUKIDqL
+	(ORCPT <rfc822;linux-kernel-outgoing>);
+	Mon, 8 Nov 2004 22:46:11 -0500
+Original-Received: from pop5-1.us4.outblaze.com ([205.158.62.125]:940 "HELO
+	pop5-1.us4.outblaze.com") by vger.kernel.org with SMTP
+	id S261210AbUKIDp7 (ORCPT <rfc822;linux-kernel at vger.kernel.org>);
+	Mon, 8 Nov 2004 22:45:59 -0500
+Original-Received: (qmail 14504 invoked from network); 9 Nov 2004 03:45:58
+	-0000
+Original-Received: from unknown (HELO ?203.194.46.144?)
+	(ncunningham at linuxmail.org@203.194.46.144)  by pop5-1.us4.outblaze.com with
+	SMTP; 9 Nov 2004 03:45:57 -0000
+Original-To: Linux Kernel Mailing List <linux-kernel at vger.kernel.org>,
+	Andrew Morton <akpm at digeo.com>,
+	Linus Torvalds <torvalds at osdl.org>
+X-Mailer: Ximian Evolution 1.4.6-1mdk
+Original-Sender: linux-kernel-owner at vger.kernel.org
+Precedence: bulk
+X-Mailing-List: linux-kernel at vger.kernel.org
+Xref: main.gmane.org gmane.linux.kernel:253634
+X-Report-Spam: http://spam.gmane.org/gmane.linux.kernel:253634
+MIME-Version: 1.0
+Content-Type: text/plain
+Content-Transfer-Encoding: 7bit
+
+Hi.
+
+If you call drivers/md/dm-io.c:resize_pool on an empty pool and
+mempool_create is unable to make the pool, the condition is not handled
+correctly, resulting in an oops in mempool_destroy.
+
+Please apply.
+
+Regards,
+
+Nigel
+
+diff -ruN 900-dm-low-memory-fix-old/drivers/md/dm-io.c 900-dm-low-memory-fix-new/drivers/md/dm-io.c
+--- 900-dm-low-memory-fix-old/drivers/md/dm-io.c	2004-11-09 14:35:09.234557768 +1100
++++ 900-dm-low-memory-fix-new/drivers/md/dm-io.c	2004-11-09 13:34:36.000000000 +1100
+@@ -265,7 +265,7 @@
+ 		/* create new pool */
+ 		_io_pool = mempool_create(new_ios, alloc_io, free_io, NULL);
+ 		if (!_io_pool)
+-			r = -ENOMEM;
++			return -ENOMEM;
+ 
+ 		r = bio_set_init(&_bios, "dm-io", 512, 1);
+ 		if (r) {
+
+-- 
+Nigel Cunningham
+Pastoral Worker
+Christian Reformed Church of Tuggeranong
+PO Box 1004, Tuggeranong, ACT 2901
+
+You see, at just the right time, when we were still powerless, Christ
+died for the ungodly.		-- Romans 5:6
+

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/doc-post_halloween.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/doc-post_halloween.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/doc-post_halloween.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,1289 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: add post-halloween-2.6.txt
+## DP: Patch author: unknown
+## DP: Upstream status: not submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -urN kernel-source-2.6.6/Documentation/post-halloween-2.6.txt kernel-source-2.6.6-1/Documentation/post-halloween-2.6.txt
+--- kernel-source-2.6.6/Documentation/post-halloween-2.6.txt	1970-01-01 10:00:00.000000000 +1000
++++ kernel-source-2.6.6-1/Documentation/post-halloween-2.6.txt	2004-02-23 08:01:43.000000000 +1100
+@@ -0,0 +1,1274 @@
++
++                     The post-halloween document. v0.48
++                        (aka, 2.6 - what to expect)
++
++                    Dave Jones <davej at codemonkey.org.uk>
++
++                          (Updated as of 2.6.0)
++
++This document explains some of the new functionality to be found in the 2.6
++Linux kernel, some pitfalls you may encounter, and also points out some new
++features which could really use testing.
++Note, that "contact foo at bar.com" below also implies that you should also
++cc: linux-kernel at vger.kernel.org.
++
++Latest version of this document can always be found at
++http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt
++
++Thanks to many [far too many to list] people for valuable feedback.
++
++Note, that this document is somewhat x86-centric, but most features
++documented here affect all platforms anyway.
++
++Translations:
++Spanish - http://www.terra.es/personal/diegocg/post-halloween-2.6.es.txt
++German  - http://www.kubieziel.de/computer/halloween-german.html
++Polish  - http://soltysiak.com/linux/post-halloween-2.6.pl.txt
++pt_BR   - http://www.maluco.com.br/thiago/docs/post-halloween-2.6-pt_BR.txt
++
++
++Applying patches.
++~~~~~~~~~~~~~~~~~
++- In 2.4 and previous kernels, the recommended way to apply patches was
++  to use a command line such as ...
++  gzip -cd patchXX.gz | patch -p0
++  In 2.6, Linus started adding an extra path element to the diffs,
++  so using -p1 in the untarred 'to be patched' directory is necessary.
++
++Reporting bugs.
++~~~~~~~~~~~~~~~
++Most large subsystems of the kernel have their own mailing list.
++Mailing these with bug reports is always good. If in doubt, send
++them to linux-kernel at vger.kernel.org
++
++    ACPI      - acpi-devel at lists.sourceforge.net
++    Bluetooth - bluez-devel at lists.sourceforge.net
++    Ext2      - ext2-devel at lists.sourceforge.net
++    Firewire  - linux1394-devel at lists.sourceforge.net
++    SCSI      - linux-scsi at vger.kernel.org
++    USB       - linux-usb-users at lists.sourceforge.net
++    XFS       - linux-xfs at oss.sgi.com
++
++Known gotchas.
++~~~~~~~~~~~~~~
++Certain known bugs are being reported over and over. Here are the
++workarounds.
++- Blank screen after decompressing kernel?
++  Make sure your .config has
++   CONFIG_INPUT=y
++   CONFIG_VT=y
++   CONFIG_VGA_CONSOLE=y
++   CONFIG_VT_CONSOLE=y
++  A lot of people have discovered that taking their .config from 2.4 and
++  running make oldconfig to pick up new options leads to problems, notably
++  with CONFIG_VT not being set.
++- An additional bug biting some people is that NICs fail to receive packets
++  (usually notable by a NIC not getting a DHCP lease for eg, despite being
++   sent one by the server). Booting with "noapic" "acpi=off" or a combination
++  of both fixes this for most people.
++- (Possibly linked to above bug) VIA APIC routing is currently broken.
++  boot with 'noapic'.
++- Can't load any modules? You need updated tools (See modules section below).
++- depmod reports Unresolved symbols?  depmod from modutils instead of
++  depmod from module-init-tools is first in $PATH (might be different
++  $PATHs as $USER and $ROOT)
++
++
++Regressions.
++~~~~~~~~~~~~
++(Things not expected to work just yet)
++- The hptraid/promise drivers for proprietary RAID formats are currently
++  non functional, and will probably be converted to use device-mapper.
++- Some filesystems still need work (Intermezzo, UFS, HFS, HPFS..)
++  - UMSDOS fs is currently missing, pending rewrite.
++  - EFS (has a blocksize problem, depending on the device that the
++    filesystem is being mounted on)
++- A number of drivers don't compile currently due to them needing various
++  work to convert them to the new APIs
++- The format of /proc/stat changed, which could break some
++  applications that still depend on the old layout.
++- Some people seem to have trouble running rpm, most notably Red Hat 9 users.
++  This is a known bug of rpm.
++  Workaround: run "export LD_ASSUME_KERNEL=2.2.5", before running rpm.
++  This is thought to be a bug related to db4 and O_DIRECT interaction.
++
++
++Stuff needing forward porting from 2.4.
++~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++- HFSPlus
++- SuperH 64
++
++
++Removed features.
++~~~~~~~~~~~~~~~~~
++- khttpd is gone.
++- Older Direct Rendering Manager (DRM) support (For XFree86 4.0)
++  has been removed. Upgrade to XFree86 4.1.0 or higher.
++- LVM1 has been removed. See Device-mapper below.
++- The system call table is no longer exported. Any module that relied
++  on this previously will no longer work.
++- Soundmodem hamradio support has been removed. Its functionality
++  has been superceded by a userspace replacement.
++  http://www.baycom.org/~tom/ham/soundmodem
++- Direct booting from floppy is no longer supported.
++  You should now use a boot loader program such as syslinux instead.
++  "make bzdisk" continues to work (now using syslinux).
++- Callout tty devices (/dev/cua) have been deprecated since 2.1.90pre2.
++  Support is now removed.
++
++
++Deprecated/obsolete features.
++~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++- devfs will be obsoleted in favour of udev (http://www.kernel.org/pub/linux/utils/kernel/hotplug/)
++- boot time root= parsing changed.
++  ramdisks are now ram<n> instead of rd<n> and cm206 is cm206cd (instead of
++  cm206).
++- usbdevfs will be going away in 2.7. The same filesystem can
++  be mounted as 'usbfs' in recent 2.4 kernels, and in 2.5.52
++  and above, which is what the filesystem will furthermore be
++  known as.
++- elvtune is deprecated (as are the ioctl's it used).
++  Instead, the io scheduler tunables are exported in sysfs (see below)
++  in the /sys/block/<device>/queue/iosched directory.
++  Jens wrote a document explaining the tunables of the new scheduler at
++  http://www.lib.uaa.alaska.edu/linux-kernel/archive/2002-Week-44/att-deadline-iosched.txt
++- Using sysctls by numeric values is deprecated, and will go away
++  in the next development series.
++
++
++Modules.
++~~~~~~~~
++- The in-kernel module loader was reimplemented.
++- You need replacement module utilities from
++  http://www.kernel.org/pub/linux/kernel/people/rusty/modules/
++- A backwards compatible set of module utilities is also available
++  from the same URL in RPM format.
++- Debian sarge/sid or Conectiva snapshot users can just use
++  'apt-get install module-init-tools'
++- Modules now free stuff marked with __init or __initdata.
++- For Red Hat users, there's another pitfall in "/etc/rc.sysinit".
++  During startup, the script sets up the binary used to dynamically load
++  modules stored at "/proc/sys/kernel/modprobe". The initscript looks
++  for "/proc/ksyms", but since it doesn't exist in 2.6 kernels, the
++  binary used is "/sbin/true" instead.
++
++  This, eventually, will keep modules from working. Red Hat users will
++  have to patch the "/etc/rc.sysinit" script to set
++  "/proc/sys/kernel/modprobe" to "/sbin/modprobe", even
++  when "/proc/ksyms" doesn't exist.
++- Modules now have a .ko suffix instead of .o
++- Some (older) versions of 'mkinitrd' don't search for modules
++  that end with .ko, so update your mkinitrd if this is a problem.
++
++
++Kernel build system.
++~~~~~~~~~~~~~~~~~~~~
++- The build system is much improved compared to 2.4.
++  You should notice quicker builds, and less spontaneous rebuilds
++  of files on subsequent builds from already built trees.
++- There are new graphical config tools.
++  "make xconfig" now requires the qt libraries.
++  "make gconfig" uses gtk libraries.
++- Make menuconfig/oldconfig has no user-visible changes other than speed,
++  whilst numerous improvements have been made.
++- Several new debug targets exist: 'allyesconfig' 'allnoconfig' 'allmodconfig'.
++- Note: The new configuration system is not CML2 related.
++- Also note: Whilst some ideas were taken from it, Keith Owens'
++  kbuild-2.5 project was not integrated.
++- "make" is now the preferred command, without a target; it does <arch-zimage>
++  and modules.
++- "make -jN" is now the preferred parallel-make execution.
++  Do not bother to provide "MAKE=xxx"
++- The build is now much less verbose.  If you want to see exactly what's
++  going on, try "make V=1" or set KBUILD_VERBOSE=1 in your environment.
++- 'make kernel/mm.o' will build the named file, provided a
++  corresponding source exists. This also works for (non-composite)
++  modules. (FIXME: broken for modules right now?)
++- 'make kernel/' will compile all files in a subdirectory and below.
++- There is no need to run 'make dep' at any stage.
++- 'make help' provides a list of typical targets, including debugging targets.
++- You can now build in a separate tree from the source by doing
++  make O=builddir
++
++
++IO subsystem.
++~~~~~~~~~~~~~
++- You should notice considerable throughput improvements over 2.4 due
++  to much reworking of the block and the memory management layers.
++- Report any regressions in this area to Jens Axboe <axboe at suse.de>
++  and Andrew Morton <akpm at osdl.org>
++- Two different IO elevators are available. The default is the
++  anticipatory IO scheduler. You can select the deadline scheduler by
++  booting with "elevator=deadline" on the kernel command line.
++- For some workloads the anticipatory scheduler is around 10% slower
++  than deadline. Most notably, database workloads which seek all over the
++  disk performing reads and synchronous writes. Database folks will likely
++  want to boot with elevator=deadline to get that last bit of performance back.
++- Assorted changes throughout the block layer meant various block
++  device drivers had a large scale cleanup whilst being updated to
++  newer APIs.
++- The size and alignment of O_DIRECT file IO requests now matches that
++  of the device, not the filesystem.  Typically this means that you
++  can perform O_DIRECT IO with 512-byte granularity rather than 4k.
++  But if you rely upon this, your application will not work on 2.4 kernels
++  and will not work on some devices.
++
++
++block device size support.
++~~~~~~~~~~~~~~~~~~~~~~~~~~
++- Thanks to work done by Peter Chubb, block devices can now access up to
++  16TB on 32-bit architectures, and up to 8EB on 64-bit architectures.
++- To use the new BLKGETSZ64 ioctls, you'll need updated file-utils.
++  (Currently only jfsutils 1.0.20 has this change, patches for other
++   filesystems are still pending merging)
++- The old 'struct statfs' is not able to describe large devices - the
++  statfs() system call will now return -EOVERFLOW for such devices.
++  A new system call called statfs64() with a new structure has been added
++  to support large devices. It it unknown at time of writing how many
++  userspace utilities have been converted to take advantage of this
++  syscall when available.
++
++
++POSIX ACLs & Extended attributes.
++~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++- Userspace tools available at http://acl.bestbits.at
++
++
++VM Changes.
++~~~~~~~~~~~
++- Version zero swap partitions are no longer supported (everything is
++  using v1 now anyway - rerun mkswap if in doubt).
++  Linux 2.0.x requires v0 swap space, Linux v2.1.117 and later
++  support v1.  mkswap(8) can format swap space in either format.
++- The actual 'reverse mappings' part of Rik van Riel's rmap vm was merged.
++  VM behaviour under certain loads should improve.
++- VM misbehaviour should be reported to linux-mm at kvack.org
++- The VM explicitly checks for sparse swapfiles, and aborts if one is found.
++- /proc/sys/vm/swappiness defines the kernel's preference for pagecache over
++  mapped memory. Setting it to 100 (percent) makes it treat both types of
++  memory equally. Setting it to zero makes the kernel very much prefer to
++  reclaim plain pagecache rather than mapped-into-pagetables memory.
++- The bdflush() syscall is now officially deprecated. The syscall
++  does nothing, and prints a stern warning to users. The functionality
++  is replaced by the pdflush daemons.
++- Due to various changes, swap files should be just as fast as swap partitions.
++- In 2.4, up to 64 swap files were possible. In 2.6, this number is reduced
++  to 32.  Like 2.4, these files can be up to 64GB in size, though you will
++  need a recent util-linux to have a mkswap utility that supports >2GB
++
++
++Kernel preemption.
++~~~~~~~~~~~~~~~~~~
++- The much talked about preemption patches made it into 2.6.
++  With this included you should notice much lower latencies especially
++  in demanding multimedia applications. 
++- Note, there are still cases where preemption must be temporarily disabled
++  where we do not. These areas occur in places where per-CPU data is used.
++- If you get "xxx exited with preempt count=n" messages in syslog,
++  don't panic, these are non fatal, but are somewhat unclean.
++  (Something is taking a lock, and exiting without unlocking)
++- If you DO notice high latency with kernel preemption enabled in
++  a specific code path, please report that to Andrew Morton <akpm at osdl.org>
++  and Robert Love <rml at tech9.net>.
++  The report should be something like "the latency in my xyz application
++  hits xxx ms when I do foo but is normally yyy" where foo is an action
++  like "unlink a huge directory tree".
++
++
++Process scheduler improvements.
++~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++- Another much talked about feature. Ingo Molnar reworked the process
++  scheduler to use an O(1) algorithm.  In operation, you should notice
++  no changes with low loads, and increased scalability with large numbers
++  of processes, especially on large SMP systems.
++- Scheduler is now Hyperthreading SMP aware and will disperse processes
++  over physically different CPUs, instead of just over logical CPUs.
++- Robert Love wrote various utilities for changing behaviour of the
++  scheduler (binding processes to CPUs etc). You can find these tools at
++  http://tech9.net/rml/schedutils
++- The behavior of sched_yield() changed a lot.  A task that uses
++  this system call should now expect to sleep for possibly a very
++  long time.  Tasks that do not really desire to give up the
++  processor for a while should probably not make heavy use of this
++  function.  Unfortunately, some GUI programs (like Open Office)
++  do make excessive use of this call and under load their
++  performance is poor.  It seems this new 2.6 behavior is optimal
++  but some user-space applications may need fixing.
++- The above applies to use of yield() in the kernel, too.
++- 2.6 adds system calls for manipulating a task's processor
++  affinity: sched_getaffinity() and sched_setaffinity()
++- Regressions to mingo at redhat.com and rml at tech9.net
++- Debian users who encounter effects such as skips in mp3
++  playback, jerky mouse movement may want to stop the
++  X server from renicing itself to -10
++  You can alter this permanently with 'dpkg-reconfigure xserver-common';
++  if you elect not to have /etc/X11/Xwrapper.config managed by debconf,
++  simply edit it directly.
++- Balancing of IRQs between multiple CPUs should be handled using the
++  irqbalance (http://people.redhat.com/arjanv/irqbalance/) program.
++- David Mosberger maintains a webpage containing some current 'known gotchas'
++  of the O(1) scheduler at http://www.hpl.hp.com/research/linux/kernel/o1.php
++
++
++PCI.
++~~~~
++- PCI domain support has been added.  For most people, this just means that
++  all PCI slot names are extended with "0000:" on the front, but for people
++  with bigger servers it means they're able to access all their PCI devices.
++- More hotplug drivers have been added, including a fake PCI hotplug driver
++  so people without specialised hardware can test hotplug features.
++
++Random.
++~~~~~~~
++- /dev/hwrandom got support for some new hardware (now also backported to 2.4)
++  such as the HW RNG on newer VIA Cyrix CPUs.
++- rng-tools can be found at http://sourceforge.net/projects/gkernel
++
++
++Fast userspace mutexes (Futexes).
++~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++- Rusty Russell added functionality that allows userspace to have
++  fast mutexes that only use syscalls when there is contention. Used by
++  NPTL.
++- Additional information on futexes can be found in Ulrich Dreppers
++  paper on the subject at http://people.redhat.com/drepper/futex.pdf
++- Bert Hubert has written some documentation on this functionality
++  at http://ds9a.nl/futex-manpages
++
++
++epoll
++~~~~~
++Davide Libenzi wrote an event based poll replacement that got
++included in 2.6.  More info available at
++http://www.xmailserver.org/linux-patches/nio-improve.html
++http://lwn.net/Articles/13587/
++
++
++Threading improvements.
++~~~~~~~~~~~~~~~~~~~~~~~
++- Ingo Molnar put a lot of work into threading improvements for 2.6.
++  Some of the features of this work are:
++  -  Generic pid allocator (arbitrary number of PIDs with no slowdown,
++     unified pidhash).
++  -  Thread Local Storage syscalls
++  -  sys_clone() enhancements (CLONE_SETTLS, CLONE_PARENT_SETTID, CLONE_SETTID,
++     CLONE_CLEARTID, CLONE_DETACHED)
++  -  POSIX thread signals stuff (atomic signals, shared signals, etc.)
++  -  Per-CPU GDT
++  -  Threaded coredumping support
++  -  sys_exit() speedups (O(1) exit)
++  -  Generic, improved futexes, vcache
++  -  New, threading related ptrace features
++  -  exit/fork task cache
++  -  /proc updates for threading
++  -  API changes for threading.
++- Users should notice a significant speedup in basic thread operations.
++  This is true to a lesser extent even for old-threading userspace libraries 
++  such as LinuxThreads.
++- Regressions should go to Ingo Molnar <mingo at redhat.com> and
++  phil-list at redhat.com.  Regressions could happen in the area of signal
++  handling and related threading semantics, plus coredumping.
++- Native Posix Threading Library (NPTL).
++  Ulrich Drepper worked closely with Ingo on the threading enhancements, and
++  developed a 1:1 model threading library. You can find out more about NPTL at
++  http://people.redhat.com/drepper/nptl-design.pdf
++
++
++Enhanced coredumping. 
++~~~~~~~~~~~~~~~~~~~~~
++- 2.6 offers you the ability to configure the way core files are
++  named through a /proc/sys/kernel/core_pattern file.
++  You can use various format identifiers in this name to affect
++  how the core dump is named.
++
++    %p - insert pid into filename
++    %u - insert current uid into filename
++    %g - insert current gid into filename
++    %s - insert signal that caused the coredump into the filename
++    %t - insert UNIX time that the coredump occurred into filename
++    %h - insert hostname where the coredump happened into filename
++    %e - insert coredumping executable name into filename
++
++  You should ensure that the string does not exceed 64 bytes.
++- Multithreaded processes can now dump core
++
++
++Input layer.
++~~~~~~~~~~~~
++- Possibly the most visible change to the end user. If misconfigured,
++  you'll find that your keyboard/mouse/other input device will no longer work.
++  2.6 offers a much more flexible interface to devices such as keyboards.
++- The downside is more confusing options.
++  In the "Input device support" menu, be sure to enable at least the following.
++
++                    --- Input I/O drivers
++                    < > Serial i/o support
++                    < >   i8042 PC Keyboard controller
++                    [ ] Keyboards
++                    [ ] Mice
++
++  (Also choose the relevant keyboard/mouse from the list)
++
++- If you find your keyboard/mouse still don't work, edit the file
++  drivers/input/serio/i8042.c, and replace the #undef DEBUG
++  with a #define DEBUG, recompile and reinstall.
++
++  When you boot, you should now see a lot more debugging information.
++  Forward this information to Vojtech Pavlik <vojtech at suse.cz>
++
++- If you use a KVM switcher, and experience problems, booting with the boot
++  time argument 'psmouse_noext' should fix your problems.
++- Users of multimedia keys without X will see changes in how the kernel
++  handles those keys. People who customize keymaps or keycodes in 2.4
++  may need to make some changes in 2.6
++- Users wanting support for the PC speaker need to enable CONFIG_INPUT_PCSPKR,
++  or you won't get a single beep.
++- Synaptics touchpad users may be interested to check out
++  http://w1.894.telia.com/~u89404340/touchpad/
++- In 2.4 users of Japanese keyboards were able to type '|' or
++  '\' characters without loading any custom keymap on the
++  console.  With the keymap in 2.6, this is not possible
++  anymore.  People with these keyboards have to load a keymap
++  with loadkeys rebuilt from the source, since loadkeys in some
++  vendor distributions cannot load keycodes larger than 127.
++  There is a patch to fix this, but it has not been integrated
++  (http://tinyurl.com/t75a).
++
++PnP layer.
++~~~~~~~~~~
++- Support for plug and play devices such as early ISAPnP cards has improved a
++  lot in the 2.6 kernel. The new code behaves more closely to the code
++  handling PCI devices (probe, remove etc callbacks), and also merges
++  PnP BIOS access code.
++- Report any regressions in plug & play functionality to
++  Adam Belay <ambx1 at neo.rr.com>
++
++
++ALSA.
++~~~~~
++- The advanced linux sound architecture was merged into 2.6.
++  This offers considerably improved functionality over the older OSS drivers,
++  but requires new userspace tools.
++- Several distros have shipped ALSA for some time, so you may already have the
++  necessary tools. If not, you can find them at http://www.alsa-project.org/
++- ALSA can emulate OSS interface using the snd_pcm_oss/snd_pcm_mixer
++  modules, if your card produces nothing but silence, you may need to run
++  alsamixer to unmute channels wich /dev/mixer doesn't see
++- Note that the OSS drivers are also still functional, and still present.
++  Many features/fixes that went into 2.4 are still not applied to these
++  drivers, and it's still unclear if they will remain when 2.6 ships.
++  The long term goal is to get everyone moved over to (the superior) ALSA.
++
++
++AGP.
++~~~~
++- The agpgart driver got a long overdue cleanup which involved
++  splitting it into an agpgart core, and per-chipset drivers.
++  You may need to adjust your modules configuration to autoload
++  the chipset drivers on loading the agpgart module.
++- Generic AGP 3.0 support is now included.
++
++DRI.
++~~~~
++- Direct rendering in 2.6 hasn't had much (if any?) testing on
++  older versions of XFree86. Feedback on whether 4.1 works would
++  be useful.
++
++
++Faster system calls.
++~~~~~~~~~~~~~~~~~~~~
++- Systems that support the SYSENTER extension (Basically Intel Pentium-II
++  and above, and AMD Athlons) now have a faster method of making the
++  transition from userspace to kernelspace when a syscall is performed.
++- Pentium Pro also has SYSENTER, but due to errata, is unusable.
++- Without an updated glibc, this will not be noticable.
++- VMWare 4 users may get crashes due to this.
++  Zwane Mwaikambo wrote a patch for a "nosysenter" option which is worth
++  googling for if there isn't a vmware update available.
++- Regressions to torvalds at osdl.org and libc-alpha at sources.redhat.com
++
++
++procps.
++~~~~~~~
++- The 2.6 /proc filesystems changed some statistics, which confuse older
++  versions of procps. Rik van Riel and Robert Love have been maintaining a
++  version of procps during the development of 2.6 which tracks changes to
++  /proc which you can find at http://tech9.net/rml/procps/
++- Alternatively, the procps by Albert Cahalan now supports the altered formats
++  since v3.0.5  -- http://procps.sf.net/
++- The /proc/meminfo format changed slightly which also broke gtop in strange
++  ways. Likely this also broke some of the KDE/GNOME panel applets.
++
++
++Framebuffer layer.
++~~~~~~~~~~~~~~~~~~
++- James Simmons has reworked the framebuffer/console layer considerably for
++  2.6. Support for some cards is still lagging a little, but it should be
++  functionally no different than previous incarnations.
++- boot time arguments may have changed depending on your driver.
++  an example of the change is..
++    append = "video=radeon:1024x768-24 at 100"
++  needs to become..
++    append = "video=radeonfb:1024x768-24 at 100"
++- Current userspace tools (fbset for eg) are not yet updated,
++  and won't function as expected.
++- The VESA framebuffer now enables MTRRs for the framebuffer memory range during
++  initialisation (Note: PCI cards only).
++  If you notice screen corruption, please report this, along with an lspci output,
++  so your card can be blacklisted.
++- Any problems should go to <jsimmons at infradead.org>
++
++
++IDE.
++~~~~
++- The IDE code rewrite was subject to much criticism in early 2.5.x, which
++  put off a lot of people from testing. This work was then subsequently
++  dropped, and reverted back to a 2.4.18 IDE status.
++  Since then additional work has occurred, but not to the extent
++  of the first cleanup attempts.
++- Known problems with the current IDE code. 
++  o  Simplex IDE devices (eg Ali15x3) are missing DMA sometimes
++  o  Most PCMCIA devices have unload races and may oops on eject
++  o  Modular IDE does not yet work, modular IDE PCI modules sometimes
++     oops on loading
++  o  ide-scsi is completely broken in 2.6 currently. Known problem.
++     If you need it either use 2.4 or fix it 8)
++- IDE disk geometry translators like OnTrack, EZ Partition, Disk Manager
++  are no longer autodetected. The only way forward is to remove the translator
++  from the drive, and start over, or use boot parameters depending on the
++  type of remapper used :-
++    hdx=remap63   - add 63 to each sector (For OnTrack DM)
++    hdx=remap     - remap 0->1 (For EZDrive)
++- See also the CD Recording section for some important changes
++  related to IDE CD writers.
++
++IDE TCQ.
++~~~~~~~~
++- Tagged command queueing for IDE devices has been included.
++- Not all combinations of controllers & devices may like this,
++  so handle with care.
++  READ AS: ** Don't use IDE TCQ on any data you value.
++  It's likely bad combinations will be blacklisted as and when discovered.
++
++- If you didn't choose the "TCQ on by default" option, you can enable
++  it by using the command
++
++    echo "using_tcq:32" > /proc/ide/hdX/settings
++
++  (replacing 32 with 0 disables TCQ again).
++
++- Report success/failure stories to Jens Axboe <axboe at suse.de> with
++  inclusion of hdparm -i /dev/hdX, and lspci output.
++
++
++SCSI.
++~~~~~
++- Various SCSI drivers still need work, and don't even compile.
++- Various drivers currently lack error handling.
++  These drivers will cause warnings during compilation due to
++  missing abort: & reset: functions.
++- Note, that some drivers have had these members removed, but still
++  lack error handling. Those noticed so far are ncr53c8xxx, sym53c8xx
++- large dev_t support allowing thousands of disks to be
++  supported (was 128 or 256 in the 2.4 series)
++- major code cleanup, initially to support the block layer (bio)
++  improvements have led to:
++   - better throughput (?) [less double handling of data]
++   - per HBA locks (there was a single io_request_lock in
++     the 2.4 series)
++   - more flexible interface to HBA drivers
++   - better hotplug support, especially for USB mass storage
++     and ieee1394 sbp2 devices [well it's work_in_progress]
++- improved error processing and scanning code (support for
++  large, sparse lun spaces)
++- lots of scsi driver internals available via sysfs
++
++
++v4l2.
++~~~~~
++- The video4linux API finally got its long awaited cleanup.
++- xawtv, bttv and most other existing v4l tools are also compatible
++  with the new v4l2 layer. You should notice no loss in functionality.
++- See http://bytesex.org/v4l/ for more information.
++
++
++Quota reworking.
++~~~~~~~~~~~~~~~~
++The new quota system needs new tools. Supports 32 bit uids.
++http://www.sf.net/projects/linuxquota/
++
++
++CD Recording.
++~~~~~~~~~~~~~
++- Jens Axboe added the ability to use DMA for writing CDs on
++  ATAPI devices. Writing CDs should be much faster than it
++  was in 2.4, and also less prone to buffer underruns and the like.
++- With a recent cdrecord, you also no longer need ide-scsi in order to use
++  an IDE CD writer.
++- Ripping audio tracks off of CDs now also uses DMA and should be
++  notably faster. You can also find an updated cdda2wav at:
++  *.kernel.org/pub/linux/kernel/people/axboe/tools/
++- Send good/bad reports of audio extraction with cdda2wav and burning with
++  the cdrecord to Jens Axboe <axboe at suse.de>
++- Currently only 'open by device name' works in cdrecord.
++  cdrecord -dev=/dev/hdX -inq
++- More info at http://lwn.net/Articles/13538/ & http://lwn.net/Articles/13160/
++
++
++USB:
++~~~~
++- USB host controller drivers were renamed in 2.6. They are now
++   uhci-hcd for UHCI controllers.
++   ohci-hcd for OHCI controllers.
++   ehci-hcd for EHCI (USB 2.0) controllers.
++- Very little user visible changes, the only noticable 'major' change
++  is that there is now only one UHCI driver. As noted elsewhere, usbdevfs 
++  was renamed to usbfs.
++- USB-storage has changed behaviour. A device which is disconnected and
++  then reconnected is not reassociated with the old /dev node.
++- USB storage also got several performance enhancements.
++
++- USB 'gadget' support.
++  There's a new "USB Gadget" API supporting USB devices that
++  run Linux inside.  Examples include PDAs, cable modems,
++  and some printers.  That API is how the driver for the
++  USB Device Controller (UDC) hardware talks with portable
++  "gadget drivers".  A gadget driver is what makes that
++  hardware act like a "network link" or a "printer".
++		                                                                                           
++  When you don't want to write a gadget driver in the kernel,
++  then "gadgetfs" lets you do it in user mode programs.
++  Each endpoint appears as a single file, so it's a lot
++  simpler than "usbfs".  Currently it's purely synchronous,
++  but it should be natural for someone to add AIO support.
++		                                                                                           
++  See http://www.linux-usb.org/gadget for more information
++  about this API framework, including a pthreaded example
++  "gadgetfs" program.  See the 2.6 kerneldoc for API info.
++		
++
++Nanosecond stat:
++~~~~~~~~~~~~~~~~
++The stat64() syscall was changed to return jiffies granularity.
++This allows make(1) to make better decisions on whether or not it
++needs to recompile a file. Not all filesystems may support such precision.
++
++
++Filesystems:
++~~~~~~~~~~~~
++A number of additional filesystems have made their way into 2.6.
++Currently it supports: ext2, ext3, reiserfs, jfs, xfs, minix, romfs,
++iso9660, udf, msdos, vfat, ntfs (ro), adfs, amiga ffs, apple macintosh hfs,
++BeOS befs (ro), bfs, efs (ro), cramfs, free vxfs, os/2 hpfs, qnx4fs,
++sysvfs, ufs.
++Whilst these have had testing out of tree, the level of testing
++after merging is unparalleled. Be wary of trusting data to immature
++filesystems.  A number of new features and improvements have also
++been made to the existing filesystems from 2.4.
++
++Reports of stress testing with the various tools available would
++be beneficial.
++
++
++Generic VFS changes.
++~~~~~~~~~~~~~~~~~~~~
++- Since Linux 2.5.1 it is possible to atomically move a subtree to
++  another place. The usage is...
++   mount --move olddir newdir
++- Since 2.5.43, dmask=value sets the umask applied to directories only.
++  The default is the umask of the current process.
++  The fmask=value sets the umask applied to regular files only.
++  Again, the default is the umask of the current process.
++- Directories can now be marked as synchronous using chattr +S,
++  so that all changes will be immediately written to disk.
++  Note, this does not guarantee atomicity, at least not for all filesystems
++  and for all operations.  You *can* be guaranteed that system calls will
++  not return until the changes are on disk; note though that this does have
++  has some significant performance impacts.
++
++
++
++devfs.
++~~~~~~
++- devfs was somewhat stripped down and a lot of duplicate functionality
++  was removed. You now need to enable CONFIG_DEVPTS_FS=y and mount
++  the devpts filesystem in the same manner you would if you were not
++  using devfs.
++
++
++EXT2.
++~~~~~
++- 2.5.49 included an extension to ext2 which will cause it to not attach
++  buffer_head structures to file or directory pagecache at all, ever.
++  This is for the big highmem machines.  It is enabled via the `-o nobh'
++  mount option.
++- The ext2 filesystem is now using finer-grained locking which yields reduced
++  context switch rates and higher throughput on large SMP machines.
++
++
++EXT3.
++~~~~~
++- The ext3 filesystem has gained indexed directory support, which offers
++  considerable performance gains when used on filesystems with directories
++  containing large numbers of files.
++- In order to use the htree feature, you need at least version 1.32 of
++  e2fsprogs.
++- Existing filesystems can be converted using the command
++
++    tune2fs -O dir_index /dev/hdXXX
++
++- The latest e2fsprogs can be found at
++  http://prdownloads.sourceforge.net/e2fsprogs
++- The ext2 and ext3 filesystems have new file allocations policies (the "Orlov
++  allocator") which will place subdirectories closer together on-disk.  This
++  tends to mean that operations which touch many files in a directory tree are
++  much faster if that tree was created under a 2.6 kernel.
++
++Reiserfs.
++~~~~~~~~~
++- Reiserfs now supports inode attributes such as immutable.
++  (Also included in 2.4.17, so not really 'new').
++- Relocated/non-standard size journal support (also backported
++  to 2.4.22pre3)
++- Support for writes larger than 4KB in size, which means speedups
++  on large file writes, esp in append mode, should also be more
++  SMP friendly.
++- Variable blocksize support. (Ie, you can choose any blocksize
++  in the range of 1024 .. PAGE_CACHE_SIZE, must be power of 2).
++
++
++NFS.
++~~~~
++- Basic support has been added for NFSv4 (server and client)
++- Additionally, kNFSD now supports transport over TCP.
++  This experimental feature is also backported to 2.4.20
++- Interoperability reports with other OS's would be useful.
++- v1.0.3 of nfs-utils supports the newer 2.6 kernels change
++  of kdev_t type. You can grab it at http://nfs.sourceforge.net
++- Problems to nfs at lists.sourceforge.net
++
++
++NTFS.
++~~~~~
++- A new, rewritten NTFS driver was merged for 2.6. It has the
++  following main benefits over the old driver:
++  - SMP and reentrant safe
++  - support bigger than 4 kB cluster sizes
++  - full support for sparse files on W2K/XP/W2K3
++  - mmap() support
++  - More stable, and much faster than the previous NTFS driver.
++  - Still read-only, but with safe file overwrite support without changes
++  to the file size
++  - More information is available at http://linux-ntfs.sf.net
++
++
++sysfs.
++~~~~~~
++In simple terms, the sysfs filesystem is a saner way for
++drivers to export their innards than /proc.
++This filesystem is always compiled in, and can be mounted
++just like another virtual filesystem. No userspace tools
++beyond cat(1) and echo(1) are needed. tree(1) is also good for
++viewing its overall structure.
++
++    mount -t sysfs none /sys
++
++See Documentation/filesystems/sysfs.txt for more info.
++
++
++JFS.
++~~~~
++IBM's JFS was merged for 2.6. (And backported to 2.4.20, but
++it was still a new feature here first. You can read more about JFS at
++http://www-124.ibm.com/developerworks/oss/jfs/index.html
++
++
++XFS.
++~~~~
++The SGI XFS filesystem has been merged, and has a number of userspace
++features. Users are encouraged to read http://oss.sgi.com/projects/xfs
++for more information.
++The various utilities for creating and manipulating XFS volumes can
++be found on SGI's ftp server:
++ftp://oss.sgi.com/projects/xfs/download/download/cmd_tars/xfsprogs-2.5.4.src.tar.gz
++
++
++CIFS.
++~~~~~
++Support utilities and documentation for the common internet file system (CIFS)
++can be found at http://us1.samba.org/samba/Linux_CIFS_client.html
++
++
++FAT.
++~~~~
++CVF (Compressed VFAT) support has been removed. This means you
++will no longer be able to access DriveSpace partitions.
++
++
++HugeTLBfs.
++~~~~~~~~~~
++Files in this filesystem are backed by large pages if the CPU
++supports them. See Documentation/vm/hugetlbpage.txt for more details.
++
++
++Internal filesystems.
++~~~~~~~~~~~~~~~~~~~~~
++/proc/filesystems will contain several filesystems that are not
++mountable in userspace, but are used internally by the kernel
++to keep track of things. Amongst these filesystems are futexfs 
++and eventpollfs.
++
++
++Kernel Asynchronous I/O (AIO) Support
++~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++Support for kernel AIO has been included in 2.6. 
++
++AIO enables even a single application thread to overlap I/O 
++operations with other processing, by providing an interface
++for submitting one or more i/o requests in one system call
++(io_submit) without waiting for completion, and a separate 
++interface (io_getevents) to reap completed i/o operations
++associated with a given completion group.
++
++The following is a quick summary of what works today as 
++expected:
++- AIO read and write on raw (and O_DIRECT on blockdev)
++- AIO read and write on files opened with O_DIRECT on
++  ext2, ext3, jfs, xfs
++
++And what doesn't work as expected or is not currently 
++supported:
++- AIO read and write on files opened without O_DIRECT
++  (i.e. normal buffered filesystem AIO). On ext2, ext3,
++  jfs, xfs and nfs, these do not return an explicit
++  error, but quietly default to synchronous or rather 
++  non-AIO behaviour (i.e io_submit waits for i/o to complete 
++  in these cases). For most other filesystems, -EINVAL is 
++  reported.
++- AIO fsync (not supported for any filesystem)
++- AIO read and write on sockets (doesn't return an
++  explicit error, but quietly defaults to synchronous
++  or rather non-AIO behaviour)
++
++You need to install libaio-0.3.92 (available at 
++http://www.kernel.org/pub/linux/kernel/people/bcrl/aio/) 
++if you are writing AIO applications which use the native 
++AIO interfaces.
++
++More info is available at http://lse.sf.net/io/aio.html
++
++
++Profiling.
++~~~~~~~~~~
++- A system wide performance profiler (Oprofile) has been included in 2.6.
++  With this option compiled in, you'll get an oprofilefs filesystem
++  which you can mount, that the userspace utilities talk to.
++  You can find out more at http://oprofile.sf.net/
++- You need a fixed readprofile utility for 2.6.
++  Present in util-linux as of 2.11z
++
++
++
++Improved BIOS table support.
++~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++- Linux now supports various new BIOS extensions.
++
++
++Simple boot flag support.
++~~~~~~~~~~~~~~~~~~~~~~~~~
++The SBF specification is an x86 BIOS extension that allows improved
++system boot speeds. It does this by marking a CMOS field to say
++"I booted okay, skip extensive POST next reboot".
++Userspace tool is at http://www.codemonkey.org.uk/projects/sbf/sbf.c
++More info on SBF is at http://www.microsoft.com/hwdev/resources/specs/simp_bios.asp
++
++
++EDD Support.
++~~~~~~~~~~~~
++- Support for BIOS Enhanced Disk Drive Services (EDD) was added,
++  which exports information on what the BIOS thinks is the boot
++  drive and other useful info to /sys/firmware/edd
++- Matt Domsch is interested in hearing success/fails on this code
++  with some simple tests decribed at http://domsch.com/linux/edd30/results.html
++
++
++Improved system monitoring.
++~~~~~~~~~~~~~~~~~~~~~~~~~~~
++- lm_sensors.
++  - Shipped in vendors kernels for years, lm_sensors is now part of mainline.
++    It does however have a different interface. (/sysfs instead of /proc
++  - http://www.xs4all.nl/~thospel/ASIS/bin/psensors is a handy script
++    for parsing the new sysfs fields.
++- IPMI. (Intelligent Platform Management Interface)
++  - IPMI is a standard for monitoring the hardware in a system.
++  - Project home page: http://openipmi.sourceforge.net
++  - Specification: http://www.intel.com/design/servers/ipmi/spec.htm
++
++
++x86 CPU detection.
++~~~~~~~~~~~~~~~~~~
++- The CPU detection code got a pretty hefty shake up. To be certain your
++  CPU has all relevant workarounds applied, be sure to check that it was
++  detected correctly. cat /proc/cpuinfo will tell what the kernel thinks it is.
++- Likewise, the x86 MTRR driver got a considerable makeover.
++  Check that XFree86 sets up MTRRs in the same way it did in 2.4
++  (Failures will get logged in /var/log/XFree86.log)
++- Early PII Xeon processors and possibly other early PII processors
++  require microcode updates either from the BIOS or the microcode driver
++  to work around CPU bugs the O(1) scheduler exposes.
++  You can find the relevant microcode tools at
++  http://www.urbanmyth.org/microcode/
++- Any regressions in both should go to mochel at osdl.org Cc: davej at codemonkey.org.uk
++
++
++Extra tainting.
++~~~~~~~~~~~~~~~
++Running certain AMD processors in SMP boxes is out of spec, and will taint
++the kernel with the 'S' flag.  Running 2 Athlon XPs for example may seem to
++work fine, but may also introduce difficult to pin down bugs.
++In time it's likely this tainting will be extended to cover other out of
++spec cases.
++
++Additionally, the new modules interface will taint the kernel if you try
++to 'force' a module to load with insmod -f.
++
++
++Power management.
++~~~~~~~~~~~~~~~~~
++- 2.6 contains a more up to date snapshot of the ACPI driver. Should
++  you experience any problems booting, try booting with the argument
++  "acpi=off" to rule out any ACPI interaction. ACPI has a much more involved
++  role in bringing the system up in 2.6 than it did in 2.4
++- The old "acpismp=force" boot option is now obsolete, and will be ignored
++  due to the old "mini ACPI" parser being removed.
++- software suspend is still in development, and in need of more work.
++  Use with SMP and/or PREEMPT not advised.
++- The ACPI code will do basic sanity checks on the DMI structure in the BIOS
++  to determine the date it was written. BIOSes older than year 2000 are
++  assumed to be broken. In some circumstances, this assumption is wrong.
++  If you see a message saying ACPI is disabled for this reason, try booting
++  with acpi=force. If things work fine, send the output of dmidecode
++  (http://www.nongnu.org/dmidecode/) to acpi-devel at lists.sf.net
++  with an explanation of why your BIOS shouldn't be blacklisted.
++
++CPU frequency scaling.
++~~~~~~~~~~~~~~~~~~~~~~
++Certain processors have the facility to scale their voltage/clockspeed.
++2.6 introduces an interface to this feature, see Documentation/cpufreq
++for more information. This functionality also covers features like
++Intel's speedstep, and the Powernow! feature present in mobile AMD Athlons.
++In addition to x86 variants, this framework also supports various ARM CPUs.
++You can find a userspace daemon that monitors battery life and
++adjusts accordingly at: http://sourceforge.net/projects/cpufreqd
++
++
++Background polling of MCE.
++~~~~~~~~~~~~~~~~~~~~~~~~~~
++The machine check handler has been extended so that it regularly polls
++for any problems on AMD Athlon, and Intel Pentium 4 systems.
++This may result in machine check exceptions occuring more frequently
++than they did in 2.4 on out of spec systems (Overclocking/inadequate
++cooling/underated PSU etc..).
++
++
++LVM2 - DeviceMapper.
++~~~~~~~~~~~~~~~~~~~~
++The LVM1 code was removed wholesale, and replaced with a much better
++designed 'device mapper'.
++- This is backwards compatible with the LVM1 disk format.
++- Device mapper does require new tools to manage volumes however.
++  You can get these from ftp://ftp.sistina.com/pub/LVM2/tools/
++
++
++Debugging options.
++~~~~~~~~~~~~~~~~~~
++During the stabilising period, it's likely that the debugging options
++in the kernel hacking menu will trigger quite a few problems.
++Please report any of these problems to linux-kernel at vger.kernel.org
++rather than just disabling the relevant CONFIG_ options.
++
++Merging of kksymoops means that the kernel will now spit out
++automatically decoded oopses (no more feeding them to ksymoops).
++For this reason, you should always enable the option in the
++kernel hacking menu labelled "Load all symbols for debugging/kksymoops".
++
++Testing with CONFIG_PREEMPT will also increase the amount of debug
++code that gets enabled in the kernel. Kernel preemption gives us
++the ability to do a whole slew of debugging checks like sleeping
++with locks held, scheduling while atomic, exiting with locks held, etc.
++
++
++Compiler issues.
++~~~~~~~~~~~~~~~~
++- The recommended compiler (for x86) is still 2.95.3.
++- When compiled with a modern gcc (Ie gcc 3.x), 2.6 will use additional
++  optimisations that 2.4 didn't. This may shake out compiler bugs that
++  2.4 didn't expose.
++- Do not use gcc 3.0.x on x86 due to a stack pointer handling bug.
++- gcc 2.96 is not supported with CONFIG_FRAME_POINTER=y due to a stack
++  pointer handling bug.
++
++
++Security concerns.
++~~~~~~~~~~~~~~~~~~
++Several security issues solved in 2.4 may not yet be forward ported
++to 2.6. For this reason 2.6.x kernels should not be tested on
++untrusted systems.  Testing known 2.4 exploits and reporting results
++is useful.
++
++SELinux.
++~~~~~~~~
++NSA Security-Enhanced Linux (SELinux) was merged in 2.6.
++SELinux defaults to not being config'd in.  If you
++config it in it defaults to enabled.  If you also config the bootparam
++you can use that param to disable it, otherwise selinux=1 is redundant
++as that's the default.
++
++You can obtain SELinux tools and an example policy configuration from
++http://www.nsa.gov/selinux
++
++
++
++Networking.
++~~~~~~~~~~~
++- ebtables
++  The bridging firewall code was merged. To manage these you'll
++  need the ebtables tool available from
++  http://users.pandora.be/bart.de.schuymer/ebtables/
++  More on bridge-nf can be found at http://bridge.sourceforge.net
++- Bridged packets can now be 'seen' by iptables.
++- IPSec
++  Linux finally has IPSec support in mainline.  Use the KAME tools port on
++  http://sourceforge.net/projects/ipsec-tools
++  For more info see http://www.lib.uaa.alaska.edu/linux-kernel/archive/2002-Week-44/1127.html
++  Also Bert Hubert has a howto at http://lartc.org/howto/lartc.ipsec.html
++  Additionally, ipsec-utils is at http://sourceforge.net/projects/ipsec-tools
++  Herbert Xu also has patches against FreeSWAN 2.00 to allow its userspace
++  to use the 2.6 IPSec functionality. They can be downloaded from
++  http://gondor.apana.org.au/~herbert/freeswan/
++  An additional HOWTO is at http://www.ipsec-howto.org
++- Some applications may trigger the kernel to spit out warnings about
++  'process xxx using obsolete setsockopt SO_BSDCOMPAT' .
++  - Bind 9.2.2 checks for #ifdef SO_BSDCOMPAT in <asm/socket.h> correctly,
++    so a recompile is all that is needed.
++  - bind9-host from debian testing triggers, though the 'host' package doesn't.
++  - process `snmpd' is using obsolete setsockopt SO_BSDCOMPAT
++  - process `snmptrapd' is using obsolete setsockopt SO_BSDCOMPAT
++  - ntop uses obsolete (PF_INET,SOCK_PACKET)
++- Users of boxes with >1 NIC may find that for eg, eth0 and eth1 refer to
++  the opposites of what they did in 2.4.   This is a bug that will be fixed
++  before 2.6.0.  One option (or management workaround) for this is to use
++  'nameif' to name Ethernet interfaces.  There is a HOWTO for doing this at
++  <http://xenotime.net/linux/doc/network-interface-names.txt>
++- Support for various new RFCs.
++  - RFC3173 (IP Payload Compression).
++  - RFC3041 (IPv6 Privacy Extensions).
++  - RFC2473 (IPv6 in IPv6 tunnels).
++  - RFC2960 (SCTP - see below).
++- Linux reaches congestion collapse when subjected to heavy network load.
++  NAPI fixes this amongst other things and therefore improving network
++  performance.
++  More info at http://www.cyberus.ca/~hadi/usenix-paper.tgz and
++  ftp://robur.slu.se/pub/Linux/net-development/NAPI/
++- IPVS (IP Virtual Server)
++  http://www.linuxvirtualserver.org/
++- RFC 2960 - SCTP (Stream Control Transmission Protocol)
++  SCTP is an IP based, message oriented reliable transport protocol with
++  congestion control, support for transparent multi-homing and multiple
++  ordered streams of messages. RFC2960 defines the core protocol.
++  More information about the protocol can be found at
++    http://www.ietf.org/rfc/rfc2960.txt
++  and about the Linux kernel implementation at
++    http://lksctp.sourceforge.net
++- ANSI/IEEE 802.2 LLC type 2 Support
++  Full implementation of LLC 1 and 2 stack, used by Appletalk, IPX and Token
++  Ring, also needed for the out of the tree, not yet functional NetBEUI
++  stack and for the for Linux SNA.
++                                                                                
++  This is based on the stack released under the GPL by Procom Inc. for the
++  2.0.30 Linux kernel.
++
++
++Crypto
++~~~~~~
++- A generic crypto API has been merged, offering support for various
++  algorithms (HMAC,MD4,MD5,SHA-1,SHA256,SHA384,SHA512,DES,Triple DES EDE,
++  Blowfish, Twofish, Serpent, AES, CAST5, CAST6)
++
++- This functionality is used by IPSec and the crypto-loop.  It's possible
++  that it will later also be available for use in userspace through a crypto
++  device, possibly compatible with the OpenBSD crypto userspace.
++
++- The in-kernel loopback device can now do crypto using the CryptoAPI.
++  May need new userspace tools.
++
++- A 2.4->2.6 cryptoloop migration guide is at http://clemens.endorphin.org/Cryptoloop_Migration_Guide.html
++
++Ports.
++~~~~~~
++- 2.6 features support for several new architectures.
++  - x86-64 (AMD Hammer)
++  - ppc64
++  - UML (User mode Linux)
++    See http://user-mode-linux.sf.net for more information.
++  - uCLinux: m68k(w/o MMU), h8300 and v850.  sh also added a uCLinux option.
++- The 64 bit s390x port was collapsed into a single port, appearing
++  as a config option in the base s390 arch.
++- In the opposite direction, arm26 was split out from arm.
++- x86 architecture also got 'subarch' support to support 'strange' x86
++  boxes (usually big boy toys). Currently supported subarchs include
++  - ES7000
++  - PC9800 (incomplete merge)
++  - VISWS (Was in 2.4, but now maintained again)
++  - Voyager. (http://www.hansenpartnership.com/voyager/)
++
++
++- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
++Revision history:
++0.48 - gadgetfs
++       cryptoloop howto URL.
++       Mailing list pointers.
++0.47 - Add futex paper URL.
++       Correct libc-alpha mailing list.
++       Jeff Garzik shouldn't get IRQ routing problems
++       Clarify syslinux necessity for boot disks.
++       Add depmod to common gotchas
++       Add EFS regression
++       Add mkinitrd note to modules section.
++       Various grammar cleanups
++       Mention tree(1) in sysfs section
++       SELinux corrections.
++       Duh, numerical sysctls are deprecated not syscalls.
++       Document seperate build dir feature.
++       /proc/stat changes broke more than just DOTS.
++       Add Japanese keyboard issue to input section.
++0.46 - Update akpm's email address.
++       Mention LLC in the networking section.
++       Added link to 2.6 migration guide.
++0.45 - DEVFS is obsolete.
++       Add pt_BR translation.
++0.44 - lm_sensors.
++       x86 subarch support.
++       Add link to Joseph Pranevich's 2.6 doc.
++       Mention chattr +S
++       Update dmidecode URL
++       Fix sbf.c URL
++       Fix typos (s/proprietory/proprietary/)
++       add URL to patched cdda2wav.
++       Mention which filesystems does 2.6 actually supports.
++       Add a small note about SELinux
++       Add a few more RFCs which we now support in the Networking section
++       Change IPVS to IPVS (IP Virtual Server)
++       Mention additional encryption algorithms that crypto api supports
++       Add a few things to TODO section
++       Add URL to AIO.
++       Polish translation URL added.
++       Fix up a stray davej at suse.de that I missed.
++       Update spanish translation URL.
++0.43 - oprofile URL changed.
++       Update Linus' email       
++       Drop report of buggy Red Hat 3.2.2-5 gcc.
++       Remove reference to Jens' hacked cdrecord, standard version is now ok.
++       PC Speaker note added.
++       Mention elevator=deadline for database folks.
++       Merge two deprecated sections.
++       Update URL to xfsprogs.
++       Mention Conectiva module-init-tools
++       Mention acpi=force, and DMI blacklist.
++       DRI CFT on X4.1
++       Pentium Pro SYSENTER is broken.
++       Update Alans list of IDE bugs
++       Add geometry translator workarounds.
++       Mention swapfile limitations.
++       Update Reiserfs new features.
++       Move some features marked as 'deprecated' to 'removed'.
++       Add 'needs forward porting' section.
++       Pointer to synaptics touchpad driver webpage.
++       Update ipsec utils URL.
++       Mention usb-storage changes.
++       Modules are now .ko instead of .o
++       Mention how to change elevator on command line.
++       Document statfs64()
++       ext3 data=journal mode should now be fixed.
++       Fix iosched pathname.
++       Document USB changes.
++       Add SCTP to Networking.
++       s/2.5/2.6/ in most of the doc.
++       Mention AIO.
++       Add additional IPSEC howto URL.
++       Deprecate numeric sysctls
++0.42 - CONFIG_LOG_BUF_SHIFT is now sanity checked by Kconfig
++       Hyperthreading scheduler improvements.
++       ALSA OSS emulation.
++       32bit uids in new quota.
++       Not all filesystems support nanosecond stat.
++       Note that NTFS still isn't R/W
++       Mention CryptoLoop.
++0.41 - V=0 is now default. Document V=1
++       s/Redhat/Red Hat/ everywhere.
++       Added vmware sysenter note.
++       MTRR for vesafb
++       Various grammar fixes.
++       Selectable elevators.
++       PCI domains
++0.40 - Callout tty devices are removed.
++       Added note about modules in Red Hat 9
++0.39 - irqbalance note added.
++       Added ntop, snmp tools obsolete messages.
++       Added link to David Mosberger's O(1) page.
++       Mention Herbert Xu's FreeSWAN patches.
++       Add CONFIG_VGA_CONSOLE to the list of gotchas.
++       Add note about 2.4 .config's to gotchas.
++       Reword devpts note.
++0.38 - Fixed URL to nameif
++0.37 - devfs users now need to mount devpts.
++       mention h8300 port.    
++       mentioned NTFS rewrite.
++0.36 - Include Doug Gilberts 'positive SCSI spin'.
++       Mention NAPI.
++       Reword the CPU bug workaround that the O(1) scheduler exposes.
++       Added 'Known Gotchas' section
++0.35 - Note about KDE panel applets.
++       mount --move, dmask, fmask
++       Removed note about oprofile utilities being underdeveloped.
++       Mention ext2 locking, and ext2/ext3 orlov allocator.
++0.34 - Remove people.redhat.com NPTL URLs on Ulrich Dreppers request.
++       Added note about s390x going away.
++       Various kbuild updates.
++       Note about swap files.
++       Added note about -p1 vs -p0
++       Lots of typo fixes from Randy Dunlap.
++       RPM from RH9 seems to have problems.
++0.33 - Networking RFCs section added.
++0.32 - Added Soundmodem userspace replacement URL.
++0.31 - ext3 data=journal breakage noted.
++0.30 - Athlon powernow is now supported.
++0.29 - Mention NIC renumbering and ACPI/APIC NIC bugs. 
++0.28 - SO_BSDCOMPAT obsolete messages, nfsutils.
++0.27 - radeon -> radeonfb
++0.26 - Added info about readprofile.
++0.25 - Added cdrecord example. Added URL to Spanish translation.
++0.1->0.24 - Unrecorded history
++
++- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
++Other Links.
++http://www.kernelnewbies.org/status/
++http://bugzilla.kernel.org/
++http://www.kniggit.net/wwol26.html
++http://thomer.com/linux/migrate-to-2.6.html
++
++
++TODO:  (Please mail me a few lines about these if you are
++         the owner of these).
++
++ PCI IDs (new_id, agpgart try_unsupported)
++ libsysfs
++ kdev_t changes?
++ ISDN rewrite?
++ AFS
++ DVB
++ Hangcheck timer
++ /proc/sysrq-trigger
++ libata
++ initramfs ?
++

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-firmware-pcdp-register.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-firmware-pcdp-register.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-firmware-pcdp-register.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,18 @@
+# origin: Bjorn Helgaas (<bjorn.helgaas at hp.com>)
+# cset: n/a
+# inclusion: Has been fixed in a code restructuring that will appear in 2.6.10
+# revision-date: 2004-12-03
+
+===== drivers/firmware/pcdp.c 1.6 vs edited =====
+--- 1.6/drivers/firmware/pcdp.c	2004-07-28 22:58:54 -06:00
++++ edited/drivers/firmware/pcdp.c	2004-12-02 11:09:43 -07:00
+@@ -97,9 +97,6 @@ setup_serial_console(int rev, struct pcd
+ 	port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF;
+ 
+ 	if (uart_irq_supported(rev, uart)) {
+-		port.irq = acpi_register_gsi(uart->gsi,
+-			uart_active_high_low(rev, uart),
+-			uart_edge_level(rev, uart));
+ 		port.flags |= UPF_AUTO_IRQ;  /* some FW reported wrong GSI */
+ 		if (uart_pci(rev, uart))
+ 			port.flags |= UPF_SHARE_IRQ;

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-ftape.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-ftape.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-ftape.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,160 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: apply x86/64bit fix in drivers/char/ftape/lowlevel/ftape-calibr.c
+## DP: Patch author: unknown
+## DP: Upstream status: not submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- kernel-source-2.6.6/drivers/char/ftape/lowlevel/ftape-calibr.c	2004-03-11 13:55:24.000000000 +1100
++++ kernel-source-2.6.6-1/drivers/char/ftape/lowlevel/ftape-calibr.c	2003-10-22 21:08:21.000000000 +1000
+@@ -31,7 +31,10 @@
+ #include <asm/io.h>
+ #if defined(__alpha__)
+ # include <asm/hwrpb.h>
+-#elif defined(__i386__) || defined(__x86_64__)
++#elif defined(__x86_64__)
++# include <asm/msr.h>
++# include <asm/timex.h>
++#elif defined(__i386__) 
+ # include <linux/timex.h>
+ #endif
+ #include <linux/ftape.h>
+@@ -45,7 +48,7 @@
+ # error Ftape is not implemented for this architecture!
+ #endif
+ 
+-#if defined(__alpha__)
++#if defined(__alpha__) || defined(__x86_64__)
+ static unsigned long ps_per_cycle = 0;
+ #endif
+ 
+@@ -72,7 +75,18 @@
+ 
+ 	asm volatile ("rpcc %0" : "=r" (r));
+ 	return r;
+-#elif defined(__i386__) || defined(__x86_64__)
++#elif defined(__x86_64__)
++	unsigned long r;
++	rdtscl(r);
++	return r;
++#elif defined(__i386__)
++
++/*
++ * Note that there is some time between counter underflowing and jiffies
++ * increasing, so the code below won't always give correct output.
++ * -Vojtech
++ */
++
+ 	unsigned long flags;
+ 	__u16 lo;
+ 	__u16 hi;
+@@ -89,9 +103,9 @@
+ 
+ static unsigned int short_ftape_timestamp(void)
+ {
+-#if defined(__alpha__)
++#if defined(__alpha__) || defined(__x86_64__)
+ 	return ftape_timestamp();
+-#elif defined(__i386__) || defined(__x86_64__)
++#elif defined(__i386__)
+ 	unsigned int count;
+  	unsigned long flags;
+  
+@@ -106,9 +120,9 @@
+ 
+ static unsigned int diff(unsigned int t0, unsigned int t1)
+ {
+-#if defined(__alpha__)
+-	return (t1 <= t0) ? t1 + (1UL << 32) - t0 : t1 - t0;
+-#elif defined(__i386__) || defined(__x86_64__)
++#if defined(__alpha__) || defined(__x86_64__)
++	return (t1 - t0);
++#elif defined(__i386__)
+ 	/*
+ 	 * This is tricky: to work for both short and full ftape_timestamps
+ 	 * we'll have to discriminate between these.
+@@ -122,9 +136,9 @@
+ 
+ static unsigned int usecs(unsigned int count)
+ {
+-#if defined(__alpha__)
++#if defined(__alpha__) || defined(__x86_64__)
+ 	return (ps_per_cycle * count) / 1000000UL;
+-#elif defined(__i386__) || defined(__x86_64__)
++#elif defined(__i386__)
+ 	return (10000 * count) / ((CLOCK_TICK_RATE + 50) / 100);
+ #endif
+ }
+@@ -163,38 +177,13 @@
+ 
+ static void init_clock(void)
+ {
+-#if defined(__i386__) || defined(__x86_64__)
+-	unsigned int t;
+-	int i;
+ 	TRACE_FUN(ft_t_any);
+ 
+-	/*  Haven't studied on why, but there sometimes is a problem
+-	 *  with the tick timer readout. The two bytes get swapped.
+-	 *  This hack solves that problem by doing one extra input.
+-	 */
+-	for (i = 0; i < 1000; ++i) {
+-		t = short_ftape_timestamp();
+-		if (t > LATCH) {
+-			inb_p(0x40);	/* get in sync again */
+-			TRACE(ft_t_warn, "clock counter fixed");
+-			break;
+-		}
+-	}
++#if defined(__x86_64__)
++	ps_per_cycle = 1000000000UL / cpu_khz;
+ #elif defined(__alpha__)
+-#if CONFIG_FT_ALPHA_CLOCK == 0
+-#error You must define and set CONFIG_FT_ALPHA_CLOCK in 'make config' !
+-#endif
+ 	extern struct hwrpb_struct *hwrpb;
+-	TRACE_FUN(ft_t_any);
+-
+-	if (hwrpb->cycle_freq != 0) {
+-		ps_per_cycle = (1000*1000*1000*1000UL) / hwrpb->cycle_freq;
+-	} else {
+-		/*
+-		 * HELP:  Linux 2.0.x doesn't set cycle_freq on my noname !
+-		 */
+-		ps_per_cycle = (1000*1000*1000*1000UL) / CONFIG_FT_ALPHA_CLOCK;
+-	}
++	ps_per_cycle = (1000*1000*1000*1000UL) / hwrpb->cycle_freq;
+ #endif
+ 	TRACE_EXIT;
+ }
+@@ -213,7 +202,7 @@
+ 	unsigned int tc = 0;
+ 	unsigned int count;
+ 	unsigned int time;
+-#if defined(__i386__) || defined(__x86_64__)
++#if defined(__i386__)
+ 	unsigned int old_tc = 0;
+ 	unsigned int old_count = 1;
+ 	unsigned int old_time = 1;
+@@ -255,7 +244,7 @@
+ 		tc = (1000 * time) / (count - 1);
+ 		TRACE(ft_t_any, "once:%3d us,%6d times:%6d us, TC:%5d ns",
+ 			usecs(once), count - 1, usecs(multiple), tc);
+-#if defined(__alpha__)
++#if defined(__alpha__) || defined(__x86_64__)
+ 		/*
+ 		 * Increase the calibration count exponentially until the
+ 		 * calibration time exceeds 100 ms.
+@@ -263,7 +252,7 @@
+ 		if (time >= 100*1000) {
+ 			break;
+ 		}
+-#elif defined(__i386__) || defined(__x86_64__)
++#elif defined(__i386__)
+ 		/*
+ 		 * increase the count until the resulting time nears 2/HZ,
+ 		 * then the tc will drop sharply because we lose LATCH counts.

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-ide-dma-blacklist-toshiba.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-ide-dma-blacklist-toshiba.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-ide-dma-blacklist-toshiba.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,21 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: blacklist "TOSHIBA CD-ROM XM-1702BC" in drivers/ide/ide-dma.c
+## DP: Patch author: unknown
+## DP: Upstream status: not submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- kernel-source-2.6.6/drivers/ide/ide-dma.c	2004-04-05 19:49:28.000000000 +1000
++++ kernel-source-2.6.6-1/drivers/ide/ide-dma.c	2004-04-05 20:54:34.000000000 +1000
+@@ -125,6 +125,7 @@
+ 	{ "HITACHI CDR-8335"	,	"ALL"		},
+ 	{ "HITACHI CDR-8435"	,	"ALL"		},
+ 	{ "Toshiba CD-ROM XM-6202B"	,	"ALL"		},
++	{ "TOSHIBA CD-ROM XM-1702BC"	,	"ALL"		},
+ 	{ "CD-532E-A"		,	"ALL"		},
+ 	{ "E-IDE CD-ROM CR-840",	"ALL"		},
+ 	{ "CD-ROM Drive/F5A",	"ALL"		},

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-ide-dma-ricoh.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-ide-dma-ricoh.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-ide-dma-ricoh.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,21 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: bogus blacklist RICOH CD-R/RW MP7083A
+## DP: Patch author: Srihari Vijayaraghavan <sriharivijayaraghavan at yahoo.com.au>
+## DP: Upstream status: backport 2.6.10-rc2
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- a/drivers/ide/ide-dma.c	2004-11-18 11:37:48 -08:00
++++ b/drivers/ide/ide-dma.c	2004-11-18 11:37:48 -08:00
+@@ -129,7 +129,6 @@
+ 	{ "CD-532E-A"		,	"ALL"		},
+ 	{ "E-IDE CD-ROM CR-840",	"ALL"		},
+ 	{ "CD-ROM Drive/F5A",	"ALL"		},
+-	{ "RICOH CD-R/RW MP7083A",	"ALL"		},
+ 	{ "WPI CDD-820",		"ALL"		},
+ 	{ "SAMSUNG CD-ROM SC-148C",	"ALL"		},
+ 	{ "SAMSUNG CD-ROM SC-148F",	"ALL"		},

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-input-hiddev-HIDIOCGUCODE.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-input-hiddev-HIDIOCGUCODE.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-input-hiddev-HIDIOCGUCODE.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,123 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: fix boundary checks for GUSAGE/SUSAGE in drivers/usb/input/hiddev.c
+## DP: Patch author: Herbert Xu
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -urN kernel-source-2.6.6/drivers/usb/input/hiddev.c kernel-source-2.6.6-1/drivers/usb/input/hiddev.c
+--- kernel-source-2.6.6/drivers/usb/input/hiddev.c	2004-05-10 19:48:01.000000000 +1000
++++ kernel-source-2.6.6-1/drivers/usb/input/hiddev.c	2004-05-11 20:07:38.000000000 +1000
+@@ -573,38 +573,11 @@
+ 
+ 		return 0;
+ 
+-	case HIDIOCGUCODE:
+-		uref_multi = kmalloc(sizeof(struct hiddev_usage_ref_multi), GFP_KERNEL);
+-		if (!uref_multi)
+-			return -ENOMEM;
+-		uref = &uref_multi->uref;
+-		if (copy_from_user(uref, user_arg, sizeof(*uref))) 
+-			goto fault;
+-
+-		rinfo.report_type = uref->report_type;
+-		rinfo.report_id = uref->report_id;
+-		if ((report = hiddev_lookup_report(hid, &rinfo)) == NULL)
+-			goto inval;
+-
+-		if (uref->field_index >= report->maxfield)
+-			goto inval;
+-
+-		field = report->field[uref->field_index];
+-		if (uref->usage_index >= field->maxusage)
+-			goto inval;
+-
+-		uref->usage_code = field->usage[uref->usage_index].hid;
+-
+-		if (copy_to_user(user_arg, uref, sizeof(*uref)))
+-			goto fault;
+-
+-		kfree(uref_multi);
+-		return 0;
+-
+ 	case HIDIOCGUSAGE:
+ 	case HIDIOCSUSAGE:
+ 	case HIDIOCGUSAGES:
+ 	case HIDIOCSUSAGES:
++	case HIDIOCGUCODE:
+ 	case HIDIOCGCOLLECTIONINDEX:
+ 		uref_multi = kmalloc(sizeof(struct hiddev_usage_ref_multi), GFP_KERNEL);
+ 		if (!uref_multi)
+@@ -621,10 +594,12 @@
+ 
+ 		if (cmd != HIDIOCGUSAGE && 
+ 		    cmd != HIDIOCGUSAGES &&
++		    cmd != HIDIOCGUCODE &&
+ 		    uref->report_type == HID_REPORT_TYPE_INPUT)
+ 			goto inval;
+ 
+-		if (uref->report_id == HID_REPORT_ID_UNKNOWN) {
++		if (cmd != HIDIOCGUCODE &&
++		    uref->report_id == HID_REPORT_ID_UNKNOWN) {
+ 			field = hiddev_lookup_usage(hid, uref);
+ 			if (field == NULL)
+ 				goto inval;
+@@ -638,28 +613,34 @@
+ 				goto inval;
+ 
+ 			field = report->field[uref->field_index];
+-			if (uref->usage_index >= field->maxusage)
+-				goto inval;
+-
+-			if (cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) {
+-				if (uref_multi->num_values >= HID_MAX_USAGES || 
+-				    uref->usage_index >= field->maxusage || 
+-				   (uref->usage_index + uref_multi->num_values) >= field->maxusage)
++			if (cmd == HIDIOCGUCODE ||
++			    cmd == HIDIOCGCOLLECTIONINDEX) {
++				if (uref->usage_index >= field->maxusage)
+ 					goto inval;
+-			}
++			} else if (uref->usage_index >= field->report_count)
++				goto inval;
++			else if ((cmd == HIDIOCGUSAGES ||
++				  cmd == HIDIOCSUSAGES) &&
++				 (uref->usage_index + uref_multi->num_values >=
++				  field->report_count ||
++				  uref->usage_index + uref_multi->num_values <
++				  uref->usage_index))
++				goto inval;
+ 		}
+ 
+ 		switch (cmd) {
+ 			case HIDIOCGUSAGE:
+ 				uref->value = field->value[uref->usage_index];
+-				if (copy_to_user(user_arg, uref, sizeof(*uref)))
+-					goto fault;
+-				goto goodreturn;
++				break;
+ 
+ 			case HIDIOCSUSAGE:
+ 				field->value[uref->usage_index] = uref->value;
+ 				goto goodreturn;
+ 
++			case HIDIOCGUCODE:
++				uref->usage_code = field->usage[uref->usage_index].hid;
++				break;
++
+ 			case HIDIOCGCOLLECTIONINDEX:
+ 				kfree(uref_multi);
+ 				return field->usage[uref->usage_index].collection_index;
+@@ -678,6 +659,8 @@
+ 				goto goodreturn;
+ 		}
+ 
++		if (copy_to_user(user_arg, uref, sizeof(*uref)))
++			goto fault;
+ goodreturn:
+ 		kfree(uref_multi);
+ 		return 0;

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-input-psaux-hacks.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-input-psaux-hacks.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-input-psaux-hacks.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,53 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: add INPUT_MOUSEDEV_PSAUX_ENABLE
+## DP: Patch author: Herbert Xu
+## DP: Upstream status: not submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- kernel-source-2.6.6/drivers/input/Kconfig	2004-03-11 13:55:22.000000000 +1100
++++ kernel-source-2.6.6-1/drivers/input/Kconfig	2004-01-27 21:05:58.000000000 +1100
+@@ -65,6 +65,11 @@
+ 	  screen resolution you are using to correctly scale the data. If
+ 	  you're not using a digitizer, this value is ignored.
+ 
++config INPUT_MOUSEDEV_PSAUX_ENABLE
++	bool "Enable /dev/psaux device by default"
++	default y
++	depends on INPUT_MOUSEDEV_PSAUX
++
+ config INPUT_JOYDEV
+ 	tristate "Joystick interface"
+ 	depends on INPUT
+--- kernel-source-2.6.6/drivers/input/mousedev.c	2004-03-11 13:55:44.000000000 +1100
++++ kernel-source-2.6.6-1/drivers/input/mousedev.c	2004-02-05 20:20:54.000000000 +1100
+@@ -47,6 +47,16 @@
+ module_param(yres, uint, 0);
+ MODULE_PARM_DESC(yres, "Vertical screen resolution");
+ 
++#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
++#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX_ENABLE
++#define psaux 1
++#else
++static int psaux;
++module_param(psaux, uint, 0);
++MODULE_PARM_DESC(psaux, "Enable legacy /dev/psaux interface");
++#endif
++#endif
++
+ struct mousedev {
+ 	int exist;
+ 	int open;
+@@ -572,7 +582,7 @@
+ 				NULL, "mice");
+ 
+ #ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
+-	if (!(psaux_registered = !misc_register(&psaux_mouse)))
++	if (psaux && !(psaux_registered = !misc_register(&psaux_mouse)))
+ 		printk(KERN_WARNING "mice: could not misc_register the device\n");
+ #endif
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-macintosh-adb-trackpad.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-macintosh-adb-trackpad.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-macintosh-adb-trackpad.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,21 @@
+#! /bin/sh -e 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: disable spurious 2nd mouse event for apple trackpads.
+## DP: Patch author: Alexander Clausen <alex at skip86.com>
+## DP: Upstream status: reviewed and submitted by benh.
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- kernel-source-2.6.8/drivers/macintosh/adbhid.c.orig	2004-03-10 23:41:43.000000000 +0100
++++ kernel-source-2.6.8/drivers/macintosh/adbhid.c		2004-03-10 23:41:34.000000000 +0100
+@@ -326,7 +326,7 @@
+ 	input_report_key(&adbhid[id]->input, BTN_LEFT,   !((data[1] >> 7) & 1));
+ 	input_report_key(&adbhid[id]->input, BTN_MIDDLE, !((data[2] >> 7) & 1));
+
+-	if (nb >= 4)
++	if (nb >= 4 && adbhid[id]->mouse_kind != ADBMOUSE_TRACKPAD)
+ 		input_report_key(&adbhid[id]->input, BTN_RIGHT,  !((data[3] >> 7) & 1));
+
+ 	input_report_rel(&adbhid[id]->input, REL_X,

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-net-3c59x-build-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-net-3c59x-build-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-net-3c59x-build-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,50 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Build fix for 3c59x without pci just eisa
+## DP: Patch author: max attems <janitor at sternwelten.at>
+## DP: Upstream status: included
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+
+--- kernel-source-2.6.8/drivers/net/3c59x.c	2004-08-14 07:36:10.000000000 +0200
++++ b/drivers/net/3c59x.c	2004-09-10 01:29:14.000000000 +0200
+@@ -900,7 +900,9 @@ static void dump_tx_ring(struct net_devi
+ static void update_stats(long ioaddr, struct net_device *dev);
+ static struct net_device_stats *vortex_get_stats(struct net_device *dev);
+ static void set_rx_mode(struct net_device *dev);
++#ifdef CONFIG_PCI
+ static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
++#endif
+ static void vortex_tx_timeout(struct net_device *dev);
+ static void acpi_set_WOL(struct net_device *dev);
+ static struct ethtool_ops vortex_ethtool_ops;
+@@ -1468,7 +1470,9 @@ static int __devinit vortex_probe1(struc
+ 
+ 	dev->stop = vortex_close;
+ 	dev->get_stats = vortex_get_stats;
++#ifdef CONFIG_PCI
+ 	dev->do_ioctl = vortex_ioctl;
++#endif
+ 	dev->ethtool_ops = &vortex_ethtool_ops;
+ 	dev->set_multicast_list = set_rx_mode;
+ 	dev->tx_timeout = vortex_tx_timeout;
+@@ -2868,6 +2872,7 @@ static struct ethtool_ops vortex_ethtool
+ 	.get_drvinfo =		vortex_get_drvinfo,
+ };
+ 
++#ifdef CONFIG_PCI
+ static int vortex_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
+ {
+ 	struct vortex_private *vp = netdev_priv(dev);
+@@ -2925,6 +2930,7 @@ static int vortex_ioctl(struct net_devic
+ 
+ 	return err;
+ }
++#endif
+ 
+ 
+ /* Pre-Cyclone chips have no documented multicast filter, so the only

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-net-8139too-locking.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-net-8139too-locking.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-net-8139too-locking.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,78 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: fix deadlock on shutdown in drivers/net/8139too.c
+## DP: Patch author: Herbert Xu
+## DP: Upstream status: discussed with viro and jgarzik, probably wants an
+## DP: Upstream status: interruptible rtnl_lock variant
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- kernel-source-2.6.6/drivers/net/8139too.c	2004-05-10 19:47:54.000000000 +1000
++++ kernel-source-2.6.6-1/drivers/net/8139too.c	2004-05-10 22:21:32.000000000 +1000
+@@ -112,6 +112,7 @@
+ #include <linux/crc32.h>
+ #include <linux/suspend.h>
+ #include <asm/io.h>
++#include <asm/semaphore.h>
+ #include <asm/uaccess.h>
+ #include <asm/irq.h>
+ 
+@@ -590,6 +591,7 @@
+ 	struct rtl_extra_stats xstats;
+ 	int time_to_die;
+ 	struct mii_if_info mii;
++	struct semaphore mdio_sem;
+ 	unsigned int regs_len;
+ };
+ 
+@@ -1025,6 +1027,7 @@
+ 	tp->mii.mdio_write = mdio_write;
+ 	tp->mii.phy_id_mask = 0x3f;
+ 	tp->mii.reg_num_mask = 0x1f;
++	init_MUTEX (&tp->mdio_sem);
+ 
+ 	/* dev is fully set up and ready to use now */
+ 	DPRINTK("about to register device named %s (%p)...\n", dev->name, dev);
+@@ -1633,9 +1636,10 @@
+ 		if (tp->time_to_die)
+ 			break;
+ 
+-		rtnl_lock ();
++		if (down_interruptible (&tp->mdio_sem))
++			break;
+ 		rtl8139_thread_iter (dev, tp, tp->mmio_addr);
+-		rtnl_unlock ();
++		up (&tp->mdio_sem);
+ 	}
+ 
+ 	complete_and_exit (&tp->thr_exited, 0);
+@@ -2221,9 +2225,9 @@
+ 		ret = kill_proc (tp->thr_pid, SIGTERM, 1);
+ 		if (ret) {
+ 			printk (KERN_ERR "%s: unable to signal thread\n", dev->name);
+-			return ret;
++		} else {
++			wait_for_completion (&tp->thr_exited);
+ 		}
+-		wait_for_completion (&tp->thr_exited);
+ 	}
+ 	
+ 	if (netif_msg_ifdown(tp))
+@@ -2464,10 +2468,14 @@
+ 	if (!netif_running(dev))
+ 		return -EINVAL;
+ 
++	if (down_interruptible (&np->mdio_sem))
++		return -ERESTARTSYS;
++
+ 	spin_lock_irq(&np->lock);
+ 	rc = generic_mii_ioctl(&np->mii, if_mii(rq), cmd, NULL);
+ 	spin_unlock_irq(&np->lock);
+ 
++	up (&np->mdio_sem);
+ 	return rc;
+ }
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-net-arcnet-crash.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-net-arcnet-crash.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-net-arcnet-crash.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,24 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: fix crash in arcnet pcmcia card when starting network.
+## DP: Patch author: Hideaki YOSHIFUJI <yoshfuji at linux-ipv6.org>
+## DP: Upstream status: included
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -Nru a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c
+--- a/drivers/net/arcnet/arcnet.c	2004-09-26 08:52:30 -07:00
++++ b/drivers/net/arcnet/arcnet.c	2004-09-26 08:52:30 -07:00
+@@ -401,7 +401,8 @@
+ 	lp->rfc1201.sequence = 1;
+ 
+ 	/* bring up the hardware driver */
+-	lp->hw.open(dev);
++	if (lp->hw.open)
++		lp->hw.open(dev);
+ 
+ 	if (dev->dev_addr[0] == 0)
+ 		BUGMSG(D_NORMAL, "WARNING!  Station address 00 is reserved "

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-net-tg3-readd.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-net-tg3-readd.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-net-tg3-readd.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,8000 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: re-add tg3.c with firmware loading support
+## DP: Patch author: Nathaneal Nerode, Jens Schmalzing
+## DP: Upstream status: rejected
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- orig/drivers/net/Kconfig	2004-08-14 03:27:18.000000000 -0400
++++ mod/drivers/net/Kconfig	2004-08-14 03:27:34.000000000 -0400
+@@ -2125,6 +2125,7 @@
+ config TIGON3
+ 	tristate "Broadcom Tigon3 support"
+ 	depends on PCI
++	select FW_LOADER
+ 	help
+ 	  This driver supports Broadcom Tigon3 based gigabit Ethernet cards.
+ 
+--- orig/drivers/net/tg3.c	2004-08-12 14:33:47.000000000 -0400
++++ mod/drivers/net/tg3.c	2004-08-14 03:25:04.000000000 -0400
+@@ -0,0 +1,7976 @@
++/*
++ * tg3.c: Broadcom Tigon3 ethernet driver.
++ *
++ * Copyright (C) 2001, 2002, 2003, 2004 David S. Miller (davem at redhat.com)
++ * Copyright (C) 2001, 2002, 2003 Jeff Garzik (jgarzik at pobox.com)
++ * Copyright (C) 2004 Sun Microsystems Inc.
++ * Portions copyright 2004 Nathanael Nerode  <neroden at gcc.gnu.org>
++ */
++
++#include <linux/config.h>
++
++#include <linux/module.h>
++
++#include <linux/kernel.h>
++#include <linux/types.h>
++#include <linux/compiler.h>
++#include <linux/slab.h>
++#include <linux/delay.h>
++#include <linux/init.h>
++#include <linux/ioport.h>
++#include <linux/pci.h>
++#include <linux/netdevice.h>
++#include <linux/etherdevice.h>
++#include <linux/skbuff.h>
++#include <linux/ethtool.h>
++#include <linux/mii.h>
++#include <linux/if_vlan.h>
++#include <linux/ip.h>
++#include <linux/tcp.h>
++#include <linux/workqueue.h>
++
++#include <linux/firmware.h>
++
++#include <net/checksum.h>
++
++#include <asm/system.h>
++#include <asm/io.h>
++#include <asm/byteorder.h>
++#include <asm/uaccess.h>
++
++#ifdef CONFIG_SPARC64
++#include <asm/idprom.h>
++#include <asm/oplib.h>
++#include <asm/pbm.h>
++#endif
++
++#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
++#define TG3_VLAN_TAG_USED 1
++#else
++#define TG3_VLAN_TAG_USED 0
++#endif
++
++#ifdef NETIF_F_TSO
++#define TG3_TSO_SUPPORT	1
++#else
++#define TG3_TSO_SUPPORT	0
++#endif
++
++#include "tg3.h"
++
++#define DRV_MODULE_NAME		"tg3"
++#define PFX DRV_MODULE_NAME	": "
++#define DRV_MODULE_VERSION	"3.8"
++#define DRV_MODULE_RELDATE	"July 14, 2004"
++
++#define TG3_DEF_MAC_MODE	0
++#define TG3_DEF_RX_MODE		0
++#define TG3_DEF_TX_MODE		0
++#define TG3_DEF_MSG_ENABLE	  \
++	(NETIF_MSG_DRV		| \
++	 NETIF_MSG_PROBE	| \
++	 NETIF_MSG_LINK		| \
++	 NETIF_MSG_TIMER	| \
++	 NETIF_MSG_IFDOWN	| \
++	 NETIF_MSG_IFUP		| \
++	 NETIF_MSG_RX_ERR	| \
++	 NETIF_MSG_TX_ERR)
++
++/* length of time before we decide the hardware is borked,
++ * and dev->tx_timeout() should be called to fix the problem
++ */
++#define TG3_TX_TIMEOUT			(5 * HZ)
++
++/* hardware minimum and maximum for a single frame's data payload */
++#define TG3_MIN_MTU			60
++#define TG3_MAX_MTU(tp)	\
++	((GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 && \
++	  GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) ? 9000 : 1500)
++
++/* These numbers seem to be hard coded in the NIC firmware somehow.
++ * You can't change the ring sizes, but you can change where you place
++ * them in the NIC onboard memory.
++ */
++#define TG3_RX_RING_SIZE		512
++#define TG3_DEF_RX_RING_PENDING		200
++#define TG3_RX_JUMBO_RING_SIZE		256
++#define TG3_DEF_RX_JUMBO_RING_PENDING	100
++
++/* Do not place this n-ring entries value into the tp struct itself,
++ * we really want to expose these constants to GCC so that modulo et
++ * al.  operations are done with shifts and masks instead of with
++ * hw multiply/modulo instructions.  Another solution would be to
++ * replace things like '% foo' with '& (foo - 1)'.
++ */
++#define TG3_RX_RCB_RING_SIZE(tp)	\
++	((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 || \
++	  GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) ? \
++	 512 : 1024)
++
++#define TG3_TX_RING_SIZE		512
++#define TG3_DEF_TX_RING_PENDING		(TG3_TX_RING_SIZE - 1)
++
++#define TG3_RX_RING_BYTES	(sizeof(struct tg3_rx_buffer_desc) * \
++				 TG3_RX_RING_SIZE)
++#define TG3_RX_JUMBO_RING_BYTES	(sizeof(struct tg3_rx_buffer_desc) * \
++			         TG3_RX_JUMBO_RING_SIZE)
++#define TG3_RX_RCB_RING_BYTES(tp) (sizeof(struct tg3_rx_buffer_desc) * \
++			           TG3_RX_RCB_RING_SIZE(tp))
++#define TG3_TX_RING_BYTES	(sizeof(struct tg3_tx_buffer_desc) * \
++				 TG3_TX_RING_SIZE)
++#define TX_RING_GAP(TP)	\
++	(TG3_TX_RING_SIZE - (TP)->tx_pending)
++#define TX_BUFFS_AVAIL(TP)						\
++	(((TP)->tx_cons <= (TP)->tx_prod) ?				\
++	  (TP)->tx_cons + (TP)->tx_pending - (TP)->tx_prod :		\
++	  (TP)->tx_cons - (TP)->tx_prod - TX_RING_GAP(TP))
++#define NEXT_TX(N)		(((N) + 1) & (TG3_TX_RING_SIZE - 1))
++
++#define RX_PKT_BUF_SZ		(1536 + tp->rx_offset + 64)
++#define RX_JUMBO_PKT_BUF_SZ	(9046 + tp->rx_offset + 64)
++
++/* minimum number of free TX descriptors required to wake up TX process */
++#define TG3_TX_WAKEUP_THRESH		(TG3_TX_RING_SIZE / 4)
++
++/* number of ETHTOOL_GSTATS u64's */
++#define TG3_NUM_STATS		(sizeof(struct tg3_ethtool_stats)/sizeof(u64))
++
++static char version[] __devinitdata =
++	DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
++
++MODULE_AUTHOR("David S. Miller (davem at redhat.com) and Jeff Garzik (jgarzik at pobox.com)");
++MODULE_DESCRIPTION("Broadcom Tigon3 ethernet driver");
++MODULE_LICENSE("GPL");
++MODULE_PARM(tg3_debug, "i");
++MODULE_PARM_DESC(tg3_debug, "Tigon3 bitmapped debugging message enable value");
++
++static int tg3_debug = -1;	/* -1 == use TG3_DEF_MSG_ENABLE as value */
++
++static struct pci_device_id tg3_pci_tbl[] = {
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5700,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5701,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5702,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5703,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5704,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5702FE,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5705,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5705_2,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5705M,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5705M_2,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5702X,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5703X,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5704S,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5702A3,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5703A3,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5782,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5788,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5789,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5901,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5901_2,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5704S_2,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5705F,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5720,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5721,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5750,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5751,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5750M,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5751M,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5751F,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1000,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1001,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1003,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC9100,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_TIGON3,
++	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
++	{ 0, }
++};
++
++MODULE_DEVICE_TABLE(pci, tg3_pci_tbl);
++
++struct {
++	char string[ETH_GSTRING_LEN];
++} ethtool_stats_keys[TG3_NUM_STATS] = {
++	{ "rx_octets" },
++	{ "rx_fragments" },
++	{ "rx_ucast_packets" },
++	{ "rx_mcast_packets" },
++	{ "rx_bcast_packets" },
++	{ "rx_fcs_errors" },
++	{ "rx_align_errors" },
++	{ "rx_xon_pause_rcvd" },
++	{ "rx_xoff_pause_rcvd" },
++	{ "rx_mac_ctrl_rcvd" },
++	{ "rx_xoff_entered" },
++	{ "rx_frame_too_long_errors" },
++	{ "rx_jabbers" },
++	{ "rx_undersize_packets" },
++	{ "rx_in_length_errors" },
++	{ "rx_out_length_errors" },
++	{ "rx_64_or_less_octet_packets" },
++	{ "rx_65_to_127_octet_packets" },
++	{ "rx_128_to_255_octet_packets" },
++	{ "rx_256_to_511_octet_packets" },
++	{ "rx_512_to_1023_octet_packets" },
++	{ "rx_1024_to_1522_octet_packets" },
++	{ "rx_1523_to_2047_octet_packets" },
++	{ "rx_2048_to_4095_octet_packets" },
++	{ "rx_4096_to_8191_octet_packets" },
++	{ "rx_8192_to_9022_octet_packets" },
++
++	{ "tx_octets" },
++	{ "tx_collisions" },
++
++	{ "tx_xon_sent" },
++	{ "tx_xoff_sent" },
++	{ "tx_flow_control" },
++	{ "tx_mac_errors" },
++	{ "tx_single_collisions" },
++	{ "tx_mult_collisions" },
++	{ "tx_deferred" },
++	{ "tx_excessive_collisions" },
++	{ "tx_late_collisions" },
++	{ "tx_collide_2times" },
++	{ "tx_collide_3times" },
++	{ "tx_collide_4times" },
++	{ "tx_collide_5times" },
++	{ "tx_collide_6times" },
++	{ "tx_collide_7times" },
++	{ "tx_collide_8times" },
++	{ "tx_collide_9times" },
++	{ "tx_collide_10times" },
++	{ "tx_collide_11times" },
++	{ "tx_collide_12times" },
++	{ "tx_collide_13times" },
++	{ "tx_collide_14times" },
++	{ "tx_collide_15times" },
++	{ "tx_ucast_packets" },
++	{ "tx_mcast_packets" },
++	{ "tx_bcast_packets" },
++	{ "tx_carrier_sense_errors" },
++	{ "tx_discards" },
++	{ "tx_errors" },
++
++	{ "dma_writeq_full" },
++	{ "dma_write_prioq_full" },
++	{ "rxbds_empty" },
++	{ "rx_discards" },
++	{ "rx_errors" },
++	{ "rx_threshold_hit" },
++
++	{ "dma_readq_full" },
++	{ "dma_read_prioq_full" },
++	{ "tx_comp_queue_full" },
++
++	{ "ring_set_send_prod_index" },
++	{ "ring_status_update" },
++	{ "nic_irqs" },
++	{ "nic_avoided_irqs" },
++	{ "nic_tx_threshold_hit" }
++};
++
++static void tg3_write_indirect_reg32(struct tg3 *tp, u32 off, u32 val)
++{
++	if ((tp->tg3_flags & TG3_FLAG_PCIX_TARGET_HWBUG) != 0) {
++		unsigned long flags;
++
++		spin_lock_irqsave(&tp->indirect_lock, flags);
++		pci_write_config_dword(tp->pdev, TG3PCI_REG_BASE_ADDR, off);
++		pci_write_config_dword(tp->pdev, TG3PCI_REG_DATA, val);
++		spin_unlock_irqrestore(&tp->indirect_lock, flags);
++	} else {
++		writel(val, tp->regs + off);
++		if ((tp->tg3_flags & TG3_FLAG_5701_REG_WRITE_BUG) != 0)
++			readl(tp->regs + off);
++	}
++}
++
++static void _tw32_flush(struct tg3 *tp, u32 off, u32 val)
++{
++	if ((tp->tg3_flags & TG3_FLAG_PCIX_TARGET_HWBUG) != 0) {
++		unsigned long flags;
++
++		spin_lock_irqsave(&tp->indirect_lock, flags);
++		pci_write_config_dword(tp->pdev, TG3PCI_REG_BASE_ADDR, off);
++		pci_write_config_dword(tp->pdev, TG3PCI_REG_DATA, val);
++		spin_unlock_irqrestore(&tp->indirect_lock, flags);
++	} else {
++		unsigned long dest = tp->regs + off;
++		writel(val, dest);
++		readl(dest);    /* always flush PCI write */
++	}
++}
++
++static inline void _tw32_rx_mbox(struct tg3 *tp, u32 off, u32 val)
++{
++	unsigned long mbox = tp->regs + off;
++	writel(val, mbox);
++	if (tp->tg3_flags & TG3_FLAG_MBOX_WRITE_REORDER)
++		readl(mbox);
++}
++
++static inline void _tw32_tx_mbox(struct tg3 *tp, u32 off, u32 val)
++{
++	unsigned long mbox = tp->regs + off;
++	writel(val, mbox);
++	if (tp->tg3_flags & TG3_FLAG_TXD_MBOX_HWBUG)
++		writel(val, mbox);
++	if (tp->tg3_flags & TG3_FLAG_MBOX_WRITE_REORDER)
++		readl(mbox);
++}
++
++#define tw32_mailbox(reg, val)  writel(((val) & 0xffffffff), tp->regs + (reg))
++#define tw32_rx_mbox(reg, val)  _tw32_rx_mbox(tp, reg, val)
++#define tw32_tx_mbox(reg, val)  _tw32_tx_mbox(tp, reg, val)
++
++#define tw32(reg,val)		tg3_write_indirect_reg32(tp,(reg),(val))
++#define tw32_f(reg,val)		_tw32_flush(tp,(reg),(val))
++#define tw16(reg,val)		writew(((val) & 0xffff), tp->regs + (reg))
++#define tw8(reg,val)		writeb(((val) & 0xff), tp->regs + (reg))
++#define tr32(reg)		readl(tp->regs + (reg))
++#define tr16(reg)		readw(tp->regs + (reg))
++#define tr8(reg)		readb(tp->regs + (reg))
++
++static void tg3_write_mem(struct tg3 *tp, u32 off, u32 val)
++{
++	unsigned long flags;
++
++	spin_lock_irqsave(&tp->indirect_lock, flags);
++	pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, off);
++	pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_DATA, val);
++
++	/* Always leave this as zero. */
++	pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, 0);
++	spin_unlock_irqrestore(&tp->indirect_lock, flags);
++}
++
++static void tg3_read_mem(struct tg3 *tp, u32 off, u32 *val)
++{
++	unsigned long flags;
++
++	spin_lock_irqsave(&tp->indirect_lock, flags);
++	pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, off);
++	pci_read_config_dword(tp->pdev, TG3PCI_MEM_WIN_DATA, val);
++
++	/* Always leave this as zero. */
++	pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, 0);
++	spin_unlock_irqrestore(&tp->indirect_lock, flags);
++}
++
++static void tg3_disable_ints(struct tg3 *tp)
++{
++	tw32(TG3PCI_MISC_HOST_CTRL,
++	     (tp->misc_host_ctrl | MISC_HOST_CTRL_MASK_PCI_INT));
++	tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00000001);
++	tr32(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW);
++}
++
++static inline void tg3_cond_int(struct tg3 *tp)
++{
++	if (tp->hw_status->status & SD_STATUS_UPDATED)
++		tw32(GRC_LOCAL_CTRL, tp->grc_local_ctrl | GRC_LCLCTRL_SETINT);
++}
++
++static void tg3_enable_ints(struct tg3 *tp)
++{
++	tw32(TG3PCI_MISC_HOST_CTRL,
++	     (tp->misc_host_ctrl & ~MISC_HOST_CTRL_MASK_PCI_INT));
++	tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00000000);
++	tr32(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW);
++
++	tg3_cond_int(tp);
++}
++
++static inline void tg3_netif_stop(struct tg3 *tp)
++{
++	netif_poll_disable(tp->dev);
++	netif_tx_disable(tp->dev);
++}
++
++static inline void tg3_netif_start(struct tg3 *tp)
++{
++	netif_wake_queue(tp->dev);
++	/* NOTE: unconditional netif_wake_queue is only appropriate
++	 * so long as all callers are assured to have free tx slots
++	 * (such as after tg3_init_hw)
++	 */
++	netif_poll_enable(tp->dev);
++	tg3_cond_int(tp);
++}
++
++static void tg3_switch_clocks(struct tg3 *tp)
++{
++	u32 clock_ctrl = tr32(TG3PCI_CLOCK_CTRL);
++	u32 orig_clock_ctrl;
++
++	orig_clock_ctrl = clock_ctrl;
++	clock_ctrl &= (CLOCK_CTRL_FORCE_CLKRUN |
++		       CLOCK_CTRL_CLKRUN_OENABLE |
++		       0x1f);
++	tp->pci_clock_ctrl = clock_ctrl;
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 &&
++	    GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750 &&
++	    (orig_clock_ctrl & CLOCK_CTRL_44MHZ_CORE) != 0) {
++		tw32_f(TG3PCI_CLOCK_CTRL,
++		     clock_ctrl |
++		     (CLOCK_CTRL_44MHZ_CORE | CLOCK_CTRL_ALTCLK));
++		udelay(40);
++		tw32_f(TG3PCI_CLOCK_CTRL,
++		     clock_ctrl | (CLOCK_CTRL_ALTCLK));
++		udelay(40);
++	}
++	tw32_f(TG3PCI_CLOCK_CTRL, clock_ctrl);
++	udelay(40);
++}
++
++#define PHY_BUSY_LOOPS	5000
++
++static int tg3_readphy(struct tg3 *tp, int reg, u32 *val)
++{
++	u32 frame_val;
++	int loops, ret;
++
++	if ((tp->mi_mode & MAC_MI_MODE_AUTO_POLL) != 0) {
++		tw32_f(MAC_MI_MODE,
++		     (tp->mi_mode & ~MAC_MI_MODE_AUTO_POLL));
++		udelay(80);
++	}
++
++	*val = 0xffffffff;
++
++	frame_val  = ((PHY_ADDR << MI_COM_PHY_ADDR_SHIFT) &
++		      MI_COM_PHY_ADDR_MASK);
++	frame_val |= ((reg << MI_COM_REG_ADDR_SHIFT) &
++		      MI_COM_REG_ADDR_MASK);
++	frame_val |= (MI_COM_CMD_READ | MI_COM_START);
++	
++	tw32_f(MAC_MI_COM, frame_val);
++
++	loops = PHY_BUSY_LOOPS;
++	while (loops-- > 0) {
++		udelay(10);
++		frame_val = tr32(MAC_MI_COM);
++
++		if ((frame_val & MI_COM_BUSY) == 0) {
++			udelay(5);
++			frame_val = tr32(MAC_MI_COM);
++			break;
++		}
++	}
++
++	ret = -EBUSY;
++	if (loops > 0) {
++		*val = frame_val & MI_COM_DATA_MASK;
++		ret = 0;
++	}
++
++	if ((tp->mi_mode & MAC_MI_MODE_AUTO_POLL) != 0) {
++		tw32_f(MAC_MI_MODE, tp->mi_mode);
++		udelay(80);
++	}
++
++	return ret;
++}
++
++static int tg3_writephy(struct tg3 *tp, int reg, u32 val)
++{
++	u32 frame_val;
++	int loops, ret;
++
++	if ((tp->mi_mode & MAC_MI_MODE_AUTO_POLL) != 0) {
++		tw32_f(MAC_MI_MODE,
++		     (tp->mi_mode & ~MAC_MI_MODE_AUTO_POLL));
++		udelay(80);
++	}
++
++	frame_val  = ((PHY_ADDR << MI_COM_PHY_ADDR_SHIFT) &
++		      MI_COM_PHY_ADDR_MASK);
++	frame_val |= ((reg << MI_COM_REG_ADDR_SHIFT) &
++		      MI_COM_REG_ADDR_MASK);
++	frame_val |= (val & MI_COM_DATA_MASK);
++	frame_val |= (MI_COM_CMD_WRITE | MI_COM_START);
++	
++	tw32_f(MAC_MI_COM, frame_val);
++
++	loops = PHY_BUSY_LOOPS;
++	while (loops-- > 0) {
++		udelay(10);
++		frame_val = tr32(MAC_MI_COM);
++		if ((frame_val & MI_COM_BUSY) == 0) {
++			udelay(5);
++			frame_val = tr32(MAC_MI_COM);
++			break;
++		}
++	}
++
++	ret = -EBUSY;
++	if (loops > 0)
++		ret = 0;
++
++	if ((tp->mi_mode & MAC_MI_MODE_AUTO_POLL) != 0) {
++		tw32_f(MAC_MI_MODE, tp->mi_mode);
++		udelay(80);
++	}
++
++	return ret;
++}
++
++static void tg3_phy_set_wirespeed(struct tg3 *tp)
++{
++	u32 val;
++
++	if (tp->tg3_flags2 & TG3_FLG2_NO_ETH_WIRE_SPEED)
++		return;
++
++	tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x7007);
++	tg3_readphy(tp, MII_TG3_AUX_CTRL, &val);
++	tg3_writephy(tp, MII_TG3_AUX_CTRL, (val | (1 << 15) | (1 << 4)));
++}
++
++static int tg3_bmcr_reset(struct tg3 *tp)
++{
++	u32 phy_control;
++	int limit, err;
++
++	/* OK, reset it, and poll the BMCR_RESET bit until it
++	 * clears or we time out.
++	 */
++	phy_control = BMCR_RESET;
++	err = tg3_writephy(tp, MII_BMCR, phy_control);
++	if (err != 0)
++		return -EBUSY;
++
++	limit = 5000;
++	while (limit--) {
++		err = tg3_readphy(tp, MII_BMCR, &phy_control);
++		if (err != 0)
++			return -EBUSY;
++
++		if ((phy_control & BMCR_RESET) == 0) {
++			udelay(40);
++			break;
++		}
++		udelay(10);
++	}
++	if (limit <= 0)
++		return -EBUSY;
++
++	return 0;
++}
++
++static int tg3_wait_macro_done(struct tg3 *tp)
++{
++	int limit = 100;
++
++	while (limit--) {
++		u32 tmp32;
++
++		tg3_readphy(tp, 0x16, &tmp32);
++		if ((tmp32 & 0x1000) == 0)
++			break;
++	}
++	if (limit <= 0)
++		return -EBUSY;
++
++	return 0;
++}
++
++static int tg3_phy_write_and_check_testpat(struct tg3 *tp, int *resetp)
++{
++	static const u32 test_pat[4][6] = {
++	{ 0x00005555, 0x00000005, 0x00002aaa, 0x0000000a, 0x00003456, 0x00000003 },
++	{ 0x00002aaa, 0x0000000a, 0x00003333, 0x00000003, 0x0000789a, 0x00000005 },
++	{ 0x00005a5a, 0x00000005, 0x00002a6a, 0x0000000a, 0x00001bcd, 0x00000003 },
++	{ 0x00002a5a, 0x0000000a, 0x000033c3, 0x00000003, 0x00002ef1, 0x00000005 }
++	};
++	int chan;
++
++	for (chan = 0; chan < 4; chan++) {
++		int i;
++
++		tg3_writephy(tp, MII_TG3_DSP_ADDRESS,
++			     (chan * 0x2000) | 0x0200);
++		tg3_writephy(tp, 0x16, 0x0002);
++
++		for (i = 0; i < 6; i++)
++			tg3_writephy(tp, MII_TG3_DSP_RW_PORT,
++				     test_pat[chan][i]);
++
++		tg3_writephy(tp, 0x16, 0x0202);
++		if (tg3_wait_macro_done(tp)) {
++			*resetp = 1;
++			return -EBUSY;
++		}
++
++		tg3_writephy(tp, MII_TG3_DSP_ADDRESS,
++			     (chan * 0x2000) | 0x0200);
++		tg3_writephy(tp, 0x16, 0x0082);
++		if (tg3_wait_macro_done(tp)) {
++			*resetp = 1;
++			return -EBUSY;
++		}
++
++		tg3_writephy(tp, 0x16, 0x0802);
++		if (tg3_wait_macro_done(tp)) {
++			*resetp = 1;
++			return -EBUSY;
++		}
++
++		for (i = 0; i < 6; i += 2) {
++			u32 low, high;
++
++			tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &low);
++			tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &high);
++			if (tg3_wait_macro_done(tp)) {
++				*resetp = 1;
++				return -EBUSY;
++			}
++			low &= 0x7fff;
++			high &= 0x000f;
++			if (low != test_pat[chan][i] ||
++			    high != test_pat[chan][i+1]) {
++				tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x000b);
++				tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x4001);
++				tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x4005);
++
++				return -EBUSY;
++			}
++		}
++	}
++
++	return 0;
++}
++
++static int tg3_phy_reset_chanpat(struct tg3 *tp)
++{
++	int chan;
++
++	for (chan = 0; chan < 4; chan++) {
++		int i;
++
++		tg3_writephy(tp, MII_TG3_DSP_ADDRESS,
++			     (chan * 0x2000) | 0x0200);
++		tg3_writephy(tp, 0x16, 0x0002);
++		for (i = 0; i < 6; i++)
++			tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x000);
++		tg3_writephy(tp, 0x16, 0x0202);
++		if (tg3_wait_macro_done(tp))
++			return -EBUSY;
++	}
++
++	return 0;
++}
++
++static int tg3_phy_reset_5703_4_5(struct tg3 *tp)
++{
++	u32 reg32, phy9_orig;
++	int retries, do_phy_reset, err;
++
++	retries = 10;
++	do_phy_reset = 1;
++	do {
++		if (do_phy_reset) {
++			err = tg3_bmcr_reset(tp);
++			if (err)
++				return err;
++			do_phy_reset = 0;
++		}
++
++		/* Disable transmitter and interrupt.  */
++		tg3_readphy(tp, MII_TG3_EXT_CTRL, &reg32);
++		reg32 |= 0x3000;
++		tg3_writephy(tp, MII_TG3_EXT_CTRL, reg32);
++
++		/* Set full-duplex, 1000 mbps.  */
++		tg3_writephy(tp, MII_BMCR,
++			     BMCR_FULLDPLX | TG3_BMCR_SPEED1000);
++
++		/* Set to master mode.  */
++		tg3_readphy(tp, MII_TG3_CTRL, &phy9_orig);
++		tg3_writephy(tp, MII_TG3_CTRL,
++			     (MII_TG3_CTRL_AS_MASTER |
++			      MII_TG3_CTRL_ENABLE_AS_MASTER));
++
++		/* Enable SM_DSP_CLOCK and 6dB.  */
++		tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0c00);
++
++		/* Block the PHY control access.  */
++		tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x8005);
++		tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x0800);
++
++		err = tg3_phy_write_and_check_testpat(tp, &do_phy_reset);
++		if (!err)
++			break;
++	} while (--retries);
++
++	err = tg3_phy_reset_chanpat(tp);
++	if (err)
++		return err;
++
++	tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x8005);
++	tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x0000);
++
++	tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x8200);
++	tg3_writephy(tp, 0x16, 0x0000);
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703 ||
++	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) {
++		/* Set Extended packet length bit for jumbo frames */
++		tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x4400);
++	}
++	else {
++		tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0400);
++	}
++
++	tg3_writephy(tp, MII_TG3_CTRL, phy9_orig);
++
++	tg3_readphy(tp, MII_TG3_EXT_CTRL, &reg32);
++	reg32 &= ~0x3000;
++	tg3_writephy(tp, MII_TG3_EXT_CTRL, reg32);
++
++	return err;
++}
++
++/* This will reset the tigon3 PHY if there is no valid
++ * link unless the FORCE argument is non-zero.
++ */
++static int tg3_phy_reset(struct tg3 *tp)
++{
++	u32 phy_status;
++	int err;
++
++	err  = tg3_readphy(tp, MII_BMSR, &phy_status);
++	err |= tg3_readphy(tp, MII_BMSR, &phy_status);
++	if (err != 0)
++		return -EBUSY;
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703 ||
++	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 ||
++	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) {
++		err = tg3_phy_reset_5703_4_5(tp);
++		if (err)
++			return err;
++		goto out;
++	}
++
++	err = tg3_bmcr_reset(tp);
++	if (err)
++		return err;
++
++out:
++	if (tp->tg3_flags2 & TG3_FLG2_PHY_ADC_BUG) {
++		tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0c00);
++		tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x201f);
++		tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x2aaa);
++		tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x000a);
++		tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x0323);
++		tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0400);
++	}
++	if (tp->tg3_flags2 & TG3_FLG2_PHY_5704_A0_BUG) {
++		tg3_writephy(tp, 0x1c, 0x8d68);
++		tg3_writephy(tp, 0x1c, 0x8d68);
++	}
++	if (tp->tg3_flags2 & TG3_FLG2_PHY_BER_BUG) {
++		tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0c00);
++		tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x000a);
++		tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x310b);
++		tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x201f);
++		tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x9506);
++		tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x401f);
++		tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x14e2);
++		tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0400);
++	}
++	/* Set Extended packet length bit (bit 14) on all chips that */
++	/* support jumbo frames */
++	if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5401) {
++		/* Cannot do read-modify-write on 5401 */
++		tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x4c20);
++	} else if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 &&
++		   GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) {
++		u32 phy_reg;
++
++		/* Set bit 14 with read-modify-write to preserve other bits */
++		tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0007);
++		tg3_readphy(tp, MII_TG3_AUX_CTRL, &phy_reg);
++		tg3_writephy(tp, MII_TG3_AUX_CTRL, phy_reg | 0x4000);
++	}
++	tg3_phy_set_wirespeed(tp);
++	return 0;
++}
++
++static void tg3_frob_aux_power(struct tg3 *tp)
++{
++	struct tg3 *tp_peer = tp;
++
++	if ((tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT) != 0)
++		return;
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) {
++		tp_peer = pci_get_drvdata(tp->pdev_peer);
++		if (!tp_peer)
++			BUG();
++	}
++
++
++	if ((tp->tg3_flags & TG3_FLAG_WOL_ENABLE) != 0 ||
++	    (tp_peer->tg3_flags & TG3_FLAG_WOL_ENABLE) != 0) {
++		if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 ||
++		    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701) {
++			tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl |
++			     (GRC_LCLCTRL_GPIO_OE0 |
++			      GRC_LCLCTRL_GPIO_OE1 |
++			      GRC_LCLCTRL_GPIO_OE2 |
++			      GRC_LCLCTRL_GPIO_OUTPUT0 |
++			      GRC_LCLCTRL_GPIO_OUTPUT1));
++			udelay(100);
++		} else {
++			if (tp_peer != tp &&
++			    (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0)
++				return;
++
++			tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl |
++			     (GRC_LCLCTRL_GPIO_OE0 |
++			      GRC_LCLCTRL_GPIO_OE1 |
++			      GRC_LCLCTRL_GPIO_OE2 |
++			      GRC_LCLCTRL_GPIO_OUTPUT1 |
++			      GRC_LCLCTRL_GPIO_OUTPUT2));
++			udelay(100);
++
++			tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl |
++			     (GRC_LCLCTRL_GPIO_OE0 |
++			      GRC_LCLCTRL_GPIO_OE1 |
++			      GRC_LCLCTRL_GPIO_OE2 |
++			      GRC_LCLCTRL_GPIO_OUTPUT0 |
++			      GRC_LCLCTRL_GPIO_OUTPUT1 |
++			      GRC_LCLCTRL_GPIO_OUTPUT2));
++			udelay(100);
++
++			tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl |
++			     (GRC_LCLCTRL_GPIO_OE0 |
++			      GRC_LCLCTRL_GPIO_OE1 |
++			      GRC_LCLCTRL_GPIO_OE2 |
++			      GRC_LCLCTRL_GPIO_OUTPUT0 |
++			      GRC_LCLCTRL_GPIO_OUTPUT1));
++			udelay(100);
++		}
++	} else {
++		if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700 &&
++		    GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5701) {
++			if (tp_peer != tp &&
++			    (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0)
++				return;
++
++			tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl |
++			     (GRC_LCLCTRL_GPIO_OE1 |
++			      GRC_LCLCTRL_GPIO_OUTPUT1));
++			udelay(100);
++
++			tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl |
++			     (GRC_LCLCTRL_GPIO_OE1));
++			udelay(100);
++
++			tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl |
++			     (GRC_LCLCTRL_GPIO_OE1 |
++			      GRC_LCLCTRL_GPIO_OUTPUT1));
++			udelay(100);
++		}
++	}
++}
++
++static int tg3_setup_phy(struct tg3 *, int);
++
++#define RESET_KIND_SHUTDOWN	0
++#define RESET_KIND_INIT		1
++#define RESET_KIND_SUSPEND	2
++
++static void tg3_write_sig_post_reset(struct tg3 *, int);
++
++static int tg3_set_power_state(struct tg3 *tp, int state)
++{
++	u32 misc_host_ctrl;
++	u16 power_control, power_caps;
++	int pm = tp->pm_cap;
++
++	/* Make sure register accesses (indirect or otherwise)
++	 * will function correctly.
++	 */
++	pci_write_config_dword(tp->pdev,
++			       TG3PCI_MISC_HOST_CTRL,
++			       tp->misc_host_ctrl);
++
++	pci_read_config_word(tp->pdev,
++			     pm + PCI_PM_CTRL,
++			     &power_control);
++	power_control |= PCI_PM_CTRL_PME_STATUS;
++	power_control &= ~(PCI_PM_CTRL_STATE_MASK);
++	switch (state) {
++	case 0:
++		power_control |= 0;
++		pci_write_config_word(tp->pdev,
++				      pm + PCI_PM_CTRL,
++				      power_control);
++		tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl);
++		udelay(100);
++
++		return 0;
++
++	case 1:
++		power_control |= 1;
++		break;
++
++	case 2:
++		power_control |= 2;
++		break;
++
++	case 3:
++		power_control |= 3;
++		break;
++
++	default:
++		printk(KERN_WARNING PFX "%s: Invalid power state (%d) "
++		       "requested.\n",
++		       tp->dev->name, state);
++		return -EINVAL;
++	};
++
++	power_control |= PCI_PM_CTRL_PME_ENABLE;
++
++	misc_host_ctrl = tr32(TG3PCI_MISC_HOST_CTRL);
++	tw32(TG3PCI_MISC_HOST_CTRL,
++	     misc_host_ctrl | MISC_HOST_CTRL_MASK_PCI_INT);
++
++	if (tp->link_config.phy_is_low_power == 0) {
++		tp->link_config.phy_is_low_power = 1;
++		tp->link_config.orig_speed = tp->link_config.speed;
++		tp->link_config.orig_duplex = tp->link_config.duplex;
++		tp->link_config.orig_autoneg = tp->link_config.autoneg;
++	}
++
++	if (tp->phy_id != PHY_ID_SERDES) {
++		tp->link_config.speed = SPEED_10;
++		tp->link_config.duplex = DUPLEX_HALF;
++		tp->link_config.autoneg = AUTONEG_ENABLE;
++		tg3_setup_phy(tp, 0);
++	}
++
++	pci_read_config_word(tp->pdev, pm + PCI_PM_PMC, &power_caps);
++
++	if (tp->tg3_flags & TG3_FLAG_WOL_ENABLE) {
++		u32 mac_mode;
++
++		if (tp->phy_id != PHY_ID_SERDES) {
++			tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x5a);
++			udelay(40);
++
++			mac_mode = MAC_MODE_PORT_MODE_MII;
++
++			if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700 ||
++			    !(tp->tg3_flags & TG3_FLAG_WOL_SPEED_100MB))
++				mac_mode |= MAC_MODE_LINK_POLARITY;
++		} else {
++			mac_mode = MAC_MODE_PORT_MODE_TBI;
++		}
++
++		if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750)
++			tw32(MAC_LED_CTRL, tp->led_ctrl);
++
++		if (((power_caps & PCI_PM_CAP_PME_D3cold) &&
++		     (tp->tg3_flags & TG3_FLAG_WOL_ENABLE)))
++			mac_mode |= MAC_MODE_MAGIC_PKT_ENABLE;
++
++		tw32_f(MAC_MODE, mac_mode);
++		udelay(100);
++
++		tw32_f(MAC_RX_MODE, RX_MODE_ENABLE);
++		udelay(10);
++	}
++
++	if (!(tp->tg3_flags & TG3_FLAG_WOL_SPEED_100MB) &&
++	    (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 ||
++	     GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701)) {
++		u32 base_val;
++
++		base_val = tp->pci_clock_ctrl;
++		base_val |= (CLOCK_CTRL_RXCLK_DISABLE |
++			     CLOCK_CTRL_TXCLK_DISABLE);
++
++		tw32_f(TG3PCI_CLOCK_CTRL, base_val |
++		     CLOCK_CTRL_ALTCLK |
++		     CLOCK_CTRL_PWRDOWN_PLL133);
++		udelay(40);
++	} else if (!((GET_ASIC_REV(tp->pci_chip_rev_id) == 5750) &&
++		     (tp->tg3_flags & TG3_FLAG_ENABLE_ASF))) {
++		u32 newbits1, newbits2;
++
++		if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 ||
++		    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701) {
++			newbits1 = (CLOCK_CTRL_RXCLK_DISABLE |
++				    CLOCK_CTRL_TXCLK_DISABLE |
++				    CLOCK_CTRL_ALTCLK);
++			newbits2 = newbits1 | CLOCK_CTRL_44MHZ_CORE;
++		} else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ||
++			   GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) {
++			newbits1 = CLOCK_CTRL_625_CORE;
++			newbits2 = newbits1 | CLOCK_CTRL_ALTCLK;
++		} else {
++			newbits1 = CLOCK_CTRL_ALTCLK;
++			newbits2 = newbits1 | CLOCK_CTRL_44MHZ_CORE;
++		}
++
++		tw32_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits1);
++		udelay(40);
++
++		tw32_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits2);
++		udelay(40);
++
++		if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 &&
++		    GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) {
++			u32 newbits3;
++
++			if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 ||
++			    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701) {
++				newbits3 = (CLOCK_CTRL_RXCLK_DISABLE |
++					    CLOCK_CTRL_TXCLK_DISABLE |
++					    CLOCK_CTRL_44MHZ_CORE);
++			} else {
++				newbits3 = CLOCK_CTRL_44MHZ_CORE;
++			}
++
++			tw32_f(TG3PCI_CLOCK_CTRL,
++					 tp->pci_clock_ctrl | newbits3);
++			udelay(40);
++		}
++	}
++
++	tg3_frob_aux_power(tp);
++
++	/* Finally, set the new power state. */
++	pci_write_config_word(tp->pdev, pm + PCI_PM_CTRL, power_control);
++
++	tg3_write_sig_post_reset(tp, RESET_KIND_SHUTDOWN);
++
++	return 0;
++}
++
++static void tg3_link_report(struct tg3 *tp)
++{
++	if (!netif_carrier_ok(tp->dev)) {
++		printk(KERN_INFO PFX "%s: Link is down.\n", tp->dev->name);
++	} else {
++		printk(KERN_INFO PFX "%s: Link is up at %d Mbps, %s duplex.\n",
++		       tp->dev->name,
++		       (tp->link_config.active_speed == SPEED_1000 ?
++			1000 :
++			(tp->link_config.active_speed == SPEED_100 ?
++			 100 : 10)),
++		       (tp->link_config.active_duplex == DUPLEX_FULL ?
++			"full" : "half"));
++
++		printk(KERN_INFO PFX "%s: Flow control is %s for TX and "
++		       "%s for RX.\n",
++		       tp->dev->name,
++		       (tp->tg3_flags & TG3_FLAG_TX_PAUSE) ? "on" : "off",
++		       (tp->tg3_flags & TG3_FLAG_RX_PAUSE) ? "on" : "off");
++	}
++}
++
++static void tg3_setup_flow_control(struct tg3 *tp, u32 local_adv, u32 remote_adv)
++{
++	u32 new_tg3_flags = 0;
++	u32 old_rx_mode = tp->rx_mode;
++	u32 old_tx_mode = tp->tx_mode;
++
++	if (local_adv & ADVERTISE_PAUSE_CAP) {
++		if (local_adv & ADVERTISE_PAUSE_ASYM) {
++			if (remote_adv & LPA_PAUSE_CAP)
++				new_tg3_flags |=
++					(TG3_FLAG_RX_PAUSE |
++					 TG3_FLAG_TX_PAUSE);
++			else if (remote_adv & LPA_PAUSE_ASYM)
++				new_tg3_flags |=
++					(TG3_FLAG_RX_PAUSE);
++		} else {
++			if (remote_adv & LPA_PAUSE_CAP)
++				new_tg3_flags |=
++					(TG3_FLAG_RX_PAUSE |
++					 TG3_FLAG_TX_PAUSE);
++		}
++	} else if (local_adv & ADVERTISE_PAUSE_ASYM) {
++		if ((remote_adv & LPA_PAUSE_CAP) &&
++		    (remote_adv & LPA_PAUSE_ASYM))
++			new_tg3_flags |= TG3_FLAG_TX_PAUSE;
++	}
++
++	tp->tg3_flags &= ~(TG3_FLAG_RX_PAUSE | TG3_FLAG_TX_PAUSE);
++	tp->tg3_flags |= new_tg3_flags;
++
++	if (new_tg3_flags & TG3_FLAG_RX_PAUSE)
++		tp->rx_mode |= RX_MODE_FLOW_CTRL_ENABLE;
++	else
++		tp->rx_mode &= ~RX_MODE_FLOW_CTRL_ENABLE;
++
++	if (old_rx_mode != tp->rx_mode) {
++		tw32_f(MAC_RX_MODE, tp->rx_mode);
++	}
++	
++	if (new_tg3_flags & TG3_FLAG_TX_PAUSE)
++		tp->tx_mode |= TX_MODE_FLOW_CTRL_ENABLE;
++	else
++		tp->tx_mode &= ~TX_MODE_FLOW_CTRL_ENABLE;
++
++	if (old_tx_mode != tp->tx_mode) {
++		tw32_f(MAC_TX_MODE, tp->tx_mode);
++	}
++}
++
++static void tg3_aux_stat_to_speed_duplex(struct tg3 *tp, u32 val, u16 *speed, u8 *duplex)
++{
++	switch (val & MII_TG3_AUX_STAT_SPDMASK) {
++	case MII_TG3_AUX_STAT_10HALF:
++		*speed = SPEED_10;
++		*duplex = DUPLEX_HALF;
++		break;
++
++	case MII_TG3_AUX_STAT_10FULL:
++		*speed = SPEED_10;
++		*duplex = DUPLEX_FULL;
++		break;
++
++	case MII_TG3_AUX_STAT_100HALF:
++		*speed = SPEED_100;
++		*duplex = DUPLEX_HALF;
++		break;
++
++	case MII_TG3_AUX_STAT_100FULL:
++		*speed = SPEED_100;
++		*duplex = DUPLEX_FULL;
++		break;
++
++	case MII_TG3_AUX_STAT_1000HALF:
++		*speed = SPEED_1000;
++		*duplex = DUPLEX_HALF;
++		break;
++
++	case MII_TG3_AUX_STAT_1000FULL:
++		*speed = SPEED_1000;
++		*duplex = DUPLEX_FULL;
++		break;
++
++	default:
++		*speed = SPEED_INVALID;
++		*duplex = DUPLEX_INVALID;
++		break;
++	};
++}
++
++static int tg3_phy_copper_begin(struct tg3 *tp)
++{
++	u32 new_adv;
++	int i;
++
++	if (tp->link_config.phy_is_low_power) {
++		/* Entering low power mode.  Disable gigabit and
++		 * 100baseT advertisements.
++		 */
++		tg3_writephy(tp, MII_TG3_CTRL, 0);
++
++		new_adv = (ADVERTISE_10HALF | ADVERTISE_10FULL |
++			   ADVERTISE_CSMA | ADVERTISE_PAUSE_CAP);
++		if (tp->tg3_flags & TG3_FLAG_WOL_SPEED_100MB)
++			new_adv |= (ADVERTISE_100HALF | ADVERTISE_100FULL);
++
++		tg3_writephy(tp, MII_ADVERTISE, new_adv);
++	} else if (tp->link_config.speed == SPEED_INVALID) {
++		tp->link_config.advertising =
++			(ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full |
++			 ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full |
++			 ADVERTISED_1000baseT_Half | ADVERTISED_1000baseT_Full |
++			 ADVERTISED_Autoneg | ADVERTISED_MII);
++
++		if (tp->tg3_flags & TG3_FLAG_10_100_ONLY)
++			tp->link_config.advertising &=
++				~(ADVERTISED_1000baseT_Half |
++				  ADVERTISED_1000baseT_Full);
++
++		new_adv = (ADVERTISE_CSMA | ADVERTISE_PAUSE_CAP);
++		if (tp->link_config.advertising & ADVERTISED_10baseT_Half)
++			new_adv |= ADVERTISE_10HALF;
++		if (tp->link_config.advertising & ADVERTISED_10baseT_Full)
++			new_adv |= ADVERTISE_10FULL;
++		if (tp->link_config.advertising & ADVERTISED_100baseT_Half)
++			new_adv |= ADVERTISE_100HALF;
++		if (tp->link_config.advertising & ADVERTISED_100baseT_Full)
++			new_adv |= ADVERTISE_100FULL;
++		tg3_writephy(tp, MII_ADVERTISE, new_adv);
++
++		if (tp->link_config.advertising &
++		    (ADVERTISED_1000baseT_Half | ADVERTISED_1000baseT_Full)) {
++			new_adv = 0;
++			if (tp->link_config.advertising & ADVERTISED_1000baseT_Half)
++				new_adv |= MII_TG3_CTRL_ADV_1000_HALF;
++			if (tp->link_config.advertising & ADVERTISED_1000baseT_Full)
++				new_adv |= MII_TG3_CTRL_ADV_1000_FULL;
++			if (!(tp->tg3_flags & TG3_FLAG_10_100_ONLY) &&
++			    (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0 ||
++			     tp->pci_chip_rev_id == CHIPREV_ID_5701_B0))
++				new_adv |= (MII_TG3_CTRL_AS_MASTER |
++					    MII_TG3_CTRL_ENABLE_AS_MASTER);
++			tg3_writephy(tp, MII_TG3_CTRL, new_adv);
++		} else {
++			tg3_writephy(tp, MII_TG3_CTRL, 0);
++		}
++	} else {
++		/* Asking for a specific link mode. */
++		if (tp->link_config.speed == SPEED_1000) {
++			new_adv = ADVERTISE_CSMA | ADVERTISE_PAUSE_CAP;
++			tg3_writephy(tp, MII_ADVERTISE, new_adv);
++
++			if (tp->link_config.duplex == DUPLEX_FULL)
++				new_adv = MII_TG3_CTRL_ADV_1000_FULL;
++			else
++				new_adv = MII_TG3_CTRL_ADV_1000_HALF;
++			if (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0 ||
++			    tp->pci_chip_rev_id == CHIPREV_ID_5701_B0)
++				new_adv |= (MII_TG3_CTRL_AS_MASTER |
++					    MII_TG3_CTRL_ENABLE_AS_MASTER);
++			tg3_writephy(tp, MII_TG3_CTRL, new_adv);
++		} else {
++			tg3_writephy(tp, MII_TG3_CTRL, 0);
++
++			new_adv = ADVERTISE_CSMA | ADVERTISE_PAUSE_CAP;
++			if (tp->link_config.speed == SPEED_100) {
++				if (tp->link_config.duplex == DUPLEX_FULL)
++					new_adv |= ADVERTISE_100FULL;
++				else
++					new_adv |= ADVERTISE_100HALF;
++			} else {
++				if (tp->link_config.duplex == DUPLEX_FULL)
++					new_adv |= ADVERTISE_10FULL;
++				else
++					new_adv |= ADVERTISE_10HALF;
++			}
++			tg3_writephy(tp, MII_ADVERTISE, new_adv);
++		}
++	}
++
++	if (tp->link_config.autoneg == AUTONEG_DISABLE &&
++	    tp->link_config.speed != SPEED_INVALID) {
++		u32 bmcr, orig_bmcr;
++
++		tp->link_config.active_speed = tp->link_config.speed;
++		tp->link_config.active_duplex = tp->link_config.duplex;
++
++		bmcr = 0;
++		switch (tp->link_config.speed) {
++		default:
++		case SPEED_10:
++			break;
++
++		case SPEED_100:
++			bmcr |= BMCR_SPEED100;
++			break;
++
++		case SPEED_1000:
++			bmcr |= TG3_BMCR_SPEED1000;
++			break;
++		};
++
++		if (tp->link_config.duplex == DUPLEX_FULL)
++			bmcr |= BMCR_FULLDPLX;
++
++		tg3_readphy(tp, MII_BMCR, &orig_bmcr);
++		if (bmcr != orig_bmcr) {
++			tg3_writephy(tp, MII_BMCR, BMCR_LOOPBACK);
++			for (i = 0; i < 1500; i++) {
++				u32 tmp;
++
++				udelay(10);
++				tg3_readphy(tp, MII_BMSR, &tmp);
++				tg3_readphy(tp, MII_BMSR, &tmp);
++				if (!(tmp & BMSR_LSTATUS)) {
++					udelay(40);
++					break;
++				}
++			}
++			tg3_writephy(tp, MII_BMCR, bmcr);
++			udelay(40);
++		}
++	} else {
++		tg3_writephy(tp, MII_BMCR,
++			     BMCR_ANENABLE | BMCR_ANRESTART);
++	}
++
++	return 0;
++}
++
++static int tg3_init_5401phy_dsp(struct tg3 *tp)
++{
++	int err;
++
++	/* Turn off tap power management. */
++	/* Set Extended packet length bit */
++	err  = tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x4c20);
++
++	err |= tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x0012);
++	err |= tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x1804);
++
++	err |= tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x0013);
++	err |= tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x1204);
++
++	err |= tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x8006);
++	err |= tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x0132);
++
++	err |= tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x8006);
++	err |= tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x0232);
++
++	err |= tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x201f);
++	err |= tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x0a20);
++
++	udelay(40);
++
++	return err;
++}
++
++static int tg3_copper_is_advertising_all(struct tg3 *tp)
++{
++	u32 adv_reg, all_mask;
++
++	tg3_readphy(tp, MII_ADVERTISE, &adv_reg);
++	all_mask = (ADVERTISE_10HALF | ADVERTISE_10FULL |
++		    ADVERTISE_100HALF | ADVERTISE_100FULL);
++	if ((adv_reg & all_mask) != all_mask)
++		return 0;
++	if (!(tp->tg3_flags & TG3_FLAG_10_100_ONLY)) {
++		u32 tg3_ctrl;
++
++		tg3_readphy(tp, MII_TG3_CTRL, &tg3_ctrl);
++		all_mask = (MII_TG3_CTRL_ADV_1000_HALF |
++			    MII_TG3_CTRL_ADV_1000_FULL);
++		if ((tg3_ctrl & all_mask) != all_mask)
++			return 0;
++	}
++	return 1;
++}
++
++static int tg3_setup_copper_phy(struct tg3 *tp, int force_reset)
++{
++	int current_link_up;
++	u32 bmsr, dummy;
++	u16 current_speed;
++	u8 current_duplex;
++	int i, err;
++
++	tw32(MAC_EVENT, 0);
++
++	tw32_f(MAC_STATUS,
++	     (MAC_STATUS_SYNC_CHANGED |
++	      MAC_STATUS_CFG_CHANGED |
++	      MAC_STATUS_MI_COMPLETION |
++	      MAC_STATUS_LNKSTATE_CHANGED));
++	udelay(40);
++
++	tp->mi_mode = MAC_MI_MODE_BASE;
++	tw32_f(MAC_MI_MODE, tp->mi_mode);
++	udelay(80);
++
++	tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x02);
++
++	/* Some third-party PHYs need to be reset on link going
++	 * down.
++	 */
++	if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703 ||
++	     GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 ||
++	     GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) &&
++	    netif_carrier_ok(tp->dev)) {
++		tg3_readphy(tp, MII_BMSR, &bmsr);
++		tg3_readphy(tp, MII_BMSR, &bmsr);
++		if (!(bmsr & BMSR_LSTATUS))
++			force_reset = 1;
++	}
++	if (force_reset)
++		tg3_phy_reset(tp);
++
++	if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5401) {
++		tg3_readphy(tp, MII_BMSR, &bmsr);
++		tg3_readphy(tp, MII_BMSR, &bmsr);
++
++		if (!(tp->tg3_flags & TG3_FLAG_INIT_COMPLETE))
++			bmsr = 0;
++
++		if (!(bmsr & BMSR_LSTATUS)) {
++			err = tg3_init_5401phy_dsp(tp);
++			if (err)
++				return err;
++
++			tg3_readphy(tp, MII_BMSR, &bmsr);
++			for (i = 0; i < 1000; i++) {
++				udelay(10);
++				tg3_readphy(tp, MII_BMSR, &bmsr);
++				if (bmsr & BMSR_LSTATUS) {
++					udelay(40);
++					break;
++				}
++			}
++
++			if ((tp->phy_id & PHY_ID_REV_MASK) == PHY_REV_BCM5401_B0 &&
++			    !(bmsr & BMSR_LSTATUS) &&
++			    tp->link_config.active_speed == SPEED_1000) {
++				err = tg3_phy_reset(tp);
++				if (!err)
++					err = tg3_init_5401phy_dsp(tp);
++				if (err)
++					return err;
++			}
++		}
++	} else if (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0 ||
++		   tp->pci_chip_rev_id == CHIPREV_ID_5701_B0) {
++		/* 5701 {A0,B0} CRC bug workaround */
++		tg3_writephy(tp, 0x15, 0x0a75);
++		tg3_writephy(tp, 0x1c, 0x8c68);
++		tg3_writephy(tp, 0x1c, 0x8d68);
++		tg3_writephy(tp, 0x1c, 0x8c68);
++	}
++
++	/* Clear pending interrupts... */
++	tg3_readphy(tp, MII_TG3_ISTAT, &dummy);
++	tg3_readphy(tp, MII_TG3_ISTAT, &dummy);
++
++	if (tp->tg3_flags & TG3_FLAG_USE_MI_INTERRUPT)
++		tg3_writephy(tp, MII_TG3_IMASK, ~MII_TG3_INT_LINKCHG);
++	else
++		tg3_writephy(tp, MII_TG3_IMASK, ~0);
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 ||
++	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701) {
++		if (tp->led_ctrl == LED_CTRL_MODE_PHY_1)
++			tg3_writephy(tp, MII_TG3_EXT_CTRL,
++				     MII_TG3_EXT_CTRL_LNK3_LED_MODE);
++		else
++			tg3_writephy(tp, MII_TG3_EXT_CTRL, 0);
++	}
++
++	current_link_up = 0;
++	current_speed = SPEED_INVALID;
++	current_duplex = DUPLEX_INVALID;
++
++	bmsr = 0;
++	for (i = 0; i < 100; i++) {
++		tg3_readphy(tp, MII_BMSR, &bmsr);
++		tg3_readphy(tp, MII_BMSR, &bmsr);
++		if (bmsr & BMSR_LSTATUS)
++			break;
++		udelay(40);
++	}
++
++	if (bmsr & BMSR_LSTATUS) {
++		u32 aux_stat, bmcr;
++
++		tg3_readphy(tp, MII_TG3_AUX_STAT, &aux_stat);
++		for (i = 0; i < 2000; i++) {
++			udelay(10);
++			tg3_readphy(tp, MII_TG3_AUX_STAT, &aux_stat);
++			if (aux_stat)
++				break;
++		}
++
++		tg3_aux_stat_to_speed_duplex(tp, aux_stat,
++					     &current_speed,
++					     &current_duplex);
++
++		bmcr = 0;
++		for (i = 0; i < 200; i++) {
++			tg3_readphy(tp, MII_BMCR, &bmcr);
++			tg3_readphy(tp, MII_BMCR, &bmcr);
++			if (bmcr && bmcr != 0x7fff)
++				break;
++			udelay(10);
++		}
++
++		if (tp->link_config.autoneg == AUTONEG_ENABLE) {
++			if (bmcr & BMCR_ANENABLE) {
++				current_link_up = 1;
++
++				/* Force autoneg restart if we are exiting
++				 * low power mode.
++				 */
++				if (!tg3_copper_is_advertising_all(tp))
++					current_link_up = 0;
++			} else {
++				current_link_up = 0;
++			}
++		} else {
++			if (!(bmcr & BMCR_ANENABLE) &&
++			    tp->link_config.speed == current_speed &&
++			    tp->link_config.duplex == current_duplex) {
++				current_link_up = 1;
++			} else {
++				current_link_up = 0;
++			}
++		}
++
++		tp->link_config.active_speed = current_speed;
++		tp->link_config.active_duplex = current_duplex;
++	}
++
++	if (current_link_up == 1 &&
++	    (tp->link_config.active_duplex == DUPLEX_FULL) &&
++	    (tp->link_config.autoneg == AUTONEG_ENABLE)) {
++		u32 local_adv, remote_adv;
++
++		tg3_readphy(tp, MII_ADVERTISE, &local_adv);
++		local_adv &= (ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM);
++
++		tg3_readphy(tp, MII_LPA, &remote_adv);
++		remote_adv &= (LPA_PAUSE_CAP | LPA_PAUSE_ASYM);
++
++		/* If we are not advertising full pause capability,
++		 * something is wrong.  Bring the link down and reconfigure.
++		 */
++		if (local_adv != ADVERTISE_PAUSE_CAP) {
++			current_link_up = 0;
++		} else {
++			tg3_setup_flow_control(tp, local_adv, remote_adv);
++		}
++	}
++
++	if (current_link_up == 0) {
++		u32 tmp;
++
++		tg3_phy_copper_begin(tp);
++
++		tg3_readphy(tp, MII_BMSR, &tmp);
++		tg3_readphy(tp, MII_BMSR, &tmp);
++		if (tmp & BMSR_LSTATUS)
++			current_link_up = 1;
++	}
++
++	tp->mac_mode &= ~MAC_MODE_PORT_MODE_MASK;
++	if (current_link_up == 1) {
++		if (tp->link_config.active_speed == SPEED_100 ||
++		    tp->link_config.active_speed == SPEED_10)
++			tp->mac_mode |= MAC_MODE_PORT_MODE_MII;
++		else
++			tp->mac_mode |= MAC_MODE_PORT_MODE_GMII;
++	} else
++		tp->mac_mode |= MAC_MODE_PORT_MODE_GMII;
++
++	tp->mac_mode &= ~MAC_MODE_HALF_DUPLEX;
++	if (tp->link_config.active_duplex == DUPLEX_HALF)
++		tp->mac_mode |= MAC_MODE_HALF_DUPLEX;
++
++	tp->mac_mode &= ~MAC_MODE_LINK_POLARITY;
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700) {
++		if ((tp->led_ctrl == LED_CTRL_MODE_PHY_2) ||
++		    (current_link_up == 1 &&
++		     tp->link_config.active_speed == SPEED_10))
++			tp->mac_mode |= MAC_MODE_LINK_POLARITY;
++	} else {
++		if (current_link_up == 1)
++			tp->mac_mode |= MAC_MODE_LINK_POLARITY;
++	}
++
++	/* ??? Without this setting Netgear GA302T PHY does not
++	 * ??? send/receive packets...
++	 */
++	if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5411 &&
++	    tp->pci_chip_rev_id == CHIPREV_ID_5700_ALTIMA) {
++		tp->mi_mode |= MAC_MI_MODE_AUTO_POLL;
++		tw32_f(MAC_MI_MODE, tp->mi_mode);
++		udelay(80);
++	}
++
++	tw32_f(MAC_MODE, tp->mac_mode);
++	udelay(40);
++
++	if (tp->tg3_flags & (TG3_FLAG_USE_LINKCHG_REG | TG3_FLAG_POLL_SERDES)) {
++		/* Polled via timer. */
++		tw32_f(MAC_EVENT, 0);
++	} else {
++		tw32_f(MAC_EVENT, MAC_EVENT_LNKSTATE_CHANGED);
++	}
++	udelay(40);
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 &&
++	    current_link_up == 1 &&
++	    tp->link_config.active_speed == SPEED_1000 &&
++	    ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) ||
++	     (tp->tg3_flags & TG3_FLAG_PCI_HIGH_SPEED))) {
++		udelay(120);
++		tw32_f(MAC_STATUS,
++		     (MAC_STATUS_SYNC_CHANGED |
++		      MAC_STATUS_CFG_CHANGED));
++		udelay(40);
++		tg3_write_mem(tp,
++			      NIC_SRAM_FIRMWARE_MBOX,
++			      NIC_SRAM_FIRMWARE_MBOX_MAGIC2);
++	}
++
++	if (current_link_up != netif_carrier_ok(tp->dev)) {
++		if (current_link_up)
++			netif_carrier_on(tp->dev);
++		else
++			netif_carrier_off(tp->dev);
++		tg3_link_report(tp);
++	}
++
++	return 0;
++}
++
++struct tg3_fiber_aneginfo {
++	int state;
++#define ANEG_STATE_UNKNOWN		0
++#define ANEG_STATE_AN_ENABLE		1
++#define ANEG_STATE_RESTART_INIT		2
++#define ANEG_STATE_RESTART		3
++#define ANEG_STATE_DISABLE_LINK_OK	4
++#define ANEG_STATE_ABILITY_DETECT_INIT	5
++#define ANEG_STATE_ABILITY_DETECT	6
++#define ANEG_STATE_ACK_DETECT_INIT	7
++#define ANEG_STATE_ACK_DETECT		8
++#define ANEG_STATE_COMPLETE_ACK_INIT	9
++#define ANEG_STATE_COMPLETE_ACK		10
++#define ANEG_STATE_IDLE_DETECT_INIT	11
++#define ANEG_STATE_IDLE_DETECT		12
++#define ANEG_STATE_LINK_OK		13
++#define ANEG_STATE_NEXT_PAGE_WAIT_INIT	14
++#define ANEG_STATE_NEXT_PAGE_WAIT	15
++
++	u32 flags;
++#define MR_AN_ENABLE		0x00000001
++#define MR_RESTART_AN		0x00000002
++#define MR_AN_COMPLETE		0x00000004
++#define MR_PAGE_RX		0x00000008
++#define MR_NP_LOADED		0x00000010
++#define MR_TOGGLE_TX		0x00000020
++#define MR_LP_ADV_FULL_DUPLEX	0x00000040
++#define MR_LP_ADV_HALF_DUPLEX	0x00000080
++#define MR_LP_ADV_SYM_PAUSE	0x00000100
++#define MR_LP_ADV_ASYM_PAUSE	0x00000200
++#define MR_LP_ADV_REMOTE_FAULT1	0x00000400
++#define MR_LP_ADV_REMOTE_FAULT2	0x00000800
++#define MR_LP_ADV_NEXT_PAGE	0x00001000
++#define MR_TOGGLE_RX		0x00002000
++#define MR_NP_RX		0x00004000
++
++#define MR_LINK_OK		0x80000000
++
++	unsigned long link_time, cur_time;
++
++	u32 ability_match_cfg;
++	int ability_match_count;
++
++	char ability_match, idle_match, ack_match;
++
++	u32 txconfig, rxconfig;
++#define ANEG_CFG_NP		0x00000080
++#define ANEG_CFG_ACK		0x00000040
++#define ANEG_CFG_RF2		0x00000020
++#define ANEG_CFG_RF1		0x00000010
++#define ANEG_CFG_PS2		0x00000001
++#define ANEG_CFG_PS1		0x00008000
++#define ANEG_CFG_HD		0x00004000
++#define ANEG_CFG_FD		0x00002000
++#define ANEG_CFG_INVAL		0x00001f06
++
++};
++#define ANEG_OK		0
++#define ANEG_DONE	1
++#define ANEG_TIMER_ENAB	2
++#define ANEG_FAILED	-1
++
++#define ANEG_STATE_SETTLE_TIME	10000
++
++static int tg3_fiber_aneg_smachine(struct tg3 *tp,
++				   struct tg3_fiber_aneginfo *ap)
++{
++	unsigned long delta;
++	u32 rx_cfg_reg;
++	int ret;
++
++	if (ap->state == ANEG_STATE_UNKNOWN) {
++		ap->rxconfig = 0;
++		ap->link_time = 0;
++		ap->cur_time = 0;
++		ap->ability_match_cfg = 0;
++		ap->ability_match_count = 0;
++		ap->ability_match = 0;
++		ap->idle_match = 0;
++		ap->ack_match = 0;
++	}
++	ap->cur_time++;
++
++	if (tr32(MAC_STATUS) & MAC_STATUS_RCVD_CFG) {
++		rx_cfg_reg = tr32(MAC_RX_AUTO_NEG);
++
++		if (rx_cfg_reg != ap->ability_match_cfg) {
++			ap->ability_match_cfg = rx_cfg_reg;
++			ap->ability_match = 0;
++			ap->ability_match_count = 0;
++		} else {
++			if (++ap->ability_match_count > 1) {
++				ap->ability_match = 1;
++				ap->ability_match_cfg = rx_cfg_reg;
++			}
++		}
++		if (rx_cfg_reg & ANEG_CFG_ACK)
++			ap->ack_match = 1;
++		else
++			ap->ack_match = 0;
++
++		ap->idle_match = 0;
++	} else {
++		ap->idle_match = 1;
++		ap->ability_match_cfg = 0;
++		ap->ability_match_count = 0;
++		ap->ability_match = 0;
++		ap->ack_match = 0;
++
++		rx_cfg_reg = 0;
++	}
++
++	ap->rxconfig = rx_cfg_reg;
++	ret = ANEG_OK;
++
++	switch(ap->state) {
++	case ANEG_STATE_UNKNOWN:
++		if (ap->flags & (MR_AN_ENABLE | MR_RESTART_AN))
++			ap->state = ANEG_STATE_AN_ENABLE;
++
++		/* fallthru */
++	case ANEG_STATE_AN_ENABLE:
++		ap->flags &= ~(MR_AN_COMPLETE | MR_PAGE_RX);
++		if (ap->flags & MR_AN_ENABLE) {
++			ap->link_time = 0;
++			ap->cur_time = 0;
++			ap->ability_match_cfg = 0;
++			ap->ability_match_count = 0;
++			ap->ability_match = 0;
++			ap->idle_match = 0;
++			ap->ack_match = 0;
++
++			ap->state = ANEG_STATE_RESTART_INIT;
++		} else {
++			ap->state = ANEG_STATE_DISABLE_LINK_OK;
++		}
++		break;
++
++	case ANEG_STATE_RESTART_INIT:
++		ap->link_time = ap->cur_time;
++		ap->flags &= ~(MR_NP_LOADED);
++		ap->txconfig = 0;
++		tw32(MAC_TX_AUTO_NEG, 0);
++		tp->mac_mode |= MAC_MODE_SEND_CONFIGS;
++		tw32_f(MAC_MODE, tp->mac_mode);
++		udelay(40);
++
++		ret = ANEG_TIMER_ENAB;
++		ap->state = ANEG_STATE_RESTART;
++
++		/* fallthru */
++	case ANEG_STATE_RESTART:
++		delta = ap->cur_time - ap->link_time;
++		if (delta > ANEG_STATE_SETTLE_TIME) {
++			ap->state = ANEG_STATE_ABILITY_DETECT_INIT;
++		} else {
++			ret = ANEG_TIMER_ENAB;
++		}
++		break;
++
++	case ANEG_STATE_DISABLE_LINK_OK:
++		ret = ANEG_DONE;
++		break;
++
++	case ANEG_STATE_ABILITY_DETECT_INIT:
++		ap->flags &= ~(MR_TOGGLE_TX);
++		ap->txconfig = (ANEG_CFG_FD | ANEG_CFG_PS1);
++		tw32(MAC_TX_AUTO_NEG, ap->txconfig);
++		tp->mac_mode |= MAC_MODE_SEND_CONFIGS;
++		tw32_f(MAC_MODE, tp->mac_mode);
++		udelay(40);
++
++		ap->state = ANEG_STATE_ABILITY_DETECT;
++		break;
++
++	case ANEG_STATE_ABILITY_DETECT:
++		if (ap->ability_match != 0 && ap->rxconfig != 0) {
++			ap->state = ANEG_STATE_ACK_DETECT_INIT;
++		}
++		break;
++
++	case ANEG_STATE_ACK_DETECT_INIT:
++		ap->txconfig |= ANEG_CFG_ACK;
++		tw32(MAC_TX_AUTO_NEG, ap->txconfig);
++		tp->mac_mode |= MAC_MODE_SEND_CONFIGS;
++		tw32_f(MAC_MODE, tp->mac_mode);
++		udelay(40);
++
++		ap->state = ANEG_STATE_ACK_DETECT;
++
++		/* fallthru */
++	case ANEG_STATE_ACK_DETECT:
++		if (ap->ack_match != 0) {
++			if ((ap->rxconfig & ~ANEG_CFG_ACK) ==
++			    (ap->ability_match_cfg & ~ANEG_CFG_ACK)) {
++				ap->state = ANEG_STATE_COMPLETE_ACK_INIT;
++			} else {
++				ap->state = ANEG_STATE_AN_ENABLE;
++			}
++		} else if (ap->ability_match != 0 &&
++			   ap->rxconfig == 0) {
++			ap->state = ANEG_STATE_AN_ENABLE;
++		}
++		break;
++
++	case ANEG_STATE_COMPLETE_ACK_INIT:
++		if (ap->rxconfig & ANEG_CFG_INVAL) {
++			ret = ANEG_FAILED;
++			break;
++		}
++		ap->flags &= ~(MR_LP_ADV_FULL_DUPLEX |
++			       MR_LP_ADV_HALF_DUPLEX |
++			       MR_LP_ADV_SYM_PAUSE |
++			       MR_LP_ADV_ASYM_PAUSE |
++			       MR_LP_ADV_REMOTE_FAULT1 |
++			       MR_LP_ADV_REMOTE_FAULT2 |
++			       MR_LP_ADV_NEXT_PAGE |
++			       MR_TOGGLE_RX |
++			       MR_NP_RX);
++		if (ap->rxconfig & ANEG_CFG_FD)
++			ap->flags |= MR_LP_ADV_FULL_DUPLEX;
++		if (ap->rxconfig & ANEG_CFG_HD)
++			ap->flags |= MR_LP_ADV_HALF_DUPLEX;
++		if (ap->rxconfig & ANEG_CFG_PS1)
++			ap->flags |= MR_LP_ADV_SYM_PAUSE;
++		if (ap->rxconfig & ANEG_CFG_PS2)
++			ap->flags |= MR_LP_ADV_ASYM_PAUSE;
++		if (ap->rxconfig & ANEG_CFG_RF1)
++			ap->flags |= MR_LP_ADV_REMOTE_FAULT1;
++		if (ap->rxconfig & ANEG_CFG_RF2)
++			ap->flags |= MR_LP_ADV_REMOTE_FAULT2;
++		if (ap->rxconfig & ANEG_CFG_NP)
++			ap->flags |= MR_LP_ADV_NEXT_PAGE;
++
++		ap->link_time = ap->cur_time;
++
++		ap->flags ^= (MR_TOGGLE_TX);
++		if (ap->rxconfig & 0x0008)
++			ap->flags |= MR_TOGGLE_RX;
++		if (ap->rxconfig & ANEG_CFG_NP)
++			ap->flags |= MR_NP_RX;
++		ap->flags |= MR_PAGE_RX;
++
++		ap->state = ANEG_STATE_COMPLETE_ACK;
++		ret = ANEG_TIMER_ENAB;
++		break;
++
++	case ANEG_STATE_COMPLETE_ACK:
++		if (ap->ability_match != 0 &&
++		    ap->rxconfig == 0) {
++			ap->state = ANEG_STATE_AN_ENABLE;
++			break;
++		}
++		delta = ap->cur_time - ap->link_time;
++		if (delta > ANEG_STATE_SETTLE_TIME) {
++			if (!(ap->flags & (MR_LP_ADV_NEXT_PAGE))) {
++				ap->state = ANEG_STATE_IDLE_DETECT_INIT;
++			} else {
++				if ((ap->txconfig & ANEG_CFG_NP) == 0 &&
++				    !(ap->flags & MR_NP_RX)) {
++					ap->state = ANEG_STATE_IDLE_DETECT_INIT;
++				} else {
++					ret = ANEG_FAILED;
++				}
++			}
++		}
++		break;
++
++	case ANEG_STATE_IDLE_DETECT_INIT:
++		ap->link_time = ap->cur_time;
++		tp->mac_mode &= ~MAC_MODE_SEND_CONFIGS;
++		tw32_f(MAC_MODE, tp->mac_mode);
++		udelay(40);
++
++		ap->state = ANEG_STATE_IDLE_DETECT;
++		ret = ANEG_TIMER_ENAB;
++		break;
++
++	case ANEG_STATE_IDLE_DETECT:
++		if (ap->ability_match != 0 &&
++		    ap->rxconfig == 0) {
++			ap->state = ANEG_STATE_AN_ENABLE;
++			break;
++		}
++		delta = ap->cur_time - ap->link_time;
++		if (delta > ANEG_STATE_SETTLE_TIME) {
++			/* XXX another gem from the Broadcom driver :( */
++			ap->state = ANEG_STATE_LINK_OK;
++		}
++		break;
++
++	case ANEG_STATE_LINK_OK:
++		ap->flags |= (MR_AN_COMPLETE | MR_LINK_OK);
++		ret = ANEG_DONE;
++		break;
++
++	case ANEG_STATE_NEXT_PAGE_WAIT_INIT:
++		/* ??? unimplemented */
++		break;
++
++	case ANEG_STATE_NEXT_PAGE_WAIT:
++		/* ??? unimplemented */
++		break;
++
++	default:
++		ret = ANEG_FAILED;
++		break;
++	};
++
++	return ret;
++}
++
++static int fiber_autoneg(struct tg3 *tp, u32 *flags)
++{
++	int res = 0;
++
++	if (tp->tg3_flags2 & TG3_FLG2_HW_AUTONEG) {
++		u32 dig_status;
++
++		dig_status = tr32(SG_DIG_STATUS);
++		*flags = 0;
++		if (dig_status & SG_DIG_PARTNER_ASYM_PAUSE)
++			*flags |= MR_LP_ADV_ASYM_PAUSE;
++		if (dig_status & SG_DIG_PARTNER_PAUSE_CAPABLE)
++			*flags |= MR_LP_ADV_SYM_PAUSE;
++
++		if ((dig_status & SG_DIG_AUTONEG_COMPLETE) &&
++		    !(dig_status & (SG_DIG_AUTONEG_ERROR |
++				    SG_DIG_PARTNER_FAULT_MASK)))
++			res = 1;
++	} else {
++		struct tg3_fiber_aneginfo aninfo;
++		int status = ANEG_FAILED;
++		unsigned int tick;
++		u32 tmp;
++
++		tw32_f(MAC_TX_AUTO_NEG, 0);
++
++		tmp = tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK;
++		tw32_f(MAC_MODE, tmp | MAC_MODE_PORT_MODE_GMII);
++		udelay(40);
++
++		tw32_f(MAC_MODE, tp->mac_mode | MAC_MODE_SEND_CONFIGS);
++		udelay(40);
++
++		memset(&aninfo, 0, sizeof(aninfo));
++		aninfo.flags |= MR_AN_ENABLE;
++		aninfo.state = ANEG_STATE_UNKNOWN;
++		aninfo.cur_time = 0;
++		tick = 0;
++		while (++tick < 195000) {
++			status = tg3_fiber_aneg_smachine(tp, &aninfo);
++			if (status == ANEG_DONE || status == ANEG_FAILED)
++				break;
++
++			udelay(1);
++		}
++
++		tp->mac_mode &= ~MAC_MODE_SEND_CONFIGS;
++		tw32_f(MAC_MODE, tp->mac_mode);
++		udelay(40);
++
++		*flags = aninfo.flags;
++
++		if (status == ANEG_DONE &&
++		    (aninfo.flags & (MR_AN_COMPLETE | MR_LINK_OK |
++				     MR_LP_ADV_FULL_DUPLEX)))
++			res = 1;
++	}
++
++	return res;
++}
++
++static int tg3_setup_fiber_phy(struct tg3 *tp, int force_reset)
++{
++	u32 orig_pause_cfg;
++	u16 orig_active_speed;
++	u8 orig_active_duplex;
++	int current_link_up;
++	int i;
++
++	orig_pause_cfg =
++		(tp->tg3_flags & (TG3_FLAG_RX_PAUSE |
++				  TG3_FLAG_TX_PAUSE));
++	orig_active_speed = tp->link_config.active_speed;
++	orig_active_duplex = tp->link_config.active_duplex;
++
++	tp->mac_mode &= ~(MAC_MODE_PORT_MODE_MASK | MAC_MODE_HALF_DUPLEX);
++	tp->mac_mode |= MAC_MODE_PORT_MODE_TBI;
++	tw32_f(MAC_MODE, tp->mac_mode);
++	udelay(40);
++
++	if (tp->tg3_flags2 & TG3_FLG2_HW_AUTONEG) {
++		/* Allow time for the hardware to auto-negotiate (195ms) */
++		unsigned int tick = 0;
++
++		while (++tick < 195000) { 
++			if (tr32(SG_DIG_STATUS) & SG_DIG_AUTONEG_COMPLETE)
++				break;
++			udelay(1);
++		}
++		if (tick >= 195000)
++			printk(KERN_INFO PFX "%s: HW autoneg failed !\n",
++			    tp->dev->name);
++	}
++
++	/* Reset when initting first time or we have a link. */
++	if (!(tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) ||
++	    (tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED)) {
++		/* Set PLL lock range. */
++		tg3_writephy(tp, 0x16, 0x8007);
++
++		/* SW reset */
++		tg3_writephy(tp, MII_BMCR, BMCR_RESET);
++
++		/* Wait for reset to complete. */
++		/* XXX schedule_timeout() ... */
++		for (i = 0; i < 500; i++)
++			udelay(10);
++
++		/* Config mode; select PMA/Ch 1 regs. */
++		tg3_writephy(tp, 0x10, 0x8411);
++
++		/* Enable auto-lock and comdet, select txclk for tx. */
++		tg3_writephy(tp, 0x11, 0x0a10);
++
++		tg3_writephy(tp, 0x18, 0x00a0);
++		tg3_writephy(tp, 0x16, 0x41ff);
++
++		/* Assert and deassert POR. */
++		tg3_writephy(tp, 0x13, 0x0400);
++		udelay(40);
++		tg3_writephy(tp, 0x13, 0x0000);
++
++		tg3_writephy(tp, 0x11, 0x0a50);
++		udelay(40);
++		tg3_writephy(tp, 0x11, 0x0a10);
++
++		/* Wait for signal to stabilize */
++		/* XXX schedule_timeout() ... */
++		for (i = 0; i < 15000; i++)
++			udelay(10);
++
++		/* Deselect the channel register so we can read the PHYID
++		 * later.
++		 */
++		tg3_writephy(tp, 0x10, 0x8011);
++	}
++
++	/* Enable link change interrupt unless serdes polling.  */
++	if (!(tp->tg3_flags & TG3_FLAG_POLL_SERDES))
++		tw32_f(MAC_EVENT, MAC_EVENT_LNKSTATE_CHANGED);
++	else
++		tw32_f(MAC_EVENT, 0);
++	udelay(40);
++
++	current_link_up = 0;
++ 	if (tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED) {
++		if (tp->link_config.autoneg == AUTONEG_ENABLE) {
++			u32 flags;
++  
++			if (fiber_autoneg(tp, &flags)) {
++				u32 local_adv, remote_adv;
++
++				local_adv = ADVERTISE_PAUSE_CAP;
++				remote_adv = 0;
++				if (flags & MR_LP_ADV_SYM_PAUSE)
++  					remote_adv |= LPA_PAUSE_CAP;
++				if (flags & MR_LP_ADV_ASYM_PAUSE)
++					remote_adv |= LPA_PAUSE_ASYM;
++
++				tg3_setup_flow_control(tp, local_adv, remote_adv);
++
++				tp->tg3_flags |=
++					TG3_FLAG_GOT_SERDES_FLOWCTL;
++				current_link_up = 1;
++			}
++			for (i = 0; i < 60; i++) {
++				udelay(20);
++				tw32_f(MAC_STATUS,
++				     (MAC_STATUS_SYNC_CHANGED |
++				      MAC_STATUS_CFG_CHANGED));
++				udelay(40);
++				if ((tr32(MAC_STATUS) &
++				     (MAC_STATUS_SYNC_CHANGED |
++				      MAC_STATUS_CFG_CHANGED)) == 0)
++					break;
++			}
++			if (current_link_up == 0 &&
++			    (tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED)) {
++				current_link_up = 1;
++			}
++		} else {
++			/* Forcing 1000FD link up. */
++			current_link_up = 1;
++			tp->tg3_flags |= TG3_FLAG_GOT_SERDES_FLOWCTL;
++		}
++	} else
++		tp->tg3_flags &= ~TG3_FLAG_GOT_SERDES_FLOWCTL;
++
++	tp->mac_mode &= ~MAC_MODE_LINK_POLARITY;
++	tw32_f(MAC_MODE, tp->mac_mode);
++	udelay(40);
++
++	tp->hw_status->status =
++		(SD_STATUS_UPDATED |
++		 (tp->hw_status->status & ~SD_STATUS_LINK_CHG));
++
++	for (i = 0; i < 100; i++) {
++		udelay(20);
++		tw32_f(MAC_STATUS,
++		     (MAC_STATUS_SYNC_CHANGED |
++		      MAC_STATUS_CFG_CHANGED));
++		udelay(40);
++		if ((tr32(MAC_STATUS) &
++		     (MAC_STATUS_SYNC_CHANGED |
++		      MAC_STATUS_CFG_CHANGED)) == 0)
++			break;
++	}
++
++	if ((tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED) == 0)
++		current_link_up = 0;
++
++	if (current_link_up == 1) {
++		tp->link_config.active_speed = SPEED_1000;
++		tp->link_config.active_duplex = DUPLEX_FULL;
++		tw32(MAC_LED_CTRL, (tp->led_ctrl |
++				    LED_CTRL_LNKLED_OVERRIDE |
++				    LED_CTRL_1000MBPS_ON));
++	} else {
++		tp->link_config.active_speed = SPEED_INVALID;
++		tp->link_config.active_duplex = DUPLEX_INVALID;
++		tw32(MAC_LED_CTRL, (tp->led_ctrl |
++				    LED_CTRL_LNKLED_OVERRIDE |
++				    LED_CTRL_TRAFFIC_OVERRIDE));
++	}
++
++	if (current_link_up != netif_carrier_ok(tp->dev)) {
++		if (current_link_up)
++			netif_carrier_on(tp->dev);
++		else
++			netif_carrier_off(tp->dev);
++		tg3_link_report(tp);
++	} else {
++		u32 now_pause_cfg =
++			tp->tg3_flags & (TG3_FLAG_RX_PAUSE |
++					 TG3_FLAG_TX_PAUSE);
++		if (orig_pause_cfg != now_pause_cfg ||
++		    orig_active_speed != tp->link_config.active_speed ||
++		    orig_active_duplex != tp->link_config.active_duplex)
++			tg3_link_report(tp);
++	}
++
++	if ((tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED) == 0) {
++		tw32_f(MAC_MODE, tp->mac_mode | MAC_MODE_LINK_POLARITY);
++		udelay(40);
++		if (tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) {
++			tw32_f(MAC_MODE, tp->mac_mode);
++			udelay(40);
++		}
++	}
++
++	return 0;
++}
++
++static int tg3_setup_phy(struct tg3 *tp, int force_reset)
++{
++	int err;
++
++	if (tp->phy_id == PHY_ID_SERDES) {
++		err = tg3_setup_fiber_phy(tp, force_reset);
++	} else {
++		err = tg3_setup_copper_phy(tp, force_reset);
++	}
++
++	if (tp->link_config.active_speed == SPEED_1000 &&
++	    tp->link_config.active_duplex == DUPLEX_HALF)
++		tw32(MAC_TX_LENGTHS,
++		     ((2 << TX_LENGTHS_IPG_CRS_SHIFT) |
++		      (6 << TX_LENGTHS_IPG_SHIFT) |
++		      (0xff << TX_LENGTHS_SLOT_TIME_SHIFT)));
++	else
++		tw32(MAC_TX_LENGTHS,
++		     ((2 << TX_LENGTHS_IPG_CRS_SHIFT) |
++		      (6 << TX_LENGTHS_IPG_SHIFT) |
++		      (32 << TX_LENGTHS_SLOT_TIME_SHIFT)));
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 &&
++	    GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) {
++		if (netif_carrier_ok(tp->dev)) {
++			tw32(HOSTCC_STAT_COAL_TICKS,
++			     DEFAULT_STAT_COAL_TICKS);
++		} else {
++			tw32(HOSTCC_STAT_COAL_TICKS, 0);
++		}
++	}
++
++	return err;
++}
++
++/* Tigon3 never reports partial packet sends.  So we do not
++ * need special logic to handle SKBs that have not had all
++ * of their frags sent yet, like SunGEM does.
++ */
++static void tg3_tx(struct tg3 *tp)
++{
++	u32 hw_idx = tp->hw_status->idx[0].tx_consumer;
++	u32 sw_idx = tp->tx_cons;
++
++	while (sw_idx != hw_idx) {
++		struct tx_ring_info *ri = &tp->tx_buffers[sw_idx];
++		struct sk_buff *skb = ri->skb;
++		int i;
++
++		if (unlikely(skb == NULL))
++			BUG();
++
++		pci_unmap_single(tp->pdev,
++				 pci_unmap_addr(ri, mapping),
++				 skb_headlen(skb),
++				 PCI_DMA_TODEVICE);
++
++		ri->skb = NULL;
++
++		sw_idx = NEXT_TX(sw_idx);
++
++		for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
++			if (unlikely(sw_idx == hw_idx))
++				BUG();
++
++			ri = &tp->tx_buffers[sw_idx];
++			if (unlikely(ri->skb != NULL))
++				BUG();
++
++			pci_unmap_page(tp->pdev,
++				       pci_unmap_addr(ri, mapping),
++				       skb_shinfo(skb)->frags[i].size,
++				       PCI_DMA_TODEVICE);
++
++			sw_idx = NEXT_TX(sw_idx);
++		}
++
++		dev_kfree_skb_irq(skb);
++	}
++
++	tp->tx_cons = sw_idx;
++
++	if (netif_queue_stopped(tp->dev) &&
++	    (TX_BUFFS_AVAIL(tp) > TG3_TX_WAKEUP_THRESH))
++		netif_wake_queue(tp->dev);
++}
++
++/* Returns size of skb allocated or < 0 on error.
++ *
++ * We only need to fill in the address because the other members
++ * of the RX descriptor are invariant, see tg3_init_rings.
++ *
++ * Note the purposeful assymetry of cpu vs. chip accesses.  For
++ * posting buffers we only dirty the first cache line of the RX
++ * descriptor (containing the address).  Whereas for the RX status
++ * buffers the cpu only reads the last cacheline of the RX descriptor
++ * (to fetch the error flags, vlan tag, checksum, and opaque cookie).
++ */
++static int tg3_alloc_rx_skb(struct tg3 *tp, u32 opaque_key,
++			    int src_idx, u32 dest_idx_unmasked)
++{
++	struct tg3_rx_buffer_desc *desc;
++	struct ring_info *map, *src_map;
++	struct sk_buff *skb;
++	dma_addr_t mapping;
++	int skb_size, dest_idx;
++
++	src_map = NULL;
++	switch (opaque_key) {
++	case RXD_OPAQUE_RING_STD:
++		dest_idx = dest_idx_unmasked % TG3_RX_RING_SIZE;
++		desc = &tp->rx_std[dest_idx];
++		map = &tp->rx_std_buffers[dest_idx];
++		if (src_idx >= 0)
++			src_map = &tp->rx_std_buffers[src_idx];
++		skb_size = RX_PKT_BUF_SZ;
++		break;
++
++	case RXD_OPAQUE_RING_JUMBO:
++		dest_idx = dest_idx_unmasked % TG3_RX_JUMBO_RING_SIZE;
++		desc = &tp->rx_jumbo[dest_idx];
++		map = &tp->rx_jumbo_buffers[dest_idx];
++		if (src_idx >= 0)
++			src_map = &tp->rx_jumbo_buffers[src_idx];
++		skb_size = RX_JUMBO_PKT_BUF_SZ;
++		break;
++
++	default:
++		return -EINVAL;
++	};
++
++	/* Do not overwrite any of the map or rp information
++	 * until we are sure we can commit to a new buffer.
++	 *
++	 * Callers depend upon this behavior and assume that
++	 * we leave everything unchanged if we fail.
++	 */
++	skb = dev_alloc_skb(skb_size);
++	if (skb == NULL)
++		return -ENOMEM;
++
++	skb->dev = tp->dev;
++	skb_reserve(skb, tp->rx_offset);
++
++	mapping = pci_map_single(tp->pdev, skb->data,
++				 skb_size - tp->rx_offset,
++				 PCI_DMA_FROMDEVICE);
++
++	map->skb = skb;
++	pci_unmap_addr_set(map, mapping, mapping);
++
++	if (src_map != NULL)
++		src_map->skb = NULL;
++
++	desc->addr_hi = ((u64)mapping >> 32);
++	desc->addr_lo = ((u64)mapping & 0xffffffff);
++
++	return skb_size;
++}
++
++/* We only need to move over in the address because the other
++ * members of the RX descriptor are invariant.  See notes above
++ * tg3_alloc_rx_skb for full details.
++ */
++static void tg3_recycle_rx(struct tg3 *tp, u32 opaque_key,
++			   int src_idx, u32 dest_idx_unmasked)
++{
++	struct tg3_rx_buffer_desc *src_desc, *dest_desc;
++	struct ring_info *src_map, *dest_map;
++	int dest_idx;
++
++	switch (opaque_key) {
++	case RXD_OPAQUE_RING_STD:
++		dest_idx = dest_idx_unmasked % TG3_RX_RING_SIZE;
++		dest_desc = &tp->rx_std[dest_idx];
++		dest_map = &tp->rx_std_buffers[dest_idx];
++		src_desc = &tp->rx_std[src_idx];
++		src_map = &tp->rx_std_buffers[src_idx];
++		break;
++
++	case RXD_OPAQUE_RING_JUMBO:
++		dest_idx = dest_idx_unmasked % TG3_RX_JUMBO_RING_SIZE;
++		dest_desc = &tp->rx_jumbo[dest_idx];
++		dest_map = &tp->rx_jumbo_buffers[dest_idx];
++		src_desc = &tp->rx_jumbo[src_idx];
++		src_map = &tp->rx_jumbo_buffers[src_idx];
++		break;
++
++	default:
++		return;
++	};
++
++	dest_map->skb = src_map->skb;
++	pci_unmap_addr_set(dest_map, mapping,
++			   pci_unmap_addr(src_map, mapping));
++	dest_desc->addr_hi = src_desc->addr_hi;
++	dest_desc->addr_lo = src_desc->addr_lo;
++
++	src_map->skb = NULL;
++}
++
++#if TG3_VLAN_TAG_USED
++static int tg3_vlan_rx(struct tg3 *tp, struct sk_buff *skb, u16 vlan_tag)
++{
++	return vlan_hwaccel_receive_skb(skb, tp->vlgrp, vlan_tag);
++}
++#endif
++
++/* The RX ring scheme is composed of multiple rings which post fresh
++ * buffers to the chip, and one special ring the chip uses to report
++ * status back to the host.
++ *
++ * The special ring reports the status of received packets to the
++ * host.  The chip does not write into the original descriptor the
++ * RX buffer was obtained from.  The chip simply takes the original
++ * descriptor as provided by the host, updates the status and length
++ * field, then writes this into the next status ring entry.
++ *
++ * Each ring the host uses to post buffers to the chip is described
++ * by a TG3_BDINFO entry in the chips SRAM area.  When a packet arrives,
++ * it is first placed into the on-chip ram.  When the packet's length
++ * is known, it walks down the TG3_BDINFO entries to select the ring.
++ * Each TG3_BDINFO specifies a MAXLEN field and the first TG3_BDINFO
++ * which is within the range of the new packet's length is chosen.
++ *
++ * The "separate ring for rx status" scheme may sound queer, but it makes
++ * sense from a cache coherency perspective.  If only the host writes
++ * to the buffer post rings, and only the chip writes to the rx status
++ * rings, then cache lines never move beyond shared-modified state.
++ * If both the host and chip were to write into the same ring, cache line
++ * eviction could occur since both entities want it in an exclusive state.
++ */
++static int tg3_rx(struct tg3 *tp, int budget)
++{
++	u32 work_mask;
++	u32 rx_rcb_ptr = tp->rx_rcb_ptr;
++	u16 hw_idx, sw_idx;
++	int received;
++
++	hw_idx = tp->hw_status->idx[0].rx_producer;
++	/*
++	 * We need to order the read of hw_idx and the read of
++	 * the opaque cookie.
++	 */
++	rmb();
++	sw_idx = rx_rcb_ptr % TG3_RX_RCB_RING_SIZE(tp);
++	work_mask = 0;
++	received = 0;
++	while (sw_idx != hw_idx && budget > 0) {
++		struct tg3_rx_buffer_desc *desc = &tp->rx_rcb[sw_idx];
++		unsigned int len;
++		struct sk_buff *skb;
++		dma_addr_t dma_addr;
++		u32 opaque_key, desc_idx, *post_ptr;
++
++		desc_idx = desc->opaque & RXD_OPAQUE_INDEX_MASK;
++		opaque_key = desc->opaque & RXD_OPAQUE_RING_MASK;
++		if (opaque_key == RXD_OPAQUE_RING_STD) {
++			dma_addr = pci_unmap_addr(&tp->rx_std_buffers[desc_idx],
++						  mapping);
++			skb = tp->rx_std_buffers[desc_idx].skb;
++			post_ptr = &tp->rx_std_ptr;
++		} else if (opaque_key == RXD_OPAQUE_RING_JUMBO) {
++			dma_addr = pci_unmap_addr(&tp->rx_jumbo_buffers[desc_idx],
++						  mapping);
++			skb = tp->rx_jumbo_buffers[desc_idx].skb;
++			post_ptr = &tp->rx_jumbo_ptr;
++		}
++		else {
++			goto next_pkt_nopost;
++		}
++
++		work_mask |= opaque_key;
++
++		if ((desc->err_vlan & RXD_ERR_MASK) != 0 &&
++		    (desc->err_vlan != RXD_ERR_ODD_NIBBLE_RCVD_MII)) {
++		drop_it:
++			tg3_recycle_rx(tp, opaque_key,
++				       desc_idx, *post_ptr);
++		drop_it_no_recycle:
++			/* Other statistics kept track of by card. */
++			tp->net_stats.rx_dropped++;
++			goto next_pkt;
++		}
++
++		len = ((desc->idx_len & RXD_LEN_MASK) >> RXD_LEN_SHIFT) - 4; /* omit crc */
++
++		if (len > RX_COPY_THRESHOLD) {
++			int skb_size;
++
++			skb_size = tg3_alloc_rx_skb(tp, opaque_key,
++						    desc_idx, *post_ptr);
++			if (skb_size < 0)
++				goto drop_it;
++
++			pci_unmap_single(tp->pdev, dma_addr,
++					 skb_size - tp->rx_offset,
++					 PCI_DMA_FROMDEVICE);
++
++			skb_put(skb, len);
++		} else {
++			struct sk_buff *copy_skb;
++
++			tg3_recycle_rx(tp, opaque_key,
++				       desc_idx, *post_ptr);
++
++			copy_skb = dev_alloc_skb(len + 2);
++			if (copy_skb == NULL)
++				goto drop_it_no_recycle;
++
++			copy_skb->dev = tp->dev;
++			skb_reserve(copy_skb, 2);
++			skb_put(copy_skb, len);
++			pci_dma_sync_single_for_cpu(tp->pdev, dma_addr, len, PCI_DMA_FROMDEVICE);
++			memcpy(copy_skb->data, skb->data, len);
++			pci_dma_sync_single_for_device(tp->pdev, dma_addr, len, PCI_DMA_FROMDEVICE);
++
++			/* We'll reuse the original ring buffer. */
++			skb = copy_skb;
++		}
++
++		if ((tp->tg3_flags & TG3_FLAG_RX_CHECKSUMS) &&
++		    (desc->type_flags & RXD_FLAG_TCPUDP_CSUM) &&
++		    (((desc->ip_tcp_csum & RXD_TCPCSUM_MASK)
++		      >> RXD_TCPCSUM_SHIFT) == 0xffff))
++			skb->ip_summed = CHECKSUM_UNNECESSARY;
++		else
++			skb->ip_summed = CHECKSUM_NONE;
++
++		skb->protocol = eth_type_trans(skb, tp->dev);
++#if TG3_VLAN_TAG_USED
++		if (tp->vlgrp != NULL &&
++		    desc->type_flags & RXD_FLAG_VLAN) {
++			tg3_vlan_rx(tp, skb,
++				    desc->err_vlan & RXD_VLAN_MASK);
++		} else
++#endif
++			netif_receive_skb(skb);
++
++		tp->dev->last_rx = jiffies;
++		received++;
++		budget--;
++
++next_pkt:
++		(*post_ptr)++;
++next_pkt_nopost:
++		rx_rcb_ptr++;
++		sw_idx = rx_rcb_ptr % TG3_RX_RCB_RING_SIZE(tp);
++	}
++
++	/* ACK the status ring. */
++	tp->rx_rcb_ptr = rx_rcb_ptr;
++	tw32_rx_mbox(MAILBOX_RCVRET_CON_IDX_0 + TG3_64BIT_REG_LOW,
++		     (rx_rcb_ptr % TG3_RX_RCB_RING_SIZE(tp)));
++
++	/* Refill RX ring(s). */
++	if (work_mask & RXD_OPAQUE_RING_STD) {
++		sw_idx = tp->rx_std_ptr % TG3_RX_RING_SIZE;
++		tw32_rx_mbox(MAILBOX_RCV_STD_PROD_IDX + TG3_64BIT_REG_LOW,
++			     sw_idx);
++	}
++	if (work_mask & RXD_OPAQUE_RING_JUMBO) {
++		sw_idx = tp->rx_jumbo_ptr % TG3_RX_JUMBO_RING_SIZE;
++		tw32_rx_mbox(MAILBOX_RCV_JUMBO_PROD_IDX + TG3_64BIT_REG_LOW,
++			     sw_idx);
++	}
++
++	return received;
++}
++
++static int tg3_poll(struct net_device *netdev, int *budget)
++{
++	struct tg3 *tp = netdev_priv(netdev);
++	struct tg3_hw_status *sblk = tp->hw_status;
++	unsigned long flags;
++	int done;
++
++	spin_lock_irqsave(&tp->lock, flags);
++
++	/* handle link change and other phy events */
++	if (!(tp->tg3_flags &
++	      (TG3_FLAG_USE_LINKCHG_REG |
++	       TG3_FLAG_POLL_SERDES))) {
++		if (sblk->status & SD_STATUS_LINK_CHG) {
++			sblk->status = SD_STATUS_UPDATED |
++				(sblk->status & ~SD_STATUS_LINK_CHG);
++			tg3_setup_phy(tp, 0);
++		}
++	}
++
++	/* run TX completion thread */
++	if (sblk->idx[0].tx_consumer != tp->tx_cons) {
++		spin_lock(&tp->tx_lock);
++		tg3_tx(tp);
++		spin_unlock(&tp->tx_lock);
++	}
++
++	spin_unlock_irqrestore(&tp->lock, flags);
++
++	/* run RX thread, within the bounds set by NAPI.
++	 * All RX "locking" is done by ensuring outside
++	 * code synchronizes with dev->poll()
++	 */
++	done = 1;
++	if (sblk->idx[0].rx_producer != tp->rx_rcb_ptr) {
++		int orig_budget = *budget;
++		int work_done;
++
++		if (orig_budget > netdev->quota)
++			orig_budget = netdev->quota;
++
++		work_done = tg3_rx(tp, orig_budget);
++
++		*budget -= work_done;
++		netdev->quota -= work_done;
++
++		if (work_done >= orig_budget)
++			done = 0;
++	}
++
++	/* if no more work, tell net stack and NIC we're done */
++	if (done) {
++		spin_lock_irqsave(&tp->lock, flags);
++		__netif_rx_complete(netdev);
++		tg3_enable_ints(tp);
++		spin_unlock_irqrestore(&tp->lock, flags);
++	}
++
++	return (done ? 0 : 1);
++}
++
++static inline unsigned int tg3_has_work(struct net_device *dev, struct tg3 *tp)
++{
++	struct tg3_hw_status *sblk = tp->hw_status;
++	unsigned int work_exists = 0;
++
++	/* check for phy events */
++	if (!(tp->tg3_flags &
++	      (TG3_FLAG_USE_LINKCHG_REG |
++	       TG3_FLAG_POLL_SERDES))) {
++		if (sblk->status & SD_STATUS_LINK_CHG)
++			work_exists = 1;
++	}
++	/* check for RX/TX work to do */
++	if (sblk->idx[0].tx_consumer != tp->tx_cons ||
++	    sblk->idx[0].rx_producer != tp->rx_rcb_ptr)
++		work_exists = 1;
++
++	return work_exists;
++}
++
++static irqreturn_t tg3_interrupt(int irq, void *dev_id, struct pt_regs *regs)
++{
++	struct net_device *dev = dev_id;
++	struct tg3 *tp = netdev_priv(dev);
++	struct tg3_hw_status *sblk = tp->hw_status;
++	unsigned long flags;
++	unsigned int handled = 1;
++
++	spin_lock_irqsave(&tp->lock, flags);
++
++	if (sblk->status & SD_STATUS_UPDATED) {
++		/*
++		 * writing any value to intr-mbox-0 clears PCI INTA# and
++		 * chip-internal interrupt pending events.
++		 * writing non-zero to intr-mbox-0 additional tells the
++		 * NIC to stop sending us irqs, engaging "in-intr-handler"
++		 * event coalescing.
++		 */
++		tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW,
++			     0x00000001);
++		/*
++		 * Flush PCI write.  This also guarantees that our
++		 * status block has been flushed to host memory.
++		 */
++		tr32(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW);
++		sblk->status &= ~SD_STATUS_UPDATED;
++
++		if (likely(tg3_has_work(dev, tp)))
++			netif_rx_schedule(dev);		/* schedule NAPI poll */
++		else {
++			/* no work, shared interrupt perhaps?  re-enable
++			 * interrupts, and flush that PCI write
++			 */
++			tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW,
++			     	0x00000000);
++			tr32(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW);
++		}
++	} else {	/* shared interrupt */
++		handled = 0;
++	}
++
++	spin_unlock_irqrestore(&tp->lock, flags);
++
++	return IRQ_RETVAL(handled);
++}
++
++static int tg3_init_hw(struct tg3 *);
++static int tg3_halt(struct tg3 *);
++
++#ifdef CONFIG_NET_POLL_CONTROLLER
++static void tg3_poll_controller(struct net_device *dev)
++{
++	tg3_interrupt(dev->irq, dev, NULL);
++}
++#endif
++
++static void tg3_reset_task(void *_data)
++{
++	struct tg3 *tp = _data;
++	unsigned int restart_timer;
++
++	tg3_netif_stop(tp);
++
++	spin_lock_irq(&tp->lock);
++	spin_lock(&tp->tx_lock);
++
++	restart_timer = tp->tg3_flags2 & TG3_FLG2_RESTART_TIMER;
++	tp->tg3_flags2 &= ~TG3_FLG2_RESTART_TIMER;
++
++	tg3_halt(tp);
++	tg3_init_hw(tp);
++
++	spin_unlock(&tp->tx_lock);
++	spin_unlock_irq(&tp->lock);
++
++	tg3_netif_start(tp);
++
++	if (restart_timer)
++		mod_timer(&tp->timer, jiffies + 1);
++}
++
++static void tg3_tx_timeout(struct net_device *dev)
++{
++	struct tg3 *tp = netdev_priv(dev);
++
++	printk(KERN_ERR PFX "%s: transmit timed out, resetting\n",
++	       dev->name);
++
++	schedule_work(&tp->reset_task);
++}
++
++static void tg3_set_txd(struct tg3 *, int, dma_addr_t, int, u32, u32);
++
++static int tigon3_4gb_hwbug_workaround(struct tg3 *tp, struct sk_buff *skb,
++				       u32 guilty_entry, int guilty_len,
++				       u32 last_plus_one, u32 *start, u32 mss)
++{
++	struct sk_buff *new_skb = skb_copy(skb, GFP_ATOMIC);
++	dma_addr_t new_addr;
++	u32 entry = *start;
++	int i;
++
++	if (!new_skb) {
++		dev_kfree_skb(skb);
++		return -1;
++	}
++
++	/* New SKB is guaranteed to be linear. */
++	entry = *start;
++	new_addr = pci_map_single(tp->pdev, new_skb->data, new_skb->len,
++				  PCI_DMA_TODEVICE);
++	tg3_set_txd(tp, entry, new_addr, new_skb->len,
++		    (skb->ip_summed == CHECKSUM_HW) ?
++		    TXD_FLAG_TCPUDP_CSUM : 0, 1 | (mss << 1));
++	*start = NEXT_TX(entry);
++
++	/* Now clean up the sw ring entries. */
++	i = 0;
++	while (entry != last_plus_one) {
++		int len;
++
++		if (i == 0)
++			len = skb_headlen(skb);
++		else
++			len = skb_shinfo(skb)->frags[i-1].size;
++		pci_unmap_single(tp->pdev,
++				 pci_unmap_addr(&tp->tx_buffers[entry], mapping),
++				 len, PCI_DMA_TODEVICE);
++		if (i == 0) {
++			tp->tx_buffers[entry].skb = new_skb;
++			pci_unmap_addr_set(&tp->tx_buffers[entry], mapping, new_addr);
++		} else {
++			tp->tx_buffers[entry].skb = NULL;
++		}
++		entry = NEXT_TX(entry);
++	}
++
++	dev_kfree_skb(skb);
++
++	return 0;
++}
++
++static void tg3_set_txd(struct tg3 *tp, int entry,
++			dma_addr_t mapping, int len, u32 flags,
++			u32 mss_and_is_end)
++{
++	int is_end = (mss_and_is_end & 0x1);
++	u32 mss = (mss_and_is_end >> 1);
++	u32 vlan_tag = 0;
++
++	if (is_end)
++		flags |= TXD_FLAG_END;
++	if (flags & TXD_FLAG_VLAN) {
++		vlan_tag = flags >> 16;
++		flags &= 0xffff;
++	}
++	vlan_tag |= (mss << TXD_MSS_SHIFT);
++	if (tp->tg3_flags & TG3_FLAG_HOST_TXDS) {
++		struct tg3_tx_buffer_desc *txd = &tp->tx_ring[entry];
++
++		txd->addr_hi = ((u64) mapping >> 32);
++		txd->addr_lo = ((u64) mapping & 0xffffffff);
++		txd->len_flags = (len << TXD_LEN_SHIFT) | flags;
++		txd->vlan_tag = vlan_tag << TXD_VLAN_TAG_SHIFT;
++	} else {
++		struct tx_ring_info *txr = &tp->tx_buffers[entry];
++		unsigned long txd;
++
++		txd = (tp->regs +
++		       NIC_SRAM_WIN_BASE +
++		       NIC_SRAM_TX_BUFFER_DESC);
++		txd += (entry * TXD_SIZE);
++
++		/* Save some PIOs */
++		if (sizeof(dma_addr_t) != sizeof(u32))
++			writel(((u64) mapping >> 32),
++			       txd + TXD_ADDR + TG3_64BIT_REG_HIGH);
++
++		writel(((u64) mapping & 0xffffffff),
++		       txd + TXD_ADDR + TG3_64BIT_REG_LOW);
++		writel(len << TXD_LEN_SHIFT | flags, txd + TXD_LEN_FLAGS);
++		if (txr->prev_vlan_tag != vlan_tag) {
++			writel(vlan_tag << TXD_VLAN_TAG_SHIFT, txd + TXD_VLAN_TAG);
++			txr->prev_vlan_tag = vlan_tag;
++		}
++	}
++}
++
++static inline int tg3_4g_overflow_test(dma_addr_t mapping, int len)
++{
++	u32 base = (u32) mapping & 0xffffffff;
++
++	return ((base > 0xffffdcc0) &&
++		(base + len + 8 < base));
++}
++
++static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
++{
++	struct tg3 *tp = netdev_priv(dev);
++	dma_addr_t mapping;
++	unsigned int i;
++	u32 len, entry, base_flags, mss;
++	int would_hit_hwbug;
++	unsigned long flags;
++
++	len = skb_headlen(skb);
++
++	/* No BH disabling for tx_lock here.  We are running in BH disabled
++	 * context and TX reclaim runs via tp->poll inside of a software
++	 * interrupt.  Rejoice!
++	 *
++	 * Actually, things are not so simple.  If we are to take a hw
++	 * IRQ here, we can deadlock, consider:
++	 *
++	 *       CPU1		CPU2
++	 *   tg3_start_xmit
++	 *   take tp->tx_lock
++	 *			tg3_timer
++	 *			take tp->lock
++	 *   tg3_interrupt
++	 *   spin on tp->lock
++	 *			spin on tp->tx_lock
++	 *
++	 * So we really do need to disable interrupts when taking
++	 * tx_lock here.
++	 */
++	spin_lock_irqsave(&tp->tx_lock, flags);
++
++	/* This is a hard error, log it. */
++	if (unlikely(TX_BUFFS_AVAIL(tp) <= (skb_shinfo(skb)->nr_frags + 1))) {
++		netif_stop_queue(dev);
++		spin_unlock_irqrestore(&tp->tx_lock, flags);
++		printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n",
++		       dev->name);
++		return 1;
++	}
++
++	entry = tp->tx_prod;
++	base_flags = 0;
++	if (skb->ip_summed == CHECKSUM_HW)
++		base_flags |= TXD_FLAG_TCPUDP_CSUM;
++#if TG3_TSO_SUPPORT != 0
++	mss = 0;
++	if (skb->len > (tp->dev->mtu + ETH_HLEN) &&
++	    (mss = skb_shinfo(skb)->tso_size) != 0) {
++		int tcp_opt_len, ip_tcp_len;
++
++		tcp_opt_len = ((skb->h.th->doff - 5) * 4);
++		ip_tcp_len = (skb->nh.iph->ihl * 4) + sizeof(struct tcphdr);
++
++		base_flags |= (TXD_FLAG_CPU_PRE_DMA |
++			       TXD_FLAG_CPU_POST_DMA);
++
++		skb->nh.iph->check = 0;
++		skb->nh.iph->tot_len = ntohs(mss + ip_tcp_len + tcp_opt_len);
++		skb->h.th->check = ~csum_tcpudp_magic(skb->nh.iph->saddr,
++						      skb->nh.iph->daddr,
++						      0, IPPROTO_TCP, 0);
++
++		if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) {
++			if (tcp_opt_len || skb->nh.iph->ihl > 5) {
++				int tsflags;
++
++				tsflags = ((skb->nh.iph->ihl - 5) +
++					   (tcp_opt_len >> 2));
++				mss |= (tsflags << 11);
++			}
++		} else {
++			if (tcp_opt_len || skb->nh.iph->ihl > 5) {
++				int tsflags;
++
++				tsflags = ((skb->nh.iph->ihl - 5) +
++					   (tcp_opt_len >> 2));
++				base_flags |= tsflags << 12;
++			}
++		}
++	}
++#else
++	mss = 0;
++#endif
++#if TG3_VLAN_TAG_USED
++	if (tp->vlgrp != NULL && vlan_tx_tag_present(skb))
++		base_flags |= (TXD_FLAG_VLAN |
++			       (vlan_tx_tag_get(skb) << 16));
++#endif
++
++	/* Queue skb data, a.k.a. the main skb fragment. */
++	mapping = pci_map_single(tp->pdev, skb->data, len, PCI_DMA_TODEVICE);
++
++	tp->tx_buffers[entry].skb = skb;
++	pci_unmap_addr_set(&tp->tx_buffers[entry], mapping, mapping);
++
++	would_hit_hwbug = 0;
++
++	if (tg3_4g_overflow_test(mapping, len))
++		would_hit_hwbug = entry + 1;
++
++	tg3_set_txd(tp, entry, mapping, len, base_flags,
++		    (skb_shinfo(skb)->nr_frags == 0) | (mss << 1));
++
++	entry = NEXT_TX(entry);
++
++	/* Now loop through additional data fragments, and queue them. */
++	if (skb_shinfo(skb)->nr_frags > 0) {
++		unsigned int i, last;
++
++		last = skb_shinfo(skb)->nr_frags - 1;
++		for (i = 0; i <= last; i++) {
++			skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
++
++			len = frag->size;
++			mapping = pci_map_page(tp->pdev,
++					       frag->page,
++					       frag->page_offset,
++					       len, PCI_DMA_TODEVICE);
++
++			tp->tx_buffers[entry].skb = NULL;
++			pci_unmap_addr_set(&tp->tx_buffers[entry], mapping, mapping);
++
++			if (tg3_4g_overflow_test(mapping, len)) {
++				/* Only one should match. */
++				if (would_hit_hwbug)
++					BUG();
++				would_hit_hwbug = entry + 1;
++			}
++
++			if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750)
++				tg3_set_txd(tp, entry, mapping, len,
++					    base_flags, (i == last)|(mss << 1));
++			else
++				tg3_set_txd(tp, entry, mapping, len,
++					    base_flags, (i == last));
++
++			entry = NEXT_TX(entry);
++		}
++	}
++
++	if (would_hit_hwbug) {
++		u32 last_plus_one = entry;
++		u32 start;
++		unsigned int len = 0;
++
++		would_hit_hwbug -= 1;
++		entry = entry - 1 - skb_shinfo(skb)->nr_frags;
++		entry &= (TG3_TX_RING_SIZE - 1);
++		start = entry;
++		i = 0;
++		while (entry != last_plus_one) {
++			if (i == 0)
++				len = skb_headlen(skb);
++			else
++				len = skb_shinfo(skb)->frags[i-1].size;
++
++			if (entry == would_hit_hwbug)
++				break;
++
++			i++;
++			entry = NEXT_TX(entry);
++
++		}
++
++		/* If the workaround fails due to memory/mapping
++		 * failure, silently drop this packet.
++		 */
++		if (tigon3_4gb_hwbug_workaround(tp, skb,
++						entry, len,
++						last_plus_one,
++						&start, mss))
++			goto out_unlock;
++
++		entry = start;
++	}
++
++	/* Packets are ready, update Tx producer idx local and on card. */
++	if (tp->tg3_flags & TG3_FLAG_HOST_TXDS) {
++		tw32_tx_mbox((MAILBOX_SNDHOST_PROD_IDX_0 +
++			      TG3_64BIT_REG_LOW), entry);
++	} else {
++		/* First, make sure tg3 sees last descriptor fully
++		 * in SRAM.
++		 */
++		if (tp->tg3_flags & TG3_FLAG_MBOX_WRITE_REORDER)
++			tr32(MAILBOX_SNDNIC_PROD_IDX_0 + TG3_64BIT_REG_LOW);
++
++		tw32_tx_mbox((MAILBOX_SNDNIC_PROD_IDX_0 +
++			      TG3_64BIT_REG_LOW), entry);
++	}
++
++	tp->tx_prod = entry;
++	if (TX_BUFFS_AVAIL(tp) <= (MAX_SKB_FRAGS + 1))
++		netif_stop_queue(dev);
++
++out_unlock:
++	spin_unlock_irqrestore(&tp->tx_lock, flags);
++
++	dev->trans_start = jiffies;
++
++	return 0;
++}
++
++static inline void tg3_set_mtu(struct net_device *dev, struct tg3 *tp,
++			       int new_mtu)
++{
++	dev->mtu = new_mtu;
++
++	if (new_mtu > ETH_DATA_LEN)
++		tp->tg3_flags |= TG3_FLAG_JUMBO_ENABLE;
++	else
++		tp->tg3_flags &= ~TG3_FLAG_JUMBO_ENABLE;
++}
++
++static int tg3_change_mtu(struct net_device *dev, int new_mtu)
++{
++	struct tg3 *tp = netdev_priv(dev);
++
++	if (new_mtu < TG3_MIN_MTU || new_mtu > TG3_MAX_MTU(tp))
++		return -EINVAL;
++
++	if (!netif_running(dev)) {
++		/* We'll just catch it later when the
++		 * device is up'd.
++		 */
++		tg3_set_mtu(dev, tp, new_mtu);
++		return 0;
++	}
++
++	tg3_netif_stop(tp);
++	spin_lock_irq(&tp->lock);
++	spin_lock(&tp->tx_lock);
++
++	tg3_halt(tp);
++
++	tg3_set_mtu(dev, tp, new_mtu);
++
++	tg3_init_hw(tp);
++
++	spin_unlock(&tp->tx_lock);
++	spin_unlock_irq(&tp->lock);
++	tg3_netif_start(tp);
++
++	return 0;
++}
++
++/* Free up pending packets in all rx/tx rings.
++ *
++ * The chip has been shut down and the driver detached from
++ * the networking, so no interrupts or new tx packets will
++ * end up in the driver.  tp->{tx,}lock is not held and we are not
++ * in an interrupt context and thus may sleep.
++ */
++static void tg3_free_rings(struct tg3 *tp)
++{
++	struct ring_info *rxp;
++	int i;
++
++	for (i = 0; i < TG3_RX_RING_SIZE; i++) {
++		rxp = &tp->rx_std_buffers[i];
++
++		if (rxp->skb == NULL)
++			continue;
++		pci_unmap_single(tp->pdev,
++				 pci_unmap_addr(rxp, mapping),
++				 RX_PKT_BUF_SZ - tp->rx_offset,
++				 PCI_DMA_FROMDEVICE);
++		dev_kfree_skb_any(rxp->skb);
++		rxp->skb = NULL;
++	}
++
++	for (i = 0; i < TG3_RX_JUMBO_RING_SIZE; i++) {
++		rxp = &tp->rx_jumbo_buffers[i];
++
++		if (rxp->skb == NULL)
++			continue;
++		pci_unmap_single(tp->pdev,
++				 pci_unmap_addr(rxp, mapping),
++				 RX_JUMBO_PKT_BUF_SZ - tp->rx_offset,
++				 PCI_DMA_FROMDEVICE);
++		dev_kfree_skb_any(rxp->skb);
++		rxp->skb = NULL;
++	}
++
++	for (i = 0; i < TG3_TX_RING_SIZE; ) {
++		struct tx_ring_info *txp;
++		struct sk_buff *skb;
++		int j;
++
++		txp = &tp->tx_buffers[i];
++		skb = txp->skb;
++
++		if (skb == NULL) {
++			i++;
++			continue;
++		}
++
++		pci_unmap_single(tp->pdev,
++				 pci_unmap_addr(txp, mapping),
++				 skb_headlen(skb),
++				 PCI_DMA_TODEVICE);
++		txp->skb = NULL;
++
++		i++;
++
++		for (j = 0; j < skb_shinfo(skb)->nr_frags; j++) {
++			txp = &tp->tx_buffers[i & (TG3_TX_RING_SIZE - 1)];
++			pci_unmap_page(tp->pdev,
++				       pci_unmap_addr(txp, mapping),
++				       skb_shinfo(skb)->frags[j].size,
++				       PCI_DMA_TODEVICE);
++			i++;
++		}
++
++		dev_kfree_skb_any(skb);
++	}
++}
++
++/* Initialize tx/rx rings for packet processing.
++ *
++ * The chip has been shut down and the driver detached from
++ * the networking, so no interrupts or new tx packets will
++ * end up in the driver.  tp->{tx,}lock are held and thus
++ * we may not sleep.
++ */
++static void tg3_init_rings(struct tg3 *tp)
++{
++	unsigned long start, end;
++	u32 i;
++
++	/* Free up all the SKBs. */
++	tg3_free_rings(tp);
++
++	/* Zero out all descriptors. */
++	memset(tp->rx_std, 0, TG3_RX_RING_BYTES);
++	memset(tp->rx_jumbo, 0, TG3_RX_JUMBO_RING_BYTES);
++	memset(tp->rx_rcb, 0, TG3_RX_RCB_RING_BYTES(tp));
++
++	if (tp->tg3_flags & TG3_FLAG_HOST_TXDS) {
++		memset(tp->tx_ring, 0, TG3_TX_RING_BYTES);
++	} else {
++		start = (tp->regs +
++			 NIC_SRAM_WIN_BASE +
++			 NIC_SRAM_TX_BUFFER_DESC);
++		end = start + TG3_TX_RING_BYTES;
++		while (start < end) {
++			writel(0, start);
++			start += 4;
++		}
++		for (i = 0; i < TG3_TX_RING_SIZE; i++)
++			tp->tx_buffers[i].prev_vlan_tag = 0;
++	}
++
++	/* Initialize invariants of the rings, we only set this
++	 * stuff once.  This works because the card does not
++	 * write into the rx buffer posting rings.
++	 */
++	for (i = 0; i < TG3_RX_RING_SIZE; i++) {
++		struct tg3_rx_buffer_desc *rxd;
++
++		rxd = &tp->rx_std[i];
++		rxd->idx_len = (RX_PKT_BUF_SZ - tp->rx_offset - 64)
++			<< RXD_LEN_SHIFT;
++		rxd->type_flags = (RXD_FLAG_END << RXD_FLAGS_SHIFT);
++		rxd->opaque = (RXD_OPAQUE_RING_STD |
++			       (i << RXD_OPAQUE_INDEX_SHIFT));
++	}
++
++	if (tp->tg3_flags & TG3_FLAG_JUMBO_ENABLE) {
++		for (i = 0; i < TG3_RX_JUMBO_RING_SIZE; i++) {
++			struct tg3_rx_buffer_desc *rxd;
++
++			rxd = &tp->rx_jumbo[i];
++			rxd->idx_len = (RX_JUMBO_PKT_BUF_SZ - tp->rx_offset - 64)
++				<< RXD_LEN_SHIFT;
++			rxd->type_flags = (RXD_FLAG_END << RXD_FLAGS_SHIFT) |
++				RXD_FLAG_JUMBO;
++			rxd->opaque = (RXD_OPAQUE_RING_JUMBO |
++			       (i << RXD_OPAQUE_INDEX_SHIFT));
++		}
++	}
++
++	/* Now allocate fresh SKBs for each rx ring. */
++	for (i = 0; i < tp->rx_pending; i++) {
++		if (tg3_alloc_rx_skb(tp, RXD_OPAQUE_RING_STD,
++				     -1, i) < 0)
++			break;
++	}
++
++	if (tp->tg3_flags & TG3_FLAG_JUMBO_ENABLE) {
++		for (i = 0; i < tp->rx_jumbo_pending; i++) {
++			if (tg3_alloc_rx_skb(tp, RXD_OPAQUE_RING_JUMBO,
++					     -1, i) < 0)
++				break;
++		}
++	}
++}
++
++/*
++ * Must not be invoked with interrupt sources disabled and
++ * the hardware shutdown down.
++ */
++static void tg3_free_consistent(struct tg3 *tp)
++{
++	if (tp->rx_std_buffers) {
++		kfree(tp->rx_std_buffers);
++		tp->rx_std_buffers = NULL;
++	}
++	if (tp->rx_std) {
++		pci_free_consistent(tp->pdev, TG3_RX_RING_BYTES,
++				    tp->rx_std, tp->rx_std_mapping);
++		tp->rx_std = NULL;
++	}
++	if (tp->rx_jumbo) {
++		pci_free_consistent(tp->pdev, TG3_RX_JUMBO_RING_BYTES,
++				    tp->rx_jumbo, tp->rx_jumbo_mapping);
++		tp->rx_jumbo = NULL;
++	}
++	if (tp->rx_rcb) {
++		pci_free_consistent(tp->pdev, TG3_RX_RCB_RING_BYTES(tp),
++				    tp->rx_rcb, tp->rx_rcb_mapping);
++		tp->rx_rcb = NULL;
++	}
++	if (tp->tx_ring) {
++		pci_free_consistent(tp->pdev, TG3_TX_RING_BYTES,
++			tp->tx_ring, tp->tx_desc_mapping);
++		tp->tx_ring = NULL;
++	}
++	if (tp->hw_status) {
++		pci_free_consistent(tp->pdev, TG3_HW_STATUS_SIZE,
++				    tp->hw_status, tp->status_mapping);
++		tp->hw_status = NULL;
++	}
++	if (tp->hw_stats) {
++		pci_free_consistent(tp->pdev, sizeof(struct tg3_hw_stats),
++				    tp->hw_stats, tp->stats_mapping);
++		tp->hw_stats = NULL;
++	}
++}
++
++/*
++ * Must not be invoked with interrupt sources disabled and
++ * the hardware shutdown down.  Can sleep.
++ */
++static int tg3_alloc_consistent(struct tg3 *tp)
++{
++	tp->rx_std_buffers = kmalloc((sizeof(struct ring_info) *
++				      (TG3_RX_RING_SIZE +
++				       TG3_RX_JUMBO_RING_SIZE)) +
++				     (sizeof(struct tx_ring_info) *
++				      TG3_TX_RING_SIZE),
++				     GFP_KERNEL);
++	if (!tp->rx_std_buffers)
++		return -ENOMEM;
++
++	memset(tp->rx_std_buffers, 0,
++	       (sizeof(struct ring_info) *
++		(TG3_RX_RING_SIZE +
++		 TG3_RX_JUMBO_RING_SIZE)) +
++	       (sizeof(struct tx_ring_info) *
++		TG3_TX_RING_SIZE));
++
++	tp->rx_jumbo_buffers = &tp->rx_std_buffers[TG3_RX_RING_SIZE];
++	tp->tx_buffers = (struct tx_ring_info *)
++		&tp->rx_jumbo_buffers[TG3_RX_JUMBO_RING_SIZE];
++
++	tp->rx_std = pci_alloc_consistent(tp->pdev, TG3_RX_RING_BYTES,
++					  &tp->rx_std_mapping);
++	if (!tp->rx_std)
++		goto err_out;
++
++	tp->rx_jumbo = pci_alloc_consistent(tp->pdev, TG3_RX_JUMBO_RING_BYTES,
++					    &tp->rx_jumbo_mapping);
++
++	if (!tp->rx_jumbo)
++		goto err_out;
++
++	tp->rx_rcb = pci_alloc_consistent(tp->pdev, TG3_RX_RCB_RING_BYTES(tp),
++					  &tp->rx_rcb_mapping);
++	if (!tp->rx_rcb)
++		goto err_out;
++
++	if (tp->tg3_flags & TG3_FLAG_HOST_TXDS) {
++		tp->tx_ring = pci_alloc_consistent(tp->pdev, TG3_TX_RING_BYTES,
++						   &tp->tx_desc_mapping);
++		if (!tp->tx_ring)
++			goto err_out;
++	} else {
++		tp->tx_ring = NULL;
++		tp->tx_desc_mapping = 0;
++	}
++
++	tp->hw_status = pci_alloc_consistent(tp->pdev,
++					     TG3_HW_STATUS_SIZE,
++					     &tp->status_mapping);
++	if (!tp->hw_status)
++		goto err_out;
++
++	tp->hw_stats = pci_alloc_consistent(tp->pdev,
++					    sizeof(struct tg3_hw_stats),
++					    &tp->stats_mapping);
++	if (!tp->hw_stats)
++		goto err_out;
++
++	memset(tp->hw_status, 0, TG3_HW_STATUS_SIZE);
++	memset(tp->hw_stats, 0, sizeof(struct tg3_hw_stats));
++
++	return 0;
++
++err_out:
++	tg3_free_consistent(tp);
++	return -ENOMEM;
++}
++
++#define MAX_WAIT_CNT 1000
++
++/* To stop a block, clear the enable bit and poll till it
++ * clears.  tp->lock is held.
++ */
++static int tg3_stop_block(struct tg3 *tp, unsigned long ofs, u32 enable_bit)
++{
++	unsigned int i;
++	u32 val;
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ||
++	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) {
++		switch (ofs) {
++		case RCVLSC_MODE:
++		case DMAC_MODE:
++		case MBFREE_MODE:
++		case BUFMGR_MODE:
++		case MEMARB_MODE:
++			/* We can't enable/disable these bits of the
++			 * 5705/5750, just say success.
++			 */
++			return 0;
++
++		default:
++			break;
++		};
++	}
++
++	val = tr32(ofs);
++	val &= ~enable_bit;
++	tw32_f(ofs, val);
++
++	for (i = 0; i < MAX_WAIT_CNT; i++) {
++		udelay(100);
++		val = tr32(ofs);
++		if ((val & enable_bit) == 0)
++			break;
++	}
++
++	if (i == MAX_WAIT_CNT) {
++		printk(KERN_ERR PFX "tg3_stop_block timed out, "
++		       "ofs=%lx enable_bit=%x\n",
++		       ofs, enable_bit);
++		return -ENODEV;
++	}
++
++	return 0;
++}
++
++/* tp->lock is held. */
++static int tg3_abort_hw(struct tg3 *tp)
++{
++	int i, err;
++
++	tg3_disable_ints(tp);
++
++	tp->rx_mode &= ~RX_MODE_ENABLE;
++	tw32_f(MAC_RX_MODE, tp->rx_mode);
++	udelay(10);
++
++	err  = tg3_stop_block(tp, RCVBDI_MODE, RCVBDI_MODE_ENABLE);
++	err |= tg3_stop_block(tp, RCVLPC_MODE, RCVLPC_MODE_ENABLE);
++	err |= tg3_stop_block(tp, RCVLSC_MODE, RCVLSC_MODE_ENABLE);
++	err |= tg3_stop_block(tp, RCVDBDI_MODE, RCVDBDI_MODE_ENABLE);
++	err |= tg3_stop_block(tp, RCVDCC_MODE, RCVDCC_MODE_ENABLE);
++	err |= tg3_stop_block(tp, RCVCC_MODE, RCVCC_MODE_ENABLE);
++
++	err |= tg3_stop_block(tp, SNDBDS_MODE, SNDBDS_MODE_ENABLE);
++	err |= tg3_stop_block(tp, SNDBDI_MODE, SNDBDI_MODE_ENABLE);
++	err |= tg3_stop_block(tp, SNDDATAI_MODE, SNDDATAI_MODE_ENABLE);
++	err |= tg3_stop_block(tp, RDMAC_MODE, RDMAC_MODE_ENABLE);
++	err |= tg3_stop_block(tp, SNDDATAC_MODE, SNDDATAC_MODE_ENABLE);
++	err |= tg3_stop_block(tp, DMAC_MODE, DMAC_MODE_ENABLE);
++	err |= tg3_stop_block(tp, SNDBDC_MODE, SNDBDC_MODE_ENABLE);
++	if (err)
++		goto out;
++
++	tp->mac_mode &= ~MAC_MODE_TDE_ENABLE;
++	tw32_f(MAC_MODE, tp->mac_mode);
++	udelay(40);
++
++	tp->tx_mode &= ~TX_MODE_ENABLE;
++	tw32_f(MAC_TX_MODE, tp->tx_mode);
++
++	for (i = 0; i < MAX_WAIT_CNT; i++) {
++		udelay(100);
++		if (!(tr32(MAC_TX_MODE) & TX_MODE_ENABLE))
++			break;
++	}
++	if (i >= MAX_WAIT_CNT) {
++		printk(KERN_ERR PFX "tg3_abort_hw timed out for %s, "
++		       "TX_MODE_ENABLE will not clear MAC_TX_MODE=%08x\n",
++		       tp->dev->name, tr32(MAC_TX_MODE));
++		return -ENODEV;
++	}
++
++	err  = tg3_stop_block(tp, HOSTCC_MODE, HOSTCC_MODE_ENABLE);
++	err |= tg3_stop_block(tp, WDMAC_MODE, WDMAC_MODE_ENABLE);
++	err |= tg3_stop_block(tp, MBFREE_MODE, MBFREE_MODE_ENABLE);
++
++	tw32(FTQ_RESET, 0xffffffff);
++	tw32(FTQ_RESET, 0x00000000);
++
++	err |= tg3_stop_block(tp, BUFMGR_MODE, BUFMGR_MODE_ENABLE);
++	err |= tg3_stop_block(tp, MEMARB_MODE, MEMARB_MODE_ENABLE);
++	if (err)
++		goto out;
++
++	if (tp->hw_status)
++		memset(tp->hw_status, 0, TG3_HW_STATUS_SIZE);
++	if (tp->hw_stats)
++		memset(tp->hw_stats, 0, sizeof(struct tg3_hw_stats));
++
++out:
++	return err;
++}
++
++/* tp->lock is held. */
++static int tg3_nvram_lock(struct tg3 *tp)
++{
++	if (tp->tg3_flags & TG3_FLAG_NVRAM) {
++		int i;
++
++		tw32(NVRAM_SWARB, SWARB_REQ_SET1);
++		for (i = 0; i < 8000; i++) {
++			if (tr32(NVRAM_SWARB) & SWARB_GNT1)
++				break;
++			udelay(20);
++		}
++		if (i == 8000)
++			return -ENODEV;
++	}
++	return 0;
++}
++
++/* tp->lock is held. */
++static void tg3_nvram_unlock(struct tg3 *tp)
++{
++	if (tp->tg3_flags & TG3_FLAG_NVRAM)
++		tw32_f(NVRAM_SWARB, SWARB_REQ_CLR1);
++}
++
++/* tp->lock is held. */
++static void tg3_write_sig_pre_reset(struct tg3 *tp, int kind)
++{
++	tg3_write_mem(tp, NIC_SRAM_FIRMWARE_MBOX,
++		      NIC_SRAM_FIRMWARE_MBOX_MAGIC1);
++
++	if (tp->tg3_flags2 & TG3_FLG2_ASF_NEW_HANDSHAKE) {
++		switch (kind) {
++		case RESET_KIND_INIT:
++			tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX,
++				      DRV_STATE_START);
++			break;
++
++		case RESET_KIND_SHUTDOWN:
++			tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX,
++				      DRV_STATE_UNLOAD);
++			break;
++
++		case RESET_KIND_SUSPEND:
++			tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX,
++				      DRV_STATE_SUSPEND);
++			break;
++
++		default:
++			break;
++		};
++	}
++}
++
++/* tp->lock is held. */
++static void tg3_write_sig_post_reset(struct tg3 *tp, int kind)
++{
++	if (tp->tg3_flags2 & TG3_FLG2_ASF_NEW_HANDSHAKE) {
++		switch (kind) {
++		case RESET_KIND_INIT:
++			tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX,
++				      DRV_STATE_START_DONE);
++			break;
++
++		case RESET_KIND_SHUTDOWN:
++			tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX,
++				      DRV_STATE_UNLOAD_DONE);
++			break;
++
++		default:
++			break;
++		};
++	}
++}
++
++/* tp->lock is held. */
++static void tg3_write_sig_legacy(struct tg3 *tp, int kind)
++{
++	if (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) {
++		switch (kind) {
++		case RESET_KIND_INIT:
++			tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX,
++				      DRV_STATE_START);
++			break;
++
++		case RESET_KIND_SHUTDOWN:
++			tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX,
++				      DRV_STATE_UNLOAD);
++			break;
++
++		case RESET_KIND_SUSPEND:
++			tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX,
++				      DRV_STATE_SUSPEND);
++			break;
++
++		default:
++			break;
++		};
++	}
++}
++
++/* tp->lock is held. */
++static int tg3_chip_reset(struct tg3 *tp)
++{
++	u32 val;
++	u32 flags_save;
++	int i;
++
++	if (!(tp->tg3_flags2 & TG3_FLG2_SUN_5704))
++		tg3_nvram_lock(tp);
++
++	/*
++	 * We must avoid the readl() that normally takes place.
++	 * It locks machines, causes machine checks, and other
++	 * fun things.  So, temporarily disable the 5701
++	 * hardware workaround, while we do the reset.
++	 */
++	flags_save = tp->tg3_flags;
++	tp->tg3_flags &= ~TG3_FLAG_5701_REG_WRITE_BUG;
++
++	/* do the reset */
++	val = GRC_MISC_CFG_CORECLK_RESET;
++
++	if (tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) {
++		if (tr32(0x7e2c) == 0x60) {
++			tw32(0x7e2c, 0x20);
++		}
++		if (tp->pci_chip_rev_id != CHIPREV_ID_5750_A0) {
++			tw32(GRC_MISC_CFG, (1 << 29));
++			val |= (1 << 29);
++		}
++	}
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ||
++	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750)
++		val |= GRC_MISC_CFG_KEEP_GPHY_POWER;
++	tw32(GRC_MISC_CFG, val);
++
++	/* restore 5701 hardware bug workaround flag */
++	tp->tg3_flags = flags_save;
++
++	/* Unfortunately, we have to delay before the PCI read back.
++	 * Some 575X chips even will not respond to a PCI cfg access
++	 * when the reset command is given to the chip.
++	 *
++	 * How do these hardware designers expect things to work
++	 * properly if the PCI write is posted for a long period
++	 * of time?  It is always necessary to have some method by
++	 * which a register read back can occur to push the write
++	 * out which does the reset.
++	 *
++	 * For most tg3 variants the trick below was working.
++	 * Ho hum...
++	 */
++	udelay(120);
++
++	/* Flush PCI posted writes.  The normal MMIO registers
++	 * are inaccessible at this time so this is the only
++	 * way to make this reliably (actually, this is no longer
++	 * the case, see above).  I tried to use indirect
++	 * register read/write but this upset some 5701 variants.
++	 */
++	pci_read_config_dword(tp->pdev, PCI_COMMAND, &val);
++
++	udelay(120);
++
++	if (tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) {
++		if (tp->pci_chip_rev_id == CHIPREV_ID_5750_A0) {
++			int i;
++			u32 cfg_val;
++
++			/* Wait for link training to complete.  */
++			for (i = 0; i < 5000; i++)
++				udelay(100);
++
++			pci_read_config_dword(tp->pdev, 0xc4, &cfg_val);
++			pci_write_config_dword(tp->pdev, 0xc4,
++					       cfg_val | (1 << 15));
++		}
++		/* Set PCIE max payload size and clear error status.  */
++		pci_write_config_dword(tp->pdev, 0xd8, 0xf5000);
++	}
++
++	/* Re-enable indirect register accesses. */
++	pci_write_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL,
++			       tp->misc_host_ctrl);
++
++	/* Set MAX PCI retry to zero. */
++	val = (PCISTATE_ROM_ENABLE | PCISTATE_ROM_RETRY_ENABLE);
++	if (tp->pci_chip_rev_id == CHIPREV_ID_5704_A0 &&
++	    (tp->tg3_flags & TG3_FLAG_PCIX_MODE))
++		val |= PCISTATE_RETRY_SAME_DMA;
++	pci_write_config_dword(tp->pdev, TG3PCI_PCISTATE, val);
++
++	pci_restore_state(tp->pdev, tp->pci_cfg_state);
++
++	/* Make sure PCI-X relaxed ordering bit is clear. */
++	pci_read_config_dword(tp->pdev, TG3PCI_X_CAPS, &val);
++	val &= ~PCIX_CAPS_RELAXED_ORDERING;
++	pci_write_config_dword(tp->pdev, TG3PCI_X_CAPS, val);
++
++	tw32(MEMARB_MODE, MEMARB_MODE_ENABLE);
++
++	tw32(GRC_MODE, tp->grc_mode);
++
++	if (tp->pci_chip_rev_id == CHIPREV_ID_5705_A0) {
++		u32 val = tr32(0xc4);
++
++		tw32(0xc4, val | (1 << 15));
++	}
++
++	if ((tp->nic_sram_data_cfg & NIC_SRAM_DATA_CFG_MINI_PCI) != 0 &&
++	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) {
++		tp->pci_clock_ctrl |= CLOCK_CTRL_CLKRUN_OENABLE;
++		if (tp->pci_chip_rev_id == CHIPREV_ID_5705_A0)
++			tp->pci_clock_ctrl |= CLOCK_CTRL_FORCE_CLKRUN;
++		tw32(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl);
++	}
++
++	if (tp->phy_id == PHY_ID_SERDES) {
++		tp->mac_mode = MAC_MODE_PORT_MODE_TBI;
++		tw32_f(MAC_MODE, tp->mac_mode);
++	} else
++		tw32_f(MAC_MODE, 0);
++	udelay(40);
++
++	/* Wait for firmware initialization to complete. */
++	for (i = 0; i < 100000; i++) {
++		tg3_read_mem(tp, NIC_SRAM_FIRMWARE_MBOX, &val);
++		if (val == ~NIC_SRAM_FIRMWARE_MBOX_MAGIC1)
++			break;
++		udelay(10);
++	}
++	if (i >= 100000 &&
++	    !(tp->tg3_flags2 & TG3_FLG2_SUN_5704)) {
++		printk(KERN_ERR PFX "tg3_reset_hw timed out for %s, "
++		       "firmware will not restart magic=%08x\n",
++		       tp->dev->name, val);
++		return -ENODEV;
++	}
++
++	if ((tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) &&
++	    tp->pci_chip_rev_id != CHIPREV_ID_5750_A0) {
++		u32 val = tr32(0x7c00);
++
++		tw32(0x7c00, val | (1 << 25));
++	}
++
++	/* Reprobe ASF enable state.  */
++	tp->tg3_flags &= ~TG3_FLAG_ENABLE_ASF;
++	tp->tg3_flags2 &= ~TG3_FLG2_ASF_NEW_HANDSHAKE;
++	tg3_read_mem(tp, NIC_SRAM_DATA_SIG, &val);
++	if (val == NIC_SRAM_DATA_SIG_MAGIC) {
++		u32 nic_cfg;
++
++		tg3_read_mem(tp, NIC_SRAM_DATA_CFG, &nic_cfg);
++		if (nic_cfg & NIC_SRAM_DATA_CFG_ASF_ENABLE) {
++			tp->tg3_flags |= TG3_FLAG_ENABLE_ASF;
++			if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750)
++				tp->tg3_flags2 |= TG3_FLG2_ASF_NEW_HANDSHAKE;
++		}
++	}
++
++	return 0;
++}
++
++/* tp->lock is held. */
++static void tg3_stop_fw(struct tg3 *tp)
++{
++	if (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) {
++		u32 val;
++		int i;
++
++		tg3_write_mem(tp, NIC_SRAM_FW_CMD_MBOX, FWCMD_NICDRV_PAUSE_FW);
++		val = tr32(GRC_RX_CPU_EVENT);
++		val |= (1 << 14);
++		tw32(GRC_RX_CPU_EVENT, val);
++
++		/* Wait for RX cpu to ACK the event.  */
++		for (i = 0; i < 100; i++) {
++			if (!(tr32(GRC_RX_CPU_EVENT) & (1 << 14)))
++				break;
++			udelay(1);
++		}
++	}
++}
++
++/* tp->lock is held. */
++static int tg3_halt(struct tg3 *tp)
++{
++	int err;
++
++	tg3_stop_fw(tp);
++
++	tg3_write_sig_pre_reset(tp, RESET_KIND_SHUTDOWN);
++
++	tg3_abort_hw(tp);
++	err = tg3_chip_reset(tp);
++
++	tg3_write_sig_legacy(tp, RESET_KIND_SHUTDOWN);
++	tg3_write_sig_post_reset(tp, RESET_KIND_SHUTDOWN);
++
++	if (err)
++		return err;
++
++	return 0;
++}
++
++#define RX_CPU_SCRATCH_BASE	0x30000
++#define RX_CPU_SCRATCH_SIZE	0x04000
++#define TX_CPU_SCRATCH_BASE	0x34000
++#define TX_CPU_SCRATCH_SIZE	0x04000
++
++/* tp->lock is held. */
++static int tg3_halt_cpu(struct tg3 *tp, u32 offset)
++{
++	int i;
++
++	if (offset == TX_CPU_BASE &&
++	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705)
++		BUG();
++
++	if (offset == RX_CPU_BASE) {
++		for (i = 0; i < 10000; i++) {
++			tw32(offset + CPU_STATE, 0xffffffff);
++			tw32(offset + CPU_MODE,  CPU_MODE_HALT);
++			if (tr32(offset + CPU_MODE) & CPU_MODE_HALT)
++				break;
++		}
++
++		tw32(offset + CPU_STATE, 0xffffffff);
++		tw32_f(offset + CPU_MODE,  CPU_MODE_HALT);
++		udelay(10);
++	} else {
++		for (i = 0; i < 10000; i++) {
++			tw32(offset + CPU_STATE, 0xffffffff);
++			tw32(offset + CPU_MODE,  CPU_MODE_HALT);
++			if (tr32(offset + CPU_MODE) & CPU_MODE_HALT)
++				break;
++		}
++	}
++
++	if (i >= 10000) {
++		printk(KERN_ERR PFX "tg3_reset_cpu timed out for %s, "
++		       "and %s CPU\n",
++		       tp->dev->name,
++		       (offset == RX_CPU_BASE ? "RX" : "TX"));
++		return -ENODEV;
++	}
++	return 0;
++}
++
++struct fw_info {
++	unsigned int text_base;
++	unsigned int text_len;
++	u32 *text_data;
++	unsigned int rodata_base;
++	unsigned int rodata_len;
++	u32 *rodata_data;
++	unsigned int data_base;
++	unsigned int data_len;
++	u32 *data_data;
++	unsigned int sbss_len;
++	unsigned int bss_len;
++};
++
++/* We are forced to store these firmware bits in memory for the duration
++ * of the module load, because they are loaded to hardware in a context
++ * where it is unsafe to sleep, and fixing this would require a lot of
++ * code refactoring.  :-P  However, they're only filled if the hardware
++ * needs them; otherwise they are NULL and do not need to be dealt with.
++ */
++
++static struct fw_info *tg3_fw_5701_a0;
++
++#if TG3_TSO_SUPPORT != 0
++static struct fw_info *tg3_fw_tso;
++static struct fw_info *tg3_fw_tso5;
++#endif /* TG3_TSO_SUPPORT */
++
++/* Wipe out one fw_info structure; it must be fully allocated */
++static void tg3_release_firmware(struct fw_info **info_ptr) {
++	struct fw_info *info = *info_ptr;
++	if (!info)
++		return;
++	kfree(info->data_data);
++	kfree(info->rodata_data);
++	kfree(info->text_data);
++	kfree(info);
++	*info_ptr = NULL;
++}
++
++/* Allocate and fill 'info' from a file in userspace.
++ * This *must* be called in user context where sleeping is allowed.
++ * We require the firmware file to be in a certain binary format:
++ * little-endian (so that it's platform-independent -- heh)
++ * struct fw_info fields in this order:
++ * text_base, text_len, rodata_base, rodata_len, data_base, data_len
++ * ('unsigned int' fields as 32-bit integers)
++ * text_data, rodata_data, data_data
++ * ('u32*' fields as a whole bunch of 32-bit integers)
++ */
++static int __devinit tg3_request_firmware(struct fw_info **info_ptr,
++					  const char *filename,
++					  const struct tg3 *tp)
++{
++	int err, i;
++	int text_zero, rodata_zero, data_zero;
++	const struct firmware *fw_entry;
++	struct fw_info *info;
++	u32 *data;
++	unsigned int len;
++
++	if (*info_ptr)
++		return 0;
++
++	err = request_firmware(&fw_entry, filename, &tp->pdev->dev);
++	if (err) {
++		printk(KERN_WARNING PFX "tg3_request_firmware (%s): "
++		       "Couldn't get firmware \"%s\".\n",
++		       tp->dev->name, filename);
++		goto cleanup_out;
++	}
++
++	len = fw_entry->size;
++	if (len < 44) {
++		printk(KERN_WARNING PFX "tg3_request_firmware (%s): "
++		       "Firmware \"%s\" is too short.\n",
++		       tp->dev->name, filename);
++		err = -EINVAL;
++		goto cleanup_firmware;
++	}
++	len -= 44;
++
++	info = kmalloc(sizeof(*info), GFP_KERNEL);
++	if (!info) {
++		err = -ENOMEM;
++		goto cleanup_firmware;
++	}
++
++	data = (u32 *)fw_entry->data;
++
++	info->text_base = le32_to_cpu(data[0]);
++	info->text_len = le32_to_cpu(data[1]);
++	text_zero = data[2];
++
++	info->rodata_base = le32_to_cpu(data[3]);
++	info->rodata_len = le32_to_cpu(data[4]);
++	rodata_zero = data[5];
++
++	info->data_base = le32_to_cpu(data[6]);
++	info->data_len = le32_to_cpu(data[7]);
++	data_zero = data[8];
++
++	info->sbss_len = le32_to_cpu(data[9]);
++	info->bss_len = le32_to_cpu(data[10]);
++
++	data += 11;
++
++	if (len != (!text_zero ? info->text_len : 0) +
++		   (!rodata_zero ? info->rodata_len : 0) +
++		   (!data_zero ? info->data_len : 0)) {
++		printk(KERN_WARNING PFX "tg3_request_firmware (%s): "
++		       "Firmware \"%s\" length doesn't add up.\n",
++		       tp->dev->name, filename);
++		err = -EINVAL;
++		goto cleanup_info;
++	}
++
++	info->text_data = NULL;
++	if (!text_zero) {
++		info->text_data = kmalloc(info->text_len, GFP_KERNEL);
++		if (info->text_data == NULL) {
++			err = -ENOMEM;
++			goto cleanup_info;
++		}
++		for (i = 0; i < info->text_len / 4; i++)
++			info->text_data[i] = le32_to_cpu(*data++);
++	}
++
++	info->rodata_data = NULL;
++	if (!rodata_zero) {
++		info->rodata_data = kmalloc(info->rodata_len, GFP_KERNEL);
++		if (info->rodata_data == NULL) {
++			err = -ENOMEM;
++			goto cleanup_text;
++		}
++		for (i = 0; i < info->rodata_len / 4; i++)
++			info->rodata_data[i] = le32_to_cpu(*data++);
++	}
++
++	info->data_data = NULL;
++	if (!data_zero) {
++		info->data_data = kmalloc(info->data_len, GFP_KERNEL);
++		if (info->data_data == NULL) {
++			err = -ENOMEM;
++			goto cleanup_rodata;
++		}
++		for (i = 0; i < info->data_len / 4; i++)
++			info->data_data[i] = le32_to_cpu(*data++);
++	}
++
++	*info_ptr = info;
++	err = 0;
++
++cleanup_firmware:
++	release_firmware(fw_entry);
++cleanup_out:
++	return err;
++
++cleanup_rodata:
++	kfree(info->rodata_data);
++cleanup_text:
++	kfree(info->text_data);
++cleanup_info:
++	kfree(info);
++	goto cleanup_firmware;
++}
++
++/* tp->lock is held. */
++static int tg3_load_firmware_cpu(struct tg3 *tp, u32 cpu_base, u32 cpu_scratch_base,
++				 int cpu_scratch_size, struct fw_info *info)
++{
++	int err, i;
++	u32 orig_tg3_flags = tp->tg3_flags;
++	void (*write_op)(struct tg3 *, u32, u32);
++
++	if (cpu_base == TX_CPU_BASE &&
++	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) {
++		printk(KERN_ERR PFX "tg3_load_firmware_cpu: Trying to load "
++		       "TX cpu firmware on %s which is 5705.\n",
++		       tp->dev->name);
++		return -EINVAL;
++	}
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705)
++		write_op = tg3_write_mem;
++	else
++		write_op = tg3_write_indirect_reg32;
++
++	/* Force use of PCI config space for indirect register
++	 * write calls.
++	 */
++	tp->tg3_flags |= TG3_FLAG_PCIX_TARGET_HWBUG;
++
++	err = tg3_halt_cpu(tp, cpu_base);
++	if (err)
++		goto out;
++
++	for (i = 0; i < cpu_scratch_size; i += sizeof(u32))
++		write_op(tp, cpu_scratch_base + i, 0);
++	tw32(cpu_base + CPU_STATE, 0xffffffff);
++	tw32(cpu_base + CPU_MODE, tr32(cpu_base+CPU_MODE)|CPU_MODE_HALT);
++	for (i = 0; i < (info->text_len / sizeof(u32)); i++)
++		write_op(tp, (cpu_scratch_base +
++			      (info->text_base & 0xffff) +
++			      (i * sizeof(u32))),
++			 (info->text_data ?
++			  info->text_data[i] : 0));
++	for (i = 0; i < (info->rodata_len / sizeof(u32)); i++)
++		write_op(tp, (cpu_scratch_base +
++			      (info->rodata_base & 0xffff) +
++			      (i * sizeof(u32))),
++			 (info->rodata_data ?
++			  info->rodata_data[i] : 0));
++	for (i = 0; i < (info->data_len / sizeof(u32)); i++)
++		write_op(tp, (cpu_scratch_base +
++			      (info->data_base & 0xffff) +
++			      (i * sizeof(u32))),
++			 (info->data_data ?
++			  info->data_data[i] : 0));
++
++	err = 0;
++
++out:
++	tp->tg3_flags = orig_tg3_flags;
++	return err;
++}
++
++/* tp->lock is held. */
++static int tg3_load_5701_a0_firmware_fix(struct tg3 *tp)
++{
++	int err, i;
++
++	err = tg3_load_firmware_cpu(tp, RX_CPU_BASE,
++				    RX_CPU_SCRATCH_BASE, RX_CPU_SCRATCH_SIZE,
++				    tg3_fw_5701_a0);
++	if (err)
++		return err;
++
++	err = tg3_load_firmware_cpu(tp, TX_CPU_BASE,
++				    TX_CPU_SCRATCH_BASE, TX_CPU_SCRATCH_SIZE,
++				    tg3_fw_5701_a0);
++	if (err)
++		return err;
++
++	/* Now startup only the RX cpu. */
++	tw32(RX_CPU_BASE + CPU_STATE, 0xffffffff);
++	tw32_f(RX_CPU_BASE + CPU_PC, tg3_fw_5701_a0->text_base);
++
++	for (i = 0; i < 5; i++) {
++		if (tr32(RX_CPU_BASE + CPU_PC) == tg3_fw_5701_a0->text_base)
++			break;
++		tw32(RX_CPU_BASE + CPU_STATE, 0xffffffff);
++		tw32(RX_CPU_BASE + CPU_MODE,  CPU_MODE_HALT);
++		tw32_f(RX_CPU_BASE + CPU_PC,  tg3_fw_5701_a0->text_base);
++		udelay(1000);
++	}
++	if (i >= 5) {
++		printk(KERN_ERR PFX "tg3_load_firmware fails for %s "
++		       "to set RX CPU PC, is %08x should be %08x\n",
++		       tp->dev->name, tr32(RX_CPU_BASE + CPU_PC),
++		       tg3_fw_5701_a0->text_base);
++		return -ENODEV;
++	}
++	tw32(RX_CPU_BASE + CPU_STATE, 0xffffffff);
++	tw32_f(RX_CPU_BASE + CPU_MODE,  0x00000000);
++
++	return 0;
++}
++
++#if TG3_TSO_SUPPORT != 0
++
++/* tp->lock is held. */
++static int tg3_load_tso_firmware(struct tg3 *tp)
++{
++	struct fw_info *info;
++	unsigned long cpu_base, cpu_scratch_base, cpu_scratch_size;
++	int err, i;
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750)
++		return 0;
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) {
++		info = tg3_fw_tso5;
++		cpu_base = RX_CPU_BASE;
++		cpu_scratch_base = NIC_SRAM_MBUF_POOL_BASE5705;
++		cpu_scratch_size = (info->text_len +
++				    info->rodata_len +
++				    info->data_len +
++				    info->sbss_len +
++				    info->bss_len);
++	} else {
++		info = tg3_fw_tso;
++		cpu_base = TX_CPU_BASE;
++		cpu_scratch_base = TX_CPU_SCRATCH_BASE;
++		cpu_scratch_size = TX_CPU_SCRATCH_SIZE;
++	}
++
++	err = tg3_load_firmware_cpu(tp, cpu_base,
++				    cpu_scratch_base, cpu_scratch_size,
++				    info);
++	if (err)
++		return err;
++
++	/* Now startup the cpu. */
++	tw32(cpu_base + CPU_STATE, 0xffffffff);
++	tw32_f(cpu_base + CPU_PC,  info->text_base);
++
++	for (i = 0; i < 5; i++) {
++		if (tr32(cpu_base + CPU_PC) == info->text_base)
++			break;
++		tw32(cpu_base + CPU_STATE, 0xffffffff);
++		tw32(cpu_base + CPU_MODE,  CPU_MODE_HALT);
++		tw32_f(cpu_base + CPU_PC,  info->text_base);
++		udelay(1000);
++	}
++	if (i >= 5) {
++		printk(KERN_ERR PFX "tg3_load_tso_firmware fails for %s "
++		       "to set CPU PC, is %08x should be %08x\n",
++		       tp->dev->name, tr32(cpu_base + CPU_PC),
++		       info->text_base);
++		return -ENODEV;
++	}
++	tw32(cpu_base + CPU_STATE, 0xffffffff);
++	tw32_f(cpu_base + CPU_MODE,  0x00000000);
++	return 0;
++}
++
++#endif /* TG3_TSO_SUPPORT != 0 */
++
++/* tp->lock is held. */
++static void __tg3_set_mac_addr(struct tg3 *tp)
++{
++	u32 addr_high, addr_low;
++	int i;
++
++	addr_high = ((tp->dev->dev_addr[0] << 8) |
++		     tp->dev->dev_addr[1]);
++	addr_low = ((tp->dev->dev_addr[2] << 24) |
++		    (tp->dev->dev_addr[3] << 16) |
++		    (tp->dev->dev_addr[4] <<  8) |
++		    (tp->dev->dev_addr[5] <<  0));
++	for (i = 0; i < 4; i++) {
++		tw32(MAC_ADDR_0_HIGH + (i * 8), addr_high);
++		tw32(MAC_ADDR_0_LOW + (i * 8), addr_low);
++	}
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700 &&
++	    GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5701 &&
++	    GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) {
++		for (i = 0; i < 12; i++) {
++			tw32(MAC_EXTADDR_0_HIGH + (i * 8), addr_high);
++			tw32(MAC_EXTADDR_0_LOW + (i * 8), addr_low);
++		}
++	}
++
++	addr_high = (tp->dev->dev_addr[0] +
++		     tp->dev->dev_addr[1] +
++		     tp->dev->dev_addr[2] +
++		     tp->dev->dev_addr[3] +
++		     tp->dev->dev_addr[4] +
++		     tp->dev->dev_addr[5]) &
++		TX_BACKOFF_SEED_MASK;
++	tw32(MAC_TX_BACKOFF_SEED, addr_high);
++}
++
++static int tg3_set_mac_addr(struct net_device *dev, void *p)
++{
++	struct tg3 *tp = netdev_priv(dev);
++	struct sockaddr *addr = p;
++
++	memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
++
++	spin_lock_irq(&tp->lock);
++	__tg3_set_mac_addr(tp);
++	spin_unlock_irq(&tp->lock);
++
++	return 0;
++}
++
++/* tp->lock is held. */
++static void tg3_set_bdinfo(struct tg3 *tp, u32 bdinfo_addr,
++			   dma_addr_t mapping, u32 maxlen_flags,
++			   u32 nic_addr)
++{
++	tg3_write_mem(tp,
++		      (bdinfo_addr + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_HIGH),
++		      ((u64) mapping >> 32));
++	tg3_write_mem(tp,
++		      (bdinfo_addr + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW),
++		      ((u64) mapping & 0xffffffff));
++	tg3_write_mem(tp,
++		      (bdinfo_addr + TG3_BDINFO_MAXLEN_FLAGS),
++		       maxlen_flags);
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705)
++		tg3_write_mem(tp,
++			      (bdinfo_addr + TG3_BDINFO_NIC_ADDR),
++			      nic_addr);
++}
++
++static void __tg3_set_rx_mode(struct net_device *);
++
++/* tp->lock is held. */
++static int tg3_reset_hw(struct tg3 *tp)
++{
++	u32 val, rdmac_mode;
++	int i, err, limit;
++
++	tg3_disable_ints(tp);
++
++	tg3_stop_fw(tp);
++
++	tg3_write_sig_pre_reset(tp, RESET_KIND_INIT);
++
++	if (tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) {
++		err = tg3_abort_hw(tp);
++		if (err)
++			return err;
++	}
++
++	err = tg3_chip_reset(tp);
++	if (err)
++		return err;
++
++	tg3_write_sig_legacy(tp, RESET_KIND_INIT);
++
++	/* This works around an issue with Athlon chipsets on
++	 * B3 tigon3 silicon.  This bit has no effect on any
++	 * other revision.  But do not set this on PCI Express
++	 * chips.
++	 */
++	if (!(tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS))
++		tp->pci_clock_ctrl |= CLOCK_CTRL_DELAY_PCI_GRANT;
++	tw32_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl);
++
++	if (tp->pci_chip_rev_id == CHIPREV_ID_5704_A0 &&
++	    (tp->tg3_flags & TG3_FLAG_PCIX_MODE)) {
++		val = tr32(TG3PCI_PCISTATE);
++		val |= PCISTATE_RETRY_SAME_DMA;
++		tw32(TG3PCI_PCISTATE, val);
++	}
++
++	if (GET_CHIP_REV(tp->pci_chip_rev_id) == CHIPREV_5704_BX) {
++		/* Enable some hw fixes.  */
++		val = tr32(TG3PCI_MSI_DATA);
++		val |= (1 << 26) | (1 << 28) | (1 << 29);
++		tw32(TG3PCI_MSI_DATA, val);
++	}
++
++	/* Descriptor ring init may make accesses to the
++	 * NIC SRAM area to setup the TX descriptors, so we
++	 * can only do this after the hardware has been
++	 * successfully reset.
++	 */
++	tg3_init_rings(tp);
++
++	/* This value is determined during the probe time DMA
++	 * engine test, tg3_test_dma.
++	 */
++	tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl);
++
++	tp->grc_mode &= ~(GRC_MODE_HOST_SENDBDS |
++			  GRC_MODE_4X_NIC_SEND_RINGS |
++			  GRC_MODE_NO_TX_PHDR_CSUM |
++			  GRC_MODE_NO_RX_PHDR_CSUM);
++	if (tp->tg3_flags & TG3_FLAG_HOST_TXDS)
++		tp->grc_mode |= GRC_MODE_HOST_SENDBDS;
++	else
++		tp->grc_mode |= GRC_MODE_4X_NIC_SEND_RINGS;
++	if (tp->tg3_flags & TG3_FLAG_NO_TX_PSEUDO_CSUM)
++		tp->grc_mode |= GRC_MODE_NO_TX_PHDR_CSUM;
++	if (tp->tg3_flags & TG3_FLAG_NO_RX_PSEUDO_CSUM)
++		tp->grc_mode |= GRC_MODE_NO_RX_PHDR_CSUM;
++
++	tw32(GRC_MODE,
++	     tp->grc_mode |
++	     (GRC_MODE_IRQ_ON_MAC_ATTN | GRC_MODE_HOST_STACKUP));
++
++	/* Setup the timer prescalar register.  Clock is always 66Mhz. */
++	val = tr32(GRC_MISC_CFG);
++	val &= ~0xff;
++	val |= (65 << GRC_MISC_CFG_PRESCALAR_SHIFT);
++	tw32(GRC_MISC_CFG, val);
++
++	/* Initialize MBUF/DESC pool. */
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) {
++		/* Do nothing.  */
++	} else if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) {
++		tw32(BUFMGR_MB_POOL_ADDR, NIC_SRAM_MBUF_POOL_BASE);
++		if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704)
++			tw32(BUFMGR_MB_POOL_SIZE, NIC_SRAM_MBUF_POOL_SIZE64);
++		else
++			tw32(BUFMGR_MB_POOL_SIZE, NIC_SRAM_MBUF_POOL_SIZE96);
++		tw32(BUFMGR_DMA_DESC_POOL_ADDR, NIC_SRAM_DMA_DESC_POOL_BASE);
++		tw32(BUFMGR_DMA_DESC_POOL_SIZE, NIC_SRAM_DMA_DESC_POOL_SIZE);
++	}
++#if TG3_TSO_SUPPORT != 0
++	else if (tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE) {
++		int fw_len;
++
++		fw_len = (tg3_fw_tso5->text_len +
++			  tg3_fw_tso5->rodata_len +
++			  tg3_fw_tso5->data_len +
++			  tg3_fw_tso5->sbss_len +
++			  tg3_fw_tso5->bss_len);
++		fw_len = (fw_len + (0x80 - 1)) & ~(0x80 - 1);
++		tw32(BUFMGR_MB_POOL_ADDR,
++		     NIC_SRAM_MBUF_POOL_BASE5705 + fw_len);
++		tw32(BUFMGR_MB_POOL_SIZE,
++		     NIC_SRAM_MBUF_POOL_SIZE5705 - fw_len - 0xa00);
++	}
++#endif
++
++	if (!(tp->tg3_flags & TG3_FLAG_JUMBO_ENABLE)) {
++		tw32(BUFMGR_MB_RDMA_LOW_WATER,
++		     tp->bufmgr_config.mbuf_read_dma_low_water);
++		tw32(BUFMGR_MB_MACRX_LOW_WATER,
++		     tp->bufmgr_config.mbuf_mac_rx_low_water);
++		tw32(BUFMGR_MB_HIGH_WATER,
++		     tp->bufmgr_config.mbuf_high_water);
++	} else {
++		tw32(BUFMGR_MB_RDMA_LOW_WATER,
++		     tp->bufmgr_config.mbuf_read_dma_low_water_jumbo);
++		tw32(BUFMGR_MB_MACRX_LOW_WATER,
++		     tp->bufmgr_config.mbuf_mac_rx_low_water_jumbo);
++		tw32(BUFMGR_MB_HIGH_WATER,
++		     tp->bufmgr_config.mbuf_high_water_jumbo);
++	}
++	tw32(BUFMGR_DMA_LOW_WATER,
++	     tp->bufmgr_config.dma_low_water);
++	tw32(BUFMGR_DMA_HIGH_WATER,
++	     tp->bufmgr_config.dma_high_water);
++
++	tw32(BUFMGR_MODE, BUFMGR_MODE_ENABLE | BUFMGR_MODE_ATTN_ENABLE);
++	for (i = 0; i < 2000; i++) {
++		if (tr32(BUFMGR_MODE) & BUFMGR_MODE_ENABLE)
++			break;
++		udelay(10);
++	}
++	if (i >= 2000) {
++		printk(KERN_ERR PFX "tg3_reset_hw cannot enable BUFMGR for %s.\n",
++		       tp->dev->name);
++		return -ENODEV;
++	}
++
++	/* Setup replenish threshold. */
++	tw32(RCVBDI_STD_THRESH, tp->rx_pending / 8);
++
++	/* Initialize TG3_BDINFO's at:
++	 *  RCVDBDI_STD_BD:	standard eth size rx ring
++	 *  RCVDBDI_JUMBO_BD:	jumbo frame rx ring
++	 *  RCVDBDI_MINI_BD:	small frame rx ring (??? does not work)
++	 *
++	 * like so:
++	 *  TG3_BDINFO_HOST_ADDR:	high/low parts of DMA address of ring
++	 *  TG3_BDINFO_MAXLEN_FLAGS:	(rx max buffer size << 16) |
++	 *                              ring attribute flags
++	 *  TG3_BDINFO_NIC_ADDR:	location of descriptors in nic SRAM
++	 *
++	 * Standard receive ring @ NIC_SRAM_RX_BUFFER_DESC, 512 entries.
++	 * Jumbo receive ring @ NIC_SRAM_RX_JUMBO_BUFFER_DESC, 256 entries.
++	 *
++	 * The size of each ring is fixed in the firmware, but the location is
++	 * configurable.
++	 */
++	tw32(RCVDBDI_STD_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_HIGH,
++	     ((u64) tp->rx_std_mapping >> 32));
++	tw32(RCVDBDI_STD_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW,
++	     ((u64) tp->rx_std_mapping & 0xffffffff));
++	tw32(RCVDBDI_STD_BD + TG3_BDINFO_NIC_ADDR,
++	     NIC_SRAM_RX_BUFFER_DESC);
++
++	/* Don't even try to program the JUMBO/MINI buffer descriptor
++	 * configs on 5705.
++	 */
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ||
++	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) {
++		tw32(RCVDBDI_STD_BD + TG3_BDINFO_MAXLEN_FLAGS,
++		     RX_STD_MAX_SIZE_5705 << BDINFO_FLAGS_MAXLEN_SHIFT);
++	} else {
++		tw32(RCVDBDI_STD_BD + TG3_BDINFO_MAXLEN_FLAGS,
++		     RX_STD_MAX_SIZE << BDINFO_FLAGS_MAXLEN_SHIFT);
++
++		tw32(RCVDBDI_MINI_BD + TG3_BDINFO_MAXLEN_FLAGS,
++		     BDINFO_FLAGS_DISABLED);
++
++		/* Setup replenish threshold. */
++		tw32(RCVBDI_JUMBO_THRESH, tp->rx_jumbo_pending / 8);
++
++		if (tp->tg3_flags & TG3_FLAG_JUMBO_ENABLE) {
++			tw32(RCVDBDI_JUMBO_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_HIGH,
++			     ((u64) tp->rx_jumbo_mapping >> 32));
++			tw32(RCVDBDI_JUMBO_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW,
++			     ((u64) tp->rx_jumbo_mapping & 0xffffffff));
++			tw32(RCVDBDI_JUMBO_BD + TG3_BDINFO_MAXLEN_FLAGS,
++			     RX_JUMBO_MAX_SIZE << BDINFO_FLAGS_MAXLEN_SHIFT);
++			tw32(RCVDBDI_JUMBO_BD + TG3_BDINFO_NIC_ADDR,
++			     NIC_SRAM_RX_JUMBO_BUFFER_DESC);
++		} else {
++			tw32(RCVDBDI_JUMBO_BD + TG3_BDINFO_MAXLEN_FLAGS,
++			     BDINFO_FLAGS_DISABLED);
++		}
++
++	}
++
++	/* There is only one send ring on 5705/5750, no need to explicitly
++	 * disable the others.
++	 */
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 &&
++	    GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) {
++		/* Clear out send RCB ring in SRAM. */
++		for (i = NIC_SRAM_SEND_RCB; i < NIC_SRAM_RCV_RET_RCB; i += TG3_BDINFO_SIZE)
++			tg3_write_mem(tp, i + TG3_BDINFO_MAXLEN_FLAGS,
++				      BDINFO_FLAGS_DISABLED);
++	}
++
++	tp->tx_prod = 0;
++	tp->tx_cons = 0;
++	tw32_mailbox(MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW, 0);
++	tw32_tx_mbox(MAILBOX_SNDNIC_PROD_IDX_0 + TG3_64BIT_REG_LOW, 0);
++
++	if (tp->tg3_flags & TG3_FLAG_HOST_TXDS) {
++		tg3_set_bdinfo(tp, NIC_SRAM_SEND_RCB,
++			       tp->tx_desc_mapping,
++			       (TG3_TX_RING_SIZE <<
++				BDINFO_FLAGS_MAXLEN_SHIFT),
++			       NIC_SRAM_TX_BUFFER_DESC);
++	} else {
++		tg3_set_bdinfo(tp, NIC_SRAM_SEND_RCB,
++			       0,
++			       BDINFO_FLAGS_DISABLED,
++			       NIC_SRAM_TX_BUFFER_DESC);
++	}
++
++	/* There is only one receive return ring on 5705/5750, no need
++	 * to explicitly disable the others.
++	 */
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 &&
++	    GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) {
++		for (i = NIC_SRAM_RCV_RET_RCB; i < NIC_SRAM_STATS_BLK;
++		     i += TG3_BDINFO_SIZE) {
++			tg3_write_mem(tp, i + TG3_BDINFO_MAXLEN_FLAGS,
++				      BDINFO_FLAGS_DISABLED);
++		}
++	}
++
++	tp->rx_rcb_ptr = 0;
++	tw32_rx_mbox(MAILBOX_RCVRET_CON_IDX_0 + TG3_64BIT_REG_LOW, 0);
++
++	tg3_set_bdinfo(tp, NIC_SRAM_RCV_RET_RCB,
++		       tp->rx_rcb_mapping,
++		       (TG3_RX_RCB_RING_SIZE(tp) <<
++			BDINFO_FLAGS_MAXLEN_SHIFT),
++		       0);
++
++	tp->rx_std_ptr = tp->rx_pending;
++	tw32_rx_mbox(MAILBOX_RCV_STD_PROD_IDX + TG3_64BIT_REG_LOW,
++		     tp->rx_std_ptr);
++
++	tp->rx_jumbo_ptr = (tp->tg3_flags & TG3_FLAG_JUMBO_ENABLE) ?
++						tp->rx_jumbo_pending : 0;
++	tw32_rx_mbox(MAILBOX_RCV_JUMBO_PROD_IDX + TG3_64BIT_REG_LOW,
++		     tp->rx_jumbo_ptr);
++
++	/* Initialize MAC address and backoff seed. */
++	__tg3_set_mac_addr(tp);
++
++	/* MTU + ethernet header + FCS + optional VLAN tag */
++	tw32(MAC_RX_MTU_SIZE, tp->dev->mtu + ETH_HLEN + 8);
++
++	/* The slot time is changed by tg3_setup_phy if we
++	 * run at gigabit with half duplex.
++	 */
++	tw32(MAC_TX_LENGTHS,
++	     (2 << TX_LENGTHS_IPG_CRS_SHIFT) |
++	     (6 << TX_LENGTHS_IPG_SHIFT) |
++	     (32 << TX_LENGTHS_SLOT_TIME_SHIFT));
++
++	/* Receive rules. */
++	tw32(MAC_RCV_RULE_CFG, RCV_RULE_CFG_DEFAULT_CLASS);
++	tw32(RCVLPC_CONFIG, 0x0181);
++
++	/* Calculate RDMAC_MODE setting early, we need it to determine
++	 * the RCVLPC_STATE_ENABLE mask.
++	 */
++	rdmac_mode = (RDMAC_MODE_ENABLE | RDMAC_MODE_TGTABORT_ENAB |
++		      RDMAC_MODE_MSTABORT_ENAB | RDMAC_MODE_PARITYERR_ENAB |
++		      RDMAC_MODE_ADDROFLOW_ENAB | RDMAC_MODE_FIFOOFLOW_ENAB |
++		      RDMAC_MODE_FIFOURUN_ENAB | RDMAC_MODE_FIFOOREAD_ENAB |
++		      RDMAC_MODE_LNGREAD_ENAB);
++	if (tp->tg3_flags & TG3_FLAG_SPLIT_MODE)
++		rdmac_mode |= RDMAC_MODE_SPLIT_ENABLE;
++	if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 &&
++	     tp->pci_chip_rev_id != CHIPREV_ID_5705_A0) ||
++	    (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750)) {
++		if (tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE &&
++		    (tp->pci_chip_rev_id == CHIPREV_ID_5705_A1 ||
++		     tp->pci_chip_rev_id == CHIPREV_ID_5705_A2)) {
++			rdmac_mode |= RDMAC_MODE_FIFO_SIZE_128;
++		} else if (!(tr32(TG3PCI_PCISTATE) & PCISTATE_BUS_SPEED_HIGH) &&
++			   !(tp->tg3_flags2 & TG3_FLG2_IS_5788)) {
++			rdmac_mode |= RDMAC_MODE_FIFO_LONG_BURST;
++		}
++	}
++
++#if TG3_TSO_SUPPORT != 0
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750)
++		rdmac_mode |= (1 << 27);
++#endif
++
++	/* Receive/send statistics. */
++	if ((rdmac_mode & RDMAC_MODE_FIFO_SIZE_128) &&
++	    (tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE)) {
++		val = tr32(RCVLPC_STATS_ENABLE);
++		val &= ~RCVLPC_STATSENAB_LNGBRST_RFIX;
++		tw32(RCVLPC_STATS_ENABLE, val);
++	} else {
++		tw32(RCVLPC_STATS_ENABLE, 0xffffff);
++	}
++	tw32(RCVLPC_STATSCTRL, RCVLPC_STATSCTRL_ENABLE);
++	tw32(SNDDATAI_STATSENAB, 0xffffff);
++	tw32(SNDDATAI_STATSCTRL,
++	     (SNDDATAI_SCTRL_ENABLE |
++	      SNDDATAI_SCTRL_FASTUPD));
++
++	/* Setup host coalescing engine. */
++	tw32(HOSTCC_MODE, 0);
++	for (i = 0; i < 2000; i++) {
++		if (!(tr32(HOSTCC_MODE) & HOSTCC_MODE_ENABLE))
++			break;
++		udelay(10);
++	}
++
++	tw32(HOSTCC_RXCOL_TICKS, 0);
++	tw32(HOSTCC_TXCOL_TICKS, LOW_TXCOL_TICKS);
++	tw32(HOSTCC_RXMAX_FRAMES, 1);
++	tw32(HOSTCC_TXMAX_FRAMES, LOW_RXMAX_FRAMES);
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 &&
++	    GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) {
++		tw32(HOSTCC_RXCOAL_TICK_INT, 0);
++		tw32(HOSTCC_TXCOAL_TICK_INT, 0);
++	}
++	tw32(HOSTCC_RXCOAL_MAXF_INT, 1);
++	tw32(HOSTCC_TXCOAL_MAXF_INT, 0);
++
++	/* set status block DMA address */
++	tw32(HOSTCC_STATUS_BLK_HOST_ADDR + TG3_64BIT_REG_HIGH,
++	     ((u64) tp->status_mapping >> 32));
++	tw32(HOSTCC_STATUS_BLK_HOST_ADDR + TG3_64BIT_REG_LOW,
++	     ((u64) tp->status_mapping & 0xffffffff));
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 &&
++	    GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) {
++		/* Status/statistics block address.  See tg3_timer,
++		 * the tg3_periodic_fetch_stats call there, and
++		 * tg3_get_stats to see how this works for 5705/5750 chips.
++		 */
++		tw32(HOSTCC_STAT_COAL_TICKS,
++		     DEFAULT_STAT_COAL_TICKS);
++		tw32(HOSTCC_STATS_BLK_HOST_ADDR + TG3_64BIT_REG_HIGH,
++		     ((u64) tp->stats_mapping >> 32));
++		tw32(HOSTCC_STATS_BLK_HOST_ADDR + TG3_64BIT_REG_LOW,
++		     ((u64) tp->stats_mapping & 0xffffffff));
++		tw32(HOSTCC_STATS_BLK_NIC_ADDR, NIC_SRAM_STATS_BLK);
++		tw32(HOSTCC_STATUS_BLK_NIC_ADDR, NIC_SRAM_STATUS_BLK);
++	}
++
++	tw32(HOSTCC_MODE, HOSTCC_MODE_ENABLE | tp->coalesce_mode);
++
++	tw32(RCVCC_MODE, RCVCC_MODE_ENABLE | RCVCC_MODE_ATTN_ENABLE);
++	tw32(RCVLPC_MODE, RCVLPC_MODE_ENABLE);
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 &&
++	    GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750)
++		tw32(RCVLSC_MODE, RCVLSC_MODE_ENABLE | RCVLSC_MODE_ATTN_ENABLE);
++
++	/* Clear statistics/status block in chip, and status block in ram. */
++	for (i = NIC_SRAM_STATS_BLK;
++	     i < NIC_SRAM_STATUS_BLK + TG3_HW_STATUS_SIZE;
++	     i += sizeof(u32)) {
++		tg3_write_mem(tp, i, 0);
++		udelay(40);
++	}
++	memset(tp->hw_status, 0, TG3_HW_STATUS_SIZE);
++
++	tp->mac_mode = MAC_MODE_TXSTAT_ENABLE | MAC_MODE_RXSTAT_ENABLE |
++		MAC_MODE_TDE_ENABLE | MAC_MODE_RDE_ENABLE | MAC_MODE_FHDE_ENABLE;
++	tw32_f(MAC_MODE, tp->mac_mode | MAC_MODE_RXSTAT_CLEAR | MAC_MODE_TXSTAT_CLEAR);
++	udelay(40);
++
++	tp->grc_local_ctrl = GRC_LCLCTRL_INT_ON_ATTN | GRC_LCLCTRL_AUTO_SEEPROM;
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700)
++		tp->grc_local_ctrl |= (GRC_LCLCTRL_GPIO_OE1 |
++				       GRC_LCLCTRL_GPIO_OUTPUT1);
++	tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl);
++	udelay(100);
++
++	tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0);
++	tr32(MAILBOX_INTERRUPT_0);
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 &&
++	    GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) {
++		tw32_f(DMAC_MODE, DMAC_MODE_ENABLE);
++		udelay(40);
++	}
++
++	val = (WDMAC_MODE_ENABLE | WDMAC_MODE_TGTABORT_ENAB |
++	       WDMAC_MODE_MSTABORT_ENAB | WDMAC_MODE_PARITYERR_ENAB |
++	       WDMAC_MODE_ADDROFLOW_ENAB | WDMAC_MODE_FIFOOFLOW_ENAB |
++	       WDMAC_MODE_FIFOURUN_ENAB | WDMAC_MODE_FIFOOREAD_ENAB |
++	       WDMAC_MODE_LNGREAD_ENAB);
++
++	if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 &&
++	     tp->pci_chip_rev_id != CHIPREV_ID_5705_A0) ||
++	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) {
++		if ((tp->tg3_flags & TG3_FLG2_TSO_CAPABLE) &&
++		    (tp->pci_chip_rev_id == CHIPREV_ID_5705_A1 ||
++		     tp->pci_chip_rev_id == CHIPREV_ID_5705_A2)) {
++			/* nothing */
++		} else if (!(tr32(TG3PCI_PCISTATE) & PCISTATE_BUS_SPEED_HIGH) &&
++			   !(tp->tg3_flags2 & TG3_FLG2_IS_5788) &&
++			   !(tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS)) {
++			val |= WDMAC_MODE_RX_ACCEL;
++		}
++	}
++
++	tw32_f(WDMAC_MODE, val);
++	udelay(40);
++
++	if ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) != 0) {
++		val = tr32(TG3PCI_X_CAPS);
++		if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) {
++			val &= ~PCIX_CAPS_BURST_MASK;
++			val |= (PCIX_CAPS_MAX_BURST_CPIOB << PCIX_CAPS_BURST_SHIFT);
++		} else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) {
++			val &= ~(PCIX_CAPS_SPLIT_MASK | PCIX_CAPS_BURST_MASK);
++			val |= (PCIX_CAPS_MAX_BURST_CPIOB << PCIX_CAPS_BURST_SHIFT);
++			if (tp->tg3_flags & TG3_FLAG_SPLIT_MODE)
++				val |= (tp->split_mode_max_reqs <<
++					PCIX_CAPS_SPLIT_SHIFT);
++		}
++		tw32(TG3PCI_X_CAPS, val);
++	}
++
++	tw32_f(RDMAC_MODE, rdmac_mode);
++	udelay(40);
++
++	tw32(RCVDCC_MODE, RCVDCC_MODE_ENABLE | RCVDCC_MODE_ATTN_ENABLE);
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 &&
++	    GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750)
++		tw32(MBFREE_MODE, MBFREE_MODE_ENABLE);
++	tw32(SNDDATAC_MODE, SNDDATAC_MODE_ENABLE);
++	tw32(SNDBDC_MODE, SNDBDC_MODE_ENABLE | SNDBDC_MODE_ATTN_ENABLE);
++	tw32(RCVBDI_MODE, RCVBDI_MODE_ENABLE | RCVBDI_MODE_RCB_ATTN_ENAB);
++	tw32(RCVDBDI_MODE, RCVDBDI_MODE_ENABLE | RCVDBDI_MODE_INV_RING_SZ);
++	tw32(SNDDATAI_MODE, SNDDATAI_MODE_ENABLE);
++#if TG3_TSO_SUPPORT != 0
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750)
++		tw32(SNDDATAI_MODE, SNDDATAI_MODE_ENABLE | 0x8);
++#endif
++	tw32(SNDBDI_MODE, SNDBDI_MODE_ENABLE | SNDBDI_MODE_ATTN_ENABLE);
++	tw32(SNDBDS_MODE, SNDBDS_MODE_ENABLE | SNDBDS_MODE_ATTN_ENABLE);
++
++	if (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0) {
++		err = tg3_load_5701_a0_firmware_fix(tp);
++		if (err)
++			return err;
++	}
++
++#if TG3_TSO_SUPPORT != 0
++	if (tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE) {
++		err = tg3_load_tso_firmware(tp);
++		if (err)
++			return err;
++	}
++#endif
++
++	tp->tx_mode = TX_MODE_ENABLE;
++	tw32_f(MAC_TX_MODE, tp->tx_mode);
++	udelay(100);
++
++	tp->rx_mode = RX_MODE_ENABLE;
++	tw32_f(MAC_RX_MODE, tp->rx_mode);
++	udelay(10);
++
++	if (tp->link_config.phy_is_low_power) {
++		tp->link_config.phy_is_low_power = 0;
++		tp->link_config.speed = tp->link_config.orig_speed;
++		tp->link_config.duplex = tp->link_config.orig_duplex;
++		tp->link_config.autoneg = tp->link_config.orig_autoneg;
++	}
++
++	tp->mi_mode = MAC_MI_MODE_BASE;
++	tw32_f(MAC_MI_MODE, tp->mi_mode);
++	udelay(80);
++
++	tw32(MAC_LED_CTRL, tp->led_ctrl);
++
++	tw32(MAC_MI_STAT, MAC_MI_STAT_LNKSTAT_ATTN_ENAB);
++	if (tp->phy_id == PHY_ID_SERDES) {
++		tw32_f(MAC_RX_MODE, RX_MODE_RESET);
++		udelay(10);
++	}
++	tw32_f(MAC_RX_MODE, tp->rx_mode);
++	udelay(10);
++
++	if (tp->phy_id == PHY_ID_SERDES) {
++		if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) {
++			/* Set drive transmission level to 1.2V  */
++			val = tr32(MAC_SERDES_CFG);
++			val &= 0xfffff000;
++			val |= 0x880;
++			tw32(MAC_SERDES_CFG, val);
++		}
++		if (tp->pci_chip_rev_id == CHIPREV_ID_5703_A1)
++			tw32(MAC_SERDES_CFG, 0x616000);
++	}
++
++	/* Prevent chip from dropping frames when flow control
++	 * is enabled.
++	 */
++	tw32_f(MAC_LOW_WMARK_MAX_RX_FRAME, 2);
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 &&
++	    tp->phy_id == PHY_ID_SERDES) {
++		/* Enable hardware link auto-negotiation */
++		u32 digctrl, txctrl;
++
++		digctrl = SG_DIG_USING_HW_AUTONEG | SG_DIG_CRC16_CLEAR_N |
++		    SG_DIG_LOCAL_DUPLEX_STATUS | SG_DIG_LOCAL_LINK_STATUS |
++		    (2 << SG_DIG_SPEED_STATUS_SHIFT) | SG_DIG_FIBER_MODE |
++		    SG_DIG_GBIC_ENABLE;
++
++		txctrl = tr32(MAC_SERDES_CFG);
++		tw32_f(MAC_SERDES_CFG, txctrl | MAC_SERDES_CFG_EDGE_SELECT);
++		tw32_f(SG_DIG_CTRL, digctrl | SG_DIG_SOFT_RESET);
++		tr32(SG_DIG_CTRL);
++		udelay(5);
++		tw32_f(SG_DIG_CTRL, digctrl);
++
++		tp->tg3_flags2 |= TG3_FLG2_HW_AUTONEG;
++	}
++
++	err = tg3_setup_phy(tp, 1);
++	if (err)
++		return err;
++
++	if (tp->phy_id != PHY_ID_SERDES) {
++		u32 tmp;
++
++		/* Clear CRC stats. */
++		tg3_readphy(tp, 0x1e, &tmp);
++		tg3_writephy(tp, 0x1e, tmp | 0x8000);
++		tg3_readphy(tp, 0x14, &tmp);
++	}
++
++	__tg3_set_rx_mode(tp->dev);
++
++	/* Initialize receive rules. */
++	tw32(MAC_RCV_RULE_0,  0xc2000000 & RCV_RULE_DISABLE_MASK);
++	tw32(MAC_RCV_VALUE_0, 0xffffffff & RCV_RULE_DISABLE_MASK);
++	tw32(MAC_RCV_RULE_1,  0x86000004 & RCV_RULE_DISABLE_MASK);
++	tw32(MAC_RCV_VALUE_1, 0xffffffff & RCV_RULE_DISABLE_MASK);
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ||
++	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750)
++		limit = 8;
++	else
++		limit = 16;
++	if (tp->tg3_flags & TG3_FLAG_ENABLE_ASF)
++		limit -= 4;
++	switch (limit) {
++	case 16:
++		tw32(MAC_RCV_RULE_15,  0); tw32(MAC_RCV_VALUE_15,  0);
++	case 15:
++		tw32(MAC_RCV_RULE_14,  0); tw32(MAC_RCV_VALUE_14,  0);
++	case 14:
++		tw32(MAC_RCV_RULE_13,  0); tw32(MAC_RCV_VALUE_13,  0);
++	case 13:
++		tw32(MAC_RCV_RULE_12,  0); tw32(MAC_RCV_VALUE_12,  0);
++	case 12:
++		tw32(MAC_RCV_RULE_11,  0); tw32(MAC_RCV_VALUE_11,  0);
++	case 11:
++		tw32(MAC_RCV_RULE_10,  0); tw32(MAC_RCV_VALUE_10,  0);
++	case 10:
++		tw32(MAC_RCV_RULE_9,  0); tw32(MAC_RCV_VALUE_9,  0);
++	case 9:
++		tw32(MAC_RCV_RULE_8,  0); tw32(MAC_RCV_VALUE_8,  0);
++	case 8:
++		tw32(MAC_RCV_RULE_7,  0); tw32(MAC_RCV_VALUE_7,  0);
++	case 7:
++		tw32(MAC_RCV_RULE_6,  0); tw32(MAC_RCV_VALUE_6,  0);
++	case 6:
++		tw32(MAC_RCV_RULE_5,  0); tw32(MAC_RCV_VALUE_5,  0);
++	case 5:
++		tw32(MAC_RCV_RULE_4,  0); tw32(MAC_RCV_VALUE_4,  0);
++	case 4:
++		/* tw32(MAC_RCV_RULE_3,  0); tw32(MAC_RCV_VALUE_3,  0); */
++	case 3:
++		/* tw32(MAC_RCV_RULE_2,  0); tw32(MAC_RCV_VALUE_2,  0); */
++	case 2:
++	case 1:
++
++	default:
++		break;
++	};
++
++	tg3_write_sig_post_reset(tp, RESET_KIND_INIT);
++
++	if (tp->tg3_flags & TG3_FLAG_INIT_COMPLETE)
++		tg3_enable_ints(tp);
++
++	return 0;
++}
++
++/* Called at device open time to get the chip ready for
++ * packet processing.  Invoked with tp->lock held.
++ */
++static int tg3_init_hw(struct tg3 *tp)
++{
++	int err;
++
++	/* Force the chip into D0. */
++	err = tg3_set_power_state(tp, 0);
++	if (err)
++		goto out;
++
++	tg3_switch_clocks(tp);
++
++	tw32(TG3PCI_MEM_WIN_BASE_ADDR, 0);
++
++	err = tg3_reset_hw(tp);
++
++out:
++	return err;
++}
++
++#define TG3_STAT_ADD32(PSTAT, REG) \
++do {	u32 __val = tr32(REG); \
++	(PSTAT)->low += __val; \
++	if ((PSTAT)->low < __val) \
++		(PSTAT)->high += 1; \
++} while (0)
++
++static void tg3_periodic_fetch_stats(struct tg3 *tp)
++{
++	struct tg3_hw_stats *sp = tp->hw_stats;
++
++	if (!netif_carrier_ok(tp->dev))
++		return;
++
++	TG3_STAT_ADD32(&sp->tx_octets, MAC_TX_STATS_OCTETS);
++	TG3_STAT_ADD32(&sp->tx_collisions, MAC_TX_STATS_COLLISIONS);
++	TG3_STAT_ADD32(&sp->tx_xon_sent, MAC_TX_STATS_XON_SENT);
++	TG3_STAT_ADD32(&sp->tx_xoff_sent, MAC_TX_STATS_XOFF_SENT);
++	TG3_STAT_ADD32(&sp->tx_mac_errors, MAC_TX_STATS_MAC_ERRORS);
++	TG3_STAT_ADD32(&sp->tx_single_collisions, MAC_TX_STATS_SINGLE_COLLISIONS);
++	TG3_STAT_ADD32(&sp->tx_mult_collisions, MAC_TX_STATS_MULT_COLLISIONS);
++	TG3_STAT_ADD32(&sp->tx_deferred, MAC_TX_STATS_DEFERRED);
++	TG3_STAT_ADD32(&sp->tx_excessive_collisions, MAC_TX_STATS_EXCESSIVE_COL);
++	TG3_STAT_ADD32(&sp->tx_late_collisions, MAC_TX_STATS_LATE_COL);
++	TG3_STAT_ADD32(&sp->tx_ucast_packets, MAC_TX_STATS_UCAST);
++	TG3_STAT_ADD32(&sp->tx_mcast_packets, MAC_TX_STATS_MCAST);
++	TG3_STAT_ADD32(&sp->tx_bcast_packets, MAC_TX_STATS_BCAST);
++
++	TG3_STAT_ADD32(&sp->rx_octets, MAC_RX_STATS_OCTETS);
++	TG3_STAT_ADD32(&sp->rx_fragments, MAC_RX_STATS_FRAGMENTS);
++	TG3_STAT_ADD32(&sp->rx_ucast_packets, MAC_RX_STATS_UCAST);
++	TG3_STAT_ADD32(&sp->rx_mcast_packets, MAC_RX_STATS_MCAST);
++	TG3_STAT_ADD32(&sp->rx_bcast_packets, MAC_RX_STATS_BCAST);
++	TG3_STAT_ADD32(&sp->rx_fcs_errors, MAC_RX_STATS_FCS_ERRORS);
++	TG3_STAT_ADD32(&sp->rx_align_errors, MAC_RX_STATS_ALIGN_ERRORS);
++	TG3_STAT_ADD32(&sp->rx_xon_pause_rcvd, MAC_RX_STATS_XON_PAUSE_RECVD);
++	TG3_STAT_ADD32(&sp->rx_xoff_pause_rcvd, MAC_RX_STATS_XOFF_PAUSE_RECVD);
++	TG3_STAT_ADD32(&sp->rx_mac_ctrl_rcvd, MAC_RX_STATS_MAC_CTRL_RECVD);
++	TG3_STAT_ADD32(&sp->rx_xoff_entered, MAC_RX_STATS_XOFF_ENTERED);
++	TG3_STAT_ADD32(&sp->rx_frame_too_long_errors, MAC_RX_STATS_FRAME_TOO_LONG);
++	TG3_STAT_ADD32(&sp->rx_jabbers, MAC_RX_STATS_JABBERS);
++	TG3_STAT_ADD32(&sp->rx_undersize_packets, MAC_RX_STATS_UNDERSIZE);
++}
++
++static void tg3_timer(unsigned long __opaque)
++{
++	struct tg3 *tp = (struct tg3 *) __opaque;
++	unsigned long flags;
++
++	spin_lock_irqsave(&tp->lock, flags);
++	spin_lock(&tp->tx_lock);
++
++	/* All of this garbage is because when using non-tagged
++	 * IRQ status the mailbox/status_block protocol the chip
++	 * uses with the cpu is race prone.
++	 */
++	if (tp->hw_status->status & SD_STATUS_UPDATED) {
++		tw32(GRC_LOCAL_CTRL,
++		     tp->grc_local_ctrl | GRC_LCLCTRL_SETINT);
++	} else {
++		tw32(HOSTCC_MODE, tp->coalesce_mode |
++		     (HOSTCC_MODE_ENABLE | HOSTCC_MODE_NOW));
++	}
++
++	if (!(tr32(WDMAC_MODE) & WDMAC_MODE_ENABLE)) {
++		tp->tg3_flags2 |= TG3_FLG2_RESTART_TIMER;
++		spin_unlock(&tp->tx_lock);
++		spin_unlock_irqrestore(&tp->lock, flags);
++		schedule_work(&tp->reset_task);
++		return;
++	}
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ||
++	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750)
++		tg3_periodic_fetch_stats(tp);
++
++	/* This part only runs once per second. */
++	if (!--tp->timer_counter) {
++		if (tp->tg3_flags & TG3_FLAG_USE_LINKCHG_REG) {
++			u32 mac_stat;
++			int phy_event;
++
++			mac_stat = tr32(MAC_STATUS);
++
++			phy_event = 0;
++			if (tp->tg3_flags & TG3_FLAG_USE_MI_INTERRUPT) {
++				if (mac_stat & MAC_STATUS_MI_INTERRUPT)
++					phy_event = 1;
++			} else if (mac_stat & MAC_STATUS_LNKSTATE_CHANGED)
++				phy_event = 1;
++
++			if (phy_event)
++				tg3_setup_phy(tp, 0);
++		} else if (tp->tg3_flags & TG3_FLAG_POLL_SERDES) {
++			u32 mac_stat = tr32(MAC_STATUS);
++			int need_setup = 0;
++
++			if (netif_carrier_ok(tp->dev) &&
++			    (mac_stat & MAC_STATUS_LNKSTATE_CHANGED)) {
++				need_setup = 1;
++			}
++			if (! netif_carrier_ok(tp->dev) &&
++			    (mac_stat & MAC_STATUS_PCS_SYNCED)) {
++				need_setup = 1;
++			}
++			if (need_setup) {
++				tw32_f(MAC_MODE,
++				     (tp->mac_mode &
++				      ~MAC_MODE_PORT_MODE_MASK));
++				udelay(40);
++				tw32_f(MAC_MODE, tp->mac_mode);
++				udelay(40);
++				tg3_setup_phy(tp, 0);
++			}
++		}
++
++		tp->timer_counter = tp->timer_multiplier;
++	}
++
++	/* Heartbeat is only sent once every 120 seconds.  */
++	if (!--tp->asf_counter) {
++		if (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) {
++			u32 val;
++
++			tg3_write_mem(tp, NIC_SRAM_FW_CMD_MBOX, FWCMD_NICDRV_ALIVE);
++			tg3_write_mem(tp, NIC_SRAM_FW_CMD_LEN_MBOX, 4);
++			tg3_write_mem(tp, NIC_SRAM_FW_CMD_DATA_MBOX, 3);
++			val = tr32(GRC_RX_CPU_EVENT);
++			val |= (1 << 14);
++			tw32(GRC_RX_CPU_EVENT, val);
++		}
++		tp->asf_counter = tp->asf_multiplier;
++	}
++
++	spin_unlock(&tp->tx_lock);
++	spin_unlock_irqrestore(&tp->lock, flags);
++
++	tp->timer.expires = jiffies + tp->timer_offset;
++	add_timer(&tp->timer);
++}
++
++static int tg3_open(struct net_device *dev)
++{
++	struct tg3 *tp = netdev_priv(dev);
++	int err;
++
++	spin_lock_irq(&tp->lock);
++	spin_lock(&tp->tx_lock);
++
++	tg3_disable_ints(tp);
++	tp->tg3_flags &= ~TG3_FLAG_INIT_COMPLETE;
++
++	spin_unlock(&tp->tx_lock);
++	spin_unlock_irq(&tp->lock);
++
++	/* If you move this call, make sure TG3_FLAG_HOST_TXDS in
++	 * tp->tg3_flags is accurate at that new place.
++	 */
++	err = tg3_alloc_consistent(tp);
++	if (err)
++		return err;
++
++	err = request_irq(dev->irq, tg3_interrupt,
++			  SA_SHIRQ, dev->name, dev);
++
++	if (err) {
++		tg3_free_consistent(tp);
++		return err;
++	}
++
++	spin_lock_irq(&tp->lock);
++	spin_lock(&tp->tx_lock);
++
++	err = tg3_init_hw(tp);
++	if (err) {
++		tg3_halt(tp);
++		tg3_free_rings(tp);
++	} else {
++		tp->timer_offset = HZ / 10;
++		tp->timer_counter = tp->timer_multiplier = 10;
++		tp->asf_counter = tp->asf_multiplier = (10 * 120);
++
++		init_timer(&tp->timer);
++		tp->timer.expires = jiffies + tp->timer_offset;
++		tp->timer.data = (unsigned long) tp;
++		tp->timer.function = tg3_timer;
++		add_timer(&tp->timer);
++
++		tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE;
++	}
++
++	spin_unlock(&tp->tx_lock);
++	spin_unlock_irq(&tp->lock);
++
++	if (err) {
++		free_irq(dev->irq, dev);
++		tg3_free_consistent(tp);
++		return err;
++	}
++
++	spin_lock_irq(&tp->lock);
++	spin_lock(&tp->tx_lock);
++
++	tg3_enable_ints(tp);
++
++	spin_unlock(&tp->tx_lock);
++	spin_unlock_irq(&tp->lock);
++
++	netif_start_queue(dev);
++
++	return 0;
++}
++
++#if 0
++/*static*/ void tg3_dump_state(struct tg3 *tp)
++{
++	u32 val32, val32_2, val32_3, val32_4, val32_5;
++	u16 val16;
++	int i;
++
++	pci_read_config_word(tp->pdev, PCI_STATUS, &val16);
++	pci_read_config_dword(tp->pdev, TG3PCI_PCISTATE, &val32);
++	printk("DEBUG: PCI status [%04x] TG3PCI state[%08x]\n",
++	       val16, val32);
++
++	/* MAC block */
++	printk("DEBUG: MAC_MODE[%08x] MAC_STATUS[%08x]\n",
++	       tr32(MAC_MODE), tr32(MAC_STATUS));
++	printk("       MAC_EVENT[%08x] MAC_LED_CTRL[%08x]\n",
++	       tr32(MAC_EVENT), tr32(MAC_LED_CTRL));
++	printk("DEBUG: MAC_TX_MODE[%08x] MAC_TX_STATUS[%08x]\n",
++	       tr32(MAC_TX_MODE), tr32(MAC_TX_STATUS));
++	printk("       MAC_RX_MODE[%08x] MAC_RX_STATUS[%08x]\n",
++	       tr32(MAC_RX_MODE), tr32(MAC_RX_STATUS));
++
++	/* Send data initiator control block */
++	printk("DEBUG: SNDDATAI_MODE[%08x] SNDDATAI_STATUS[%08x]\n",
++	       tr32(SNDDATAI_MODE), tr32(SNDDATAI_STATUS));
++	printk("       SNDDATAI_STATSCTRL[%08x]\n",
++	       tr32(SNDDATAI_STATSCTRL));
++
++	/* Send data completion control block */
++	printk("DEBUG: SNDDATAC_MODE[%08x]\n", tr32(SNDDATAC_MODE));
++
++	/* Send BD ring selector block */
++	printk("DEBUG: SNDBDS_MODE[%08x] SNDBDS_STATUS[%08x]\n",
++	       tr32(SNDBDS_MODE), tr32(SNDBDS_STATUS));
++
++	/* Send BD initiator control block */
++	printk("DEBUG: SNDBDI_MODE[%08x] SNDBDI_STATUS[%08x]\n",
++	       tr32(SNDBDI_MODE), tr32(SNDBDI_STATUS));
++
++	/* Send BD completion control block */
++	printk("DEBUG: SNDBDC_MODE[%08x]\n", tr32(SNDBDC_MODE));
++
++	/* Receive list placement control block */
++	printk("DEBUG: RCVLPC_MODE[%08x] RCVLPC_STATUS[%08x]\n",
++	       tr32(RCVLPC_MODE), tr32(RCVLPC_STATUS));
++	printk("       RCVLPC_STATSCTRL[%08x]\n",
++	       tr32(RCVLPC_STATSCTRL));
++
++	/* Receive data and receive BD initiator control block */
++	printk("DEBUG: RCVDBDI_MODE[%08x] RCVDBDI_STATUS[%08x]\n",
++	       tr32(RCVDBDI_MODE), tr32(RCVDBDI_STATUS));
++
++	/* Receive data completion control block */
++	printk("DEBUG: RCVDCC_MODE[%08x]\n",
++	       tr32(RCVDCC_MODE));
++
++	/* Receive BD initiator control block */
++	printk("DEBUG: RCVBDI_MODE[%08x] RCVBDI_STATUS[%08x]\n",
++	       tr32(RCVBDI_MODE), tr32(RCVBDI_STATUS));
++
++	/* Receive BD completion control block */
++	printk("DEBUG: RCVCC_MODE[%08x] RCVCC_STATUS[%08x]\n",
++	       tr32(RCVCC_MODE), tr32(RCVCC_STATUS));
++
++	/* Receive list selector control block */
++	printk("DEBUG: RCVLSC_MODE[%08x] RCVLSC_STATUS[%08x]\n",
++	       tr32(RCVLSC_MODE), tr32(RCVLSC_STATUS));
++
++	/* Mbuf cluster free block */
++	printk("DEBUG: MBFREE_MODE[%08x] MBFREE_STATUS[%08x]\n",
++	       tr32(MBFREE_MODE), tr32(MBFREE_STATUS));
++
++	/* Host coalescing control block */
++	printk("DEBUG: HOSTCC_MODE[%08x] HOSTCC_STATUS[%08x]\n",
++	       tr32(HOSTCC_MODE), tr32(HOSTCC_STATUS));
++	printk("DEBUG: HOSTCC_STATS_BLK_HOST_ADDR[%08x%08x]\n",
++	       tr32(HOSTCC_STATS_BLK_HOST_ADDR + TG3_64BIT_REG_HIGH),
++	       tr32(HOSTCC_STATS_BLK_HOST_ADDR + TG3_64BIT_REG_LOW));
++	printk("DEBUG: HOSTCC_STATUS_BLK_HOST_ADDR[%08x%08x]\n",
++	       tr32(HOSTCC_STATUS_BLK_HOST_ADDR + TG3_64BIT_REG_HIGH),
++	       tr32(HOSTCC_STATUS_BLK_HOST_ADDR + TG3_64BIT_REG_LOW));
++	printk("DEBUG: HOSTCC_STATS_BLK_NIC_ADDR[%08x]\n",
++	       tr32(HOSTCC_STATS_BLK_NIC_ADDR));
++	printk("DEBUG: HOSTCC_STATUS_BLK_NIC_ADDR[%08x]\n",
++	       tr32(HOSTCC_STATUS_BLK_NIC_ADDR));
++
++	/* Memory arbiter control block */
++	printk("DEBUG: MEMARB_MODE[%08x] MEMARB_STATUS[%08x]\n",
++	       tr32(MEMARB_MODE), tr32(MEMARB_STATUS));
++
++	/* Buffer manager control block */
++	printk("DEBUG: BUFMGR_MODE[%08x] BUFMGR_STATUS[%08x]\n",
++	       tr32(BUFMGR_MODE), tr32(BUFMGR_STATUS));
++	printk("DEBUG: BUFMGR_MB_POOL_ADDR[%08x] BUFMGR_MB_POOL_SIZE[%08x]\n",
++	       tr32(BUFMGR_MB_POOL_ADDR), tr32(BUFMGR_MB_POOL_SIZE));
++	printk("DEBUG: BUFMGR_DMA_DESC_POOL_ADDR[%08x] "
++	       "BUFMGR_DMA_DESC_POOL_SIZE[%08x]\n",
++	       tr32(BUFMGR_DMA_DESC_POOL_ADDR),
++	       tr32(BUFMGR_DMA_DESC_POOL_SIZE));
++
++	/* Read DMA control block */
++	printk("DEBUG: RDMAC_MODE[%08x] RDMAC_STATUS[%08x]\n",
++	       tr32(RDMAC_MODE), tr32(RDMAC_STATUS));
++
++	/* Write DMA control block */
++	printk("DEBUG: WDMAC_MODE[%08x] WDMAC_STATUS[%08x]\n",
++	       tr32(WDMAC_MODE), tr32(WDMAC_STATUS));
++
++	/* DMA completion block */
++	printk("DEBUG: DMAC_MODE[%08x]\n",
++	       tr32(DMAC_MODE));
++
++	/* GRC block */
++	printk("DEBUG: GRC_MODE[%08x] GRC_MISC_CFG[%08x]\n",
++	       tr32(GRC_MODE), tr32(GRC_MISC_CFG));
++	printk("DEBUG: GRC_LOCAL_CTRL[%08x]\n",
++	       tr32(GRC_LOCAL_CTRL));
++
++	/* TG3_BDINFOs */
++	printk("DEBUG: RCVDBDI_JUMBO_BD[%08x%08x:%08x:%08x]\n",
++	       tr32(RCVDBDI_JUMBO_BD + 0x0),
++	       tr32(RCVDBDI_JUMBO_BD + 0x4),
++	       tr32(RCVDBDI_JUMBO_BD + 0x8),
++	       tr32(RCVDBDI_JUMBO_BD + 0xc));
++	printk("DEBUG: RCVDBDI_STD_BD[%08x%08x:%08x:%08x]\n",
++	       tr32(RCVDBDI_STD_BD + 0x0),
++	       tr32(RCVDBDI_STD_BD + 0x4),
++	       tr32(RCVDBDI_STD_BD + 0x8),
++	       tr32(RCVDBDI_STD_BD + 0xc));
++	printk("DEBUG: RCVDBDI_MINI_BD[%08x%08x:%08x:%08x]\n",
++	       tr32(RCVDBDI_MINI_BD + 0x0),
++	       tr32(RCVDBDI_MINI_BD + 0x4),
++	       tr32(RCVDBDI_MINI_BD + 0x8),
++	       tr32(RCVDBDI_MINI_BD + 0xc));
++
++	tg3_read_mem(tp, NIC_SRAM_SEND_RCB + 0x0, &val32);
++	tg3_read_mem(tp, NIC_SRAM_SEND_RCB + 0x4, &val32_2);
++	tg3_read_mem(tp, NIC_SRAM_SEND_RCB + 0x8, &val32_3);
++	tg3_read_mem(tp, NIC_SRAM_SEND_RCB + 0xc, &val32_4);
++	printk("DEBUG: SRAM_SEND_RCB_0[%08x%08x:%08x:%08x]\n",
++	       val32, val32_2, val32_3, val32_4);
++
++	tg3_read_mem(tp, NIC_SRAM_RCV_RET_RCB + 0x0, &val32);
++	tg3_read_mem(tp, NIC_SRAM_RCV_RET_RCB + 0x4, &val32_2);
++	tg3_read_mem(tp, NIC_SRAM_RCV_RET_RCB + 0x8, &val32_3);
++	tg3_read_mem(tp, NIC_SRAM_RCV_RET_RCB + 0xc, &val32_4);
++	printk("DEBUG: SRAM_RCV_RET_RCB_0[%08x%08x:%08x:%08x]\n",
++	       val32, val32_2, val32_3, val32_4);
++
++	tg3_read_mem(tp, NIC_SRAM_STATUS_BLK + 0x0, &val32);
++	tg3_read_mem(tp, NIC_SRAM_STATUS_BLK + 0x4, &val32_2);
++	tg3_read_mem(tp, NIC_SRAM_STATUS_BLK + 0x8, &val32_3);
++	tg3_read_mem(tp, NIC_SRAM_STATUS_BLK + 0xc, &val32_4);
++	tg3_read_mem(tp, NIC_SRAM_STATUS_BLK + 0x10, &val32_5);
++	printk("DEBUG: SRAM_STATUS_BLK[%08x:%08x:%08x:%08x:%08x]\n",
++	       val32, val32_2, val32_3, val32_4, val32_5);
++
++	/* SW status block */
++	printk("DEBUG: Host status block [%08x:%08x:(%04x:%04x:%04x):(%04x:%04x)]\n",
++	       tp->hw_status->status,
++	       tp->hw_status->status_tag,
++	       tp->hw_status->rx_jumbo_consumer,
++	       tp->hw_status->rx_consumer,
++	       tp->hw_status->rx_mini_consumer,
++	       tp->hw_status->idx[0].rx_producer,
++	       tp->hw_status->idx[0].tx_consumer);
++
++	/* SW statistics block */
++	printk("DEBUG: Host statistics block [%08x:%08x:%08x:%08x]\n",
++	       ((u32 *)tp->hw_stats)[0],
++	       ((u32 *)tp->hw_stats)[1],
++	       ((u32 *)tp->hw_stats)[2],
++	       ((u32 *)tp->hw_stats)[3]);
++
++	/* Mailboxes */
++	printk("DEBUG: SNDHOST_PROD[%08x%08x] SNDNIC_PROD[%08x%08x]\n",
++	       tr32(MAILBOX_SNDHOST_PROD_IDX_0 + 0x0),
++	       tr32(MAILBOX_SNDHOST_PROD_IDX_0 + 0x4),
++	       tr32(MAILBOX_SNDNIC_PROD_IDX_0 + 0x0),
++	       tr32(MAILBOX_SNDNIC_PROD_IDX_0 + 0x4));
++
++	/* NIC side send descriptors. */
++	for (i = 0; i < 6; i++) {
++		unsigned long txd;
++
++		txd = tp->regs + NIC_SRAM_WIN_BASE + NIC_SRAM_TX_BUFFER_DESC
++			+ (i * sizeof(struct tg3_tx_buffer_desc));
++		printk("DEBUG: NIC TXD(%d)[%08x:%08x:%08x:%08x]\n",
++		       i,
++		       readl(txd + 0x0), readl(txd + 0x4),
++		       readl(txd + 0x8), readl(txd + 0xc));
++	}
++
++	/* NIC side RX descriptors. */
++	for (i = 0; i < 6; i++) {
++		unsigned long rxd;
++
++		rxd = tp->regs + NIC_SRAM_WIN_BASE + NIC_SRAM_RX_BUFFER_DESC
++			+ (i * sizeof(struct tg3_rx_buffer_desc));
++		printk("DEBUG: NIC RXD_STD(%d)[0][%08x:%08x:%08x:%08x]\n",
++		       i,
++		       readl(rxd + 0x0), readl(rxd + 0x4),
++		       readl(rxd + 0x8), readl(rxd + 0xc));
++		rxd += (4 * sizeof(u32));
++		printk("DEBUG: NIC RXD_STD(%d)[1][%08x:%08x:%08x:%08x]\n",
++		       i,
++		       readl(rxd + 0x0), readl(rxd + 0x4),
++		       readl(rxd + 0x8), readl(rxd + 0xc));
++	}
++
++	for (i = 0; i < 6; i++) {
++		unsigned long rxd;
++
++		rxd = tp->regs + NIC_SRAM_WIN_BASE + NIC_SRAM_RX_JUMBO_BUFFER_DESC
++			+ (i * sizeof(struct tg3_rx_buffer_desc));
++		printk("DEBUG: NIC RXD_JUMBO(%d)[0][%08x:%08x:%08x:%08x]\n",
++		       i,
++		       readl(rxd + 0x0), readl(rxd + 0x4),
++		       readl(rxd + 0x8), readl(rxd + 0xc));
++		rxd += (4 * sizeof(u32));
++		printk("DEBUG: NIC RXD_JUMBO(%d)[1][%08x:%08x:%08x:%08x]\n",
++		       i,
++		       readl(rxd + 0x0), readl(rxd + 0x4),
++		       readl(rxd + 0x8), readl(rxd + 0xc));
++	}
++}
++#endif
++
++static struct net_device_stats *tg3_get_stats(struct net_device *);
++static struct tg3_ethtool_stats *tg3_get_estats(struct tg3 *);
++
++static int tg3_close(struct net_device *dev)
++{
++	struct tg3 *tp = netdev_priv(dev);
++
++	netif_stop_queue(dev);
++
++	del_timer_sync(&tp->timer);
++
++	spin_lock_irq(&tp->lock);
++	spin_lock(&tp->tx_lock);
++#if 0
++	tg3_dump_state(tp);
++#endif
++
++	tg3_disable_ints(tp);
++
++	tg3_halt(tp);
++	tg3_free_rings(tp);
++	tp->tg3_flags &=
++		~(TG3_FLAG_INIT_COMPLETE |
++		  TG3_FLAG_GOT_SERDES_FLOWCTL);
++	netif_carrier_off(tp->dev);
++
++	spin_unlock(&tp->tx_lock);
++	spin_unlock_irq(&tp->lock);
++
++	free_irq(dev->irq, dev);
++
++	memcpy(&tp->net_stats_prev, tg3_get_stats(tp->dev),
++	       sizeof(tp->net_stats_prev));
++	memcpy(&tp->estats_prev, tg3_get_estats(tp),
++	       sizeof(tp->estats_prev));
++
++	tg3_free_consistent(tp);
++
++	return 0;
++}
++
++static inline unsigned long get_stat64(tg3_stat64_t *val)
++{
++	unsigned long ret;
++
++#if (BITS_PER_LONG == 32)
++	ret = val->low;
++#else
++	ret = ((u64)val->high << 32) | ((u64)val->low);
++#endif
++	return ret;
++}
++
++static unsigned long calc_crc_errors(struct tg3 *tp)
++{
++	struct tg3_hw_stats *hw_stats = tp->hw_stats;
++
++	if (tp->phy_id != PHY_ID_SERDES &&
++	    (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 ||
++	     GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701)) {
++		unsigned long flags;
++		u32 val;
++
++		spin_lock_irqsave(&tp->lock, flags);
++		tg3_readphy(tp, 0x1e, &val);
++		tg3_writephy(tp, 0x1e, val | 0x8000);
++		tg3_readphy(tp, 0x14, &val);
++		spin_unlock_irqrestore(&tp->lock, flags);
++
++		tp->phy_crc_errors += val;
++
++		return tp->phy_crc_errors;
++	}
++
++	return get_stat64(&hw_stats->rx_fcs_errors);
++}
++
++#define ESTAT_ADD(member) \
++	estats->member =	old_estats->member + \
++				get_stat64(&hw_stats->member)
++
++static struct tg3_ethtool_stats *tg3_get_estats(struct tg3 *tp)
++{
++	struct tg3_ethtool_stats *estats = &tp->estats;
++	struct tg3_ethtool_stats *old_estats = &tp->estats_prev;
++	struct tg3_hw_stats *hw_stats = tp->hw_stats;
++
++	if (!hw_stats)
++		return old_estats;
++
++	ESTAT_ADD(rx_octets);
++	ESTAT_ADD(rx_fragments);
++	ESTAT_ADD(rx_ucast_packets);
++	ESTAT_ADD(rx_mcast_packets);
++	ESTAT_ADD(rx_bcast_packets);
++	ESTAT_ADD(rx_fcs_errors);
++	ESTAT_ADD(rx_align_errors);
++	ESTAT_ADD(rx_xon_pause_rcvd);
++	ESTAT_ADD(rx_xoff_pause_rcvd);
++	ESTAT_ADD(rx_mac_ctrl_rcvd);
++	ESTAT_ADD(rx_xoff_entered);
++	ESTAT_ADD(rx_frame_too_long_errors);
++	ESTAT_ADD(rx_jabbers);
++	ESTAT_ADD(rx_undersize_packets);
++	ESTAT_ADD(rx_in_length_errors);
++	ESTAT_ADD(rx_out_length_errors);
++	ESTAT_ADD(rx_64_or_less_octet_packets);
++	ESTAT_ADD(rx_65_to_127_octet_packets);
++	ESTAT_ADD(rx_128_to_255_octet_packets);
++	ESTAT_ADD(rx_256_to_511_octet_packets);
++	ESTAT_ADD(rx_512_to_1023_octet_packets);
++	ESTAT_ADD(rx_1024_to_1522_octet_packets);
++	ESTAT_ADD(rx_1523_to_2047_octet_packets);
++	ESTAT_ADD(rx_2048_to_4095_octet_packets);
++	ESTAT_ADD(rx_4096_to_8191_octet_packets);
++	ESTAT_ADD(rx_8192_to_9022_octet_packets);
++
++	ESTAT_ADD(tx_octets);
++	ESTAT_ADD(tx_collisions);
++	ESTAT_ADD(tx_xon_sent);
++	ESTAT_ADD(tx_xoff_sent);
++	ESTAT_ADD(tx_flow_control);
++	ESTAT_ADD(tx_mac_errors);
++	ESTAT_ADD(tx_single_collisions);
++	ESTAT_ADD(tx_mult_collisions);
++	ESTAT_ADD(tx_deferred);
++	ESTAT_ADD(tx_excessive_collisions);
++	ESTAT_ADD(tx_late_collisions);
++	ESTAT_ADD(tx_collide_2times);
++	ESTAT_ADD(tx_collide_3times);
++	ESTAT_ADD(tx_collide_4times);
++	ESTAT_ADD(tx_collide_5times);
++	ESTAT_ADD(tx_collide_6times);
++	ESTAT_ADD(tx_collide_7times);
++	ESTAT_ADD(tx_collide_8times);
++	ESTAT_ADD(tx_collide_9times);
++	ESTAT_ADD(tx_collide_10times);
++	ESTAT_ADD(tx_collide_11times);
++	ESTAT_ADD(tx_collide_12times);
++	ESTAT_ADD(tx_collide_13times);
++	ESTAT_ADD(tx_collide_14times);
++	ESTAT_ADD(tx_collide_15times);
++	ESTAT_ADD(tx_ucast_packets);
++	ESTAT_ADD(tx_mcast_packets);
++	ESTAT_ADD(tx_bcast_packets);
++	ESTAT_ADD(tx_carrier_sense_errors);
++	ESTAT_ADD(tx_discards);
++	ESTAT_ADD(tx_errors);
++
++	ESTAT_ADD(dma_writeq_full);
++	ESTAT_ADD(dma_write_prioq_full);
++	ESTAT_ADD(rxbds_empty);
++	ESTAT_ADD(rx_discards);
++	ESTAT_ADD(rx_errors);
++	ESTAT_ADD(rx_threshold_hit);
++
++	ESTAT_ADD(dma_readq_full);
++	ESTAT_ADD(dma_read_prioq_full);
++	ESTAT_ADD(tx_comp_queue_full);
++
++	ESTAT_ADD(ring_set_send_prod_index);
++	ESTAT_ADD(ring_status_update);
++	ESTAT_ADD(nic_irqs);
++	ESTAT_ADD(nic_avoided_irqs);
++	ESTAT_ADD(nic_tx_threshold_hit);
++
++	return estats;
++}
++
++static struct net_device_stats *tg3_get_stats(struct net_device *dev)
++{
++	struct tg3 *tp = netdev_priv(dev);
++	struct net_device_stats *stats = &tp->net_stats;
++	struct net_device_stats *old_stats = &tp->net_stats_prev;
++	struct tg3_hw_stats *hw_stats = tp->hw_stats;
++
++	if (!hw_stats)
++		return old_stats;
++
++	stats->rx_packets = old_stats->rx_packets +
++		get_stat64(&hw_stats->rx_ucast_packets) +
++		get_stat64(&hw_stats->rx_mcast_packets) +
++		get_stat64(&hw_stats->rx_bcast_packets);
++		
++	stats->tx_packets = old_stats->tx_packets +
++		get_stat64(&hw_stats->tx_ucast_packets) +
++		get_stat64(&hw_stats->tx_mcast_packets) +
++		get_stat64(&hw_stats->tx_bcast_packets);
++
++	stats->rx_bytes = old_stats->rx_bytes +
++		get_stat64(&hw_stats->rx_octets);
++	stats->tx_bytes = old_stats->tx_bytes +
++		get_stat64(&hw_stats->tx_octets);
++
++	stats->rx_errors = old_stats->rx_errors +
++		get_stat64(&hw_stats->rx_errors) +
++		get_stat64(&hw_stats->rx_discards);
++	stats->tx_errors = old_stats->tx_errors +
++		get_stat64(&hw_stats->tx_errors) +
++		get_stat64(&hw_stats->tx_mac_errors) +
++		get_stat64(&hw_stats->tx_carrier_sense_errors) +
++		get_stat64(&hw_stats->tx_discards);
++
++	stats->multicast = old_stats->multicast +
++		get_stat64(&hw_stats->rx_mcast_packets);
++	stats->collisions = old_stats->collisions +
++		get_stat64(&hw_stats->tx_collisions);
++
++	stats->rx_length_errors = old_stats->rx_length_errors +
++		get_stat64(&hw_stats->rx_frame_too_long_errors) +
++		get_stat64(&hw_stats->rx_undersize_packets);
++
++	stats->rx_over_errors = old_stats->rx_over_errors +
++		get_stat64(&hw_stats->rxbds_empty);
++	stats->rx_frame_errors = old_stats->rx_frame_errors +
++		get_stat64(&hw_stats->rx_align_errors);
++	stats->tx_aborted_errors = old_stats->tx_aborted_errors +
++		get_stat64(&hw_stats->tx_discards);
++	stats->tx_carrier_errors = old_stats->tx_carrier_errors +
++		get_stat64(&hw_stats->tx_carrier_sense_errors);
++
++	stats->rx_crc_errors = old_stats->rx_crc_errors +
++		calc_crc_errors(tp);
++
++	return stats;
++}
++
++static inline u32 calc_crc(unsigned char *buf, int len)
++{
++	u32 reg;
++	u32 tmp;
++	int j, k;
++
++	reg = 0xffffffff;
++
++	for (j = 0; j < len; j++) {
++		reg ^= buf[j];
++
++		for (k = 0; k < 8; k++) {
++			tmp = reg & 0x01;
++
++			reg >>= 1;
++
++			if (tmp) {
++				reg ^= 0xedb88320;
++			}
++		}
++	}
++
++	return ~reg;
++}
++
++static void tg3_set_multi(struct tg3 *tp, unsigned int accept_all)
++{
++	/* accept or reject all multicast frames */
++	tw32(MAC_HASH_REG_0, accept_all ? 0xffffffff : 0);
++	tw32(MAC_HASH_REG_1, accept_all ? 0xffffffff : 0);
++	tw32(MAC_HASH_REG_2, accept_all ? 0xffffffff : 0);
++	tw32(MAC_HASH_REG_3, accept_all ? 0xffffffff : 0);
++}
++
++static void __tg3_set_rx_mode(struct net_device *dev)
++{
++	struct tg3 *tp = netdev_priv(dev);
++	u32 rx_mode;
++
++	rx_mode = tp->rx_mode & ~(RX_MODE_PROMISC |
++				  RX_MODE_KEEP_VLAN_TAG);
++
++	/* When ASF is in use, we always keep the RX_MODE_KEEP_VLAN_TAG
++	 * flag clear.
++	 */
++#if TG3_VLAN_TAG_USED
++	if (!tp->vlgrp &&
++	    !(tp->tg3_flags & TG3_FLAG_ENABLE_ASF))
++		rx_mode |= RX_MODE_KEEP_VLAN_TAG;
++#else
++	/* By definition, VLAN is disabled always in this
++	 * case.
++	 */
++	if (!(tp->tg3_flags & TG3_FLAG_ENABLE_ASF))
++		rx_mode |= RX_MODE_KEEP_VLAN_TAG;
++#endif
++
++	if (dev->flags & IFF_PROMISC) {
++		/* Promiscuous mode. */
++		rx_mode |= RX_MODE_PROMISC;
++	} else if (dev->flags & IFF_ALLMULTI) {
++		/* Accept all multicast. */
++		tg3_set_multi (tp, 1);
++	} else if (dev->mc_count < 1) {
++		/* Reject all multicast. */
++		tg3_set_multi (tp, 0);
++	} else {
++		/* Accept one or more multicast(s). */
++		struct dev_mc_list *mclist;
++		unsigned int i;
++		u32 mc_filter[4] = { 0, };
++		u32 regidx;
++		u32 bit;
++		u32 crc;
++
++		for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count;
++		     i++, mclist = mclist->next) {
++
++			crc = calc_crc (mclist->dmi_addr, ETH_ALEN);
++			bit = ~crc & 0x7f;
++			regidx = (bit & 0x60) >> 5;
++			bit &= 0x1f;
++			mc_filter[regidx] |= (1 << bit);
++		}
++
++		tw32(MAC_HASH_REG_0, mc_filter[0]);
++		tw32(MAC_HASH_REG_1, mc_filter[1]);
++		tw32(MAC_HASH_REG_2, mc_filter[2]);
++		tw32(MAC_HASH_REG_3, mc_filter[3]);
++	}
++
++	if (rx_mode != tp->rx_mode) {
++		tp->rx_mode = rx_mode;
++		tw32_f(MAC_RX_MODE, rx_mode);
++		udelay(10);
++	}
++}
++
++static void tg3_set_rx_mode(struct net_device *dev)
++{
++	struct tg3 *tp = netdev_priv(dev);
++
++	spin_lock_irq(&tp->lock);
++	__tg3_set_rx_mode(dev);
++	spin_unlock_irq(&tp->lock);
++}
++
++#define TG3_REGDUMP_LEN		(32 * 1024)
++
++static int tg3_get_regs_len(struct net_device *dev)
++{
++	return TG3_REGDUMP_LEN;
++}
++
++static void tg3_get_regs(struct net_device *dev,
++		struct ethtool_regs *regs, void *_p)
++{
++	u32 *p = _p;
++	struct tg3 *tp = netdev_priv(dev);
++	u8 *orig_p = _p;
++	int i;
++
++	regs->version = 0;
++
++	memset(p, 0, TG3_REGDUMP_LEN);
++
++	spin_lock_irq(&tp->lock);
++	spin_lock(&tp->tx_lock);
++
++#define __GET_REG32(reg)	(*(p)++ = tr32(reg))
++#define GET_REG32_LOOP(base,len)		\
++do {	p = (u32 *)(orig_p + (base));		\
++	for (i = 0; i < len; i += 4)		\
++		__GET_REG32((base) + i);	\
++} while (0)
++#define GET_REG32_1(reg)			\
++do {	p = (u32 *)(orig_p + (reg));		\
++	__GET_REG32((reg));			\
++} while (0)
++
++	GET_REG32_LOOP(TG3PCI_VENDOR, 0xb0);
++	GET_REG32_LOOP(MAILBOX_INTERRUPT_0, 0x200);
++	GET_REG32_LOOP(MAC_MODE, 0x4f0);
++	GET_REG32_LOOP(SNDDATAI_MODE, 0xe0);
++	GET_REG32_1(SNDDATAC_MODE);
++	GET_REG32_LOOP(SNDBDS_MODE, 0x80);
++	GET_REG32_LOOP(SNDBDI_MODE, 0x48);
++	GET_REG32_1(SNDBDC_MODE);
++	GET_REG32_LOOP(RCVLPC_MODE, 0x20);
++	GET_REG32_LOOP(RCVLPC_SELLST_BASE, 0x15c);
++	GET_REG32_LOOP(RCVDBDI_MODE, 0x0c);
++	GET_REG32_LOOP(RCVDBDI_JUMBO_BD, 0x3c);
++	GET_REG32_LOOP(RCVDBDI_BD_PROD_IDX_0, 0x44);
++	GET_REG32_1(RCVDCC_MODE);
++	GET_REG32_LOOP(RCVBDI_MODE, 0x20);
++	GET_REG32_LOOP(RCVCC_MODE, 0x14);
++	GET_REG32_LOOP(RCVLSC_MODE, 0x08);
++	GET_REG32_1(MBFREE_MODE);
++	GET_REG32_LOOP(HOSTCC_MODE, 0x100);
++	GET_REG32_LOOP(MEMARB_MODE, 0x10);
++	GET_REG32_LOOP(BUFMGR_MODE, 0x58);
++	GET_REG32_LOOP(RDMAC_MODE, 0x08);
++	GET_REG32_LOOP(WDMAC_MODE, 0x08);
++	GET_REG32_LOOP(RX_CPU_BASE, 0x280);
++	GET_REG32_LOOP(TX_CPU_BASE, 0x280);
++	GET_REG32_LOOP(GRCMBOX_INTERRUPT_0, 0x110);
++	GET_REG32_LOOP(FTQ_RESET, 0x120);
++	GET_REG32_LOOP(MSGINT_MODE, 0x0c);
++	GET_REG32_1(DMAC_MODE);
++	GET_REG32_LOOP(GRC_MODE, 0x4c);
++	if (tp->tg3_flags & TG3_FLAG_NVRAM)
++		GET_REG32_LOOP(NVRAM_CMD, 0x24);
++
++#undef __GET_REG32
++#undef GET_REG32_LOOP
++#undef GET_REG32_1
++
++	spin_unlock(&tp->tx_lock);
++	spin_unlock_irq(&tp->lock);
++}
++
++static int tg3_get_eeprom_len(struct net_device *dev)
++{
++	return EEPROM_CHIP_SIZE;
++}
++
++static int __devinit tg3_nvram_read_using_eeprom(struct tg3 *tp,
++						 u32 offset, u32 *val);
++static int tg3_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, u8 *data)
++{
++	struct tg3 *tp = dev->priv;
++	int ret;
++	u8  *pd;
++	u32 i, offset, len, val, b_offset, b_count;
++
++	offset = eeprom->offset;
++	len = eeprom->len;
++	eeprom->len = 0;
++
++	ret = tg3_nvram_read_using_eeprom(tp, 0, &eeprom->magic);
++	if (ret)
++		return ret;
++	eeprom->magic = swab32(eeprom->magic);
++
++	if (offset & 3) {
++		/* adjustments to start on required 4 byte boundary */
++		b_offset = offset & 3;
++		b_count = 4 - b_offset;
++		if (b_count > len) {
++			/* i.e. offset=1 len=2 */
++			b_count = len;
++		}
++		ret = tg3_nvram_read_using_eeprom(tp, offset-b_offset, &val);
++		if (ret)
++			return ret;
++		memcpy(data, ((char*)&val) + b_offset, b_count);
++		len -= b_count;
++		offset += b_count;
++	        eeprom->len += b_count;
++	}
++
++	/* read bytes upto the last 4 byte boundary */
++	pd = &data[eeprom->len];
++	for (i = 0; i < (len - (len & 3)); i += 4) {
++		ret = tg3_nvram_read_using_eeprom(tp, offset + i, 
++				(u32*)(pd + i));
++		if (ret) {
++			eeprom->len += i;
++			return ret;
++		}
++	}
++	eeprom->len += i;
++
++	if (len & 3) {
++		/* read last bytes not ending on 4 byte boundary */
++		pd = &data[eeprom->len];
++		b_count = len & 3;
++		b_offset = offset + len - b_count;
++		ret = tg3_nvram_read_using_eeprom(tp, b_offset, &val);
++		if (ret)
++			return ret;
++		memcpy(pd, ((char*)&val), b_count);
++		eeprom->len += b_count;
++	}
++	return 0;
++}
++
++static int tg3_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
++{
++  	struct tg3 *tp = netdev_priv(dev);
++  
++	if (!(tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) ||
++					tp->link_config.phy_is_low_power)
++		return -EAGAIN;
++
++	cmd->supported = (SUPPORTED_Autoneg);
++
++	if (!(tp->tg3_flags & TG3_FLAG_10_100_ONLY))
++		cmd->supported |= (SUPPORTED_1000baseT_Half |
++				   SUPPORTED_1000baseT_Full);
++
++	if (tp->phy_id != PHY_ID_SERDES)
++		cmd->supported |= (SUPPORTED_100baseT_Half |
++				  SUPPORTED_100baseT_Full |
++				  SUPPORTED_10baseT_Half |
++				  SUPPORTED_10baseT_Full |
++				  SUPPORTED_MII);
++	else
++		cmd->supported |= SUPPORTED_FIBRE;
++  
++	cmd->advertising = tp->link_config.advertising;
++	cmd->speed = tp->link_config.active_speed;
++	cmd->duplex = tp->link_config.active_duplex;
++	cmd->port = 0;
++	cmd->phy_address = PHY_ADDR;
++	cmd->transceiver = 0;
++	cmd->autoneg = tp->link_config.autoneg;
++	cmd->maxtxpkt = 0;
++	cmd->maxrxpkt = 0;
++	return 0;
++}
++  
++static int tg3_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
++{
++	struct tg3 *tp = netdev_priv(dev);
++  
++	if (!(tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) ||
++	    tp->link_config.phy_is_low_power)
++		return -EAGAIN;
++
++	if (tp->phy_id == PHY_ID_SERDES) {
++		/* These are the only valid advertisement bits allowed.  */
++		if (cmd->autoneg == AUTONEG_ENABLE &&
++		    (cmd->advertising & ~(ADVERTISED_1000baseT_Half |
++					  ADVERTISED_1000baseT_Full |
++					  ADVERTISED_Autoneg |
++					  ADVERTISED_FIBRE)))
++			return -EINVAL;
++	}
++
++	spin_lock_irq(&tp->lock);
++	spin_lock(&tp->tx_lock);
++
++	tp->link_config.autoneg = cmd->autoneg;
++	if (cmd->autoneg == AUTONEG_ENABLE) {
++		tp->link_config.advertising = cmd->advertising;
++		tp->link_config.speed = SPEED_INVALID;
++		tp->link_config.duplex = DUPLEX_INVALID;
++	} else {
++		tp->link_config.advertising = 0;
++		tp->link_config.speed = cmd->speed;
++		tp->link_config.duplex = cmd->duplex;
++  	}
++  
++	tg3_setup_phy(tp, 1);
++	spin_unlock(&tp->tx_lock);
++	spin_unlock_irq(&tp->lock);
++  
++	return 0;
++}
++  
++static void tg3_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
++{
++	struct tg3 *tp = netdev_priv(dev);
++  
++	strcpy(info->driver, DRV_MODULE_NAME);
++	strcpy(info->version, DRV_MODULE_VERSION);
++	strcpy(info->bus_info, pci_name(tp->pdev));
++}
++  
++static void tg3_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
++{
++	struct tg3 *tp = netdev_priv(dev);
++  
++	wol->supported = WAKE_MAGIC;
++	wol->wolopts = 0;
++	if (tp->tg3_flags & TG3_FLAG_WOL_ENABLE)
++		wol->wolopts = WAKE_MAGIC;
++	memset(&wol->sopass, 0, sizeof(wol->sopass));
++}
++  
++static int tg3_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
++{
++	struct tg3 *tp = netdev_priv(dev);
++  
++	if (wol->wolopts & ~WAKE_MAGIC)
++		return -EINVAL;
++	if ((wol->wolopts & WAKE_MAGIC) &&
++	    tp->phy_id == PHY_ID_SERDES &&
++	    !(tp->tg3_flags & TG3_FLAG_SERDES_WOL_CAP))
++		return -EINVAL;
++  
++	spin_lock_irq(&tp->lock);
++	if (wol->wolopts & WAKE_MAGIC)
++		tp->tg3_flags |= TG3_FLAG_WOL_ENABLE;
++	else
++		tp->tg3_flags &= ~TG3_FLAG_WOL_ENABLE;
++	spin_unlock_irq(&tp->lock);
++  
++	return 0;
++}
++  
++static u32 tg3_get_msglevel(struct net_device *dev)
++{
++	struct tg3 *tp = netdev_priv(dev);
++	return tp->msg_enable;
++}
++  
++static void tg3_set_msglevel(struct net_device *dev, u32 value)
++{
++	struct tg3 *tp = netdev_priv(dev);
++	tp->msg_enable = value;
++}
++  
++#if TG3_TSO_SUPPORT != 0
++static int tg3_set_tso(struct net_device *dev, u32 value)
++{
++	struct tg3 *tp = netdev_priv(dev);
++
++	if (!(tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE)) {
++		if (value)
++			return -EINVAL;
++		return 0;
++	}
++	return ethtool_op_set_tso(dev, value);
++}
++#endif
++  
++static int tg3_nway_reset(struct net_device *dev)
++{
++	struct tg3 *tp = netdev_priv(dev);
++	u32 bmcr;
++	int r;
++  
++	spin_lock_irq(&tp->lock);
++	tg3_readphy(tp, MII_BMCR, &bmcr);
++	tg3_readphy(tp, MII_BMCR, &bmcr);
++	r = -EINVAL;
++	if (bmcr & BMCR_ANENABLE) {
++		tg3_writephy(tp, MII_BMCR, bmcr | BMCR_ANRESTART);
++		r = 0;
++	}
++	spin_unlock_irq(&tp->lock);
++  
++	return r;
++}
++  
++static void tg3_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
++{
++	struct tg3 *tp = netdev_priv(dev);
++  
++	ering->rx_max_pending = TG3_RX_RING_SIZE - 1;
++	ering->rx_mini_max_pending = 0;
++	ering->rx_jumbo_max_pending = TG3_RX_JUMBO_RING_SIZE - 1;
++
++	ering->rx_pending = tp->rx_pending;
++	ering->rx_mini_pending = 0;
++	ering->rx_jumbo_pending = tp->rx_jumbo_pending;
++	ering->tx_pending = tp->tx_pending;
++}
++  
++static int tg3_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
++{
++	struct tg3 *tp = netdev_priv(dev);
++  
++	if ((ering->rx_pending > TG3_RX_RING_SIZE - 1) ||
++	    (ering->rx_jumbo_pending > TG3_RX_JUMBO_RING_SIZE - 1) ||
++	    (ering->tx_pending > TG3_TX_RING_SIZE - 1))
++		return -EINVAL;
++  
++	tg3_netif_stop(tp);
++	spin_lock_irq(&tp->lock);
++	spin_lock(&tp->tx_lock);
++  
++	tp->rx_pending = ering->rx_pending;
++
++	if ((tp->tg3_flags2 & TG3_FLG2_MAX_RXPEND_64) &&
++	    tp->rx_pending > 63)
++		tp->rx_pending = 63;
++	tp->rx_jumbo_pending = ering->rx_jumbo_pending;
++	tp->tx_pending = ering->tx_pending;
++
++	tg3_halt(tp);
++	tg3_init_hw(tp);
++	netif_wake_queue(tp->dev);
++	spin_unlock(&tp->tx_lock);
++	spin_unlock_irq(&tp->lock);
++	tg3_netif_start(tp);
++  
++	return 0;
++}
++  
++static void tg3_get_pauseparam(struct net_device *dev, struct ethtool_pauseparam *epause)
++{
++	struct tg3 *tp = netdev_priv(dev);
++  
++	epause->autoneg = (tp->tg3_flags & TG3_FLAG_PAUSE_AUTONEG) != 0;
++	epause->rx_pause = (tp->tg3_flags & TG3_FLAG_PAUSE_RX) != 0;
++	epause->tx_pause = (tp->tg3_flags & TG3_FLAG_PAUSE_TX) != 0;
++}
++  
++static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam *epause)
++{
++	struct tg3 *tp = netdev_priv(dev);
++  
++	tg3_netif_stop(tp);
++	spin_lock_irq(&tp->lock);
++	spin_lock(&tp->tx_lock);
++	if (epause->autoneg)
++		tp->tg3_flags |= TG3_FLAG_PAUSE_AUTONEG;
++	else
++		tp->tg3_flags &= ~TG3_FLAG_PAUSE_AUTONEG;
++	if (epause->rx_pause)
++		tp->tg3_flags |= TG3_FLAG_PAUSE_RX;
++	else
++		tp->tg3_flags &= ~TG3_FLAG_PAUSE_RX;
++	if (epause->tx_pause)
++		tp->tg3_flags |= TG3_FLAG_PAUSE_TX;
++	else
++		tp->tg3_flags &= ~TG3_FLAG_PAUSE_TX;
++	tg3_halt(tp);
++	tg3_init_hw(tp);
++	spin_unlock(&tp->tx_lock);
++	spin_unlock_irq(&tp->lock);
++	tg3_netif_start(tp);
++  
++	return 0;
++}
++  
++static u32 tg3_get_rx_csum(struct net_device *dev)
++{
++	struct tg3 *tp = netdev_priv(dev);
++	return (tp->tg3_flags & TG3_FLAG_RX_CHECKSUMS) != 0;
++}
++  
++static int tg3_set_rx_csum(struct net_device *dev, u32 data)
++{
++	struct tg3 *tp = netdev_priv(dev);
++  
++	if (tp->tg3_flags & TG3_FLAG_BROKEN_CHECKSUMS) {
++		if (data != 0)
++			return -EINVAL;
++  		return 0;
++  	}
++  
++	spin_lock_irq(&tp->lock);
++	if (data)
++		tp->tg3_flags |= TG3_FLAG_RX_CHECKSUMS;
++	else
++		tp->tg3_flags &= ~TG3_FLAG_RX_CHECKSUMS;
++	spin_unlock_irq(&tp->lock);
++  
++	return 0;
++}
++  
++static int tg3_set_tx_csum(struct net_device *dev, u32 data)
++{
++	struct tg3 *tp = netdev_priv(dev);
++  
++	if (tp->tg3_flags & TG3_FLAG_BROKEN_CHECKSUMS) {
++		if (data != 0)
++			return -EINVAL;
++  		return 0;
++  	}
++  
++	if (data)
++		dev->features |= NETIF_F_IP_CSUM;
++	else
++		dev->features &= ~NETIF_F_IP_CSUM;
++
++	return 0;
++}
++
++static int tg3_get_stats_count (struct net_device *dev)
++{
++	return TG3_NUM_STATS;
++}
++
++static void tg3_get_strings (struct net_device *dev, u32 stringset, u8 *buf)
++{
++	switch (stringset) {
++	case ETH_SS_STATS:
++		memcpy(buf, &ethtool_stats_keys, sizeof(ethtool_stats_keys));
++		break;
++	default:
++		WARN_ON(1);	/* we need a WARN() */
++		break;
++	}
++}
++
++static void tg3_get_ethtool_stats (struct net_device *dev,
++				   struct ethtool_stats *estats, u64 *tmp_stats)
++{
++	struct tg3 *tp = dev->priv;
++	memcpy(tmp_stats, tg3_get_estats(tp), sizeof(tp->estats));
++}
++
++static int tg3_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
++{
++	struct mii_ioctl_data *data = if_mii(ifr);
++	struct tg3 *tp = netdev_priv(dev);
++	int err;
++
++	switch(cmd) {
++	case SIOCGMIIPHY:
++		data->phy_id = PHY_ADDR;
++
++		/* fallthru */
++	case SIOCGMIIREG: {
++		u32 mii_regval;
++
++		if (tp->phy_id == PHY_ID_SERDES)
++			break;			/* We have no PHY */
++
++		spin_lock_irq(&tp->lock);
++		err = tg3_readphy(tp, data->reg_num & 0x1f, &mii_regval);
++		spin_unlock_irq(&tp->lock);
++
++		data->val_out = mii_regval;
++
++		return err;
++	}
++
++	case SIOCSMIIREG:
++		if (tp->phy_id == PHY_ID_SERDES)
++			break;			/* We have no PHY */
++
++		if (!capable(CAP_NET_ADMIN))
++			return -EPERM;
++
++		spin_lock_irq(&tp->lock);
++		err = tg3_writephy(tp, data->reg_num & 0x1f, data->val_in);
++		spin_unlock_irq(&tp->lock);
++
++		return err;
++
++	default:
++		/* do nothing */
++		break;
++	}
++	return -EOPNOTSUPP;
++}
++
++#if TG3_VLAN_TAG_USED
++static void tg3_vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
++{
++	struct tg3 *tp = netdev_priv(dev);
++
++	spin_lock_irq(&tp->lock);
++	spin_lock(&tp->tx_lock);
++
++	tp->vlgrp = grp;
++
++	/* Update RX_MODE_KEEP_VLAN_TAG bit in RX_MODE register. */
++	__tg3_set_rx_mode(dev);
++
++	spin_unlock(&tp->tx_lock);
++	spin_unlock_irq(&tp->lock);
++}
++
++static void tg3_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
++{
++	struct tg3 *tp = netdev_priv(dev);
++
++	spin_lock_irq(&tp->lock);
++	spin_lock(&tp->tx_lock);
++	if (tp->vlgrp)
++		tp->vlgrp->vlan_devices[vid] = NULL;
++	spin_unlock(&tp->tx_lock);
++	spin_unlock_irq(&tp->lock);
++}
++#endif
++
++static struct ethtool_ops tg3_ethtool_ops = {
++	.get_settings		= tg3_get_settings,
++	.set_settings		= tg3_set_settings,
++	.get_drvinfo		= tg3_get_drvinfo,
++	.get_regs_len		= tg3_get_regs_len,
++	.get_regs		= tg3_get_regs,
++	.get_wol		= tg3_get_wol,
++	.set_wol		= tg3_set_wol,
++	.get_msglevel		= tg3_get_msglevel,
++	.set_msglevel		= tg3_set_msglevel,
++	.nway_reset		= tg3_nway_reset,
++	.get_link		= ethtool_op_get_link,
++	.get_eeprom_len		= tg3_get_eeprom_len,
++	.get_eeprom		= tg3_get_eeprom,
++	.get_ringparam		= tg3_get_ringparam,
++	.set_ringparam		= tg3_set_ringparam,
++	.get_pauseparam		= tg3_get_pauseparam,
++	.set_pauseparam		= tg3_set_pauseparam,
++	.get_rx_csum		= tg3_get_rx_csum,
++	.set_rx_csum		= tg3_set_rx_csum,
++	.get_tx_csum		= ethtool_op_get_tx_csum,
++	.set_tx_csum		= tg3_set_tx_csum,
++	.get_sg			= ethtool_op_get_sg,
++	.set_sg			= ethtool_op_set_sg,
++#if TG3_TSO_SUPPORT != 0
++	.get_tso		= ethtool_op_get_tso,
++	.set_tso		= tg3_set_tso,
++#endif
++	.get_strings		= tg3_get_strings,
++	.get_stats_count	= tg3_get_stats_count,
++	.get_ethtool_stats	= tg3_get_ethtool_stats,
++};
++
++/* Chips other than 5700/5701 use the NVRAM for fetching info. */
++static void __devinit tg3_nvram_init(struct tg3 *tp)
++{
++	int j;
++
++	if (tp->tg3_flags2 & TG3_FLG2_SUN_5704)
++		return;
++
++	tw32_f(GRC_EEPROM_ADDR,
++	     (EEPROM_ADDR_FSM_RESET |
++	      (EEPROM_DEFAULT_CLOCK_PERIOD <<
++	       EEPROM_ADDR_CLKPERD_SHIFT)));
++
++	/* XXX schedule_timeout() ... */
++	for (j = 0; j < 100; j++)
++		udelay(10);
++
++	/* Enable seeprom accesses. */
++	tw32_f(GRC_LOCAL_CTRL,
++	     tr32(GRC_LOCAL_CTRL) | GRC_LCLCTRL_AUTO_SEEPROM);
++	udelay(100);
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700 &&
++	    GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5701) {
++		u32 nvcfg1;
++
++		if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) {
++			u32 nvaccess = tr32(NVRAM_ACCESS);
++
++			tw32_f(NVRAM_ACCESS, nvaccess | ACCESS_ENABLE);
++		}
++
++		nvcfg1 = tr32(NVRAM_CFG1);
++
++		tp->tg3_flags |= TG3_FLAG_NVRAM;
++		if (nvcfg1 & NVRAM_CFG1_FLASHIF_ENAB) {
++			if (nvcfg1 & NVRAM_CFG1_BUFFERED_MODE)
++				tp->tg3_flags |= TG3_FLAG_NVRAM_BUFFERED;
++		} else {
++			nvcfg1 &= ~NVRAM_CFG1_COMPAT_BYPASS;
++			tw32(NVRAM_CFG1, nvcfg1);
++		}
++
++		if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) {
++			u32 nvaccess = tr32(NVRAM_ACCESS);
++
++			tw32_f(NVRAM_ACCESS, nvaccess & ~ACCESS_ENABLE);
++		}
++	} else {
++		tp->tg3_flags &= ~(TG3_FLAG_NVRAM | TG3_FLAG_NVRAM_BUFFERED);
++	}
++}
++
++static int __devinit tg3_nvram_read_using_eeprom(struct tg3 *tp,
++						 u32 offset, u32 *val)
++{
++	u32 tmp;
++	int i;
++
++	if (offset > EEPROM_ADDR_ADDR_MASK ||
++	    (offset % 4) != 0)
++		return -EINVAL;
++
++	tmp = tr32(GRC_EEPROM_ADDR) & ~(EEPROM_ADDR_ADDR_MASK |
++					EEPROM_ADDR_DEVID_MASK |
++					EEPROM_ADDR_READ);
++	tw32(GRC_EEPROM_ADDR,
++	     tmp |
++	     (0 << EEPROM_ADDR_DEVID_SHIFT) |
++	     ((offset << EEPROM_ADDR_ADDR_SHIFT) &
++	      EEPROM_ADDR_ADDR_MASK) |
++	     EEPROM_ADDR_READ | EEPROM_ADDR_START);
++
++	for (i = 0; i < 10000; i++) {
++		tmp = tr32(GRC_EEPROM_ADDR);
++
++		if (tmp & EEPROM_ADDR_COMPLETE)
++			break;
++		udelay(100);
++	}
++	if (!(tmp & EEPROM_ADDR_COMPLETE))
++		return -EBUSY;
++
++	*val = tr32(GRC_EEPROM_DATA);
++	return 0;
++}
++
++static int __devinit tg3_nvram_read(struct tg3 *tp,
++				    u32 offset, u32 *val)
++{
++	int i;
++
++	if (tp->tg3_flags2 & TG3_FLG2_SUN_5704) {
++		printk(KERN_ERR PFX "Attempt to do nvram_read on Sun 5704\n");
++		return -EINVAL;
++	}
++
++	if (!(tp->tg3_flags & TG3_FLAG_NVRAM))
++		return tg3_nvram_read_using_eeprom(tp, offset, val);
++
++	if (tp->tg3_flags & TG3_FLAG_NVRAM_BUFFERED)
++		offset = ((offset / NVRAM_BUFFERED_PAGE_SIZE) <<
++			  NVRAM_BUFFERED_PAGE_POS) +
++			(offset % NVRAM_BUFFERED_PAGE_SIZE);
++
++	if (offset > NVRAM_ADDR_MSK)
++		return -EINVAL;
++
++	tg3_nvram_lock(tp);
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) {
++		u32 nvaccess = tr32(NVRAM_ACCESS);
++
++		tw32_f(NVRAM_ACCESS, nvaccess | ACCESS_ENABLE);
++	}
++
++	tw32(NVRAM_ADDR, offset);
++	tw32(NVRAM_CMD,
++	     NVRAM_CMD_RD | NVRAM_CMD_GO |
++	     NVRAM_CMD_FIRST | NVRAM_CMD_LAST | NVRAM_CMD_DONE);
++
++	/* Wait for done bit to clear. */
++	for (i = 0; i < 1000; i++) {
++		udelay(10);
++		if (tr32(NVRAM_CMD) & NVRAM_CMD_DONE) {
++			udelay(10);
++			*val = swab32(tr32(NVRAM_RDDATA));
++			break;
++		}
++	}
++
++	tg3_nvram_unlock(tp);
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) {
++		u32 nvaccess = tr32(NVRAM_ACCESS);
++
++		tw32_f(NVRAM_ACCESS, nvaccess & ~ACCESS_ENABLE);
++	}
++
++	if (i >= 1000)
++		return -EBUSY;
++
++	return 0;
++}
++
++struct subsys_tbl_ent {
++	u16 subsys_vendor, subsys_devid;
++	u32 phy_id;
++};
++
++static struct subsys_tbl_ent subsys_id_to_phy_id[] = {
++	/* Broadcom boards. */
++	{ PCI_VENDOR_ID_BROADCOM, 0x1644, PHY_ID_BCM5401 }, /* BCM95700A6 */
++	{ PCI_VENDOR_ID_BROADCOM, 0x0001, PHY_ID_BCM5701 }, /* BCM95701A5 */
++	{ PCI_VENDOR_ID_BROADCOM, 0x0002, PHY_ID_BCM8002 }, /* BCM95700T6 */
++	{ PCI_VENDOR_ID_BROADCOM, 0x0003, PHY_ID_SERDES  }, /* BCM95700A9 */
++	{ PCI_VENDOR_ID_BROADCOM, 0x0005, PHY_ID_BCM5701 }, /* BCM95701T1 */
++	{ PCI_VENDOR_ID_BROADCOM, 0x0006, PHY_ID_BCM5701 }, /* BCM95701T8 */
++	{ PCI_VENDOR_ID_BROADCOM, 0x0007, PHY_ID_SERDES  }, /* BCM95701A7 */
++	{ PCI_VENDOR_ID_BROADCOM, 0x0008, PHY_ID_BCM5701 }, /* BCM95701A10 */
++	{ PCI_VENDOR_ID_BROADCOM, 0x8008, PHY_ID_BCM5701 }, /* BCM95701A12 */
++	{ PCI_VENDOR_ID_BROADCOM, 0x0009, PHY_ID_BCM5703 }, /* BCM95703Ax1 */
++	{ PCI_VENDOR_ID_BROADCOM, 0x8009, PHY_ID_BCM5703 }, /* BCM95703Ax2 */
++
++	/* 3com boards. */
++	{ PCI_VENDOR_ID_3COM, 0x1000, PHY_ID_BCM5401 }, /* 3C996T */
++	{ PCI_VENDOR_ID_3COM, 0x1006, PHY_ID_BCM5701 }, /* 3C996BT */
++	{ PCI_VENDOR_ID_3COM, 0x1004, PHY_ID_SERDES  }, /* 3C996SX */
++	{ PCI_VENDOR_ID_3COM, 0x1007, PHY_ID_BCM5701 }, /* 3C1000T */
++	{ PCI_VENDOR_ID_3COM, 0x1008, PHY_ID_BCM5701 }, /* 3C940BR01 */
++
++	/* DELL boards. */
++	{ PCI_VENDOR_ID_DELL, 0x00d1, PHY_ID_BCM5401 }, /* VIPER */
++	{ PCI_VENDOR_ID_DELL, 0x0106, PHY_ID_BCM5401 }, /* JAGUAR */
++	{ PCI_VENDOR_ID_DELL, 0x0109, PHY_ID_BCM5411 }, /* MERLOT */
++	{ PCI_VENDOR_ID_DELL, 0x010a, PHY_ID_BCM5411 }, /* SLIM_MERLOT */
++
++	/* Compaq boards. */
++	{ PCI_VENDOR_ID_COMPAQ, 0x007c, PHY_ID_BCM5701 }, /* BANSHEE */
++	{ PCI_VENDOR_ID_COMPAQ, 0x009a, PHY_ID_BCM5701 }, /* BANSHEE_2 */
++	{ PCI_VENDOR_ID_COMPAQ, 0x007d, PHY_ID_SERDES  }, /* CHANGELING */
++	{ PCI_VENDOR_ID_COMPAQ, 0x0085, PHY_ID_BCM5701 }, /* NC7780 */
++	{ PCI_VENDOR_ID_COMPAQ, 0x0099, PHY_ID_BCM5701 }, /* NC7780_2 */
++
++	/* IBM boards. */
++	{ PCI_VENDOR_ID_IBM, 0x0281, PHY_ID_SERDES } /* IBM??? */
++};
++
++static int __devinit tg3_phy_probe(struct tg3 *tp)
++{
++	u32 eeprom_phy_id, hw_phy_id_1, hw_phy_id_2;
++	u32 hw_phy_id, hw_phy_id_masked;
++	u32 val;
++	int i, eeprom_signature_found, err;
++
++	tp->phy_id = PHY_ID_INVALID;
++	for (i = 0; i < ARRAY_SIZE(subsys_id_to_phy_id); i++) {
++		if ((subsys_id_to_phy_id[i].subsys_vendor ==
++		     tp->pdev->subsystem_vendor) &&
++		    (subsys_id_to_phy_id[i].subsys_devid ==
++		     tp->pdev->subsystem_device)) {
++			tp->phy_id = subsys_id_to_phy_id[i].phy_id;
++			break;
++		}
++	}
++
++	eeprom_phy_id = PHY_ID_INVALID;
++	eeprom_signature_found = 0;
++	tg3_read_mem(tp, NIC_SRAM_DATA_SIG, &val);
++	if (val == NIC_SRAM_DATA_SIG_MAGIC) {
++		u32 nic_cfg, led_cfg;
++
++		tg3_read_mem(tp, NIC_SRAM_DATA_CFG, &nic_cfg);
++		tp->nic_sram_data_cfg = nic_cfg;
++
++		eeprom_signature_found = 1;
++
++		if ((nic_cfg & NIC_SRAM_DATA_CFG_PHY_TYPE_MASK) ==
++		    NIC_SRAM_DATA_CFG_PHY_TYPE_FIBER) {
++			eeprom_phy_id = PHY_ID_SERDES;
++		} else {
++			u32 nic_phy_id;
++
++			tg3_read_mem(tp, NIC_SRAM_DATA_PHY_ID, &nic_phy_id);
++			if (nic_phy_id != 0) {
++				u32 id1 = nic_phy_id & NIC_SRAM_DATA_PHY_ID1_MASK;
++				u32 id2 = nic_phy_id & NIC_SRAM_DATA_PHY_ID2_MASK;
++
++				eeprom_phy_id  = (id1 >> 16) << 10;
++				eeprom_phy_id |= (id2 & 0xfc00) << 16;
++				eeprom_phy_id |= (id2 & 0x03ff) <<  0;
++			}
++		}
++
++		if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) {
++			tg3_read_mem(tp, NIC_SRAM_DATA_CFG_2, &led_cfg);
++			led_cfg &= (NIC_SRAM_DATA_CFG_LED_MODE_MASK |
++				    SHASTA_EXT_LED_MODE_MASK);
++		} else
++			led_cfg = nic_cfg & NIC_SRAM_DATA_CFG_LED_MODE_MASK;
++
++		switch (led_cfg) {
++		default:
++		case NIC_SRAM_DATA_CFG_LED_MODE_PHY_1:
++			tp->led_ctrl = LED_CTRL_MODE_PHY_1;
++			break;
++
++		case NIC_SRAM_DATA_CFG_LED_MODE_PHY_2:
++			tp->led_ctrl = LED_CTRL_MODE_PHY_2;
++			break;
++
++		case NIC_SRAM_DATA_CFG_LED_MODE_MAC:
++			tp->led_ctrl = LED_CTRL_MODE_MAC;
++			break;
++
++		case SHASTA_EXT_LED_SHARED:
++			tp->led_ctrl = LED_CTRL_MODE_SHARED;
++			if (tp->pci_chip_rev_id != CHIPREV_ID_5750_A0 &&
++			    tp->pci_chip_rev_id != CHIPREV_ID_5750_A1)
++				tp->led_ctrl |= (LED_CTRL_MODE_PHY_1 |
++						 LED_CTRL_MODE_PHY_2);
++			break;
++
++		case SHASTA_EXT_LED_MAC:
++			tp->led_ctrl = LED_CTRL_MODE_SHASTA_MAC;
++			break;
++
++		case SHASTA_EXT_LED_COMBO:
++			tp->led_ctrl = LED_CTRL_MODE_COMBO;
++			if (tp->pci_chip_rev_id != CHIPREV_ID_5750_A0)
++				tp->led_ctrl |= (LED_CTRL_MODE_PHY_1 |
++						 LED_CTRL_MODE_PHY_2);
++			break;
++
++		};
++
++		if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 ||
++		     GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701) &&
++		    tp->pdev->subsystem_vendor == PCI_VENDOR_ID_DELL)
++			tp->led_ctrl = LED_CTRL_MODE_PHY_2;
++
++		if (((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) ||
++		     (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) ||
++		     (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705)) &&
++		    (nic_cfg & NIC_SRAM_DATA_CFG_EEPROM_WP))
++			tp->tg3_flags |= TG3_FLAG_EEPROM_WRITE_PROT;
++
++		if (nic_cfg & NIC_SRAM_DATA_CFG_ASF_ENABLE) {
++			tp->tg3_flags |= TG3_FLAG_ENABLE_ASF;
++			if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750)
++				tp->tg3_flags2 |= TG3_FLG2_ASF_NEW_HANDSHAKE;
++		}
++		if (nic_cfg & NIC_SRAM_DATA_CFG_FIBER_WOL)
++			tp->tg3_flags |= TG3_FLAG_SERDES_WOL_CAP;
++	}
++
++	/* Reading the PHY ID register can conflict with ASF
++	 * firwmare access to the PHY hardware.
++	 */
++	err = 0;
++	if (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) {
++		hw_phy_id = hw_phy_id_masked = PHY_ID_INVALID;
++	} else {
++		/* Now read the physical PHY_ID from the chip and verify
++		 * that it is sane.  If it doesn't look good, we fall back
++		 * to either the hard-coded table based PHY_ID and failing
++		 * that the value found in the eeprom area.
++		 */
++		err |= tg3_readphy(tp, MII_PHYSID1, &hw_phy_id_1);
++		err |= tg3_readphy(tp, MII_PHYSID2, &hw_phy_id_2);
++
++		hw_phy_id  = (hw_phy_id_1 & 0xffff) << 10;
++		hw_phy_id |= (hw_phy_id_2 & 0xfc00) << 16;
++		hw_phy_id |= (hw_phy_id_2 & 0x03ff) <<  0;
++
++		hw_phy_id_masked = hw_phy_id & PHY_ID_MASK;
++	}
++
++	if (!err && KNOWN_PHY_ID(hw_phy_id_masked)) {
++		tp->phy_id = hw_phy_id;
++	} else {
++		/* phy_id currently holds the value found in the
++		 * subsys_id_to_phy_id[] table or PHY_ID_INVALID
++		 * if a match was not found there.
++		 */
++		if (tp->phy_id == PHY_ID_INVALID) {
++			if (!eeprom_signature_found ||
++			    !KNOWN_PHY_ID(eeprom_phy_id & PHY_ID_MASK))
++				return -ENODEV;
++			tp->phy_id = eeprom_phy_id;
++		}
++	}
++
++	if (tp->phy_id != PHY_ID_SERDES &&
++	    !(tp->tg3_flags & TG3_FLAG_ENABLE_ASF)) {
++		u32 bmsr, adv_reg, tg3_ctrl;
++
++		tg3_readphy(tp, MII_BMSR, &bmsr);
++		tg3_readphy(tp, MII_BMSR, &bmsr);
++
++		if (bmsr & BMSR_LSTATUS)
++			goto skip_phy_reset;
++		    
++		err = tg3_phy_reset(tp);
++		if (err)
++			return err;
++
++		adv_reg = (ADVERTISE_10HALF | ADVERTISE_10FULL |
++			   ADVERTISE_100HALF | ADVERTISE_100FULL |
++			   ADVERTISE_CSMA | ADVERTISE_PAUSE_CAP);
++		tg3_ctrl = 0;
++		if (!(tp->tg3_flags & TG3_FLAG_10_100_ONLY)) {
++			tg3_ctrl = (MII_TG3_CTRL_ADV_1000_HALF |
++				    MII_TG3_CTRL_ADV_1000_FULL);
++			if (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0 ||
++			    tp->pci_chip_rev_id == CHIPREV_ID_5701_B0)
++				tg3_ctrl |= (MII_TG3_CTRL_AS_MASTER |
++					     MII_TG3_CTRL_ENABLE_AS_MASTER);
++		}
++
++		if (!tg3_copper_is_advertising_all(tp)) {
++			tg3_writephy(tp, MII_ADVERTISE, adv_reg);
++
++			if (!(tp->tg3_flags & TG3_FLAG_10_100_ONLY))
++				tg3_writephy(tp, MII_TG3_CTRL, tg3_ctrl);
++
++			tg3_writephy(tp, MII_BMCR,
++				     BMCR_ANENABLE | BMCR_ANRESTART);
++		}
++		tg3_phy_set_wirespeed(tp);
++
++		tg3_writephy(tp, MII_ADVERTISE, adv_reg);
++		if (!(tp->tg3_flags & TG3_FLAG_10_100_ONLY))
++			tg3_writephy(tp, MII_TG3_CTRL, tg3_ctrl);
++	}
++
++skip_phy_reset:
++	if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5401) {
++		err = tg3_init_5401phy_dsp(tp);
++		if (err)
++			return err;
++	}
++
++	if (!err && ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5401)) {
++		err = tg3_init_5401phy_dsp(tp);
++	}
++
++	if (!eeprom_signature_found)
++		tp->led_ctrl = LED_CTRL_MODE_PHY_1;
++
++	if (tp->phy_id == PHY_ID_SERDES)
++		tp->link_config.advertising =
++			(ADVERTISED_1000baseT_Half |
++			 ADVERTISED_1000baseT_Full |
++			 ADVERTISED_Autoneg |
++			 ADVERTISED_FIBRE);
++	if (tp->tg3_flags & TG3_FLAG_10_100_ONLY)
++		tp->link_config.advertising &=
++			~(ADVERTISED_1000baseT_Half |
++			  ADVERTISED_1000baseT_Full);
++
++	return err;
++}
++
++static void __devinit tg3_read_partno(struct tg3 *tp)
++{
++	unsigned char vpd_data[256];
++	int i;
++
++	if (tp->tg3_flags2 & TG3_FLG2_SUN_5704) {
++		/* Sun decided not to put the necessary bits in the
++		 * NVRAM of their onboard tg3 parts :(
++		 */
++		strcpy(tp->board_part_number, "Sun 5704");
++		return;
++	}
++
++	for (i = 0; i < 256; i += 4) {
++		u32 tmp;
++
++		if (tg3_nvram_read(tp, 0x100 + i, &tmp))
++			goto out_not_found;
++
++		vpd_data[i + 0] = ((tmp >>  0) & 0xff);
++		vpd_data[i + 1] = ((tmp >>  8) & 0xff);
++		vpd_data[i + 2] = ((tmp >> 16) & 0xff);
++		vpd_data[i + 3] = ((tmp >> 24) & 0xff);
++	}
++
++	/* Now parse and find the part number. */
++	for (i = 0; i < 256; ) {
++		unsigned char val = vpd_data[i];
++		int block_end;
++
++		if (val == 0x82 || val == 0x91) {
++			i = (i + 3 +
++			     (vpd_data[i + 1] +
++			      (vpd_data[i + 2] << 8)));
++			continue;
++		}
++
++		if (val != 0x90)
++			goto out_not_found;
++
++		block_end = (i + 3 +
++			     (vpd_data[i + 1] +
++			      (vpd_data[i + 2] << 8)));
++		i += 3;
++		while (i < block_end) {
++			if (vpd_data[i + 0] == 'P' &&
++			    vpd_data[i + 1] == 'N') {
++				int partno_len = vpd_data[i + 2];
++
++				if (partno_len > 24)
++					goto out_not_found;
++
++				memcpy(tp->board_part_number,
++				       &vpd_data[i + 3],
++				       partno_len);
++
++				/* Success. */
++				return;
++			}
++		}
++
++		/* Part number not found. */
++		goto out_not_found;
++	}
++
++out_not_found:
++	strcpy(tp->board_part_number, "none");
++}
++
++#ifdef CONFIG_SPARC64
++static int __devinit tg3_is_sun_5704(struct tg3 *tp)
++{
++	struct pci_dev *pdev = tp->pdev;
++	struct pcidev_cookie *pcp = pdev->sysdata;
++
++	if (pcp != NULL) {
++		int node = pcp->prom_node;
++		u32 venid, devid;
++		int err;
++
++		err = prom_getproperty(node, "subsystem-vendor-id",
++				       (char *) &venid, sizeof(venid));
++		if (err == 0 || err == -1)
++			return 0;
++		err = prom_getproperty(node, "subsystem-id",
++				       (char *) &devid, sizeof(devid));
++		if (err == 0 || err == -1)
++			return 0;
++
++		if (venid == PCI_VENDOR_ID_SUN &&
++		    devid == PCI_DEVICE_ID_TIGON3_5704)
++			return 1;
++	}
++	return 0;
++}
++#endif
++
++static int __devinit tg3_get_invariants(struct tg3 *tp)
++{
++	u32 misc_ctrl_reg;
++	u32 cacheline_sz_reg;
++	u32 pci_state_reg, grc_misc_cfg;
++	u32 val;
++	u16 pci_cmd;
++	int err;
++
++#ifdef CONFIG_SPARC64
++	if (tg3_is_sun_5704(tp))
++		tp->tg3_flags2 |= TG3_FLG2_SUN_5704;
++#endif
++
++	/* If we have an AMD 762 or Intel ICH/ICH0/ICH2 chipset, write
++	 * reordering to the mailbox registers done by the host
++	 * controller can cause major troubles.  We read back from
++	 * every mailbox register write to force the writes to be
++	 * posted to the chip in order.
++	 */
++	if (pci_find_device(PCI_VENDOR_ID_INTEL,
++			    PCI_DEVICE_ID_INTEL_82801AA_8, NULL) ||
++	    pci_find_device(PCI_VENDOR_ID_INTEL,
++			    PCI_DEVICE_ID_INTEL_82801AB_8, NULL) ||
++	    pci_find_device(PCI_VENDOR_ID_INTEL,
++			    PCI_DEVICE_ID_INTEL_82801BA_11, NULL) ||
++	    pci_find_device(PCI_VENDOR_ID_INTEL,
++			    PCI_DEVICE_ID_INTEL_82801BA_6, NULL) ||
++	    pci_find_device(PCI_VENDOR_ID_AMD,
++			    PCI_DEVICE_ID_AMD_FE_GATE_700C, NULL))
++		tp->tg3_flags |= TG3_FLAG_MBOX_WRITE_REORDER;
++
++	/* Force memory write invalidate off.  If we leave it on,
++	 * then on 5700_BX chips we have to enable a workaround.
++	 * The workaround is to set the TG3PCI_DMA_RW_CTRL boundary
++	 * to match the cacheline size.  The Broadcom driver have this
++	 * workaround but turns MWI off all the times so never uses
++	 * it.  This seems to suggest that the workaround is insufficient.
++	 */
++	pci_read_config_word(tp->pdev, PCI_COMMAND, &pci_cmd);
++	pci_cmd &= ~PCI_COMMAND_INVALIDATE;
++	pci_write_config_word(tp->pdev, PCI_COMMAND, pci_cmd);
++
++	/* It is absolutely critical that TG3PCI_MISC_HOST_CTRL
++	 * has the register indirect write enable bit set before
++	 * we try to access any of the MMIO registers.  It is also
++	 * critical that the PCI-X hw workaround situation is decided
++	 * before that as well.
++	 */
++	pci_read_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL,
++			      &misc_ctrl_reg);
++
++	tp->pci_chip_rev_id = (misc_ctrl_reg >>
++			       MISC_HOST_CTRL_CHIPREV_SHIFT);
++
++	/* Initialize misc host control in PCI block. */
++	tp->misc_host_ctrl |= (misc_ctrl_reg &
++			       MISC_HOST_CTRL_CHIPREV);
++	pci_write_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL,
++			       tp->misc_host_ctrl);
++
++	pci_read_config_dword(tp->pdev, TG3PCI_CACHELINESZ,
++			      &cacheline_sz_reg);
++
++	tp->pci_cacheline_sz = (cacheline_sz_reg >>  0) & 0xff;
++	tp->pci_lat_timer    = (cacheline_sz_reg >>  8) & 0xff;
++	tp->pci_hdr_type     = (cacheline_sz_reg >> 16) & 0xff;
++	tp->pci_bist         = (cacheline_sz_reg >> 24) & 0xff;
++
++	if (pci_find_capability(tp->pdev, PCI_CAP_ID_EXP) != 0)
++		tp->tg3_flags2 |= TG3_FLG2_PCI_EXPRESS;
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703 &&
++	    tp->pci_lat_timer < 64) {
++		tp->pci_lat_timer = 64;
++
++		cacheline_sz_reg  = ((tp->pci_cacheline_sz & 0xff) <<  0);
++		cacheline_sz_reg |= ((tp->pci_lat_timer    & 0xff) <<  8);
++		cacheline_sz_reg |= ((tp->pci_hdr_type     & 0xff) << 16);
++		cacheline_sz_reg |= ((tp->pci_bist         & 0xff) << 24);
++
++		pci_write_config_dword(tp->pdev, TG3PCI_CACHELINESZ,
++				       cacheline_sz_reg);
++	}
++
++	pci_read_config_dword(tp->pdev, TG3PCI_PCISTATE,
++			      &pci_state_reg);
++
++	if ((pci_state_reg & PCISTATE_CONV_PCI_MODE) == 0) {
++		tp->tg3_flags |= TG3_FLAG_PCIX_MODE;
++
++		/* If this is a 5700 BX chipset, and we are in PCI-X
++		 * mode, enable register write workaround.
++		 *
++		 * The workaround is to use indirect register accesses
++		 * for all chip writes not to mailbox registers.
++		 */
++		if (GET_CHIP_REV(tp->pci_chip_rev_id) == CHIPREV_5700_BX) {
++			u32 pm_reg;
++			u16 pci_cmd;
++
++			tp->tg3_flags |= TG3_FLAG_PCIX_TARGET_HWBUG;
++
++			/* The chip can have it's power management PCI config
++			 * space registers clobbered due to this bug.
++			 * So explicitly force the chip into D0 here.
++			 */
++			pci_read_config_dword(tp->pdev, TG3PCI_PM_CTRL_STAT,
++					      &pm_reg);
++			pm_reg &= ~PCI_PM_CTRL_STATE_MASK;
++			pm_reg |= PCI_PM_CTRL_PME_ENABLE | 0 /* D0 */;
++			pci_write_config_dword(tp->pdev, TG3PCI_PM_CTRL_STAT,
++					       pm_reg);
++
++			/* Also, force SERR#/PERR# in PCI command. */
++			pci_read_config_word(tp->pdev, PCI_COMMAND, &pci_cmd);
++			pci_cmd |= PCI_COMMAND_PARITY | PCI_COMMAND_SERR;
++			pci_write_config_word(tp->pdev, PCI_COMMAND, pci_cmd);
++		}
++	}
++
++	/* Back to back register writes can cause problems on this chip,
++	 * the workaround is to read back all reg writes except those to
++	 * mailbox regs.  See tg3_write_indirect_reg32().
++	 *
++	 * PCI Express 5750_A0 rev chips need this workaround too.
++	 */
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701 ||
++	    ((tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) &&
++	     tp->pci_chip_rev_id == CHIPREV_ID_5750_A0))
++		tp->tg3_flags |= TG3_FLAG_5701_REG_WRITE_BUG;
++
++	if ((pci_state_reg & PCISTATE_BUS_SPEED_HIGH) != 0)
++		tp->tg3_flags |= TG3_FLAG_PCI_HIGH_SPEED;
++	if ((pci_state_reg & PCISTATE_BUS_32BIT) != 0)
++		tp->tg3_flags |= TG3_FLAG_PCI_32BIT;
++
++	/* Chip-specific fixup from Broadcom driver */
++	if ((tp->pci_chip_rev_id == CHIPREV_ID_5704_A0) &&
++	    (!(pci_state_reg & PCISTATE_RETRY_SAME_DMA))) {
++		pci_state_reg |= PCISTATE_RETRY_SAME_DMA;
++		pci_write_config_dword(tp->pdev, TG3PCI_PCISTATE, pci_state_reg);
++	}
++
++	/* Force the chip into D0. */
++	err = tg3_set_power_state(tp, 0);
++	if (err) {
++		printk(KERN_ERR PFX "(%s) transition to D0 failed\n",
++		       pci_name(tp->pdev));
++		return err;
++	}
++
++	/* 5700 B0 chips do not support checksumming correctly due
++	 * to hardware bugs.
++	 */
++	if (tp->pci_chip_rev_id == CHIPREV_ID_5700_B0)
++		tp->tg3_flags |= TG3_FLAG_BROKEN_CHECKSUMS;
++
++	/* Pseudo-header checksum is done by hardware logic and not
++	 * the offload processers, so make the chip do the pseudo-
++	 * header checksums on receive.  For transmit it is more
++	 * convenient to do the pseudo-header checksum in software
++	 * as Linux does that on transmit for us in all cases.
++	 */
++	tp->tg3_flags |= TG3_FLAG_NO_TX_PSEUDO_CSUM;
++	tp->tg3_flags &= ~TG3_FLAG_NO_RX_PSEUDO_CSUM;
++
++	/* Derive initial jumbo mode from MTU assigned in
++	 * ether_setup() via the alloc_etherdev() call
++	 */
++	if (tp->dev->mtu > ETH_DATA_LEN)
++		tp->tg3_flags |= TG3_FLAG_JUMBO_ENABLE;
++
++	/* Determine WakeOnLan speed to use. */
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 ||
++	    tp->pci_chip_rev_id == CHIPREV_ID_5701_A0 ||
++	    tp->pci_chip_rev_id == CHIPREV_ID_5701_B0 ||
++	    tp->pci_chip_rev_id == CHIPREV_ID_5701_B2) {
++		tp->tg3_flags &= ~(TG3_FLAG_WOL_SPEED_100MB);
++	} else {
++		tp->tg3_flags |= TG3_FLAG_WOL_SPEED_100MB;
++	}
++
++	/* A few boards don't want Ethernet at WireSpeed phy feature */
++	if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700) ||
++	    ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) &&
++	     (tp->pci_chip_rev_id != CHIPREV_ID_5705_A0) &&
++	     (tp->pci_chip_rev_id != CHIPREV_ID_5705_A1)))
++		tp->tg3_flags2 |= TG3_FLG2_NO_ETH_WIRE_SPEED;
++
++	if (GET_CHIP_REV(tp->pci_chip_rev_id) == CHIPREV_5703_AX ||
++	    GET_CHIP_REV(tp->pci_chip_rev_id) == CHIPREV_5704_AX)
++		tp->tg3_flags2 |= TG3_FLG2_PHY_ADC_BUG;
++	if (tp->pci_chip_rev_id == CHIPREV_ID_5704_A0)
++		tp->tg3_flags2 |= TG3_FLG2_PHY_5704_A0_BUG;
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ||
++	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750)
++		tp->tg3_flags2 |= TG3_FLG2_PHY_BER_BUG;
++
++	/* Only 5701 and later support tagged irq status mode.
++	 * Also, 5788 chips cannot use tagged irq status.
++	 *
++	 * However, since we are using NAPI avoid tagged irq status
++	 * because the interrupt condition is more difficult to
++	 * fully clear in that mode.
++	 */
++	tp->coalesce_mode = 0;
++
++	if (GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5700_AX &&
++	    GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5700_BX)
++		tp->coalesce_mode |= HOSTCC_MODE_32BYTE;
++
++	/* Initialize MAC MI mode, polling disabled. */
++	tw32_f(MAC_MI_MODE, tp->mi_mode);
++	udelay(80);
++
++	/* Initialize data/descriptor byte/word swapping. */
++	val = tr32(GRC_MODE);
++	val &= GRC_MODE_HOST_STACKUP;
++	tw32(GRC_MODE, val | tp->grc_mode);
++
++	tg3_switch_clocks(tp);
++
++	/* Clear this out for sanity. */
++	tw32(TG3PCI_MEM_WIN_BASE_ADDR, 0);
++
++	pci_read_config_dword(tp->pdev, TG3PCI_PCISTATE,
++			      &pci_state_reg);
++	if ((pci_state_reg & PCISTATE_CONV_PCI_MODE) == 0 &&
++	    (tp->tg3_flags & TG3_FLAG_PCIX_TARGET_HWBUG) == 0) {
++		u32 chiprevid = GET_CHIP_REV_ID(tp->misc_host_ctrl);
++
++		if (chiprevid == CHIPREV_ID_5701_A0 ||
++		    chiprevid == CHIPREV_ID_5701_B0 ||
++		    chiprevid == CHIPREV_ID_5701_B2 ||
++		    chiprevid == CHIPREV_ID_5701_B5) {
++			unsigned long sram_base;
++
++			/* Write some dummy words into the SRAM status block
++			 * area, see if it reads back correctly.  If the return
++			 * value is bad, force enable the PCIX workaround.
++			 */
++			sram_base = tp->regs + NIC_SRAM_WIN_BASE + NIC_SRAM_STATS_BLK;
++
++			writel(0x00000000, sram_base);
++			writel(0x00000000, sram_base + 4);
++			writel(0xffffffff, sram_base + 4);
++			if (readl(sram_base) != 0x00000000)
++				tp->tg3_flags |= TG3_FLAG_PCIX_TARGET_HWBUG;
++		}
++	}
++
++	udelay(50);
++	tg3_nvram_init(tp);
++
++	/* Always use host TXDs, it performs better in particular
++	 * with multi-frag packets.  The tests below are kept here
++	 * as documentation should we change this decision again
++	 * in the future.
++	 */
++	tp->tg3_flags |= TG3_FLAG_HOST_TXDS;
++
++#if 0
++	/* Determine if TX descriptors will reside in
++	 * main memory or in the chip SRAM.
++	 */
++	if ((tp->tg3_flags & TG3_FLAG_PCIX_TARGET_HWBUG) != 0 ||
++	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ||
++	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750)
++		tp->tg3_flags |= TG3_FLAG_HOST_TXDS;
++#endif
++
++	grc_misc_cfg = tr32(GRC_MISC_CFG);
++	grc_misc_cfg &= GRC_MISC_CFG_BOARD_ID_MASK;
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 &&
++	    grc_misc_cfg == GRC_MISC_CFG_BOARD_ID_5704CIOBE) {
++		tp->tg3_flags |= TG3_FLAG_SPLIT_MODE;
++		tp->split_mode_max_reqs = SPLIT_MODE_5704_MAX_REQ;
++	}
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 &&
++	    (grc_misc_cfg == GRC_MISC_CFG_BOARD_ID_5788 ||
++	     grc_misc_cfg == GRC_MISC_CFG_BOARD_ID_5788M))
++		tp->tg3_flags2 |= TG3_FLG2_IS_5788;
++
++	/* these are limited to 10/100 only */
++	if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703 &&
++	     (grc_misc_cfg == 0x8000 || grc_misc_cfg == 0x4000)) ||
++	    (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 &&
++	     tp->pdev->vendor == PCI_VENDOR_ID_BROADCOM &&
++	     (tp->pdev->device == PCI_DEVICE_ID_TIGON3_5901 ||
++	      tp->pdev->device == PCI_DEVICE_ID_TIGON3_5901_2 ||
++	      tp->pdev->device == PCI_DEVICE_ID_TIGON3_5705F)) ||
++	    (tp->pdev->vendor == PCI_VENDOR_ID_BROADCOM &&
++	     tp->pdev->device == PCI_DEVICE_ID_TIGON3_5751F))
++		tp->tg3_flags |= TG3_FLAG_10_100_ONLY;
++
++	err = tg3_phy_probe(tp);
++	if (err) {
++		printk(KERN_ERR PFX "(%s) phy probe failed, err %d\n",
++		       pci_name(tp->pdev), err);
++		/* ... but do not return immediately ... */
++	}
++
++	tg3_read_partno(tp);
++
++	if (tp->phy_id == PHY_ID_SERDES) {
++		tp->tg3_flags &= ~TG3_FLAG_USE_MI_INTERRUPT;
++	} else {
++		if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700)
++			tp->tg3_flags |= TG3_FLAG_USE_MI_INTERRUPT;
++		else
++			tp->tg3_flags &= ~TG3_FLAG_USE_MI_INTERRUPT;
++	}
++
++	/* 5700 {AX,BX} chips have a broken status block link
++	 * change bit implementation, so we must use the
++	 * status register in those cases.
++	 */
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700)
++		tp->tg3_flags |= TG3_FLAG_USE_LINKCHG_REG;
++	else
++		tp->tg3_flags &= ~TG3_FLAG_USE_LINKCHG_REG;
++
++	/* The led_ctrl is set during tg3_phy_probe, here we might
++	 * have to force the link status polling mechanism based
++	 * upon subsystem IDs.
++	 */
++	if (tp->pdev->subsystem_vendor == PCI_VENDOR_ID_DELL &&
++	    tp->phy_id != PHY_ID_SERDES) {
++		tp->tg3_flags |= (TG3_FLAG_USE_MI_INTERRUPT |
++				  TG3_FLAG_USE_LINKCHG_REG);
++	}
++
++	/* For all SERDES we poll the MAC status register. */
++	if (tp->phy_id == PHY_ID_SERDES)
++		tp->tg3_flags |= TG3_FLAG_POLL_SERDES;
++	else
++		tp->tg3_flags &= ~TG3_FLAG_POLL_SERDES;
++
++	/* 5700 BX chips need to have their TX producer index mailboxes
++	 * written twice to workaround a bug.
++	 */
++	if (GET_CHIP_REV(tp->pci_chip_rev_id) == CHIPREV_5700_BX)
++		tp->tg3_flags |= TG3_FLAG_TXD_MBOX_HWBUG;
++	else
++		tp->tg3_flags &= ~TG3_FLAG_TXD_MBOX_HWBUG;
++
++	/* It seems all chips can get confused if TX buffers
++	 * straddle the 4GB address boundary in some cases.
++	 */
++	tp->dev->hard_start_xmit = tg3_start_xmit;
++
++	tp->rx_offset = 2;
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701 &&
++	    (tp->tg3_flags & TG3_FLAG_PCIX_MODE) != 0)
++		tp->rx_offset = 0;
++
++	/* By default, disable wake-on-lan.  User can change this
++	 * using ETHTOOL_SWOL.
++	 */
++	tp->tg3_flags &= ~TG3_FLAG_WOL_ENABLE;
++
++	return err;
++}
++
++#ifdef CONFIG_SPARC64
++static int __devinit tg3_get_macaddr_sparc(struct tg3 *tp)
++{
++	struct net_device *dev = tp->dev;
++	struct pci_dev *pdev = tp->pdev;
++	struct pcidev_cookie *pcp = pdev->sysdata;
++
++	if (pcp != NULL) {
++		int node = pcp->prom_node;
++
++		if (prom_getproplen(node, "local-mac-address") == 6) {
++			prom_getproperty(node, "local-mac-address",
++					 dev->dev_addr, 6);
++			return 0;
++		}
++	}
++	return -ENODEV;
++}
++
++static int __devinit tg3_get_default_macaddr_sparc(struct tg3 *tp)
++{
++	struct net_device *dev = tp->dev;
++
++	memcpy(dev->dev_addr, idprom->id_ethaddr, 6);
++	return 0;
++}
++#endif
++
++static int __devinit tg3_get_device_address(struct tg3 *tp)
++{
++	struct net_device *dev = tp->dev;
++	u32 hi, lo, mac_offset;
++
++#ifdef CONFIG_SPARC64
++	if (!tg3_get_macaddr_sparc(tp))
++		return 0;
++#endif
++
++	mac_offset = 0x7c;
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 &&
++	    !(tp->tg3_flags & TG3_FLG2_SUN_5704)) {
++		if (tr32(TG3PCI_DUAL_MAC_CTRL) & DUAL_MAC_CTRL_ID)
++			mac_offset = 0xcc;
++		if (tg3_nvram_lock(tp))
++			tw32_f(NVRAM_CMD, NVRAM_CMD_RESET);
++		else
++			tg3_nvram_unlock(tp);
++	}
++
++	/* First try to get it from MAC address mailbox. */
++	tg3_read_mem(tp, NIC_SRAM_MAC_ADDR_HIGH_MBOX, &hi);
++	if ((hi >> 16) == 0x484b) {
++		dev->dev_addr[0] = (hi >>  8) & 0xff;
++		dev->dev_addr[1] = (hi >>  0) & 0xff;
++
++		tg3_read_mem(tp, NIC_SRAM_MAC_ADDR_LOW_MBOX, &lo);
++		dev->dev_addr[2] = (lo >> 24) & 0xff;
++		dev->dev_addr[3] = (lo >> 16) & 0xff;
++		dev->dev_addr[4] = (lo >>  8) & 0xff;
++		dev->dev_addr[5] = (lo >>  0) & 0xff;
++	}
++	/* Next, try NVRAM. */
++	else if (!(tp->tg3_flags & TG3_FLG2_SUN_5704) &&
++		 !tg3_nvram_read(tp, mac_offset + 0, &hi) &&
++		 !tg3_nvram_read(tp, mac_offset + 4, &lo)) {
++		dev->dev_addr[0] = ((hi >> 16) & 0xff);
++		dev->dev_addr[1] = ((hi >> 24) & 0xff);
++		dev->dev_addr[2] = ((lo >>  0) & 0xff);
++		dev->dev_addr[3] = ((lo >>  8) & 0xff);
++		dev->dev_addr[4] = ((lo >> 16) & 0xff);
++		dev->dev_addr[5] = ((lo >> 24) & 0xff);
++	}
++	/* Finally just fetch it out of the MAC control regs. */
++	else {
++		hi = tr32(MAC_ADDR_0_HIGH);
++		lo = tr32(MAC_ADDR_0_LOW);
++
++		dev->dev_addr[5] = lo & 0xff;
++		dev->dev_addr[4] = (lo >> 8) & 0xff;
++		dev->dev_addr[3] = (lo >> 16) & 0xff;
++		dev->dev_addr[2] = (lo >> 24) & 0xff;
++		dev->dev_addr[1] = hi & 0xff;
++		dev->dev_addr[0] = (hi >> 8) & 0xff;
++	}
++
++	if (!is_valid_ether_addr(&dev->dev_addr[0])) {
++#ifdef CONFIG_SPARC64
++		if (!tg3_get_default_macaddr_sparc(tp))
++			return 0;
++#endif
++		return -EINVAL;
++	}
++	return 0;
++}
++
++static int __devinit tg3_do_test_dma(struct tg3 *tp, u32 *buf, dma_addr_t buf_dma, int size, int to_device)
++{
++	struct tg3_internal_buffer_desc test_desc;
++	u32 sram_dma_descs;
++	int i, ret;
++
++	sram_dma_descs = NIC_SRAM_DMA_DESC_POOL_BASE;
++
++	tw32(FTQ_RCVBD_COMP_FIFO_ENQDEQ, 0);
++	tw32(FTQ_RCVDATA_COMP_FIFO_ENQDEQ, 0);
++	tw32(RDMAC_STATUS, 0);
++	tw32(WDMAC_STATUS, 0);
++
++	tw32(BUFMGR_MODE, 0);
++	tw32(FTQ_RESET, 0);
++
++	test_desc.addr_hi = ((u64) buf_dma) >> 32;
++	test_desc.addr_lo = buf_dma & 0xffffffff;
++	test_desc.nic_mbuf = 0x00002100;
++	test_desc.len = size;
++
++	/*
++	 * HP ZX1 was seeing test failures for 5701 cards running at 33Mhz
++	 * the *second* time the tg3 driver was getting loaded after an
++	 * initial scan.
++	 *
++	 * Broadcom tells me:
++	 *   ...the DMA engine is connected to the GRC block and a DMA
++	 *   reset may affect the GRC block in some unpredictable way...
++	 *   The behavior of resets to individual blocks has not been tested.
++	 *
++	 * Broadcom noted the GRC reset will also reset all sub-components.
++	 */
++	if (to_device) {
++		test_desc.cqid_sqid = (13 << 8) | 2;
++
++		tw32_f(RDMAC_MODE, RDMAC_MODE_ENABLE);
++		udelay(40);
++	} else {
++		test_desc.cqid_sqid = (16 << 8) | 7;
++
++		tw32_f(WDMAC_MODE, WDMAC_MODE_ENABLE);
++		udelay(40);
++	}
++	test_desc.flags = 0x00000005;
++
++	for (i = 0; i < (sizeof(test_desc) / sizeof(u32)); i++) {
++		u32 val;
++
++		val = *(((u32 *)&test_desc) + i);
++		pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR,
++				       sram_dma_descs + (i * sizeof(u32)));
++		pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_DATA, val);
++	}
++	pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, 0);
++
++	if (to_device) {
++		tw32(FTQ_DMA_HIGH_READ_FIFO_ENQDEQ, sram_dma_descs);
++	} else {
++		tw32(FTQ_DMA_HIGH_WRITE_FIFO_ENQDEQ, sram_dma_descs);
++	}
++
++	ret = -ENODEV;
++	for (i = 0; i < 40; i++) {
++		u32 val;
++
++		if (to_device)
++			val = tr32(FTQ_RCVBD_COMP_FIFO_ENQDEQ);
++		else
++			val = tr32(FTQ_RCVDATA_COMP_FIFO_ENQDEQ);
++		if ((val & 0xffff) == sram_dma_descs) {
++			ret = 0;
++			break;
++		}
++
++		udelay(100);
++	}
++
++	return ret;
++}
++
++#define TEST_BUFFER_SIZE	0x400
++
++static int __devinit tg3_test_dma(struct tg3 *tp)
++{
++	dma_addr_t buf_dma;
++	u32 *buf;
++	int ret;
++
++	buf = pci_alloc_consistent(tp->pdev, TEST_BUFFER_SIZE, &buf_dma);
++	if (!buf) {
++		ret = -ENOMEM;
++		goto out_nofree;
++	}
++
++	tp->dma_rwctrl = ((0x7 << DMA_RWCTRL_PCI_WRITE_CMD_SHIFT) |
++			  (0x6 << DMA_RWCTRL_PCI_READ_CMD_SHIFT));
++
++#ifndef CONFIG_X86
++	{
++		u8 byte;
++		int cacheline_size;
++		pci_read_config_byte(tp->pdev, PCI_CACHE_LINE_SIZE, &byte);
++
++		if (byte == 0)
++			cacheline_size = 1024;
++		else
++			cacheline_size = (int) byte * 4;
++
++		switch (cacheline_size) {
++		case 16:
++		case 32:
++		case 64:
++		case 128:
++			if ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) &&
++			    !(tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS)) {
++				tp->dma_rwctrl |=
++					DMA_RWCTRL_WRITE_BNDRY_384_PCIX;
++				break;
++			} else if (tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) {
++				tp->dma_rwctrl &=
++					~(DMA_RWCTRL_PCI_WRITE_CMD);
++				tp->dma_rwctrl |=
++					DMA_RWCTRL_WRITE_BNDRY_128_PCIE;
++				break;
++			}
++			/* fallthrough */
++		case 256:
++			if (!(tp->tg3_flags & TG3_FLAG_PCIX_MODE) &&
++			    !(tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS))
++				tp->dma_rwctrl |=
++					DMA_RWCTRL_WRITE_BNDRY_256;
++			else if (!(tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS))
++				tp->dma_rwctrl |=
++					DMA_RWCTRL_WRITE_BNDRY_256_PCIX;
++		};
++	}
++#endif
++
++	if (tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) {
++		tp->dma_rwctrl |= 0x001f0000;
++	} else if (!(tp->tg3_flags & TG3_FLAG_PCIX_MODE)) {
++		if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ||
++		    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750)
++			tp->dma_rwctrl |= 0x003f0000;
++		else
++			tp->dma_rwctrl |= 0x003f000f;
++	} else {
++		if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703 ||
++		    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) {
++			u32 ccval = (tr32(TG3PCI_CLOCK_CTRL) & 0x1f);
++
++			if (ccval == 0x6 || ccval == 0x7)
++				tp->dma_rwctrl |= DMA_RWCTRL_ONE_DMA;
++
++			/* Set bit 23 to renable PCIX hw bug fix */
++			tp->dma_rwctrl |= 0x009f0000;
++		} else {
++			tp->dma_rwctrl |= 0x001b000f;
++		}
++	}
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703 ||
++	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704)
++		tp->dma_rwctrl &= 0xfffffff0;
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 ||
++	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701) {
++		/* Remove this if it causes problems for some boards. */
++		tp->dma_rwctrl |= DMA_RWCTRL_USE_MEM_READ_MULT;
++
++		/* On 5700/5701 chips, we need to set this bit.
++		 * Otherwise the chip will issue cacheline transactions
++		 * to streamable DMA memory with not all the byte
++		 * enables turned on.  This is an error on several
++		 * RISC PCI controllers, in particular sparc64.
++		 *
++		 * On 5703/5704 chips, this bit has been reassigned
++		 * a different meaning.  In particular, it is used
++		 * on those chips to enable a PCI-X workaround.
++		 */
++		tp->dma_rwctrl |= DMA_RWCTRL_ASSERT_ALL_BE;
++	}
++
++	tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl);
++
++#if 0
++	/* Unneeded, already done by tg3_get_invariants.  */
++	tg3_switch_clocks(tp);
++#endif
++
++	ret = 0;
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700 &&
++	    GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5701)
++		goto out;
++
++	while (1) {
++		u32 *p = buf, i;
++
++		for (i = 0; i < TEST_BUFFER_SIZE / sizeof(u32); i++)
++			p[i] = i;
++
++		/* Send the buffer to the chip. */
++		ret = tg3_do_test_dma(tp, buf, buf_dma, TEST_BUFFER_SIZE, 1);
++		if (ret) {
++			printk(KERN_ERR "tg3_test_dma() Write the buffer failed %d\n", ret);
++			break;
++		}
++
++#if 0
++		/* validate data reached card RAM correctly. */
++		for (i = 0; i < TEST_BUFFER_SIZE / sizeof(u32); i++) {
++			u32 val;
++			tg3_read_mem(tp, 0x2100 + (i*4), &val);
++			if (le32_to_cpu(val) != p[i]) {
++				printk(KERN_ERR "  tg3_test_dma()  Card buffer corrupted on write! (%d != %d)\n", val, i);
++				/* ret = -ENODEV here? */
++			}
++			p[i] = 0;
++		}
++#endif
++		/* Now read it back. */
++		ret = tg3_do_test_dma(tp, buf, buf_dma, TEST_BUFFER_SIZE, 0);
++		if (ret) {
++			printk(KERN_ERR "tg3_test_dma() Read the buffer failed %d\n", ret);
++
++			break;
++		}
++
++		/* Verify it. */
++		for (i = 0; i < TEST_BUFFER_SIZE / sizeof(u32); i++) {
++			if (p[i] == i)
++				continue;
++
++			if ((tp->dma_rwctrl & DMA_RWCTRL_WRITE_BNDRY_MASK) ==
++			    DMA_RWCTRL_WRITE_BNDRY_DISAB) {
++				tp->dma_rwctrl |= DMA_RWCTRL_WRITE_BNDRY_16;
++				tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl);
++				break;
++			} else {
++				printk(KERN_ERR "tg3_test_dma() buffer corrupted on read back! (%d != %d)\n", p[i], i);
++				ret = -ENODEV;
++				goto out;
++			}
++		}
++
++		if (i == (TEST_BUFFER_SIZE / sizeof(u32))) {
++			/* Success. */
++			ret = 0;
++			break;
++		}
++	}
++
++out:
++	pci_free_consistent(tp->pdev, TEST_BUFFER_SIZE, buf, buf_dma);
++out_nofree:
++	return ret;
++}
++
++static void __devinit tg3_init_link_config(struct tg3 *tp)
++{
++	tp->link_config.advertising =
++		(ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full |
++		 ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full |
++		 ADVERTISED_1000baseT_Half | ADVERTISED_1000baseT_Full |
++		 ADVERTISED_Autoneg | ADVERTISED_MII);
++	tp->link_config.speed = SPEED_INVALID;
++	tp->link_config.duplex = DUPLEX_INVALID;
++	tp->link_config.autoneg = AUTONEG_ENABLE;
++	netif_carrier_off(tp->dev);
++	tp->link_config.active_speed = SPEED_INVALID;
++	tp->link_config.active_duplex = DUPLEX_INVALID;
++	tp->link_config.phy_is_low_power = 0;
++	tp->link_config.orig_speed = SPEED_INVALID;
++	tp->link_config.orig_duplex = DUPLEX_INVALID;
++	tp->link_config.orig_autoneg = AUTONEG_INVALID;
++}
++
++static void __devinit tg3_init_bufmgr_config(struct tg3 *tp)
++{
++	tp->bufmgr_config.mbuf_read_dma_low_water =
++		DEFAULT_MB_RDMA_LOW_WATER;
++	tp->bufmgr_config.mbuf_mac_rx_low_water =
++		DEFAULT_MB_MACRX_LOW_WATER;
++	tp->bufmgr_config.mbuf_high_water =
++		DEFAULT_MB_HIGH_WATER;
++
++	tp->bufmgr_config.mbuf_read_dma_low_water_jumbo =
++		DEFAULT_MB_RDMA_LOW_WATER_JUMBO;
++	tp->bufmgr_config.mbuf_mac_rx_low_water_jumbo =
++		DEFAULT_MB_MACRX_LOW_WATER_JUMBO;
++	tp->bufmgr_config.mbuf_high_water_jumbo =
++		DEFAULT_MB_HIGH_WATER_JUMBO;
++
++	tp->bufmgr_config.dma_low_water = DEFAULT_DMA_LOW_WATER;
++	tp->bufmgr_config.dma_high_water = DEFAULT_DMA_HIGH_WATER;
++}
++
++static char * __devinit tg3_phy_string(struct tg3 *tp)
++{
++	switch (tp->phy_id & PHY_ID_MASK) {
++	case PHY_ID_BCM5400:	return "5400";
++	case PHY_ID_BCM5401:	return "5401";
++	case PHY_ID_BCM5411:	return "5411";
++	case PHY_ID_BCM5701:	return "5701";
++	case PHY_ID_BCM5703:	return "5703";
++	case PHY_ID_BCM5704:	return "5704";
++	case PHY_ID_BCM5705:	return "5705";
++	case PHY_ID_BCM5750:	return "5750";
++	case PHY_ID_BCM8002:	return "8002";
++	case PHY_ID_SERDES:	return "serdes";
++	default:		return "unknown";
++	};
++}
++
++static struct pci_dev * __devinit tg3_find_5704_peer(struct tg3 *tp)
++{
++	struct pci_dev *peer;
++	unsigned int func, devnr = tp->pdev->devfn & ~7;
++
++	for (func = 0; func < 8; func++) {
++		peer = pci_get_slot(tp->pdev->bus, devnr | func);
++		if (peer && peer != tp->pdev)
++			break;
++		pci_dev_put(peer);
++	}
++	if (!peer || peer == tp->pdev)
++		BUG();
++
++	/*
++	 * We don't need to keep the refcount elevated; there's no way
++	 * to remove one half of this device without removing the other
++	 */
++	pci_dev_put(peer);
++
++	return peer;
++}
++
++static int __devinit tg3_init_one(struct pci_dev *pdev,
++				  const struct pci_device_id *ent)
++{
++	static int tg3_version_printed = 0;
++	unsigned long tg3reg_base, tg3reg_len;
++	struct net_device *dev;
++	struct tg3 *tp;
++	int i, err, pci_using_dac, pm_cap;
++
++	if (tg3_version_printed++ == 0)
++		printk(KERN_INFO "%s", version);
++
++	err = pci_enable_device(pdev);
++	if (err) {
++		printk(KERN_ERR PFX "Cannot enable PCI device, "
++		       "aborting.\n");
++		return err;
++	}
++
++	if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) {
++		printk(KERN_ERR PFX "Cannot find proper PCI device "
++		       "base address, aborting.\n");
++		err = -ENODEV;
++		goto err_out_disable_pdev;
++	}
++
++	err = pci_request_regions(pdev, DRV_MODULE_NAME);
++	if (err) {
++		printk(KERN_ERR PFX "Cannot obtain PCI resources, "
++		       "aborting.\n");
++		goto err_out_disable_pdev;
++	}
++
++	pci_set_master(pdev);
++
++	/* Find power-management capability. */
++	pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM);
++	if (pm_cap == 0) {
++		printk(KERN_ERR PFX "Cannot find PowerManagement capability, "
++		       "aborting.\n");
++		err = -EIO;
++		goto err_out_free_res;
++	}
++
++	/* Configure DMA attributes. */
++	err = pci_set_dma_mask(pdev, 0xffffffffffffffffULL);
++	if (!err) {
++		pci_using_dac = 1;
++		err = pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL);
++		if (err < 0) {
++			printk(KERN_ERR PFX "Unable to obtain 64 bit DMA "
++			       "for consistent allocations\n");
++			goto err_out_free_res;
++		}
++	} else {
++		err = pci_set_dma_mask(pdev, 0xffffffffULL);
++		if (err) {
++			printk(KERN_ERR PFX "No usable DMA configuration, "
++			       "aborting.\n");
++			goto err_out_free_res;
++		}
++		pci_using_dac = 0;
++	}
++
++	tg3reg_base = pci_resource_start(pdev, 0);
++	tg3reg_len = pci_resource_len(pdev, 0);
++
++	dev = alloc_etherdev(sizeof(*tp));
++	if (!dev) {
++		printk(KERN_ERR PFX "Etherdev alloc failed, aborting.\n");
++		err = -ENOMEM;
++		goto err_out_free_res;
++	}
++
++	SET_MODULE_OWNER(dev);
++	SET_NETDEV_DEV(dev, &pdev->dev);
++
++	if (pci_using_dac)
++		dev->features |= NETIF_F_HIGHDMA;
++#if TG3_VLAN_TAG_USED
++	dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
++	dev->vlan_rx_register = tg3_vlan_rx_register;
++	dev->vlan_rx_kill_vid = tg3_vlan_rx_kill_vid;
++#endif
++
++	tp = netdev_priv(dev);
++	tp->pdev = pdev;
++	tp->dev = dev;
++	tp->pm_cap = pm_cap;
++	tp->mac_mode = TG3_DEF_MAC_MODE;
++	tp->rx_mode = TG3_DEF_RX_MODE;
++	tp->tx_mode = TG3_DEF_TX_MODE;
++	tp->mi_mode = MAC_MI_MODE_BASE;
++	if (tg3_debug > 0)
++		tp->msg_enable = tg3_debug;
++	else
++		tp->msg_enable = TG3_DEF_MSG_ENABLE;
++
++	/* The word/byte swap controls here control register access byte
++	 * swapping.  DMA data byte swapping is controlled in the GRC_MODE
++	 * setting below.
++	 */
++	tp->misc_host_ctrl =
++		MISC_HOST_CTRL_MASK_PCI_INT |
++		MISC_HOST_CTRL_WORD_SWAP |
++		MISC_HOST_CTRL_INDIR_ACCESS |
++		MISC_HOST_CTRL_PCISTATE_RW;
++
++	/* The NONFRM (non-frame) byte/word swap controls take effect
++	 * on descriptor entries, anything which isn't packet data.
++	 *
++	 * The StrongARM chips on the board (one for tx, one for rx)
++	 * are running in big-endian mode.
++	 */
++	tp->grc_mode = (GRC_MODE_WSWAP_DATA | GRC_MODE_BSWAP_DATA |
++			GRC_MODE_WSWAP_NONFRM_DATA);
++#ifdef __BIG_ENDIAN
++	tp->grc_mode |= GRC_MODE_BSWAP_NONFRM_DATA;
++#endif
++	spin_lock_init(&tp->lock);
++	spin_lock_init(&tp->tx_lock);
++	spin_lock_init(&tp->indirect_lock);
++	INIT_WORK(&tp->reset_task, tg3_reset_task, tp);
++
++	tp->regs = (unsigned long) ioremap(tg3reg_base, tg3reg_len);
++	if (tp->regs == 0UL) {
++		printk(KERN_ERR PFX "Cannot map device registers, "
++		       "aborting.\n");
++		err = -ENOMEM;
++		goto err_out_free_dev;
++	}
++
++	tg3_init_link_config(tp);
++
++	tg3_init_bufmgr_config(tp);
++
++	tp->rx_pending = TG3_DEF_RX_RING_PENDING;
++	tp->rx_jumbo_pending = TG3_DEF_RX_JUMBO_RING_PENDING;
++	tp->tx_pending = TG3_DEF_TX_RING_PENDING;
++
++	dev->open = tg3_open;
++	dev->stop = tg3_close;
++	dev->get_stats = tg3_get_stats;
++	dev->set_multicast_list = tg3_set_rx_mode;
++	dev->set_mac_address = tg3_set_mac_addr;
++	dev->do_ioctl = tg3_ioctl;
++	dev->tx_timeout = tg3_tx_timeout;
++	dev->poll = tg3_poll;
++	dev->ethtool_ops = &tg3_ethtool_ops;
++	dev->weight = 64;
++	dev->watchdog_timeo = TG3_TX_TIMEOUT;
++	dev->change_mtu = tg3_change_mtu;
++	dev->irq = pdev->irq;
++#ifdef CONFIG_NET_POLL_CONTROLLER
++	dev->poll_controller = tg3_poll_controller;
++#endif
++
++	err = tg3_get_invariants(tp);
++	if (err) {
++		printk(KERN_ERR PFX "Problem fetching invariants of chip, "
++		       "aborting.\n");
++		goto err_out_iounmap;
++	}
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ||
++	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) {
++		tp->bufmgr_config.mbuf_read_dma_low_water =
++			DEFAULT_MB_RDMA_LOW_WATER_5705;
++		tp->bufmgr_config.mbuf_mac_rx_low_water =
++			DEFAULT_MB_MACRX_LOW_WATER_5705;
++		tp->bufmgr_config.mbuf_high_water =
++			DEFAULT_MB_HIGH_WATER_5705;
++	}
++
++	if (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0) {
++		/* Ick.  This needs firmware loading. */
++		err = tg3_request_firmware(&tg3_fw_5701_a0,
++					   "tg3/5701_a0-0.0.0", tp);
++		if (err)
++			goto err_out_iounmap;
++	}
++
++#if TG3_TSO_SUPPORT != 0
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 ||
++	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701 ||
++	    tp->pci_chip_rev_id == CHIPREV_ID_5705_A0 ||
++	    ((tp->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0 &&
++	     GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750)) {
++		tp->tg3_flags2 &= ~TG3_FLG2_TSO_CAPABLE;
++	} else {
++		const char *name;
++
++		name = "tg3/tso-1.4.0";
++		if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) {
++			/* 5705 needs a special version of the TSO firmware. */
++			name = "tg3/tso_5705-1.1.0";
++		}
++		err = tg3_request_firmware(&tg3_fw_tso5, name, tp);
++		if (err) {
++			/* We can function without TSO; pretend it's
++			 * not supported. */
++			printk(KERN_INFO PFX "%s: Firmware \"%s\" not "
++			       "loaded; continuing without TSO.\n",
++			       tp->dev->name, name);
++			tp->tg3_flags2 &= ~TG3_FLG2_TSO_CAPABLE;
++		} else
++			tp->tg3_flags2 |= TG3_FLG2_TSO_CAPABLE;
++	}
++
++	/* TSO is off by default, user can enable using ethtool.  */
++#if 0
++	if (tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE)
++		dev->features |= NETIF_F_TSO;
++#endif
++
++#endif
++
++	if (tp->pci_chip_rev_id == CHIPREV_ID_5705_A1 &&
++	    !(tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE) &&
++	    !(tr32(TG3PCI_PCISTATE) & PCISTATE_BUS_SPEED_HIGH)) {
++		tp->tg3_flags2 |= TG3_FLG2_MAX_RXPEND_64;
++		tp->rx_pending = 63;
++	}
++
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704)
++		tp->pdev_peer = tg3_find_5704_peer(tp);
++
++	err = tg3_get_device_address(tp);
++	if (err) {
++		printk(KERN_ERR PFX "Could not obtain valid ethernet address, "
++		       "aborting.\n");
++		goto err_out_iounmap;
++	}
++
++	/*
++	 * Reset chip in case UNDI or EFI driver did not shutdown
++	 * DMA self test will enable WDMAC and we'll see (spurious)
++	 * pending DMA on the PCI bus at that point.
++	 */
++	if ((tr32(HOSTCC_MODE) & HOSTCC_MODE_ENABLE) ||
++	    (tr32(WDMAC_MODE) & WDMAC_MODE_ENABLE)) {
++		pci_save_state(tp->pdev, tp->pci_cfg_state);
++		tw32(MEMARB_MODE, MEMARB_MODE_ENABLE);
++		tg3_halt(tp);
++	}
++
++	err = tg3_test_dma(tp);
++	if (err) {
++		printk(KERN_ERR PFX "DMA engine test failed, aborting.\n");
++		goto err_out_iounmap;
++	}
++
++	/* Tigon3 can do ipv4 only... and some chips have buggy
++	 * checksumming.
++	 */
++	if ((tp->tg3_flags & TG3_FLAG_BROKEN_CHECKSUMS) == 0) {
++		dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM;
++		tp->tg3_flags |= TG3_FLAG_RX_CHECKSUMS;
++	} else
++		tp->tg3_flags &= ~TG3_FLAG_RX_CHECKSUMS;
++
++	if (tp->tg3_flags2 & TG3_FLG2_IS_5788)
++		dev->features &= ~NETIF_F_HIGHDMA;
++
++	err = register_netdev(dev);
++	if (err) {
++		printk(KERN_ERR PFX "Cannot register net device, "
++		       "aborting.\n");
++		goto err_out_iounmap;
++	}
++
++	pci_set_drvdata(pdev, dev);
++
++	/* Now that we have fully setup the chip, save away a snapshot
++	 * of the PCI config space.  We need to restore this after
++	 * GRC_MISC_CFG core clock resets and some resume events.
++	 */
++	pci_save_state(tp->pdev, tp->pci_cfg_state);
++
++	printk(KERN_INFO "%s: Tigon3 [partno(%s) rev %04x PHY(%s)] (PCI%s:%s:%s) %sBaseT Ethernet ",
++	       dev->name,
++	       tp->board_part_number,
++	       tp->pci_chip_rev_id,
++	       tg3_phy_string(tp),
++	       ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) ? "X" : ""),
++	       ((tp->tg3_flags & TG3_FLAG_PCI_HIGH_SPEED) ?
++		((tp->tg3_flags & TG3_FLAG_PCIX_MODE) ? "133MHz" : "66MHz") :
++		((tp->tg3_flags & TG3_FLAG_PCIX_MODE) ? "100MHz" : "33MHz")),
++	       ((tp->tg3_flags & TG3_FLAG_PCI_32BIT) ? "32-bit" : "64-bit"),
++	       (tp->tg3_flags & TG3_FLAG_10_100_ONLY) ? "10/100" : "10/100/1000");
++
++	for (i = 0; i < 6; i++)
++		printk("%2.2x%c", dev->dev_addr[i],
++		       i == 5 ? '\n' : ':');
++
++	printk(KERN_INFO "%s: HostTXDS[%d] RXcsums[%d] LinkChgREG[%d] "
++	       "MIirq[%d] ASF[%d] Split[%d] WireSpeed[%d] "
++	       "TSOcap[%d] \n",
++	       dev->name,
++	       (tp->tg3_flags & TG3_FLAG_HOST_TXDS) != 0,
++	       (tp->tg3_flags & TG3_FLAG_RX_CHECKSUMS) != 0,
++	       (tp->tg3_flags & TG3_FLAG_USE_LINKCHG_REG) != 0,
++	       (tp->tg3_flags & TG3_FLAG_USE_MI_INTERRUPT) != 0,
++	       (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0,
++	       (tp->tg3_flags & TG3_FLAG_SPLIT_MODE) != 0,
++	       (tp->tg3_flags2 & TG3_FLG2_NO_ETH_WIRE_SPEED) == 0,
++	       (tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE) != 0);
++
++	return 0;
++
++err_out_iounmap:
++	iounmap((void *) tp->regs);
++
++err_out_free_dev:
++	free_netdev(dev);
++
++err_out_free_res:
++	pci_release_regions(pdev);
++
++err_out_disable_pdev:
++	pci_disable_device(pdev);
++	pci_set_drvdata(pdev, NULL);
++	return err;
++}
++
++static void __devexit tg3_remove_one(struct pci_dev *pdev)
++{
++	struct net_device *dev = pci_get_drvdata(pdev);
++
++	if (dev) {
++		struct tg3 *tp = netdev_priv(dev);
++
++		unregister_netdev(dev);
++		iounmap((void *)tp->regs);
++		free_netdev(dev);
++		pci_release_regions(pdev);
++		pci_disable_device(pdev);
++		pci_set_drvdata(pdev, NULL);
++	}
++}
++
++static int tg3_suspend(struct pci_dev *pdev, u32 state)
++{
++	struct net_device *dev = pci_get_drvdata(pdev);
++	struct tg3 *tp = netdev_priv(dev);
++	int err;
++
++	if (!netif_running(dev))
++		return 0;
++
++	tg3_netif_stop(tp);
++
++	del_timer_sync(&tp->timer);
++
++	spin_lock_irq(&tp->lock);
++	spin_lock(&tp->tx_lock);
++	tg3_disable_ints(tp);
++	spin_unlock(&tp->tx_lock);
++	spin_unlock_irq(&tp->lock);
++
++	netif_device_detach(dev);
++
++	spin_lock_irq(&tp->lock);
++	spin_lock(&tp->tx_lock);
++	tg3_halt(tp);
++	spin_unlock(&tp->tx_lock);
++	spin_unlock_irq(&tp->lock);
++
++	err = tg3_set_power_state(tp, state);
++	if (err) {
++		spin_lock_irq(&tp->lock);
++		spin_lock(&tp->tx_lock);
++
++		tg3_init_hw(tp);
++
++		tp->timer.expires = jiffies + tp->timer_offset;
++		add_timer(&tp->timer);
++
++		spin_unlock(&tp->tx_lock);
++		spin_unlock_irq(&tp->lock);
++
++		netif_device_attach(dev);
++		tg3_netif_start(tp);
++	}
++
++	return err;
++}
++
++static int tg3_resume(struct pci_dev *pdev)
++{
++	struct net_device *dev = pci_get_drvdata(pdev);
++	struct tg3 *tp = netdev_priv(dev);
++	int err;
++
++	if (!netif_running(dev))
++		return 0;
++
++	pci_restore_state(tp->pdev, tp->pci_cfg_state);
++
++	err = tg3_set_power_state(tp, 0);
++	if (err)
++		return err;
++
++	netif_device_attach(dev);
++
++	spin_lock_irq(&tp->lock);
++	spin_lock(&tp->tx_lock);
++
++	tg3_init_hw(tp);
++
++	tp->timer.expires = jiffies + tp->timer_offset;
++	add_timer(&tp->timer);
++
++	tg3_enable_ints(tp);
++
++	spin_unlock(&tp->tx_lock);
++	spin_unlock_irq(&tp->lock);
++
++	tg3_netif_start(tp);
++
++	return 0;
++}
++
++static struct pci_driver tg3_driver = {
++	.name		= DRV_MODULE_NAME,
++	.id_table	= tg3_pci_tbl,
++	.probe		= tg3_init_one,
++	.remove		= __devexit_p(tg3_remove_one),
++	.suspend	= tg3_suspend,
++	.resume		= tg3_resume
++};
++
++static int __init tg3_init(void)
++{
++	return pci_module_init(&tg3_driver);
++}
++
++static void __exit tg3_cleanup(void)
++{
++	/* Clean up any leftover firmware.  We can't currently
++	 * do this in tg3_remove_one, because we don't know whether
++	 * any of the other devices need the firmware. */
++	tg3_release_firmware(&tg3_fw_5701_a0);
++#if TG3_TSO_SUPPORT != 0
++	tg3_release_firmware(&tg3_fw_tso5);
++	tg3_release_firmware(&tg3_fw_tso);
++#endif /* TG3_TSO_SUPPORT */
++
++	pci_unregister_driver(&tg3_driver);
++}
++
++module_init(tg3_init);
++module_exit(tg3_cleanup);

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-net-wireless-airo-build-smp.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-net-wireless-airo-build-smp.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-net-wireless-airo-build-smp.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,22 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: fix airo build on smp
+## DP: Patch author: Andrew Morton <akpm at osdl.org>
+## DP: Upstream status: inluded
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -Nru a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
+--- a/drivers/net/wireless/airo.c	2004-09-26 09:13:56 -07:00
++++ b/drivers/net/wireless/airo.c	2004-09-26 09:13:56 -07:00
+@@ -25,6 +25,7 @@
+ #include <linux/kernel.h>
+ #include <linux/module.h>
+ #include <linux/proc_fs.h>
++#include <linux/smp_lock.h>
+ 
+ #include <linux/sched.h>
+ #include <linux/ptrace.h>

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-pci-quirks-via8233a.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-pci-quirks-via8233a.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-pci-quirks-via8233a.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,22 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Resolves problem in correctly detecting 8233A sound card
+## DP: Patch author: David Shaohua <shaohua.li at intel.com>
+## DP: Backport author: David Sterratt <david.c.sterratt at ed.ac.uk>
+## DP: Upstream status: pending (http://bugme.osdl.org/show_bug.cgi?id=3175)
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- a/drivers/pci/quirks.c	2004-08-14 06:36:12.000000000 +0100
++++ b/drivers/pci/quirks.c	2004-11-01 15:01:30.000000000 +0000
+@@ -998,6 +998,7 @@
+ 	{ PCI_FIXUP_FINAL,	PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C586_2,	quirk_via_irqpic },
+ 	{ PCI_FIXUP_FINAL,	PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C686_5,	quirk_via_irqpic },
+ 	{ PCI_FIXUP_FINAL,	PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C686_6,	quirk_via_irqpic },
++	{ PCI_FIXUP_FINAL,	PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8233_5,	quirk_via_irqpic },
+ 
+ 	{ PCI_FIXUP_FINAL,	PCI_VENDOR_ID_AMD,	PCI_DEVICE_ID_AMD_FE_GATE_700C, quirk_amd_ordering },
+ 	{ PCI_FIXUP_FINAL,	PCI_VENDOR_ID_ATI,	PCI_DEVICE_ID_ATI_RS100,   quirk_ati_exploding_mce },

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-scsi-generic_proc_info.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-scsi-generic_proc_info.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-scsi-generic_proc_info.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,92 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: restore generic SCSI proc_info function in drivers/scsi/scsi_proc.c
+## DP: Patch author: unknown
+## DP: Upstream status: rejected
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -urN kernel-source-2.6.6/drivers/scsi/scsi_proc.c kernel-source-2.6.6-1/drivers/scsi/scsi_proc.c
+--- kernel-source-2.6.6/drivers/scsi/scsi_proc.c	2004-03-11 13:55:22.000000000 +1100
++++ kernel-source-2.6.6-1/drivers/scsi/scsi_proc.c	2004-02-16 18:23:47.000000000 +1100
+@@ -42,13 +42,47 @@
+ /* Protect sht->present and sht->proc_dir */
+ static DECLARE_MUTEX(global_host_template_sem);
+ 
++/* Used if the driver currently has no own support for /proc/scsi */
++static int generic_proc_info(char *buffer, char **start, off_t offset,
++			     int count, const char *(*info)(struct Scsi_Host *),
++			     struct Scsi_Host *shost)
++{
++	int len, pos, begin = 0;
++	static const char noprocfs[] =
++		"The driver does not yet support the proc-fs\n";
++
++	if (info && shost)
++		len = sprintf(buffer, "%s\n", info(shost));
++	else
++		len = sprintf(buffer, "%s\n", noprocfs);
++
++	pos = len;
++	if (pos < offset) {
++		len = 0;
++		begin = pos;
++	}
++
++	*start = buffer + (offset - begin);
++	len -= (offset - begin);
++	if (len > count)
++		len = count;
++
++	return len;
++}
++
+ static int proc_scsi_read(char *buffer, char **start, off_t offset,
+ 			  int length, int *eof, void *data)
+ {
+ 	struct Scsi_Host *shost = data;
+ 	int n;
+ 
+-	n = shost->hostt->proc_info(shost, buffer, start, offset, length, 0);
++	if (shost->hostt->proc_info == NULL)
++		n = generic_proc_info(buffer, start, offset, length,
++				      shost->hostt->info, shost);
++	else
++		n = shost->hostt->proc_info(shost, buffer, start, offset,
++					   length, 0);
++
+ 	*eof = (n < length);
+ 
+ 	return n;
+@@ -62,6 +96,8 @@
+ 	char *page;
+ 	char *start;
+     
++	if (!shost->hostt->proc_info)
++		return -ENOSYS;
+ 	if (count > PROC_BLOCK_SIZE)
+ 		return -EOVERFLOW;
+ 
+@@ -79,9 +115,6 @@
+ 
+ void scsi_proc_hostdir_add(struct scsi_host_template *sht)
+ {
+-	if (!sht->proc_info)
+-		return;
+-
+ 	down(&global_host_template_sem);
+ 	if (!sht->present++) {
+ 		sht->proc_dir = proc_mkdir(sht->proc_name, proc_scsi);
+@@ -96,9 +129,6 @@
+ 
+ void scsi_proc_hostdir_rm(struct scsi_host_template *sht)
+ {
+-	if (!sht->proc_info)
+-		return;
+-
+ 	down(&global_host_template_sem);
+ 	if (!--sht->present && sht->proc_dir) {
+ 		remove_proc_entry(sht->proc_name, proc_scsi);

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-scsi-sym53c8xx_revert.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-scsi-sym53c8xx_revert.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-scsi-sym53c8xx_revert.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,387 @@
+#! /bin/sh -e 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Revert driver to 2.6.5 version; DV breaks on some configs
+## DP: Patch author: dann frazier
+## DP: Upstream status: willy/jejb notified - dannf getting them debug access
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a *reversed* BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/04/04 11:13:38-05:00 willy at debian.org 
+#   [PATCH] sym 2.1.18j
+#   
+#   sym 2.1.18j:
+#    - Add SPI transport attributes (James Bottomley)
+#    - Use generic code to do Domain Validation (James Bottomley)
+#    - Stop using scsi_to_pci_dma_dir() (Christoph Hellwig)
+#    - Change some constants to their symbolic names (Grant Grundler)
+#    - Handle a race between a postponed command completing and the EH retrying
+#      it (James Bottomley)
+#    - If the auto request sense fails, issue a device reset (James Bottomley)
+# 
+# drivers/scsi/Kconfig
+#   2004/04/04 04:24:09-05:00 willy at debian.org +1 -0
+#   sym 2.1.18j
+# 
+# drivers/scsi/sym53c8xx_2/sym_glue.c
+#   2004/04/04 04:24:14-05:00 willy at debian.org +142 -8
+#   sym 2.1.18j
+# 
+# drivers/scsi/sym53c8xx_2/sym_glue.h
+#   2004/04/04 04:24:14-05:00 willy at debian.org +7 -12
+#   sym 2.1.18j
+# 
+# drivers/scsi/sym53c8xx_2/sym_hipd.c
+#   2004/04/04 04:24:14-05:00 willy at debian.org +4 -3
+#   sym 2.1.18j
+# 
+diff -urN kernel-source-2.6.6.orig/drivers/scsi/Kconfig kernel-source-2.6.6/drivers/scsi/Kconfig
+--- kernel-source-2.6.6.orig/drivers/scsi/Kconfig	2004-05-10 06:21:38.000000000 -0600
++++ kernel-source-2.6.6/drivers/scsi/Kconfig	2004-06-09 22:38:58.886662460 -0600
+@@ -934,7 +934,6 @@
+ config SCSI_SYM53C8XX_2
+ 	tristate "SYM53C8XX Version 2 SCSI support"
+ 	depends on PCI && SCSI
+-	select SCSI_SPI_ATTRS
+ 	---help---
+ 	  This driver supports the whole NCR53C8XX/SYM53C8XX family of
+ 	  PCI-SCSI controllers.  It also supports the subset of LSI53C10XX
+diff -urN kernel-source-2.6.6.orig/drivers/scsi/sym53c8xx_2/sym_glue.c kernel-source-2.6.6/drivers/scsi/sym53c8xx_2/sym_glue.c
+--- kernel-source-2.6.6.orig/drivers/scsi/sym53c8xx_2/sym_glue.c	2004-05-10 03:48:00.000000000 -0600
++++ kernel-source-2.6.6/drivers/scsi/sym53c8xx_2/sym_glue.c	2004-06-09 22:38:58.889592147 -0600
+@@ -57,10 +57,6 @@
+ #include <linux/module.h>
+ #include <linux/spinlock.h>
+ #include <scsi/scsi.h>
+-#include <scsi/scsi_tcq.h>
+-#include <scsi/scsi_device.h>
+-#include <scsi/scsi_transport.h>
+-#include <scsi/scsi_transport_spi.h>
+ 
+ #include "sym_glue.h"
+ #include "sym_nvram.h"
+@@ -91,8 +87,6 @@
+ /* This lock protects only the memory allocation/free.  */
+ spinlock_t sym53c8xx_lock = SPIN_LOCK_UNLOCKED;
+ 
+-static struct scsi_transport_template *sym2_transport_template = NULL;
+-
+ /*
+  *  Wrappers to the generic memory allocator.
+  */
+@@ -177,7 +171,7 @@
+ 
+ static void __unmap_scsi_data(struct pci_dev *pdev, struct scsi_cmnd *cmd)
+ {
+-	int dma_dir = cmd->sc_data_direction;
++	int dma_dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
+ 
+ 	switch(SYM_UCMD_PTR(cmd)->data_mapped) {
+ 	case 2:
+@@ -194,7 +188,7 @@
+ static dma_addr_t __map_scsi_single_data(struct pci_dev *pdev, struct scsi_cmnd *cmd)
+ {
+ 	dma_addr_t mapping;
+-	int dma_dir = cmd->sc_data_direction;
++	int dma_dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
+ 
+ 	mapping = pci_map_single(pdev, cmd->request_buffer,
+ 				 cmd->request_bufflen, dma_dir);
+@@ -209,7 +203,7 @@
+ static int __map_scsi_sg_data(struct pci_dev *pdev, struct scsi_cmnd *cmd)
+ {
+ 	int use_sg;
+-	int dma_dir = cmd->sc_data_direction;
++	int dma_dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
+ 
+ 	use_sg = pci_map_sg(pdev, cmd->buffer, cmd->use_sg, dma_dir);
+ 	if (use_sg > 0) {
+@@ -222,7 +216,7 @@
+ 
+ static void __sync_scsi_data_for_cpu(struct pci_dev *pdev, struct scsi_cmnd *cmd)
+ {
+-	int dma_dir = cmd->sc_data_direction;
++	int dma_dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
+ 
+ 	switch(SYM_UCMD_PTR(cmd)->data_mapped) {
+ 	case 2:
+@@ -237,7 +231,7 @@
+ 
+ static void __sync_scsi_data_for_device(struct pci_dev *pdev, struct scsi_cmnd *cmd)
+ {
+-	int dma_dir = cmd->sc_data_direction;
++	int dma_dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
+ 
+ 	switch(SYM_UCMD_PTR(cmd)->data_mapped) {
+ 	case 2:
+@@ -384,13 +378,6 @@
+ 			}
+ #endif
+ 		} else {
+-			/*
+-			 * Error return from our internal request sense.  This
+-			 * is bad: we must clear the contingent allegiance
+-			 * condition otherwise the device will always return
+-			 * BUSY.  Use a big stick.
+-			 */
+-			sym_reset_scsi_target(np, csio->device->id);
+ 			cam_status = DID_ERROR;
+ 		}
+ 	} else if (cp->host_status == HS_COMPLETE) 	/* Bad SCSI status */
+@@ -607,7 +594,7 @@
+ 	 *  No direction means no data.
+ 	 */
+ 	dir = csio->sc_data_direction;
+-	if (dir != DMA_NONE) {
++	if (dir != SCSI_DATA_NONE) {
+ 		cp->segments = sym_scatter(np, cp, csio);
+ 		if (cp->segments < 0) {
+ 			if (cp->segments == -2)
+@@ -931,6 +918,7 @@
+ 	switch(to_do) {
+ 	default:
+ 	case SYM_EH_DO_IGNORE:
++		goto finish;
+ 		break;
+ 	case SYM_EH_DO_WAIT:
+ 		init_MUTEX_LOCKED(&ep->sem);
+@@ -970,6 +958,7 @@
+ 		to_do = SYM_EH_DO_IGNORE;
+ 	}
+ 
++finish:
+ 	ep->to_do = to_do;
+ 	/* Complete the command with locks held as required by the driver */
+ 	if (to_do == SYM_EH_DO_COMPLETE)
+@@ -1163,8 +1152,6 @@
+ 	lp->s.scdev_depth = depth_to_use;
+ 	sym_tune_dev_queuing(np, device->id, device->lun, reqtags);
+ 
+-	spi_dv_device(device);
+-
+ 	return 0;
+ }
+ 
+@@ -1850,8 +1837,6 @@
+ 	instance->can_queue	= (SYM_CONF_MAX_START-2);
+ 	instance->sg_tablesize	= SYM_CONF_MAX_SG;
+ 	instance->max_cmd_len	= 16;
+-	BUG_ON(sym2_transport_template == NULL);
+-	instance->transportt	= sym2_transport_template;
+ 
+ 	spin_unlock_irqrestore(instance->host_lock, flags);
+ 
+@@ -2370,120 +2355,6 @@
+ 	attach_count--;
+ }
+ 
+-static void sym2_get_offset(struct scsi_device *sdev)
+-{
+-	struct sym_hcb *np = ((struct host_data *)sdev->host->hostdata)->ncb;
+-	struct sym_tcb *tp = &np->target[sdev->id];
+-
+-	spi_offset(sdev) = tp->tinfo.curr.offset;
+-}
+-
+-static void sym2_set_offset(struct scsi_device *sdev, int offset)
+-{
+-	struct sym_hcb *np = ((struct host_data *)sdev->host->hostdata)->ncb;
+-	struct sym_tcb *tp = &np->target[sdev->id];
+-
+-	if (tp->tinfo.curr.options & PPR_OPT_DT) {
+-		if (offset > np->maxoffs_dt)
+-			offset = np->maxoffs_dt;
+-	} else {
+-		if (offset > np->maxoffs)
+-			offset = np->maxoffs;
+-	}
+-	tp->tinfo.goal.offset = offset;
+-}
+-
+-
+-static void sym2_get_period(struct scsi_device *sdev)
+-{
+-	struct sym_hcb *np = ((struct host_data *)sdev->host->hostdata)->ncb;
+-	struct sym_tcb *tp = &np->target[sdev->id];
+-
+-	spi_period(sdev) = tp->tinfo.curr.period;
+-}
+-
+-static void sym2_set_period(struct scsi_device *sdev, int period)
+-{
+-	struct sym_hcb *np = ((struct host_data *)sdev->host->hostdata)->ncb;
+-	struct sym_tcb *tp = &np->target[sdev->id];
+-
+-	if (period <= 9 && np->minsync_dt) {
+-		if (period < np->minsync_dt)
+-			period = np->minsync_dt;
+-		tp->tinfo.goal.options = PPR_OPT_DT;
+-		tp->tinfo.goal.period = period;
+-		if (!tp->tinfo.curr.offset ||
+-					tp->tinfo.curr.offset > np->maxoffs_dt)
+-			tp->tinfo.goal.offset = np->maxoffs_dt;
+-	} else {
+-		if (period < np->minsync)
+-			period = np->minsync;
+-		tp->tinfo.goal.options = 0;
+-		tp->tinfo.goal.period = period;
+-		if (!tp->tinfo.curr.offset ||
+-					tp->tinfo.curr.offset > np->maxoffs)
+-			tp->tinfo.goal.offset = np->maxoffs;
+-	}
+-}
+-
+-static void sym2_get_width(struct scsi_device *sdev)
+-{
+-	struct sym_hcb *np = ((struct host_data *)sdev->host->hostdata)->ncb;
+-	struct sym_tcb *tp = &np->target[sdev->id];
+-
+-	spi_width(sdev) = tp->tinfo.curr.width ? 1 : 0;
+-}
+-
+-static void sym2_set_width(struct scsi_device *sdev, int width)
+-{
+-	struct sym_hcb *np = ((struct host_data *)sdev->host->hostdata)->ncb;
+-	struct sym_tcb *tp = &np->target[sdev->id];
+-
+-	tp->tinfo.goal.width = width;
+-}
+-
+-static void sym2_get_dt(struct scsi_device *sdev)
+-{
+-	struct sym_hcb *np = ((struct host_data *)sdev->host->hostdata)->ncb;
+-	struct sym_tcb *tp = &np->target[sdev->id];
+-
+-	spi_dt(sdev) = (tp->tinfo.curr.options & PPR_OPT_DT) ? 1 : 0;
+-}
+-
+-static void sym2_set_dt(struct scsi_device *sdev, int dt)
+-{
+-	struct sym_hcb *np = ((struct host_data *)sdev->host->hostdata)->ncb;
+-	struct sym_tcb *tp = &np->target[sdev->id];
+-
+-	if (!dt) {
+-		/* if clearing DT, then we may need to reduce the
+-		 * period and the offset */
+-		if (tp->tinfo.curr.period < np->minsync)
+-			tp->tinfo.goal.period = np->minsync;
+-		if (tp->tinfo.curr.offset > np->maxoffs)
+-			tp->tinfo.goal.offset = np->maxoffs;
+-		tp->tinfo.goal.options &= ~PPR_OPT_DT;
+-	} else {
+-		tp->tinfo.goal.options |= PPR_OPT_DT;
+-	}
+-}
+-	
+-
+-static struct spi_function_template sym2_transport_functions = {
+-	.set_offset	= sym2_set_offset,
+-	.get_offset	= sym2_get_offset,
+-	.show_offset	= 1,
+-	.set_period	= sym2_set_period,
+-	.get_period	= sym2_get_period,
+-	.show_period	= 1,
+-	.set_width	= sym2_set_width,
+-	.get_width	= sym2_get_width,
+-	.show_width	= 1,
+-	.get_dt		= sym2_get_dt,
+-	.set_dt		= sym2_set_dt,
+-	.show_dt	= 1,
+-};
+-
+ static struct pci_device_id sym2_id_table[] __devinitdata = {
+ 	{ PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_NCR_53C810,
+ 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
+@@ -2533,10 +2404,6 @@
+ 
+ static int __init sym2_init(void)
+ {
+-	sym2_transport_template = spi_attach_transport(&sym2_transport_functions);
+-	if (!sym2_transport_template)
+-		return -ENODEV;
+-
+ 	pci_register_driver(&sym2_driver);
+ 	return 0;
+ }
+@@ -2544,7 +2411,6 @@
+ static void __exit sym2_exit(void)
+ {
+ 	pci_unregister_driver(&sym2_driver);
+-	spi_release_transport(sym2_transport_template);
+ }
+ 
+ module_init(sym2_init);
+diff -urN kernel-source-2.6.6.orig/drivers/scsi/sym53c8xx_2/sym_glue.h kernel-source-2.6.6/drivers/scsi/sym53c8xx_2/sym_glue.h
+--- kernel-source-2.6.6.orig/drivers/scsi/sym53c8xx_2/sym_glue.h	2004-05-10 03:48:00.000000000 -0600
++++ kernel-source-2.6.6/drivers/scsi/sym53c8xx_2/sym_glue.h	2004-06-09 22:38:58.890568710 -0600
+@@ -66,10 +66,9 @@
+ #  include <asm/irq.h>
+ #endif
+ 
+-#include <scsi/scsi.h>
+ #include <scsi/scsi_cmnd.h>
+-#include <scsi/scsi_device.h>
+ #include <scsi/scsi_host.h>
++#include "../scsi.h"		/* XXX: DID_* */
+ 
+ #ifndef bzero
+ #define bzero(d, n)	memset((d), 0, (n))
+@@ -342,12 +341,18 @@
+ #define	CAM_RESRC_UNAVAIL	DID_ERROR
+ 
+ /*
+- *  Remap data direction values.
++ *  Remap SCSI data direction values.
+  */
+-#define CAM_DIR_NONE		DMA_NONE
+-#define CAM_DIR_IN		DMA_FROM_DEVICE
+-#define CAM_DIR_OUT		DMA_TO_DEVICE
+-#define CAM_DIR_UNKNOWN		DMA_BIDIRECTIONAL
++#ifndef	SCSI_DATA_UNKNOWN
++#define	SCSI_DATA_UNKNOWN	0
++#define	SCSI_DATA_WRITE		1
++#define	SCSI_DATA_READ		2
++#define	SCSI_DATA_NONE		3
++#endif
++#define CAM_DIR_NONE		SCSI_DATA_NONE
++#define CAM_DIR_IN		SCSI_DATA_READ
++#define CAM_DIR_OUT		SCSI_DATA_WRITE
++#define CAM_DIR_UNKNOWN		SCSI_DATA_UNKNOWN
+ 
+ /*
+  *  These ones are used as return code from 
+diff -urN kernel-source-2.6.6.orig/drivers/scsi/sym53c8xx_2/sym_hipd.c kernel-source-2.6.6/drivers/scsi/sym53c8xx_2/sym_hipd.c
+--- kernel-source-2.6.6.orig/drivers/scsi/sym53c8xx_2/sym_hipd.c	2004-05-10 03:48:00.000000000 -0600
++++ kernel-source-2.6.6/drivers/scsi/sym53c8xx_2/sym_hipd.c	2004-06-09 22:38:58.894474959 -0600
+@@ -50,8 +50,7 @@
+  * SUCH DAMAGE.
+  */
+ 
+-#define SYM_VERSION "2.1.18j"
+-#define SYM_DRIVER_NAME	"sym-" SYM_VERSION
++#define SYM_DRIVER_NAME	"sym-2.1.18i"
+ 
+ #include "sym_glue.h"
+ #include "sym_nvram.h"
+@@ -3184,7 +3183,7 @@
+ 		/*
+ 		 *  patch requested size into sense command
+ 		 */
+-		cp->sensecmd[0]		= REQUEST_SENSE;
++		cp->sensecmd[0]		= 0x03;
+ 		cp->sensecmd[1]		= 0;
+ 		if (tp->tinfo.curr.scsi_version <= 2 && cp->lun <= 7)
+ 			cp->sensecmd[1]	= cp->lun << 5;
+@@ -5694,7 +5693,7 @@
+ 	 *  On standard INQUIRY response (EVPD and CmDt 
+ 	 *  not set), sniff out device capabilities.
+ 	 */
+-	if (cp->cdb_buf[0] == INQUIRY && !(cp->cdb_buf[1] & 0x3))
++	if (cp->cdb_buf[0] == 0x12 && !(cp->cdb_buf[1] & 0x3))
+ 		sym_sniff_inquiry(np, cp->cam_ccb, resid);
+ #endif
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-scsi-sym_2-dv-hang.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-scsi-sym_2-dv-hang.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-scsi-sym_2-dv-hang.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,42 @@
+#! /bin/sh -e 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix DV hang with certain devices
+## DP: Patch author: James Bottomley
+## DP: Upstream status: Submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+There's a bad hang where the driver locks the system solid trying to do
+domain validation with certain devices.  The one I've managed to
+reproduce it with is a Quantum Atlas.
+
+What happens is that setting the offset to zero is an async negotiation
+message.  However, the driver still seems to have DT set (which is
+illegal).  Most devices just reject this as stupid, but the Quantum
+seems to try to obey it and hangs the bus.
+
+The simple fix is to reset all PPR options when the offset is set to
+zero.
+
+James
+
+===== drivers/scsi/sym53c8xx_2/sym_glue.c 1.44 vs edited =====
+--- 1.44/drivers/scsi/sym53c8xx_2/sym_glue.c	2004-07-26 17:24:36 -04:00
++++ edited/drivers/scsi/sym53c8xx_2/sym_glue.c	2004-08-19 22:30:35 -04:00
+@@ -2383,6 +2383,9 @@
+ 	struct sym_hcb *np = ((struct host_data *)sdev->host->hostdata)->ncb;
+ 	struct sym_tcb *tp = &np->target[sdev->id];
+ 
++	if (offset == 0)
++		tp->tinfo.goal.options = 0;
++
+ 	if (tp->tinfo.curr.options & PPR_OPT_DT) {
+ 		if (offset > np->maxoffs_dt)
+ 			offset = np->maxoffs_dt;
+
+-
+To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
+the body of a message to majordomo at vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-scsi_changer.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-scsi_changer.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-scsi_changer.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,1537 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: SCSI Media Changer - http://bytesex.org/patches/
+## DP: Patch author: unknown
+## DP: Upstream status: not submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -urN kernel-source-2.6.6/Documentation/scsi-changer.txt kernel-source-2.6.6-1/Documentation/scsi-changer.txt
+--- kernel-source-2.6.6/Documentation/scsi-changer.txt	1970-01-01 10:00:00.000000000 +1000
++++ kernel-source-2.6.6-1/Documentation/scsi-changer.txt	2004-03-17 21:24:11.000000000 +1100
+@@ -0,0 +1,184 @@
++
++README for the SCSI media changer driver
++========================================
++
++This is a driver for SCSI Medium Changer devices, which are listed
++with "Type: Medium Changer" in /proc/scsi/scsi.
++
++This is for *real* Jukeboxes.  It is *not* supported to work with
++common small CD-ROM changers, neither one-lun-per-slot SCSI changers
++nor IDE drives.
++
++Userland tools available from: http://bytesex.org/changer.html
++
++
++General Information
++-------------------
++
++First some words about how changers work: A changer has 2 (possibly
++more) SCSI ID's. One for the changer device which controls the robot,
++and one for the device which actually reads and writes the data. The
++later may be anything, a MOD, a CD-ROM, a tape or whatever. For the
++changer device this is a "don't care", he *only* shuffles around the
++media, nothing else.
++
++
++The SCSI changer model is complex, compared to - for example - IDE-CD
++changers. But it allows to handle nearly all possible cases. It knows
++4 different types of changer elements:
++
++  media transport - this one shuffles around the media, i.e. the
++                    transport arm.  Also known as "picker".
++  storage         - a slot which can hold a media.
++  import/export   - the same as above, but is accessable from outside,
++                    i.e. there the operator (you !) can use this to
++                    fill in and remove media from the changer.
++		    Sometimes named "mailslot".
++  data transfer   - this is the device which reads/writes, i.e. the
++		    CD-ROM / Tape / whatever drive.
++
++None of these is limited to one: A huge Jukebox could have slots for
++123 CD-ROM's, 5 CD-ROM readers (and therefore 6 SCSI ID's: the changer
++and each CD-ROM) and 2 transport arms. No problem to handle.
++
++
++How it is implemented
++---------------------
++
++I implemented the driver as character device driver with a NetBSD-like
++ioctl interface. Just grabbed NetBSD's header file and one of the
++other linux SCSI device drivers as starting point. The interface
++should be source code compatible with NetBSD. So if there is any
++software (anybody knows ???) which supports a BSDish changer driver,
++it should work with this driver too.
++
++Over time a few more ioctls where added, volume tag support for example
++wasn't covered by the NetBSD ioctl API.
++
++
++Current State
++-------------
++
++Support for more than one transport arm is not implemented yet (and
++nobody asked for it so far...).
++
++I test and use the driver myself with a 35 slot cdrom jukebox from
++Grundig.  I got some reports telling it works ok with tape autoloaders
++(Exabyte, HP and DEC).  Some People use this driver with amanda.  It
++works fine with small (11 slots) and a huge (4 MOs, 88 slots)
++magneto-optical Jukebox.  Probably with lots of other changers too, most
++(but not all :-) people mail me only if it does *not* work...
++
++I don't have any device lists, neither black-list nor white-list.  Thus
++it is quite useless to ask me whenever a specific device is supported or
++not.  In theory every changer device which supports the SCSI-2 media
++changer command set should work out-of-the-box with this driver.  If it
++doesn't, it is a bug.  Either within the driver or within the firmware
++of the changer device.
++
++
++Using it
++--------
++
++This is a character device with major number is 86, so use
++"mknod /dev/sch0 c 86 0" to create the special file for the driver.
++
++If the module finds the changer, it prints some messages about the
++device [ try "dmesg" if you don't see anything ] and should show up in
++/proc/devices. If not....  some changers use ID ? / LUN 0 for the
++device and ID ? / LUN 1 for the robot mechanism. But Linux does *not*
++look for LUN's other than 0 as default, becauce there are to many
++broken devices. So you can try:
++
++  1) echo "scsi add-single-device 0 0 ID 1" > /proc/scsi/scsi
++     (replace ID with the SCSI-ID of the device)
++  2) boot the kernel with "max_scsi_luns=1" on the command line
++     (append="max_scsi_luns=1" in lilo.conf should do the trick)
++
++
++Trouble?
++--------
++
++If you insmod the driver with "insmod debug=1", it will be verbose and
++prints a lot of stuff to the syslog.  Compiling the kernel with
++CONFIG_SCSI_CONSTANTS=y improves the quality of the error messages alot
++because the kernel will translate the error codes into human-readable
++strings then.
++
++You can display these messages with the dmesg command (or check the
++logfiles).  If you email me some question becauce of a problem with the
++driver, please include these messages.
++
++
++Insmod options
++--------------
++
++debug=0/1
++	Enable debug messages (see above, default: 0).
++
++verbose=0/1
++	Be verbose (default: 1).
++
++init=0/1
++	Send INITIALIZE ELEMENT STATUS command to the changer
++	at insmod time (default: 1).
++
++check_busy=0/1
++	When moving media from/to data transfer elements, check
++	whenever the device is busy and refuse to move if so
++	(default: 1).
++
++timeout_init=<seconds>
++	timeout for the INITIALIZE ELEMENT STATUS command
++	(default: 3600).
++
++timeout_move=<seconds>
++	timeout for all other commands (default: 120).
++
++dt_id=<id1>,<id2>,...
++dt_lun=<lun1>,<lun2>,...
++	These two allow to specify the SCSI ID and LUN for the data
++	transfer elements.  You likely don't need this as the jukebox
++	should provide this information.  But some devices don't ...
++
++vendor_firsts=
++vendor_counts=
++vendor_labels=
++	These insmod options can be used to tell the driver that there
++	are some vendor-specific element types.  Grundig for example
++	does this.  Some jukeboxes have a printer to label fresh burned
++	CDs, which is addressed as element 0xc000 (type 5).  To tell the
++	driver about this vendor-specific element, use this:
++		$ insmod ch			\
++			vendor_firsts=0xc000	\
++			vendor_counts=1		\
++			vendor_labels=printer
++	All three insmod options accept up to four comma-separated
++	values, this way you can configure the element types 5-8.
++	You likely need the SCSI specs for the device in question to
++	find the correct values as they are not covered by the SCSI-2
++	standard.
++
++
++Credits
++-------
++
++I wrote this driver using the famous mailing-patches-around-the-world
++method.  With (more or less) help from:
++
++	Daniel Moehwald <moehwald at hdg.de>
++	Dane Jasper <dane at sonic.net>
++	R. Scott Bailey <sbailey at dsddi.eds.com>
++	Jonathan Corbet <corbet at atd.ucar.edu>
++
++Special thanks go to
++	Martin Kuehne <Martin.KUEHNE at GRUNDIG.com>
++for a old, second-hand (but full functional) cdrom jukebox which I use
++to develop/test driver and tools now.
++
++Have fun,
++
++   Gerd
++
++-- 
++Gerd Knorr <kraxel at bytesex.org>
+diff -urN kernel-source-2.6.6/drivers/scsi/Kconfig kernel-source-2.6.6-1/drivers/scsi/Kconfig
+--- kernel-source-2.6.6/drivers/scsi/Kconfig	2004-05-10 19:47:58.000000000 +1000
++++ kernel-source-2.6.6-1/drivers/scsi/Kconfig	2004-05-10 22:21:38.000000000 +1000
+@@ -137,6 +137,24 @@
+ 
+ 	  If unsure, say N.
+ 
++config CHR_DEV_SCH
++	tristate "SCSI media changer support"
++	depends on SCSI
++	---help---
++	  This is a driver for SCSI media changers.  Most common devices are
++	  tape libraries and MOD/CDROM jukeboxes.  *Real* jukeboxes, you
++	  don't need this for those tiny 6-slot cdrom changers.  Media
++	  changers are listed as "Type: Medium Changer" in /proc/scsi/scsi.
++	  If you have such hardware and want to use it with linux, say Y
++	  here.  Check <file:Documentation/scsi-changer.txt> for details.
++	
++	  If you want to compile this as a module ( = code which can be
++	  inserted in and removed from the running kernel whenever you want),
++	  say M here and read <file:Documentation/modules.txt> and
++	  <file:Documentation/scsi.txt>. The module will be called ch.o.
++	  If unsure, say N.
++	
++
+ comment "Some SCSI devices (e.g. CD jukebox) support multiple LUNs"
+ 	depends on SCSI
+ 
+diff -urN kernel-source-2.6.6/drivers/scsi/Makefile kernel-source-2.6.6-1/drivers/scsi/Makefile
+--- kernel-source-2.6.6/drivers/scsi/Makefile	2004-05-10 19:47:58.000000000 +1000
++++ kernel-source-2.6.6-1/drivers/scsi/Makefile	2004-05-10 22:21:38.000000000 +1000
+@@ -132,6 +131,7 @@
+ obj-$(CONFIG_BLK_DEV_SD)	+= sd_mod.o
+ obj-$(CONFIG_BLK_DEV_SR)	+= sr_mod.o
+ obj-$(CONFIG_CHR_DEV_SG)	+= sg.o
++obj-$(CONFIG_CHR_DEV_SCH)	+= ch.o
+ 
+ scsi_mod-y			+= scsi.o hosts.o scsi_ioctl.o constants.o \
+ 				   scsicam.o scsi_error.o scsi_lib.o \
+diff -urN kernel-source-2.6.6/drivers/scsi/ch.c kernel-source-2.6.6-1/drivers/scsi/ch.c
+--- kernel-source-2.6.6/drivers/scsi/ch.c	1970-01-01 10:00:00.000000000 +1000
++++ kernel-source-2.6.6-1/drivers/scsi/ch.c	2004-03-17 21:24:11.000000000 +1100
+@@ -0,0 +1,1085 @@
++/*
++ * SCSI Media Changer device driver for Linux 2.6
++ *
++ *     (c) 1996-2003 Gerd Knorr <kraxel at bytesex.org>
++ *
++ */
++
++#define VERSION "0.22"
++
++#include <linux/config.h>
++#include <linux/version.h>
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/fs.h>
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/mm.h>
++#include <linux/major.h>
++#include <linux/string.h>
++#include <linux/errno.h>
++#include <linux/interrupt.h>
++#include <linux/blkdev.h>
++#include <linux/completion.h>
++#include <linux/devfs_fs_kernel.h>
++#include <linux/ioctl32.h>
++#include <linux/compat.h>
++#include <asm/system.h>
++#include <asm/uaccess.h>
++
++#include <linux/chio.h>			/* here are all the ioctls */
++
++#define MAJOR_NR	SCSI_CHANGER_MAJOR
++
++#define CH_DT_MAX       16
++#define CH_TYPES        8
++
++#include <scsi/scsi_cmnd.h>
++#include <scsi/scsi_driver.h>
++#include <scsi/scsi_ioctl.h>
++
++#include "scsi.h"
++#include "hosts.h"
++
++MODULE_SUPPORTED_DEVICE("sch");
++MODULE_DESCRIPTION("device driver for scsi media changer devices");
++MODULE_AUTHOR("Gerd Knorr <kraxel at bytesex.org>");
++MODULE_LICENSE("GPL");
++
++static int check_busy = 1;
++MODULE_PARM(check_busy,"i");
++MODULE_PARM_DESC(check_busy, \
++    "enable/disable busy check for data transfer elements (default: on)");
++
++static int init = 1;
++MODULE_PARM(init,"i");
++MODULE_PARM_DESC(init, \
++    "initialize element status on driver load (default: on)");
++
++static int timeout_move = 300;
++MODULE_PARM(timeout_move,"i");
++MODULE_PARM_DESC(timeout_move,"timeout for move commands "
++		 "(default: 300 seconds)");
++
++static int timeout_init = 3600;
++MODULE_PARM(timeout_init,"i");
++MODULE_PARM_DESC(timeout_init,"timeout for INITIALIZE ELEMENT STATUS "
++		 "(default: 3600 seconds)");
++
++static int verbose = 1;
++MODULE_PARM(verbose,"i");
++MODULE_PARM_DESC(verbose,"be verbose (default: on)");
++
++static int debug = 0;
++MODULE_PARM(debug,"i");
++MODULE_PARM_DESC(debug,"enable/disable debug messages, also prints more "
++		 "detailed sense codes on scsi errors (default: off)");
++
++static int dt_id[CH_DT_MAX] = { [ 0 ... (CH_DT_MAX-1) ] = -1 };
++static int dt_lun[CH_DT_MAX];
++MODULE_PARM(dt_id,"1-" __MODULE_STRING(CH_DT_MAX) "i");
++MODULE_PARM(dt_lun,"1-" __MODULE_STRING(CH_DT_MAX) "i");
++
++/* tell the driver about vendor-specific slots */
++static int vendor_firsts[CH_TYPES-4];
++static int vendor_counts[CH_TYPES-4];
++static char *vendor_labels[CH_TYPES-4];
++MODULE_PARM(vendor_firsts,"1-4i");
++MODULE_PARM(vendor_counts,"1-4i");
++MODULE_PARM(vendor_labels,"1-4s");
++
++#define dprintk(fmt, arg...)    if (debug) \
++        printk(KERN_DEBUG "%s: " fmt, ch->name, ##arg)
++#define vprintk(fmt, arg...)    if (verbose) \
++        printk(KERN_INFO "%s: " fmt, ch->name, ##arg)
++
++/* ------------------------------------------------------------------- */
++
++#define MAX_RETRIES   1
++
++static int  ch_probe(struct device *);
++static int  ch_remove(struct device *);
++static int  ch_open(struct inode * inode, struct file * filp);
++static int  ch_release(struct inode * inode, struct file * filp);
++static int  ch_ioctl(struct inode * inode, struct file * filp,
++		     unsigned int cmd, unsigned long arg);
++
++typedef struct {
++	struct list_head    list;
++	int                 minor;
++	char                name[8];
++	Scsi_Device  	    *device;
++	Scsi_Device         **dt;        /* ptrs to data transfer elements */
++	u_int               firsts[CH_TYPES];
++	u_int               counts[CH_TYPES];
++	u_int               unit_attention;
++	u_int		    voltags;
++	struct semaphore    lock;
++} scsi_changer;
++
++static LIST_HEAD(ch_devlist);
++static spinlock_t ch_devlist_lock = SPIN_LOCK_UNLOCKED;
++static int ch_devcount;
++
++struct scsi_driver ch_template =
++{
++	.owner     	= THIS_MODULE,
++	.gendrv     	= {
++		.name	= "ch",
++		.probe  = ch_probe,
++		.remove = ch_remove,
++	},
++};
++
++static struct file_operations changer_fops =
++{
++	.owner      = THIS_MODULE,
++	.open       = ch_open,
++	.release    = ch_release,
++	.ioctl      = ch_ioctl,
++};
++
++static struct {
++	unsigned char  sense;
++	unsigned char  asc;
++	unsigned char  ascq;
++	int	       errno;
++} err[] = {
++/* Just filled in what looks right. Hav'nt checked any standard paper for
++   these errno assignments, so they may be wrong... */
++	{
++		.sense  = ILLEGAL_REQUEST,
++		.asc    = 0x21,
++		.ascq   = 0x01,
++		.errno  = EBADSLT, /* Invalid element address */
++	},{
++		.sense  = ILLEGAL_REQUEST,
++		.asc    = 0x28,
++		.ascq   = 0x01,
++		.errno  = EBADE,   /* Import or export element accessed */
++	},{
++		.sense  = ILLEGAL_REQUEST,
++		.asc    = 0x3B,
++		.ascq   = 0x0D,
++		.errno  = EXFULL,  /* Medium destination element full */
++	},{
++		.sense  = ILLEGAL_REQUEST,
++		.asc    = 0x3B,
++		.ascq   = 0x0E,
++		.errno  = EBADE,   /* Medium source element empty */
++	},{
++		.sense  = ILLEGAL_REQUEST,
++		.asc    = 0x20,
++		.ascq   = 0x00,
++		.errno  = EBADRQC, /* Invalid command operation code */
++	},{
++	        /* end of list */
++	}
++};
++
++/* ------------------------------------------------------------------- */
++/* ioctl32 compat                                                      */
++
++#ifdef CONFIG_COMPAT
++
++struct changer_element_status32 {
++	int		ces_type;
++	compat_uptr_t	ces_data;
++};
++#define CHIOGSTATUS32  _IOW('c', 8,struct changer_element_status32)
++
++static struct {
++	unsigned int cmd;
++	int          reg;
++} ioctl32_cmds[] = {
++	{ .cmd = CHIOMOVE      },
++	{ .cmd = CHIOEXCHANGE  },
++	{ .cmd = CHIOPOSITION  },
++	{ .cmd = CHIOGPICKER   },
++	{ .cmd = CHIOSPICKER   },
++	{ .cmd = CHIOGPARAMS   },
++	{ .cmd = CHIOGELEM     },
++	{ .cmd = CHIOINITELEM  },
++	{ .cmd = CHIOSVOLTAG   },
++	{ .cmd = CHIOGVPARAMS  },
++	{ .cmd = CHIOGSTATUS32 },
++};
++
++static int ioctl32_register(void)
++{
++	unsigned int i;
++	int err;
++
++	for (i = 0; i < ARRAY_SIZE(ioctl32_cmds); i++) {
++		err = register_ioctl32_conversion(ioctl32_cmds[i].cmd,NULL);
++		if (err >= 0)
++			ioctl32_cmds[i].reg++;
++	}
++	return 0;
++}
++static int ioctl32_unregister(void)
++{
++	unsigned int i;
++	
++	for (i = 0; i < ARRAY_SIZE(ioctl32_cmds); i++) {
++		if (ioctl32_cmds[i].reg) {
++			unregister_ioctl32_conversion(ioctl32_cmds[i].cmd);
++			ioctl32_cmds[i].reg--;
++		}
++	}
++	return 0;
++}
++
++#else
++
++static int ioctl32_register(void)   { return 0; }
++static int ioctl32_unregister(void) { return 0; }
++
++#endif
++
++/* ------------------------------------------------------------------- */
++
++static int ch_find_errno(unsigned char *sense_buffer)
++{
++	int i,errno = 0;
++
++	/* Check to see if additional sense information is available */
++	if (sense_buffer[7]  > 5 &&
++	    sense_buffer[12] != 0) {
++		for (i = 0; err[i].errno != 0; i++) {
++			if (err[i].sense == sense_buffer[ 2] &&
++			    err[i].asc   == sense_buffer[12] &&
++			    err[i].ascq  == sense_buffer[13]) {
++				errno = -err[i].errno;
++				break;
++			}
++		}
++	}
++	if (errno == 0)
++		errno = -EIO;
++	return errno;
++}
++
++static void
++ch_request_done (Scsi_Cmnd * sc)
++{
++	sc->request->rq_status = RQ_SCSI_DONE; /* Busy, but indicate request done */
++        if (sc->request->waiting != NULL)
++		complete(sc->request->waiting);
++}
++
++static int
++ch_do_scsi(scsi_changer *ch, unsigned char *cmd,
++	   void *buffer, unsigned buflength)
++{
++	int errno, retries = 0, timeout;
++	DECLARE_COMPLETION(wait);
++	Scsi_Request *sr;
++	
++	sr = scsi_allocate_request(ch->device, GFP_ATOMIC);
++	if (NULL == sr)
++		return -ENOMEM;
++
++ retry:
++	errno = 0;
++	if (debug) {
++		dprintk("command: %s","");
++		print_command(cmd);
++	}
++
++	sr->sr_request->waiting = &wait;
++	timeout = (cmd[0] == INITIALIZE_ELEMENT_STATUS)
++		? timeout_init : timeout_move;
++	scsi_do_req(sr, cmd, buffer, buflength, ch_request_done,
++		    timeout * HZ, MAX_RETRIES);
++	wait_for_completion(&wait);
++	sr->sr_request->waiting = NULL;
++
++	dprintk("result: 0x%x\n",sr->sr_result);
++	if (driver_byte(sr->sr_result) != 0) {
++		if (debug)
++			print_req_sense(ch->name, sr);
++		errno = ch_find_errno(sr->sr_sense_buffer);
++
++		switch(sr->sr_sense_buffer[2] & 0xf) {
++		case UNIT_ATTENTION:
++			ch->unit_attention = 1;
++			if (retries++ < 3)
++				goto retry;
++			break;
++		}
++	}
++	scsi_release_request(sr);
++	return errno;
++}
++
++/* ------------------------------------------------------------------------ */
++
++static int
++ch_elem_to_typecode(scsi_changer *ch, u_int elem)
++{
++	int i;
++	
++	for (i = 0; i < CH_TYPES; i++) {
++		if (elem >= ch->firsts[i]  &&
++		    elem <  ch->firsts[i] +
++	            ch->counts[i])
++			return i+1;
++	}
++	return 0;
++}
++
++static int
++ch_read_element_status(scsi_changer *ch, u_int elem, char *data)
++{
++	u_char  cmd[12];
++	u_char  *buffer;
++	int     result;
++	
++	buffer = kmalloc(512, GFP_KERNEL);
++	if(!buffer)
++		return -ENOMEM;
++	
++ retry:
++	memset(cmd,0,sizeof(cmd));
++	cmd[0] = READ_ELEMENT_STATUS;
++	cmd[1] = (ch->device->lun << 5) | 
++		(ch->voltags ? 0x10 : 0) |
++		ch_elem_to_typecode(ch,elem);
++	cmd[2] = (elem >> 8) & 0xff;
++	cmd[3] = elem        & 0xff;
++	cmd[5] = 1;
++	cmd[9] = 255;
++	if (0 == (result = ch_do_scsi(ch, cmd, buffer, 256))) {
++		if (((buffer[16] << 8) | buffer[17]) != elem) {
++			dprintk("asked for element 0x%02x, got 0x%02x\n",
++				elem,(buffer[16] << 8) | buffer[17]);
++			kfree(buffer);
++			return -EIO;
++		}
++		memcpy(data,buffer+16,16);
++	} else {
++		if (ch->voltags) {
++			ch->voltags = 0;
++			vprintk("device has no volume tag support%s\n","");
++			goto retry;
++		}
++		dprintk("READ ELEMENT STATUS for element 0x%x failed\n",elem);
++	}
++	kfree(buffer);
++	return result;
++}
++
++static int 
++ch_init_elem(scsi_changer *ch)
++{
++	int err;
++	u_char cmd[6];
++
++	vprintk("INITIALIZE ELEMENT STATUS, may take some time ...%s\n","");
++	memset(cmd,0,sizeof(cmd));
++	cmd[0] = INITIALIZE_ELEMENT_STATUS;
++	cmd[1] = ch->device->lun << 5;
++	err = ch_do_scsi(ch, cmd, NULL, 0);
++	vprintk("... finished%s\n","");
++	return err;
++}
++
++static int
++ch_readconfig(scsi_changer *ch)
++{
++	u_char  cmd[10], data[16];
++	u_char  *buffer;
++	int     result,id,lun,i;
++	u_int   elem;
++	
++	buffer = kmalloc(512, GFP_KERNEL);
++	if (!buffer)
++		return -ENOMEM;
++	memset(buffer,0,512);
++	
++	memset(cmd,0,sizeof(cmd));
++	cmd[0] = MODE_SENSE;
++	cmd[1] = ch->device->lun << 5;
++	cmd[2] = 0x1d;
++	cmd[4] = 255;
++	result = ch_do_scsi(ch, cmd, buffer, 255);
++	if (0 != result) {
++		cmd[1] |= (1<<3);
++		result  = ch_do_scsi(ch, cmd, buffer, 255);
++	}
++	if (0 == result) {
++		ch->firsts[CHET_MT] =
++			(buffer[buffer[3]+ 6] << 8) | buffer[buffer[3]+ 7];
++		ch->counts[CHET_MT] =
++			(buffer[buffer[3]+ 8] << 8) | buffer[buffer[3]+ 9];
++		ch->firsts[CHET_ST] =
++			(buffer[buffer[3]+10] << 8) | buffer[buffer[3]+11];
++		ch->counts[CHET_ST] =
++			(buffer[buffer[3]+12] << 8) | buffer[buffer[3]+13];
++		ch->firsts[CHET_IE] =
++			(buffer[buffer[3]+14] << 8) | buffer[buffer[3]+15];
++		ch->counts[CHET_IE] =
++			(buffer[buffer[3]+16] << 8) | buffer[buffer[3]+17];
++		ch->firsts[CHET_DT] =
++			(buffer[buffer[3]+18] << 8) | buffer[buffer[3]+19];
++		ch->counts[CHET_DT] =
++			(buffer[buffer[3]+20] << 8) | buffer[buffer[3]+21];
++		vprintk("type #1 (mt): 0x%x+%d [medium transport]\n",
++			ch->firsts[CHET_MT],
++			ch->counts[CHET_MT]);
++		vprintk("type #2 (st): 0x%x+%d [storage]\n",
++			ch->firsts[CHET_ST],
++			ch->counts[CHET_ST]);
++		vprintk("type #3 (ie): 0x%x+%d [import/export]\n",
++			ch->firsts[CHET_IE],
++			ch->counts[CHET_IE]);
++		vprintk("type #4 (dt): 0x%x+%d [data transfer]\n",
++			ch->firsts[CHET_DT],
++			ch->counts[CHET_DT]);
++	} else {
++		vprintk("reading element address assigment page failed!%s\n",
++			"");
++	}
++	
++	/* vendor specific element types */
++	for (i = 0; i < 4; i++) {
++		if (0 == vendor_counts[i])
++			continue;
++		if (NULL == vendor_labels[i])
++			continue;
++		ch->firsts[CHET_V1+i] = vendor_firsts[i];
++		ch->counts[CHET_V1+i] = vendor_counts[i];
++		vprintk("type #%d (v%d): 0x%x+%d [%s, vendor specific]\n",
++			i+5,i+1,vendor_firsts[i],vendor_counts[i],
++			vendor_labels[i]);
++	}
++
++	/* look up the devices of the data transfer elements */
++	ch->dt =
++		kmalloc(ch->counts[CHET_DT]*sizeof(Scsi_Device*),
++			GFP_ATOMIC);
++	for (elem = 0; elem < ch->counts[CHET_DT]; elem++) {
++		id  = -1;
++		lun = 0;
++		if (-1 != dt_id[elem]) {
++			id  = dt_id[elem];
++			lun = dt_lun[elem];
++			vprintk("dt 0x%x: [insmod option] ",
++				elem+ch->firsts[CHET_DT]);
++		} else if (0 != ch_read_element_status
++			   (ch,elem+ch->firsts[CHET_DT],data)) {
++			vprintk("dt 0x%x: READ ELEMENT STATUS failed\n",
++				elem+ch->firsts[CHET_DT]);
++		} else {
++			vprintk("dt 0x%x: ",elem+ch->firsts[CHET_DT]);
++			if (data[6] & 0x80) {
++				if (verbose)
++					printk("not this SCSI bus\n");
++				ch->dt[elem] = NULL;
++			} else if (0 == (data[6] & 0x30)) {
++				if (verbose)
++					printk("ID/LUN unknown\n");
++				ch->dt[elem] = NULL;
++			} else {
++				id  = ch->device->id;
++				lun = 0;
++				if (data[6] & 0x20) id  = data[7];
++				if (data[6] & 0x10) lun = data[6] & 7;
++			}
++		}
++		if (-1 != id) {
++			if (verbose)
++				printk("ID %i, LUN %i, ",id,lun);
++			ch->dt[elem] =
++				scsi_device_lookup(ch->device->host,
++						   ch->device->channel,
++						   id,lun);
++			if (!ch->dt[elem]) {
++				/* should not happen */
++				if (verbose)
++					printk("Huh? device not found!\n");
++			} else {
++				if (verbose)
++					printk("name: %8.8s %16.16s %4.4s\n",
++					       ch->dt[elem]->vendor,
++					       ch->dt[elem]->model,
++					       ch->dt[elem]->rev);
++			}
++		}
++	}
++	ch->voltags = 1;
++	kfree(buffer);
++
++	return 0;
++}
++
++/* ------------------------------------------------------------------------ */
++
++static int
++ch_position(scsi_changer *ch, u_int trans, u_int elem, int rotate)
++{
++	u_char  cmd[10];
++	
++	dprintk("position: 0x%x\n",elem);
++	if (0 == trans)
++		trans = ch->firsts[CHET_MT];
++	memset(cmd,0,sizeof(cmd));
++	cmd[0]  = POSITION_TO_ELEMENT;
++	cmd[1]  = ch->device->lun << 5;
++	cmd[2]  = (trans >> 8) & 0xff;
++	cmd[3]  =  trans       & 0xff;
++	cmd[4]  = (elem  >> 8) & 0xff;
++	cmd[5]  =  elem        & 0xff;
++	cmd[8]  = rotate ? 1 : 0;
++	return ch_do_scsi(ch, cmd, NULL,0);
++}
++
++static int
++ch_move(scsi_changer *ch, u_int trans, u_int src, u_int dest, int rotate)
++{
++	u_char  cmd[12];
++	
++	dprintk("move: 0x%x => 0x%x\n",src,dest);
++	if (0 == trans)
++		trans = ch->firsts[CHET_MT];
++	memset(cmd,0,sizeof(cmd));
++	cmd[0]  = MOVE_MEDIUM;
++	cmd[1]  = ch->device->lun << 5;
++	cmd[2]  = (trans >> 8) & 0xff;
++	cmd[3]  =  trans       & 0xff;
++	cmd[4]  = (src   >> 8) & 0xff;
++	cmd[5]  =  src         & 0xff;
++	cmd[6]  = (dest  >> 8) & 0xff;
++	cmd[7]  =  dest        & 0xff;
++	cmd[10] = rotate ? 1 : 0;
++	return ch_do_scsi(ch, cmd, NULL,0);
++}
++
++static int
++ch_exchange(scsi_changer *ch, u_int trans, u_int src,
++	    u_int dest1, u_int dest2, int rotate1, int rotate2)
++{
++	u_char  cmd[12];
++	
++	dprintk("exchange: 0x%x => 0x%x => 0x%x\n",
++		src,dest1,dest2);
++	if (0 == trans)
++		trans = ch->firsts[CHET_MT];
++	memset(cmd,0,sizeof(cmd));
++	cmd[0]  = EXCHANGE_MEDIUM;
++	cmd[1]  = ch->device->lun << 5;
++	cmd[2]  = (trans >> 8) & 0xff;
++	cmd[3]  =  trans       & 0xff;
++	cmd[4]  = (src   >> 8) & 0xff;
++	cmd[5]  =  src         & 0xff;
++	cmd[6]  = (dest1 >> 8) & 0xff;
++	cmd[7]  =  dest1       & 0xff;
++	cmd[8]  = (dest2 >> 8) & 0xff;
++	cmd[9]  =  dest2       & 0xff;
++	cmd[10] = (rotate1 ? 1 : 0) | (rotate2 ? 2 : 0);
++	
++	return ch_do_scsi(ch, cmd, NULL,0);
++}
++
++static void
++ch_check_voltag(char *tag)
++{
++	int i;
++
++	for (i = 0; i < 32; i++) {
++		/* restrict to ascii */
++		if (tag[i] >= 0x7f || tag[i] < 0x20)
++			tag[i] = ' ';
++		/* don't allow search wildcards */
++		if (tag[i] == '?' ||
++		    tag[i] == '*')
++			tag[i] = ' ';
++	}
++}
++
++static int
++ch_set_voltag(scsi_changer *ch, u_int elem,
++	      int alternate, int clear, u_char *tag)
++{
++	u_char  cmd[12];
++	u_char  *buffer;
++	int result;
++
++	buffer = kmalloc(512, GFP_KERNEL);
++	if (!buffer)
++		return -ENOMEM;
++	memset(buffer,0,512);
++
++	dprintk("%s %s voltag: 0x%x => \"%s\"\n",
++		clear     ? "clear"     : "set",
++		alternate ? "alternate" : "primary",
++		elem, tag);
++	memset(cmd,0,sizeof(cmd));
++	cmd[0]  = SEND_VOLUME_TAG;
++	cmd[1] = (ch->device->lun << 5) | 
++		ch_elem_to_typecode(ch,elem);
++	cmd[2] = (elem >> 8) & 0xff;
++	cmd[3] = elem        & 0xff;
++	cmd[5] = clear
++		? (alternate ? 0x0d : 0x0c)
++		: (alternate ? 0x0b : 0x0a);
++	
++	cmd[9] = 255;
++
++	memcpy(buffer,tag,32);
++	ch_check_voltag(buffer);
++
++	result = ch_do_scsi(ch, cmd, buffer, 256);
++	kfree(buffer);
++	return result;
++}
++
++static int ch_gstatus(scsi_changer *ch, int type, unsigned char *dest)
++{
++	int retval = 0;
++	u_char data[16];
++	unsigned int i;
++	
++	down(&ch->lock);
++	for (i = 0; i < ch->counts[type]; i++) {
++		if (0 != ch_read_element_status
++		    (ch, ch->firsts[type]+i,data)) {
++			retval = -EIO;
++			break;
++		}
++		put_user(data[2], dest+i);
++		if (data[2] & CESTATUS_EXCEPT)
++			vprintk("element 0x%x: asc=0x%x, ascq=0x%x\n",
++				ch->firsts[type]+i,
++				(int)data[4],(int)data[5]);
++		retval = ch_read_element_status
++			(ch, ch->firsts[type]+i,data);
++		if (0 != retval)
++			break;
++	}
++	up(&ch->lock);
++	return retval;
++}
++
++/* ------------------------------------------------------------------------ */
++
++static int
++ch_release(struct inode *inode, struct file *file)
++{
++	scsi_changer *ch = file->private_data;
++
++	scsi_device_put(ch->device);
++	file->private_data = NULL;
++	return 0;
++}
++
++static int
++ch_open(struct inode *inode, struct file *file)
++{
++	struct list_head *item;
++	scsi_changer *tmp, *ch;
++	int minor = iminor(inode);
++
++	spin_lock(&ch_devlist_lock);
++	ch = NULL;
++	list_for_each(item,&ch_devlist) {
++		tmp = list_entry(item, scsi_changer, list);
++		if (tmp->minor == minor)
++			ch = tmp;
++	}
++	if (NULL == ch || scsi_device_get(ch->device)) {
++		spin_unlock(&ch_devlist_lock);
++		return -ENXIO;
++	}
++	spin_unlock(&ch_devlist_lock);
++
++	file->private_data = ch;
++	return 0;
++}
++
++static int
++ch_checkrange(scsi_changer *ch, unsigned int type, unsigned int unit)
++{
++	if (type >= CH_TYPES  ||  unit >= ch->counts[type])
++		return -1;
++	return 0;
++}
++
++/* for data transfer elements: check if they are busy */
++static int
++ch_is_busy(scsi_changer *ch, int type, int unit)
++{
++#if 0 /* hmm, access_count is gone :-/ */
++	if (!check_busy)
++		return 0;
++	if (type != CHET_DT)
++		return 0;
++	if (!ch->dt[unit])
++		return 0;
++	return atomic_read(&ch->dt[unit]->access_count);
++#else
++	return 0;
++#endif
++}
++
++static int ch_ioctl(struct inode * inode, struct file * file,
++		    unsigned int cmd, unsigned long arg)
++{
++	scsi_changer *ch = file->private_data;
++	int retval;
++	
++	switch (cmd) {
++	case CHIOGPARAMS:
++	{
++		struct changer_params params;
++		
++		params.cp_curpicker = 0;
++		params.cp_npickers  = ch->counts[CHET_MT];
++		params.cp_nslots    = ch->counts[CHET_ST];
++		params.cp_nportals  = ch->counts[CHET_IE];
++		params.cp_ndrives   = ch->counts[CHET_DT];
++		
++		if (copy_to_user((void *) arg, &params, sizeof(params)))
++			return -EFAULT;
++		return 0;
++	}
++	case CHIOGVPARAMS:
++	{
++		struct changer_vendor_params vparams;
++
++		memset(&vparams,0,sizeof(vparams));
++		if (ch->counts[CHET_V1]) {
++			vparams.cvp_n1  = ch->counts[CHET_V1];
++			strncpy(vparams.cvp_label1,vendor_labels[0],16);
++		}
++		if (ch->counts[CHET_V2]) {
++			vparams.cvp_n2  = ch->counts[CHET_V2];
++			strncpy(vparams.cvp_label2,vendor_labels[1],16);
++		}
++		if (ch->counts[CHET_V3]) {
++			vparams.cvp_n3  = ch->counts[CHET_V3];
++			strncpy(vparams.cvp_label3,vendor_labels[2],16);
++		}
++		if (ch->counts[CHET_V4]) {
++			vparams.cvp_n4  = ch->counts[CHET_V4];
++			strncpy(vparams.cvp_label4,vendor_labels[3],16);
++		}
++		if (copy_to_user((void *) arg, &vparams, sizeof(vparams)))
++			return -EFAULT;
++		return 0;
++	}
++	
++	case CHIOPOSITION:
++	{
++		struct changer_position pos;
++		
++		if (copy_from_user(&pos, (void*)arg, sizeof (pos)))
++			return -EFAULT;
++
++		if (0 != ch_checkrange(ch, pos.cp_type, pos.cp_unit)) {
++			dprintk("CHIOPOSITION: invalid parameter%s\n","");
++			return -EBADSLT;
++		}
++		down(&ch->lock);
++		retval = ch_position(ch,0,
++				     ch->firsts[pos.cp_type] + pos.cp_unit,
++				     pos.cp_flags & CP_INVERT);
++		up(&ch->lock);
++		return retval;
++	}
++	
++	case CHIOMOVE:
++	{
++		struct changer_move mv;
++
++		if (copy_from_user(&mv, (void*)arg, sizeof (mv)))
++			return -EFAULT;
++
++		if (0 != ch_checkrange(ch, mv.cm_fromtype, mv.cm_fromunit) ||
++		    0 != ch_checkrange(ch, mv.cm_totype,   mv.cm_tounit  )) {
++			dprintk("CHIOMOVE: invalid parameter%s\n","");
++			return -EBADSLT;
++		}
++		if (ch_is_busy(ch, mv.cm_fromtype, mv.cm_fromunit) ||
++		    ch_is_busy(ch, mv.cm_totype,   mv.cm_tounit  ))
++			return -EBUSY;
++		
++		down(&ch->lock);
++		retval = ch_move(ch,0,
++				 ch->firsts[mv.cm_fromtype] + mv.cm_fromunit,
++				 ch->firsts[mv.cm_totype]   + mv.cm_tounit,
++				 mv.cm_flags & CM_INVERT);
++		up(&ch->lock);
++		return retval;
++	}
++
++	case CHIOEXCHANGE:
++	{
++		struct changer_exchange mv;
++		
++		if (copy_from_user(&mv, (void*)arg, sizeof (mv)))
++			return -EFAULT;
++
++		if (0 != ch_checkrange(ch, mv.ce_srctype,  mv.ce_srcunit ) ||
++		    0 != ch_checkrange(ch, mv.ce_fdsttype, mv.ce_fdstunit) ||
++		    0 != ch_checkrange(ch, mv.ce_sdsttype, mv.ce_sdstunit)) {
++			dprintk("CHIOEXCHANGE: invalid parameter%s\n","");
++			return -EBADSLT;
++		}
++		if (0 != ch_is_busy(ch, mv.ce_srctype,  mv.ce_srcunit ) ||
++		    0 != ch_is_busy(ch, mv.ce_fdsttype, mv.ce_fdstunit) ||
++		    0 != ch_is_busy(ch, mv.ce_sdsttype, mv.ce_sdstunit))
++			return -EBUSY;
++		
++		down(&ch->lock);
++		retval = ch_exchange
++			(ch,0,
++			 ch->firsts[mv.ce_srctype]  + mv.ce_srcunit,
++			 ch->firsts[mv.ce_fdsttype] + mv.ce_fdstunit,
++			 ch->firsts[mv.ce_sdsttype] + mv.ce_sdstunit,
++			 mv.ce_flags & CE_INVERT1, mv.ce_flags & CE_INVERT2);
++		up(&ch->lock);
++		return retval;
++	}
++
++	case CHIOGSTATUS:
++	{
++		struct changer_element_status ces;
++		
++		if (copy_from_user(&ces, (void*)arg, sizeof (ces)))
++			return -EFAULT;
++		if (ces.ces_type < 0 || ces.ces_type >= CH_TYPES)
++			return -EINVAL;
++
++		return ch_gstatus(ch, ces.ces_type, ces.ces_data);
++	}
++
++#ifdef CONFIG_COMPAT
++	case CHIOGSTATUS32:
++	{
++		struct changer_element_status32 ces32;
++		unsigned char *data;
++		
++		if (copy_from_user(&ces32, (void*)arg, sizeof (ces32)))
++			return -EFAULT;
++		if (ces32.ces_type < 0 || ces32.ces_type >= CH_TYPES)
++			return -EINVAL;
++
++		data = compat_ptr(ces32.ces_data);
++		return ch_gstatus(ch, ces32.ces_type, data);
++	}
++#endif
++    
++	case CHIOGELEM:
++	{
++		struct changer_get_element cge;
++		u_char  cmd[12];
++		u_char  *buffer;
++		unsigned int elem;
++		int     result,i;
++		
++		if (copy_from_user(&cge, (void*)arg, sizeof (cge)))
++			return -EFAULT;
++
++		if (0 != ch_checkrange(ch, cge.cge_type, cge.cge_unit))
++			return -EINVAL;
++		elem = ch->firsts[cge.cge_type] + cge.cge_unit;
++		
++		buffer = kmalloc(512, GFP_KERNEL);
++		if (!buffer)
++			return -ENOMEM;
++		down(&ch->lock);
++		
++	voltag_retry:
++		memset(cmd,0,sizeof(cmd));
++		cmd[0] = READ_ELEMENT_STATUS;
++		cmd[1] = (ch->device->lun << 5) |
++			(ch->voltags ? 0x10 : 0) |
++			ch_elem_to_typecode(ch,elem);
++		cmd[2] = (elem >> 8) & 0xff;
++		cmd[3] = elem        & 0xff;
++		cmd[5] = 1;
++		cmd[9] = 255;
++		
++		if (0 == (result = ch_do_scsi(ch, cmd, buffer, 256))) {
++			cge.cge_status = buffer[18];
++			cge.cge_flags = 0;
++			if (buffer[18] & CESTATUS_EXCEPT) {
++				/* FIXME: fill cge_errno */
++			}
++			if (buffer[25] & 0x80) {
++				cge.cge_flags |= CGE_SRC;
++				if (buffer[25] & 0x40)
++					cge.cge_flags |= CGE_INVERT;
++				elem = (buffer[26]<<8) | buffer[27];
++				for (i = 0; i < 4; i++) {
++					if (elem >= ch->firsts[i] &&
++					    elem <  ch->firsts[i] + ch->counts[i]) {
++						cge.cge_srctype = i;
++						cge.cge_srcunit = elem-ch->firsts[i];
++					}
++				}
++			}
++			if ((buffer[22] & 0x30) == 0x30) {
++				cge.cge_flags |= CGE_IDLUN;
++				cge.cge_id  = buffer[23];
++				cge.cge_lun = buffer[22] & 7;
++			}
++			if (buffer[9] & 0x80) {
++				cge.cge_flags |= CGE_PVOLTAG;
++				memcpy(cge.cge_pvoltag,buffer+28,36);
++			}
++			if (buffer[9] & 0x40) {
++				cge.cge_flags |= CGE_AVOLTAG;
++				memcpy(cge.cge_avoltag,buffer+64,36);
++			}
++		} else if (ch->voltags) {
++			ch->voltags = 0;
++			vprintk("device has no volume tag support%s\n","");
++			goto voltag_retry;
++		}
++		kfree(buffer);
++		up(&ch->lock);
++		
++		if (copy_to_user((void*)arg, &cge, sizeof (cge)))
++			return -EFAULT;
++		return result;
++	}
++
++	case CHIOINITELEM:
++	{
++		down(&ch->lock);
++		retval = ch_init_elem(ch);
++		up(&ch->lock);
++		return retval;
++	}
++		
++	case CHIOSVOLTAG:
++	{
++		struct changer_set_voltag csv;
++		int elem;
++
++		if (copy_from_user(&csv, (void*)arg, sizeof(csv)))
++			return -EFAULT;
++
++		if (0 != ch_checkrange(ch, csv.csv_type, csv.csv_unit)) {
++			dprintk("CHIOSVOLTAG: invalid parameter%s\n","");
++			return -EBADSLT;
++		}
++		elem = ch->firsts[csv.csv_type] + csv.csv_unit;
++		down(&ch->lock);
++		retval = ch_set_voltag(ch, elem,
++				       csv.csv_flags & CSV_AVOLTAG,
++				       csv.csv_flags & CSV_CLEARTAG,
++				       csv.csv_voltag);
++		up(&ch->lock);
++		return retval;
++	}
++
++	default:
++		return scsi_ioctl(ch->device, cmd, (void*)arg);
++
++	}
++}
++
++/* ------------------------------------------------------------------------ */
++
++static int ch_probe(struct device *dev)
++{
++	struct scsi_device *sd = to_scsi_device(dev);
++	scsi_changer *ch;
++	
++	if (sd->type != TYPE_MEDIUM_CHANGER)
++		return -ENODEV;
++    
++	ch = kmalloc(sizeof(*ch), GFP_KERNEL);
++	if (NULL == ch)
++		return -ENOMEM;
++
++	memset(ch,0,sizeof(*ch));
++	ch->minor = ch_devcount;
++	sprintf(ch->name,"ch%d",ch->minor);
++	init_MUTEX(&ch->lock);
++	ch->device = sd;
++	ch_readconfig(ch);
++	if (init)
++		ch_init_elem(ch);
++
++	devfs_mk_cdev(MKDEV(MAJOR_NR,ch->minor),
++		      S_IFCHR | S_IRUGO | S_IWUGO, ch->name);
++
++	printk(KERN_INFO "Attached scsi changer %s "
++	       "at scsi%d, channel %d, id %d, lun %d\n", 
++	       ch->name, sd->host->host_no, sd->channel, sd->id, sd->lun);
++	
++	spin_lock(&ch_devlist_lock);
++	list_add_tail(&ch->list,&ch_devlist);
++	ch_devcount++;
++	spin_unlock(&ch_devlist_lock);
++	return 0;
++}
++
++static int ch_remove(struct device *dev)
++{
++	struct scsi_device *sd = to_scsi_device(dev);
++	struct list_head *item;
++	scsi_changer *tmp, *ch;
++
++	spin_lock(&ch_devlist_lock);
++	ch = NULL;
++	list_for_each(item,&ch_devlist) {
++		tmp = list_entry(item, scsi_changer, list);
++		if (tmp->device == sd)
++			ch = tmp;
++	}
++	BUG_ON(NULL == ch);
++	list_del(&ch->list);
++	spin_unlock(&ch_devlist_lock);
++
++	devfs_remove(ch->name);
++	kfree(ch->dt);
++	kfree(ch);
++	ch_devcount--;
++	return 0;
++}
++
++static int __init init_ch_module(void)
++{
++	int rc;
++	
++	printk(KERN_INFO "SCSI Media Changer driver v" VERSION
++	       " for Linux " UTS_RELEASE "\n");
++	rc = register_chrdev(MAJOR_NR,"ch",&changer_fops);
++	if (rc < 0) {
++		printk("Unable to get major %d for SCSI-Changer\n",
++		       MAJOR_NR);
++		return rc;
++	}
++	ioctl32_register();
++	rc = scsi_register_driver(&ch_template.gendrv);
++	if (rc < 0)
++		goto fail1;
++	return 0;
++
++ fail1:
++	ioctl32_unregister();
++	unregister_chrdev(MAJOR_NR, "ch");
++	return rc;
++}
++
++static void __exit exit_ch_module(void) 
++{
++	scsi_unregister_driver(&ch_template.gendrv);
++	unregister_chrdev(MAJOR_NR, "ch");
++	ioctl32_unregister();
++}
++
++module_init(init_ch_module);
++module_exit(exit_ch_module);
++
++/*
++ * Local variables:
++ * c-basic-offset: 8
++ * End:
++ */
+diff -urN kernel-source-2.6.6/include/linux/chio.h kernel-source-2.6.6-1/include/linux/chio.h
+--- kernel-source-2.6.6/include/linux/chio.h	1970-01-01 10:00:00.000000000 +1000
++++ kernel-source-2.6.6-1/include/linux/chio.h	2004-03-17 21:24:11.000000000 +1100
+@@ -0,0 +1,168 @@
++/*
++ * ioctl interface for the scsi media changer driver
++ */
++
++/* changer element types */
++#define CHET_MT   0	/* media transport element (robot) */
++#define CHET_ST   1	/* storage element (media slots) */
++#define CHET_IE   2	/* import/export element */
++#define CHET_DT   3	/* data transfer element (tape/cdrom/whatever) */
++#define CHET_V1   4	/* vendor specific #1 */
++#define CHET_V2   5	/* vendor specific #2 */
++#define CHET_V3   6	/* vendor specific #3 */
++#define CHET_V4   7	/* vendor specific #4 */
++
++
++/*
++ * CHIOGPARAMS
++ *    query changer properties
++ *
++ * CHIOVGPARAMS
++ *    query vendor-specific element types
++ *
++ *    accessing elements works by specifing type and unit of the element.
++ *    for eample, storage elements are addressed with type = CHET_ST and
++ *    unit = 0 .. cp_nslots-1
++ *
++ */
++struct changer_params {
++	int cp_curpicker;  /* current transport element */
++	int cp_npickers;   /* number of transport elements      (CHET_MT) */
++	int cp_nslots;     /* number of storage elements        (CHET_ST) */
++	int cp_nportals;   /* number of import/export elements  (CHET_IE) */
++	int cp_ndrives;    /* number of data transfer elements  (CHET_DT) */
++};
++struct changer_vendor_params {
++	int  cvp_n1;       /* number of vendor specific elems   (CHET_V1) */
++	char cvp_label1[16];
++	int  cvp_n2;       /* number of vendor specific elems   (CHET_V2) */
++	char cvp_label2[16];
++	int  cvp_n3;       /* number of vendor specific elems   (CHET_V3) */
++	char cvp_label3[16];
++	int  cvp_n4;       /* number of vendor specific elems   (CHET_V4) */
++	char cvp_label4[16];
++	int  reserved[8];
++};
++
++
++/*
++ * CHIOMOVE
++ *    move a medium from one element to another
++ */
++struct changer_move {
++	int cm_fromtype;	/* type/unit of source element */
++	int cm_fromunit;	
++	int cm_totype;	/* type/unit of destination element */
++	int cm_tounit;
++	int cm_flags;
++};
++#define CM_INVERT   1   /* flag: rotate media (for double-sided like MOD) */
++
++
++/*
++ * CHIOEXCHANGE
++ *    move one medium from element #1 to element #2,
++ *    and another one from element #2 to element #3.
++ *    element #1 and #3 are allowed to be identical.
++ */
++struct changer_exchange {
++	int ce_srctype;	    /* type/unit of element #1 */
++	int ce_srcunit;
++	int ce_fdsttype;    /* type/unit of element #2 */
++	int ce_fdstunit;
++	int ce_sdsttype;    /* type/unit of element #3 */
++	int ce_sdstunit;
++	int ce_flags;
++};
++#define CE_INVERT1   1
++#define CE_INVERT2   2
++
++
++/*
++ * CHIOPOSITION
++ *    move the transport element (robot arm) to a specific element.
++ */
++struct changer_position {
++	int cp_type;
++	int cp_unit;
++	int cp_flags;
++};
++#define CP_INVERT   1
++
++
++/*
++ * CHIOGSTATUS
++ *    get element status for all elements of a specific type
++ */
++struct changer_element_status {
++	int             ces_type;
++	unsigned char   *ces_data;
++};
++#define CESTATUS_FULL     0x01 /* full */
++#define CESTATUS_IMPEXP   0x02	/* media was imported (inserted by sysop) */
++#define CESTATUS_EXCEPT   0x04	/* error condition */
++#define CESTATUS_ACCESS   0x08	/* access allowed */
++#define CESTATUS_EXENAB   0x10	/* element can export media */
++#define CESTATUS_INENAB   0x20	/* element can import media */
++
++
++/*
++ * CHIOGELEM
++ *    get more detailed status informtion for a single element
++ */
++struct changer_get_element {
++	int	cge_type;	 /* type/unit */
++	int	cge_unit;
++	int	cge_status;      /* status */
++	int     cge_errno;       /* errno */
++	int     cge_srctype;     /* source element of the last move/exchange */
++	int     cge_srcunit;
++	int     cge_id;          /* scsi id  (for data transfer elements) */
++	int     cge_lun;         /* scsi lun (for data transfer elements) */
++	char    cge_pvoltag[36]; /* primary volume tag */
++	char    cge_avoltag[36]; /* alternate volume tag */
++	int     cge_flags;
++};
++/* flags */
++#define CGE_ERRNO     0x01       /* errno available       */
++#define CGE_INVERT    0x02       /* media inverted        */
++#define CGE_SRC       0x04       /* media src available   */
++#define CGE_IDLUN     0x08       /* ID+LUN available      */
++#define CGE_PVOLTAG   0x10       /* primary volume tag available */
++#define CGE_AVOLTAG   0x20       /* alternate volume tag available */
++
++
++/*
++ * CHIOSVOLTAG
++ *    set volume tag
++ */
++struct changer_set_voltag {
++	int	csv_type;	 /* type/unit */
++	int	csv_unit;
++	char    csv_voltag[36];  /* volume tag */
++	int     csv_flags;
++};
++#define CSV_PVOLTAG   0x01       /* primary volume tag */
++#define CSV_AVOLTAG   0x02       /* alternate volume tag */
++#define CSV_CLEARTAG  0x04       /* clear volume tag */
++
++/* ioctls */
++#define CHIOMOVE       _IOW('c', 1,struct changer_move)
++#define CHIOEXCHANGE   _IOW('c', 2,struct changer_exchange)
++#define CHIOPOSITION   _IOW('c', 3,struct changer_position)
++#define CHIOGPICKER    _IOR('c', 4,int)                        /* not impl. */
++#define CHIOSPICKER    _IOW('c', 5,int)                        /* not impl. */
++#define CHIOGPARAMS    _IOR('c', 6,struct changer_params)
++#define CHIOGSTATUS    _IOW('c', 8,struct changer_element_status)
++#define CHIOGELEM      _IOW('c',16,struct changer_get_element)
++#define CHIOINITELEM   _IO('c',17)
++#define CHIOSVOLTAG    _IOW('c',18,struct changer_set_voltag)
++#define CHIOGVPARAMS   _IOR('c',19,struct changer_vendor_params)
++
++/* ---------------------------------------------------------------------- */
++
++/*
++ * Local variables:
++ * c-basic-offset: 8
++ * End:
++ */
+diff -urN kernel-source-2.6.6/include/linux/major.h kernel-source-2.6.6-1/include/linux/major.h
+--- kernel-source-2.6.6/include/linux/major.h	2004-04-05 19:49:42.000000000 +1000
++++ kernel-source-2.6.6-1/include/linux/major.h	2004-04-05 20:54:51.000000000 +1000
+@@ -101,6 +101,7 @@
+ #define I2O_MAJOR		80	/* 80->87 */
+ 
+ #define SHMIQ_MAJOR		85   /* Linux/mips, SGI /dev/shmiq */
++#define SCSI_CHANGER_MAJOR      86
+ 
+ #define IDE6_MAJOR		88
+ #define IDE7_MAJOR		89
+diff -urN kernel-source-2.6.6/include/scsi/scsi.h kernel-source-2.6.6-1/include/scsi/scsi.h
+--- kernel-source-2.6.6/include/scsi/scsi.h	2004-04-05 19:49:43.000000000 +1000
++++ kernel-source-2.6.6-1/include/scsi/scsi.h	2004-04-05 20:54:52.000000000 +1000
+@@ -41,6 +41,7 @@
+ #define FORMAT_UNIT           0x04
+ #define READ_BLOCK_LIMITS     0x05
+ #define REASSIGN_BLOCKS       0x07
++#define INITIALIZE_ELEMENT_STATUS 0x07
+ #define READ_6                0x08
+ #define WRITE_6               0x0a
+ #define SEEK_6                0x0b
+@@ -65,6 +66,7 @@
+ #define READ_10               0x28
+ #define WRITE_10              0x2a
+ #define SEEK_10               0x2b
++#define POSITION_TO_ELEMENT   0x2b
+ #define WRITE_VERIFY          0x2e
+ #define VERIFY                0x2f
+ #define SEARCH_HIGH           0x30
+@@ -97,6 +99,7 @@
+ #define PERSISTENT_RESERVE_OUT 0x5f
+ #define REPORT_LUNS           0xa0
+ #define MOVE_MEDIUM           0xa5
++#define EXCHANGE_MEDIUM       0xa6
+ #define READ_12               0xa8
+ #define WRITE_12              0xaa
+ #define WRITE_VERIFY_12       0xae

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-serial-8250-ioremap-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-serial-8250-ioremap-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-serial-8250-ioremap-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,50 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Don't ioremap if MMIO uart has a mapbase, but no membase
+## DP: Patch author: Alex Williamson <alex.williamson at hp.com>
+## DP: Upstream status: submitted; but not accepted as code is being rewritten
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+
+  The iounmap/ioremap path in serial8250_release/request_port is
+terribly unbalanced.  The UPF_IOREMAP flag is used to determine if a
+port gets ioremap'd, but plays no part in whether it gets iounmap'd.
+It's easy to see how an MMIO serial port can be passed through
+uart_set_info and end up with an unmapped membase.  The results is a
+non-functional UART or worse.  I've tried to generate some discussion on
+the proper fix for this, but I haven't succeeded.  I propose the patch
+below as a safe compromise.  An MMIO uart w/ a mapbase, but no membase
+doesn't seem viable to me.  Thanks,
+
+	Alex
+
+-- 
+Signed-off-by: Alex Williamson <alex.williamson at hp.com>
+
+===== drivers/serial/8250.c 1.77 vs edited =====
+--- 1.77/drivers/serial/8250.c	2004-10-25 06:05:26 -06:00
++++ edited/drivers/serial/8250.c	2004-10-28 13:18:01 -06:00
+@@ -1858,7 +1858,11 @@
+ 	/*
+ 	 * If we have a mapbase, then request that as well.
+ 	 */
+-	if (ret == 0 && up->port.flags & UPF_IOREMAP) {
++	if (ret == 0 && ((up->port.flags & UPF_IOREMAP) ||
++	                 (up->port.iotype == UPIO_MEM &&
++	                  up->port.mapbase &&
++	                  !up->port.membase))) {
++
+ 		int size = res->end - res->start + 1;
+ 
+ 		up->port.membase = ioremap(up->port.mapbase, size);
+
+
+
+To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
+the body of a message to majordomo at vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+Please read the FAQ at  http://www.tux.org/lkml/

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-usb-storage-revoltec.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-usb-storage-revoltec.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-usb-storage-revoltec.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,85 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: USB: Remove inappropriate unusual_devs.h entry
+## DP: Patch author: Alan Stern <stern at rowland.harvard.edu>
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/09/03 13:31:41+02:00 stern at rowland.harvard.edu 
+#   [PATCH] USB: Remove inappropriate unusual_devs.h entry
+#   
+#   A couple of months ago you applied a patch from Torsten Scherer to create
+#   a new unusual_devs.h entry.  In further discussions with him I learned
+#   that the entry wasn't needed to access the device; the only reason for it
+#   was as a workaround for some old, buggy hotplug program on his system.
+#   
+#   Now Evan Fletcher reports that the entry actively prevents him from using
+#   his device.  For me that's the last straw, so here's a patch to remove the
+#   entry.  Torsten should be okay if he simply upgrades his hotplug package
+#   or removes the buggy program.
+#   
+#   On Mon, 30 Aug 2004, Evan Fletcher wrote:
+#   > Hi list,
+#   >
+#   > I have a Bytecc 5.25" External Enclosure, model ME-320U2F, that has
+#   > both USB 2.0 and Firewire connections
+#   > (http://www.byteccusa.com/product/enclosure/ME-320.htm).  It used to
+#   > work fine on earlier Linux 2.6 kernels, but stopped working a few
+#   > revisions ago.
+#   >
+#   > I tracked the problem down to an entry in unusual_devs.h:
+#   >
+#   > /* <torsten.scherer at uni-bielefeld.de>: I don't know the name of the bridge
+#   >  * manufacturer, but I've got an external USB drive by the Revoltec company
+#   >  * that needs this. otherwise the drive is recognized as /dev/sda, but any
+#   >  * access to it blocks indefinitely.
+#   >  */
+#   > UNUSUAL_DEV(  0x0402, 0x5621, 0x0103, 0x0103,
+#   >                 "Revoltec",
+#   >                 "USB/IDE Bridge (ATA/ATAPI)",
+#   >                 US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY),
+#   
+#   <...>
+#   > So, is there some way that this entry can be modified so that my DVD+R
+#   > works properly, and Mr. Scherer can still use his Revoltec external
+#   > disk?
+#   >
+#   > Thank you,
+#   > Evan Fletcher
+#   
+#   
+#   
+#   Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
+#   Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
+# 
+# drivers/usb/storage/unusual_devs.h
+#   2004/08/30 16:12:17+02:00 stern at rowland.harvard.edu +0 -10
+#   USB: Remove inappropriate unusual_devs.h entry
+# 
+diff -Nru a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
+--- a/drivers/usb/storage/unusual_devs.h	2004-12-22 23:57:24 -08:00
++++ b/drivers/usb/storage/unusual_devs.h	2004-12-22 23:57:24 -08:00
+@@ -68,16 +68,6 @@
+ 		US_SC_8070, US_PR_SCM_ATAPI, init_8200e, 0), 
+ #endif
+ 
+-/* <torsten.scherer at uni-bielefeld.de>: I don't know the name of the bridge
+- * manufacturer, but I've got an external USB drive by the Revoltec company
+- * that needs this. otherwise the drive is recognized as /dev/sda, but any
+- * access to it blocks indefinitely.
+- */
+-UNUSUAL_DEV(  0x0402, 0x5621, 0x0103, 0x0103,
+-		"Revoltec",
+-		"USB/IDE Bridge (ATA/ATAPI)",
+-		US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY),
+-
+ /* Deduced by Jonathan Woithe <jwoithe at physics.adelaide.edu.au>
+  * Entry needed for flags: US_FL_FIX_INQUIRY because initial inquiry message
+  * always fails and confuses drive.

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-usb-storage-transport-1.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-usb-storage-transport-1.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-usb-storage-transport-1.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,127 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: USB Storage: ignore bogus residue values
+## DP: Patch author: Matthew Dharm
+## DP: Upstream status: included
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: mdharm-usb (BitKeeper)
+# cset: 1.1939.1.51 (2.6) key=415b022fporD8taxknvj32O-ZXJNNw
+# inclusion: upstream
+# descrition: [PATCH] USB Storage: ignore bogus residue values
+# revision date: Mon, 08 Nov 2004 12:56:12 +0900
+#
+# rset: ChangeSet|1.1939.1.50..1.1939.1.51
+# rset: drivers/usb/storage/transport.c|1.108..1.109
+# rset: drivers/usb/storage/usb.h|1.45..1.46
+# rset: drivers/usb/storage/unusual_devs.h|1.118..1.119
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/09/29 11:42:55-07:00 mdharm-usb at one-eyed-alien.net 
+#   [PATCH] USB Storage: ignore bogus residue values
+#   
+#   This patch allows usb-storage to ignore the reported residue values when
+#   required by some devices.  A few devices are included... I know more are
+#   waiting to be merged into unusual_devs.h
+#   
+#   In case anyone is curious... yes, these are broken devices.
+#   
+#   Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
+#   Signed-off-by: Matthew Dharm <mdharm-usb at one-eyed-alien.net>
+#   Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
+# 
+# drivers/usb/storage/usb.h
+#   2004/09/26 05:59:06-07:00 mdharm-usb at one-eyed-alien.net +1 -0
+#   USB Storage: ignore bogus residue values
+# 
+# drivers/usb/storage/unusual_devs.h
+#   2004/09/26 05:59:06-07:00 mdharm-usb at one-eyed-alien.net +22 -1
+#   USB Storage: ignore bogus residue values
+# 
+# drivers/usb/storage/transport.c
+#   2004/09/26 05:59:06-07:00 mdharm-usb at one-eyed-alien.net +7 -2
+#   USB Storage: ignore bogus residue values
+# 
+diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
+--- a/drivers/usb/storage/transport.c	2004-11-08 12:56:12 +09:00
++++ b/drivers/usb/storage/transport.c	2004-11-08 12:56:12 +09:00
+@@ -1055,8 +1055,13 @@
+ 
+ 	/* try to compute the actual residue, based on how much data
+ 	 * was really transferred and what the device tells us */
+-	residue = min(residue, transfer_length);
+-	srb->resid = max(srb->resid, (int) residue);
++	if (residue) {
++		if (!(us->flags & US_FL_IGNORE_RESIDUE) ||
++				srb->sc_data_direction == DMA_TO_DEVICE) {
++			residue = min(residue, transfer_length);
++			srb->resid = max(srb->resid, (int) residue);
++		}
++	}
+ 
+ 	/* based on the status code, we report good or bad */
+ 	switch (bcs->Status) {
+diff -Nru a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
+--- a/drivers/usb/storage/unusual_devs.h	2004-11-08 12:56:12 +09:00
++++ b/drivers/usb/storage/unusual_devs.h	2004-11-08 12:56:12 +09:00
+@@ -268,6 +268,13 @@
+ 		US_SC_8070, US_PR_BULK, NULL,
+ 		US_FL_FIX_INQUIRY ),
+ 
++/* Reported by Iacopo Spalletti <avvisi at spalletti.it> */
++UNUSUAL_DEV(  0x052b, 0x1807, 0x0100, 0x0100,
++		"Tekom Technologies, Inc",
++		"300_CAMERA",
++		US_SC_DEVICE, US_PR_DEVICE, NULL,
++		US_FL_IGNORE_RESIDUE ),
++
+ /* This entry is needed because the device reports Sub=ff */
+ UNUSUAL_DEV(  0x054c, 0x0010, 0x0106, 0x0450, 
+ 		"Sony",
+@@ -811,7 +818,14 @@
+ 		"Solid state disk",
+ 		US_SC_DEVICE, US_PR_DEVICE, NULL,
+ 		US_FL_FIX_INQUIRY ),
+-		
++
++/* Reported by Rastislav Stanik <rs_kernel at yahoo.com> */
++UNUSUAL_DEV(  0x0ea0, 0x6828, 0x0110, 0x0110,
++		"USB",
++		"Flash Disk",
++		US_SC_DEVICE, US_PR_DEVICE, NULL,
++		US_FL_IGNORE_RESIDUE ),
++
+ /* Reported by Kevin Cernekee <kpc-usbdev at gelato.uiuc.edu>
+  * Tested on hardware version 1.10.
+  * Entry is needed only for the initializer function override.
+@@ -832,6 +846,13 @@
+ 		"EasyDisk Portable Device",
+ 		US_SC_DEVICE, US_PR_DEVICE, NULL,
+ 		US_FL_MODE_XLATE ),
++
++/* Reported by Kotrla Vitezslav <kotrla at ceb.cz> */
++UNUSUAL_DEV(  0x1370, 0x6828, 0x0110, 0x0110,
++		"SWISSBIT",
++		"Black Silver",
++		US_SC_DEVICE, US_PR_DEVICE, NULL,
++		US_FL_IGNORE_RESIDUE ),
+ 
+ #ifdef CONFIG_USB_STORAGE_SDDR55
+ UNUSUAL_DEV(  0x55aa, 0xa103, 0x0000, 0x9999, 
+diff -Nru a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h
+--- a/drivers/usb/storage/usb.h	2004-11-08 12:56:12 +09:00
++++ b/drivers/usb/storage/usb.h	2004-11-08 12:56:12 +09:00
+@@ -73,6 +73,7 @@
+ #define US_FL_SCM_MULT_TARG   0x00000020 /* supports multiple targets	    */
+ #define US_FL_FIX_INQUIRY     0x00000040 /* INQUIRY response needs faking   */
+ #define US_FL_FIX_CAPACITY    0x00000080 /* READ CAPACITY response too big  */
++#define US_FL_IGNORE_RESIDUE  0x00000100 /* reported residue is wrong	    */
+ 
+ /* Dynamic flag definitions: used in set_bit() etc. */
+ #define US_FLIDX_URB_ACTIVE	18  /* 0x00040000  current_urb is in use  */

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-usb-storage-transport-2.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-usb-storage-transport-2.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-usb-storage-transport-2.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,84 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: USB Storage: revert GetMaxLUN strictness
+## DP: Patch author: Matthew Dharm
+## DP: Upstream status: included
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: mdharm-usb (BitKeeper)
+# cset: 1.1939.1.52 (2.6) key=415b02497EnNJinuYxLfmOEWKsUNdw
+# inclusion: upstream
+# descrition: [PATCH] USB Storage: revert GetMaxLUN strictness
+# revision date: Mon, 08 Nov 2004 12:56:29 +0900
+#
+# rset: ChangeSet|1.1939.1.51..1.1939.1.52
+# rset: drivers/usb/storage/transport.c|1.109..1.110
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/09/29 11:43:21-07:00 mdharm-usb at one-eyed-alien.net 
+#   [PATCH] USB Storage: revert GetMaxLUN strictness
+#   
+#   This is patch as384.  It reverts some of our sanity checks on the GetMaxLUN
+#   part of the Bulk-only protocol.  Apparently, this is one area where vendors
+#   can't even get close to correct.  So, in the face of any sort of error, we
+#   assume a single LUN.
+#   
+#   We also include some comments so we don't make this mistake again.
+#   
+#   
+#   Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
+#   Signed-off-by: Matthew Dharm <mdharm-usb at one-eyed-alien.net>
+#   Signed-off-by: Greg Kroah-Hartman <greg at kroah.com>
+# 
+# drivers/usb/storage/transport.c
+#   2004/09/26 06:06:12-07:00 mdharm-usb at one-eyed-alien.net +9 -7
+#   USB Storage: revert GetMaxLUN strictness
+# 
+diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
+--- a/drivers/usb/storage/transport.c	2004-11-08 12:56:29 +09:00
++++ b/drivers/usb/storage/transport.c	2004-11-08 12:56:29 +09:00
+@@ -911,7 +911,6 @@
+ 	int result;
+ 
+ 	/* issue the command */
+-	us->iobuf[0] = 0;
+ 	result = usb_stor_control_msg(us, us->recv_ctrl_pipe,
+ 				 US_BULK_GET_MAX_LUN, 
+ 				 USB_DIR_IN | USB_TYPE_CLASS | 
+@@ -922,7 +921,7 @@
+ 		  result, us->iobuf[0]);
+ 
+ 	/* if we have a successful request, return the result */
+-	if (result >= 0)
++	if (result > 0)
+ 		return us->iobuf[0];
+ 
+ 	/* 
+@@ -934,13 +933,16 @@
+ 	if (result == -EPIPE) {
+ 		usb_stor_clear_halt(us, us->recv_bulk_pipe);
+ 		usb_stor_clear_halt(us, us->send_bulk_pipe);
+-		/* return the default -- no LUNs */
+-		return 0;
+ 	}
+ 
+-	/* An answer or a STALL are the only valid responses.  If we get
+-	 * something else, return an indication of error */
+-	return -1;
++	/*
++	 * Some devices don't like GetMaxLUN.  They may STALL the control
++	 * pipe, they may return a zero-length result, they may do nothing at
++	 * all and timeout, or they may fail in even more bizarrely creative
++	 * ways.  In these cases the best approach is to use the default
++	 * value: only one LUN.
++	 */
++	return 0;
+ }
+ 
+ int usb_stor_Bulk_transport(struct scsi_cmnd *srb, struct us_data *us)

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-usb-storage-transport_dimage_getmaxlun.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-usb-storage-transport_dimage_getmaxlun.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drivers-usb-storage-transport_dimage_getmaxlun.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,34 @@
+#! /bin/sh -e 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: It turns out that the Konica-Minolta DiMAGE A2 camera,
+## DP:   in addition to all its other problems, returns a 0-length reply to 
+## DP:   the GetMaxLUN request. With this patch (accept a null reply as 
+## DP:   meaning a single LUN) it is somewhat useable. 
+## DP:   (text changeset 1.1832.8.11)
+## DP: Patch author: Alan Stern <stern at rowland.harvard.edu>
+## DP: Upstream status: submitted and approved.
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
+--- a/drivers/usb/storage/transport.c	2004-10-14 01:21:45 -07:00
++++ b/drivers/usb/storage/transport.c	2004-10-14 01:21:45 -07:00
+@@ -911,6 +911,7 @@
+ 	int result;
+ 
+ 	/* issue the command */
++	us->iobuf[0] = 0;
+ 	result = usb_stor_control_msg(us, us->recv_ctrl_pipe,
+ 				 US_BULK_GET_MAX_LUN, 
+ 				 USB_DIR_IN | USB_TYPE_CLASS | 
+@@ -921,7 +922,7 @@
+ 		  result, us->iobuf[0]);
+ 
+ 	/* if we have a successful request, return the result */
+-	if (result == 1)
++	if (result >= 0)
+ 		return us->iobuf[0];
+ 
+ 	/* 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drm-locking-fixes.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drm-locking-fixes.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/drm-locking-fixes.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,214 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix insufficient locking checks in DRM code
+## DP: Patch author: https://bugs.freedesktop.org/attachment.cgi?id=1250
+## DP: Upstream status: unknown
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -urNad linux-source-2.6.9-2.6.9/drivers/char/drm/i810_dma.c /tmp/dpep.C9szyr/linux-source-2.6.9-2.6.9/drivers/char/drm/i810_dma.c
+--- linux-source-2.6.9-2.6.9/drivers/char/drm/i810_dma.c	2004-10-18 23:53:46.000000000 +0200
++++ /tmp/dpep.C9szyr/linux-source-2.6.9-2.6.9/drivers/char/drm/i810_dma.c	2004-12-01 11:02:03.115499360 +0100
+@@ -1030,10 +1030,7 @@
+    	drm_file_t	  *priv	  = filp->private_data;
+    	drm_device_t	  *dev	  = priv->dev;
+ 
+-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
+-		DRM_ERROR("i810_flush_ioctl called without lock held\n");
+-		return -EINVAL;
+-	}
++	LOCK_TEST_WITH_RETURN( dev, filp );
+ 
+    	i810_flush_queue(dev);
+    	return 0;
+@@ -1055,10 +1052,7 @@
+ 	if (copy_from_user(&vertex, (drm_i810_vertex_t __user *)arg, sizeof(vertex)))
+ 		return -EFAULT;
+ 
+-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
+-		DRM_ERROR("i810_dma_vertex called without lock held\n");
+-		return -EINVAL;
+-	}
++	LOCK_TEST_WITH_RETURN( dev, filp );
+ 
+ 	DRM_DEBUG("i810 dma vertex, idx %d used %d discard %d\n",
+ 		  vertex.idx, vertex.used, vertex.discard);
+@@ -1090,10 +1084,7 @@
+    	if (copy_from_user(&clear, (drm_i810_clear_t __user *)arg, sizeof(clear)))
+ 		return -EFAULT;
+ 
+-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
+-		DRM_ERROR("i810_clear_bufs called without lock held\n");
+-		return -EINVAL;
+-	}
++	LOCK_TEST_WITH_RETURN( dev, filp );
+ 
+  	/* GH: Someone's doing nasty things... */
+  	if (!dev->dev_private) {
+@@ -1114,10 +1105,8 @@
+ 
+ 	DRM_DEBUG("i810_swap_bufs\n");
+ 
+-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
+-		DRM_ERROR("i810_swap_buf called without lock held\n");
+-		return -EINVAL;
+-	}
++
++	LOCK_TEST_WITH_RETURN( dev, filp ); 
+ 
+ 	i810_dma_dispatch_swap( dev );
+    	return 0;
+@@ -1152,10 +1141,7 @@
+    	if (copy_from_user(&d, (drm_i810_dma_t __user *)arg, sizeof(d)))
+ 		return -EFAULT;
+ 
+-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
+-		DRM_ERROR("i810_dma called without lock held\n");
+-		return -EINVAL;
+-	}
++	LOCK_TEST_WITH_RETURN( dev, filp ); 
+ 
+ 	d.granted = 0;
+ 
+@@ -1266,10 +1252,7 @@
+ 		return -EFAULT;
+ 
+ 
+-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
+-		DRM_ERROR("i810_dma_mc called without lock held\n");
+-		return -EINVAL;
+-	}
++	LOCK_TEST_WITH_RETURN( dev, filp ); 
+ 
+ 	if (mc.idx >= dma->buf_count || mc.idx < 0)
+ 		return -EINVAL;
+@@ -1317,10 +1300,7 @@
+ 	drm_device_t *dev = priv->dev;
+ 	drm_i810_private_t *dev_priv = (drm_i810_private_t *)dev->dev_private;
+ 
+-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
+-		DRM_ERROR("i810_fstatus called without lock held\n");
+-		return -EINVAL;
+-	}
++	LOCK_TEST_WITH_RETURN( dev, filp ); 
+ 	return I810_READ(0x30008);
+ }
+ 
+@@ -1331,10 +1311,7 @@
+ 	drm_device_t *dev = priv->dev;
+ 	drm_i810_private_t *dev_priv = (drm_i810_private_t *)dev->dev_private;
+ 
+-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
+-		DRM_ERROR("i810_ov0_flip called without lock held\n");
+-		return -EINVAL;
+-	}
++	LOCK_TEST_WITH_RETURN( dev, filp ); 
+ 
+ 	//Tell the overlay to update
+ 	I810_WRITE(0x30000,dev_priv->overlay_physical | 0x80000000);
+@@ -1376,10 +1353,7 @@
+ 
+ 	DRM_DEBUG("%s\n", __FUNCTION__);
+ 
+-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
+-		DRM_ERROR("i810_flip_buf called without lock held\n");
+-		return -EINVAL;
+-	}
++	LOCK_TEST_WITH_RETURN( dev, filp );
+ 
+ 	if (!dev_priv->page_flipping) 
+ 		i810_do_init_pageflip( dev );
+diff -urNad linux-source-2.6.9-2.6.9/drivers/char/drm/i830_dma.c /tmp/dpep.C9szyr/linux-source-2.6.9-2.6.9/drivers/char/drm/i830_dma.c
+--- linux-source-2.6.9-2.6.9/drivers/char/drm/i830_dma.c	2004-10-18 23:53:12.000000000 +0200
++++ /tmp/dpep.C9szyr/linux-source-2.6.9-2.6.9/drivers/char/drm/i830_dma.c	2004-12-01 11:02:03.116499208 +0100
+@@ -1319,10 +1319,7 @@
+    	drm_file_t	  *priv	  = filp->private_data;
+    	drm_device_t	  *dev	  = priv->dev;
+ 
+-   	if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
+-		DRM_ERROR("i830_flush_ioctl called without lock held\n");
+-		return -EINVAL;
+-	}
++	LOCK_TEST_WITH_RETURN( dev, filp ); 
+ 
+    	i830_flush_queue(dev);
+    	return 0;
+@@ -1343,10 +1340,7 @@
+ 	if (copy_from_user(&vertex, (drm_i830_vertex_t __user *)arg, sizeof(vertex)))
+ 		return -EFAULT;
+ 
+-   	if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
+-		DRM_ERROR("i830_dma_vertex called without lock held\n");
+-		return -EINVAL;
+-	}
++	LOCK_TEST_WITH_RETURN( dev, filp ); 
+ 
+ 	DRM_DEBUG("i830 dma vertex, idx %d used %d discard %d\n",
+ 		  vertex.idx, vertex.used, vertex.discard);
+@@ -1373,10 +1367,7 @@
+    	if (copy_from_user(&clear, (drm_i830_clear_t __user *)arg, sizeof(clear)))
+ 		return -EFAULT;
+    
+-   	if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
+-		DRM_ERROR("i830_clear_bufs called without lock held\n");
+-		return -EINVAL;
+-	}
++	LOCK_TEST_WITH_RETURN( dev, filp ); 
+ 
+ 	/* GH: Someone's doing nasty things... */
+ 	if (!dev->dev_private) {
+@@ -1398,10 +1389,7 @@
+    
+ 	DRM_DEBUG("i830_swap_bufs\n");
+ 
+-   	if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
+-		DRM_ERROR("i830_swap_buf called without lock held\n");
+-		return -EINVAL;
+-	}
++	LOCK_TEST_WITH_RETURN( dev, filp ); 
+ 
+ 	i830_dma_dispatch_swap( dev );
+    	return 0;
+@@ -1442,10 +1430,7 @@
+ 
+ 	DRM_DEBUG("%s\n", __FUNCTION__);
+ 
+-   	if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
+-		DRM_ERROR("i830_flip_buf called without lock held\n");
+-		return -EINVAL;
+-	}
++	LOCK_TEST_WITH_RETURN( dev, filp ); 
+ 
+ 	if (!dev_priv->page_flipping) 
+ 		i830_do_init_pageflip( dev );
+@@ -1484,10 +1469,7 @@
+    	if (copy_from_user(&d, (drm_i830_dma_t __user *)arg, sizeof(d)))
+ 		return -EFAULT;
+    
+-	if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
+-		DRM_ERROR("i830_dma called without lock held\n");
+-		return -EINVAL;
+-	}
++	LOCK_TEST_WITH_RETURN( dev, filp ); 
+ 	
+ 	d.granted = 0;
+ 
+diff -urNad linux-source-2.6.9-2.6.9/drivers/char/drm/i830_irq.c /tmp/dpep.C9szyr/linux-source-2.6.9-2.6.9/drivers/char/drm/i830_irq.c
+--- linux-source-2.6.9-2.6.9/drivers/char/drm/i830_irq.c	2004-10-18 23:54:54.000000000 +0200
++++ /tmp/dpep.C9szyr/linux-source-2.6.9-2.6.9/drivers/char/drm/i830_irq.c	2004-12-01 11:02:03.116499208 +0100
+@@ -129,10 +129,7 @@
+ 	drm_i830_irq_emit_t emit;
+ 	int result;
+ 
+-   	if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
+-		DRM_ERROR("i830_irq_emit called without lock held\n");
+-		return -EINVAL;
+-	}
++	LOCK_TEST_WITH_RETURN( dev, filp ); 
+ 
+ 	if ( !dev_priv ) {
+ 		DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
+

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/elf-loader-fixes-the-return.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/elf-loader-fixes-the-return.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/elf-loader-fixes-the-return.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,53 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [PATCH] binfmt_elf: handle p_filesz == 0 on PT_INTERP section
+## DP: Patch author: Jakub Jelinek <jakub at redhat.com>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/11/16 17:38:30-08:00 chrisw at osdl.org 
+#   [PATCH] binfmt_elf: handle p_filesz == 0 on PT_INTERP section
+#   
+#   Jakub Jelinek points out that current fix has an underflow problem
+#   if elf_ppnt->p_filesz == 0.  Fix that up, and also stop overwriting
+#   interpreter buffer, simply check that it's NULL-terminated.
+#   
+#   From: Jakub Jelinek <jakub at redhat.com>
+#   Signed-off-by: Chris Wright <chrisw at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# fs/binfmt_elf.c
+#   2004/11/16 11:01:21-08:00 chrisw at osdl.org +5 -2
+#   binfmt_elf: handle p_filesz == 0 on PT_INTERP section
+# 
+diff -Nru a/fs/binfmt_elf.c b/fs/binfmt_elf.c
+--- a/fs/binfmt_elf.c	2004-11-21 11:32:30 -08:00
++++ b/fs/binfmt_elf.c	2004-11-21 11:32:30 -08:00
+@@ -576,7 +576,8 @@
+ 			 */
+ 
+ 			retval = -ENOMEM;
+-			if (elf_ppnt->p_filesz > PATH_MAX)
++			if (elf_ppnt->p_filesz > PATH_MAX || 
++			    elf_ppnt->p_filesz == 0)
+ 				goto out_free_file;
+ 			elf_interpreter = (char *) kmalloc(elf_ppnt->p_filesz,
+ 							   GFP_KERNEL);
+@@ -592,7 +593,9 @@
+ 				goto out_free_interp;
+ 			}
+ 			/* make sure path is NULL terminated */
+-			elf_interpreter[elf_ppnt->p_filesz - 1] = '\0';
++			retval = -EINVAL;
++			if (elf_interpreter[elf_ppnt->p_filesz - 1] != '\0')
++				goto out_free_interp;
+ 
+ 			/* If the program interpreter is one of these two,
+ 			 * then assume an iBCS2 image. Otherwise assume

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/elf-loader-fixes.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/elf-loader-fixes.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/elf-loader-fixes.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,102 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Correct handle various failures in ELF loader
+## DP: Patch author: Chris Wright <chrisw at osdl.org>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/11/10 10:33:00-08:00 chrisw at osdl.org 
+#   [PATCH] binfmt_elf: handle partial reads gracefully
+#   
+#   Make sure kernel reads full size of elf data.  Error out if mmap fails
+#   when mapping any sections of the executable.  Make sure interpreter
+#   string is NULL terminated. 
+#   
+#   Signed-off-by: Chris Wright <chrisw at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# fs/binfmt_elf.c
+#   2004/11/10 09:45:38-08:00 chrisw at osdl.org +24 -7
+#   binfmt_elf: handle partial reads gracefully
+# 
+# Slightly modified to apply to Debian's 2.6.8 by Andres Salomon.
+diff -Nru a/fs/binfmt_elf.c b/fs/binfmt_elf.c
+--- a/fs/binfmt_elf.c	2004-11-11 09:10:16 -08:00
++++ b/fs/binfmt_elf.c	2004-11-11 09:10:16 -08:00
+@@ -335,9 +335,12 @@
+ 		goto out;
+ 
+ 	retval = kernel_read(interpreter,interp_elf_ex->e_phoff,(char *)elf_phdata,size);
+-	error = retval;
+-	if (retval < 0)
++	error = -EIO;
++	if (retval != size) {
++		if (retval < 0)
++			error = retval;	
+ 		goto out_close;
++	}
+ 
+ 	eppnt = elf_phdata;
+ 	for (i=0; i<interp_elf_ex->e_phnum; i++, eppnt++) {
+@@ -532,8 +535,11 @@
+ 		goto out;
+ 
+ 	retval = kernel_read(bprm->file, elf_ex.e_phoff, (char *) elf_phdata, size);
+-	if (retval < 0)
++	if (retval != size) {
++		if (retval >= 0)
++			retval = -EIO;
+ 		goto out_free_ph;
++	}
+ 
+ 	files = current->files;		/* Refcounted so ok */
+ 	retval = unshare_files();
+@@ -580,8 +586,14 @@
+ 			retval = kernel_read(bprm->file, elf_ppnt->p_offset,
+ 					   elf_interpreter,
+ 					   elf_ppnt->p_filesz);
+-			if (retval < 0)
++			if (retval != elf_ppnt->p_filesz) {
++				if (retval >= 0)
++					retval = -EIO;
+ 				goto out_free_interp;
++			}
++			/* make sure path is NULL terminated */
++			elf_interpreter[elf_ppnt->p_filesz - 1] = '\0';
++
+ 			/* If the program interpreter is one of these two,
+ 			 * then assume an iBCS2 image. Otherwise assume
+ 			 * a native linux image.
+@@ -616,8 +628,11 @@
+ 			if (IS_ERR(interpreter))
+ 				goto out_free_interp;
+ 			retval = kernel_read(interpreter, 0, bprm->buf, BINPRM_BUF_SIZE);
+-			if (retval < 0)
++			if (retval != BINPRM_BUF_SIZE) {
++				if (retval >= 0)
++					retval = -EIO;
+ 				goto out_free_dentry;
++			}
+ 
+ 			/* Get the exec headers */
+ 			loc->interp_ex = *((struct exec *) bprm->buf);
+@@ -776,8 +791,10 @@
+ 		}
+ 
+ 		error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt, elf_prot, elf_flags);
+-		if (BAD_ADDR(error))
+-			continue;
++		if (BAD_ADDR(error)) {
++			send_sig(SIGKILL, current, 0);
++			goto out_free_dentry;
++		}
+ 
+ 		if (!load_addr_set) {
+ 			load_addr_set = 1;

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ext3-direct-io-assert-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ext3-direct-io-assert-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ext3-direct-io-assert-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,48 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: ext3 direct io assert fix
+## DP: Patch author: unknown (akpm?)
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/16 15:02:35-07:00 akpm at osdl.org 
+#   [PATCH] ext3 direct io assert fix
+#   
+#   Fix bug identified by Badari Pulavarty <pbadari at us.ibm.com>
+#   
+#   Local variable `handle' will become stale if ext3_direct_io_get_blocks()
+#   closes off the current transaction and starts a new one.  This causes a BUG in
+#   journal_stop().
+#   
+#   So reacquire the handle from *current after performing the I/O.
+#   
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# fs/ext3/inode.c
+#   2004/10/14 18:21:18-07:00 akpm at osdl.org +6 -0
+#   ext3 direct io assert fix
+# 
+diff -Nru a/fs/ext3/inode.c b/fs/ext3/inode.c
+--- a/fs/ext3/inode.c	2004-10-17 17:15:28 -07:00
++++ b/fs/ext3/inode.c	2004-10-17 17:15:28 -07:00
+@@ -1579,6 +1579,12 @@
+ 				 offset, nr_segs,
+ 				 ext3_direct_io_get_blocks, NULL);
+ 
++	/*
++	 * Reacquire the handle: ext3_direct_io_get_block() can restart the
++	 * transaction
++	 */
++	handle = journal_current_handle();
++
+ out_stop:
+ 	if (handle) {
+ 		int err;

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/extraversion.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/extraversion.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/extraversion.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,23 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: read .extraversion if it exists in Makefile
+## DP: Patch author: unknown
+## DP: Upstream status: not submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- kernel-source-2.6.6/Makefile	2004-05-10 19:47:45.000000000 +1000
++++ kernel-source-2.6.6-1/Makefile	2004-05-10 22:21:02.000000000 +1000
+@@ -151,6 +151,9 @@
+ 
+ export srctree objtree VPATH TOPDIR
+ 
++ifeq ($(EXTRAVERSION),)
++EXTRAVERSION := $(shell [ ! -f .extraversion ] || cat .extraversion)
++endif
+ KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
+ 
+ # SUBARCH tells the usermode build what the underlying arch is.  That is set

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fix-alpha-ext3-oops.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fix-alpha-ext3-oops.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fix-alpha-ext3-oops.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,13 @@
+--- kernel-source-2.6.8-2.6.8/fs/ext3/super.c~	2004-08-14 07:37:41.000000000 +0200
++++ kernel-source-2.6.8-2.6.8/fs/ext3/super.c	2005-01-09 21:44:51.449409783 +0100
+@@ -2337,6 +2337,10 @@
+ static int __init init_ext3_fs(void)
+ {
+ 	int err = init_ext3_xattr();
++	/* ugly hack to work around compiler bug */
++#ifdef __alpha__
++	printk(KERN_DEBUG "[%d] init_ext3_fs(), err = %d\n", __LINE__, err);
++#endif
+ 	if (err)
+ 		return err;
+ 	err = init_inodecache();

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fix-ip-options-leak.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fix-ip-options-leak.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fix-ip-options-leak.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,40 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Do not leak IP options.
+## DP: Patch author: David S. Miller <davem at davemloft.net>
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/12/08 12:39:15-08:00 davem at nuts.davemloft.net 
+#   [IPV4]: Do not leak IP options.
+#   
+#   If the user makes ip_cmsg_send call ip_options_get
+#   multiple times, we leak kmalloced IP options data.
+#   
+#   Noticed by Georgi Guninski.
+#   
+#   Signed-off-by: David S. Miller <davem at davemloft.net>
+# 
+# net/ipv4/ip_options.c
+#   2004/12/08 12:38:09-08:00 davem at nuts.davemloft.net +2 -0
+#   [IPV4]: Do not leak IP options.
+# 
+diff -Nru a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c
+--- a/net/ipv4/ip_options.c	2004-12-22 03:00:30 -08:00
++++ b/net/ipv4/ip_options.c	2004-12-22 03:00:30 -08:00
+@@ -515,6 +515,8 @@
+ 		kfree(opt);
+ 		return -EINVAL;
+ 	}
++	if (*optp)
++		kfree(*optp);
+ 	*optp = opt;
+ 	return 0;
+ }

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fix-sn_console-for-config_smp.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fix-sn_console-for-config_smp.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fix-sn_console-for-config_smp.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,46 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: fix sn_console compilation for UP
+## DP: Patch author: Jesse Barnes <jbarnes at sgi.com>
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+
+From: Jesse Barnes <jbarnes at engr.sgi.com>
+
+I found that sn_console was missing an include and a fix if CONFIG_SMP=n.  
+This patch fixes up the two small problems I found.
+
+Signed-off-by: Jesse Barnes <jbarnes at sgi.com>
+Signed-off-by: Andrew Morton <akpm at osdl.org>
+---
+
+ 25-akpm/drivers/serial/sn_console.c |    3 +++
+ 1 files changed, 3 insertions(+)
+
+diff -puN drivers/serial/sn_console.c~fix-sn_console-for-config_smp=n drivers/serial/sn_console.c
+--- 25/drivers/serial/sn_console.c~fix-sn_console-for-config_smp=n	2004-08-15 15:40:38.161876312 -0700
++++ 25-akpm/drivers/serial/sn_console.c	2004-08-15 15:40:38.165875704 -0700
+@@ -50,6 +50,7 @@
+ #include <linux/miscdevice.h>
+ #include <linux/serial_core.h>
+ 
++#include <asm/io.h>
+ #include <asm/sn/simulator.h>
+ #include <asm/sn/sn2/sn_private.h>
+ #include <asm/sn/sn_sal.h>
+@@ -1086,7 +1087,9 @@ sn_sal_console_write(struct console *co,
+ 			spin_unlock_irqrestore(&port->sc_port.lock, flags);
+ 
+ 			puts_raw_fixed(port->sc_ops->sal_puts_raw, s, count);
++#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT)
+ 		}
++#endif
+ 	}
+ 	else {
+ 		/* Not yet registered with serial core - simple case */
+_

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fix-url-bsd-acct.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fix-url-bsd-acct.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fix-url-bsd-acct.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,23 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix bad URL in BSD acct help entry
+## DP: Patch author: tim at physik3.uni-rostock.de
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -Nru a/init/Kconfig b/init/Kconfig
+--- a/init/Kconfig	2004-08-29 12:06:26 -07:00
++++ b/init/Kconfig	2004-08-29 12:06:26 -07:00
+@@ -123,7 +123,7 @@
+ 	  process and it's parent. Note that this file format is incompatible
+ 	  with previous v0/v1/v2 file formats, so you will need updated tools
+ 	  for processing it. A preliminary version of these tools is available
+-	  at <http://http://www.de.kernel.org/pub/linux/utils/acct/>.
++	  at <http://www.physik3.uni-rostock.de/tim/kernel/utils/acct/>.
+ 
+ config SYSCTL
+ 	bool "Sysctl support"

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/forcedeth-update.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/forcedeth-update.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/forcedeth-update.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,176 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Update forcedeth driver to upstream BK as of 2004/09/21
+## DP:			(fixes autonegotiation for 100Mbit cards)
+## DP: Patch author: Manfred Spraul <manfred at colorfullife.com>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -uNr -p -Xdontdiff kernel-source-2.6.8/drivers/net/forcedeth.c linux-2.5/drivers/net/forcedeth.c
+--- kernel-source-2.6.8/drivers/net/forcedeth.c	2004-08-14 07:36:12.000000000 +0200
++++ linux-2.5/drivers/net/forcedeth.c	2004-09-19 11:47:55.000000000 +0200
+@@ -75,6 +75,7 @@
+  *			   added CK804/MCP04 device IDs, code fixes
+  *			   for registers, link status and other minor fixes.
+  *	0.28: 21 Jun 2004: Big cleanup, making driver mostly endian safe
++ *	0.29: 31 Aug 2004: Add backup timer for link change notification.
+  *
+  * Known bugs:
+  * We suspect that on some hardware no TX done interrupts are generated.
+@@ -86,7 +87,7 @@
+  * DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few
+  * superfluous timer interrupts from the nic.
+  */
+-#define FORCEDETH_VERSION		"0.28"
++#define FORCEDETH_VERSION		"0.29"
+ #define DRV_NAME			"forcedeth"
+ 
+ #include <linux/module.h>
+@@ -120,10 +121,11 @@
+  * Hardware access:
+  */
+ 
+-#define DEV_NEED_LASTPACKET1	0x0001
+-#define DEV_IRQMASK_1		0x0002
+-#define DEV_IRQMASK_2		0x0004
+-#define DEV_NEED_TIMERIRQ	0x0008
++#define DEV_NEED_LASTPACKET1	0x0001	/* set LASTPACKET1 in tx flags */
++#define DEV_IRQMASK_1		0x0002  /* use NVREG_IRQMASK_WANTED_1 for irq mask */
++#define DEV_IRQMASK_2		0x0004  /* use NVREG_IRQMASK_WANTED_2 for irq mask */
++#define DEV_NEED_TIMERIRQ	0x0008  /* set the timer irq flag in the irq mask */
++#define DEV_NEED_LINKTIMER	0x0010	/* poll link settings. Relies on the timer irq */
+ 
+ enum {
+ 	NvRegIrqStatus = 0x000,
+@@ -367,6 +369,7 @@ struct ring_desc {
+ 
+ #define OOM_REFILL	(1+HZ/20)
+ #define POLL_WAIT	(1+HZ/100)
++#define LINK_TIMEOUT	(3*HZ)
+ 
+ #define DESC_VER_1	0x0
+ #define DESC_VER_2	0x02100
+@@ -446,6 +449,11 @@ struct fe_priv {
+ 	struct timer_list oom_kick;
+ 	struct timer_list nic_poll;
+ 
++	/* media detection workaround.
++	 * Locking: Within irq hander or disable_irq+spin_lock(&np->lock);
++	 */
++	int need_linktimer;
++	unsigned long link_timeout;
+ 	/*
+ 	 * tx specific fields.
+ 	 */
+@@ -1384,6 +1392,25 @@ set_speed:
+ 	return retval;
+ }
+ 
++static void nv_linkchange(struct net_device *dev)
++{
++	if (nv_update_linkspeed(dev)) {
++		if (netif_carrier_ok(dev)) {
++			nv_stop_rx(dev);
++		} else {
++			netif_carrier_on(dev);
++			printk(KERN_INFO "%s: link up.\n", dev->name);
++		}
++		nv_start_rx(dev);
++	} else {
++		if (netif_carrier_ok(dev)) {
++			netif_carrier_off(dev);
++			printk(KERN_INFO "%s: link down.\n", dev->name);
++			nv_stop_rx(dev);
++		}
++	}
++}
++
+ static void nv_link_irq(struct net_device *dev)
+ {
+ 	u8 *base = get_hwbase(dev);
+@@ -1391,25 +1418,10 @@ static void nv_link_irq(struct net_devic
+ 
+ 	miistat = readl(base + NvRegMIIStatus);
+ 	writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus);
+-	dprintk(KERN_DEBUG "%s: link change notification, status 0x%x.\n", dev->name, miistat);
++	dprintk(KERN_INFO "%s: link change irq, status 0x%x.\n", dev->name, miistat);
+ 
+-	if (miistat & (NVREG_MIISTAT_LINKCHANGE)) {
+-		if (nv_update_linkspeed(dev)) {
+-			if (netif_carrier_ok(dev)) {
+-				nv_stop_rx(dev);
+-			} else {
+-				netif_carrier_on(dev);
+-				printk(KERN_INFO "%s: link up.\n", dev->name);
+-			}
+-			nv_start_rx(dev);
+-		} else {
+-			if (netif_carrier_ok(dev)) {
+-				netif_carrier_off(dev);
+-				printk(KERN_INFO "%s: link down.\n", dev->name);
+-				nv_stop_rx(dev);
+-			}
+-		}
+-	}
++	if (miistat & (NVREG_MIISTAT_LINKCHANGE))
++		nv_linkchange(dev);
+ 	dprintk(KERN_DEBUG "%s: link change notification done.\n", dev->name);
+ }
+ 
+@@ -1452,6 +1464,12 @@ static irqreturn_t nv_nic_irq(int foo, v
+ 			nv_link_irq(dev);
+ 			spin_unlock(&np->lock);
+ 		}
++		if (np->need_linktimer && time_after(jiffies, np->link_timeout)) {
++			spin_lock(&np->lock);
++			nv_linkchange(dev);
++			spin_unlock(&np->lock);
++			np->link_timeout = jiffies + LINK_TIMEOUT;
++		}
+ 		if (events & (NVREG_IRQ_TX_ERR)) {
+ 			dprintk(KERN_DEBUG "%s: received irq with events 0x%x. Probably TX fail.\n",
+ 						dev->name, events);
+@@ -1816,6 +1834,14 @@ static int __devinit nv_probe(struct pci
+ 		np->irqmask = NVREG_IRQMASK_WANTED_2;
+ 	if (id->driver_data & DEV_NEED_TIMERIRQ)
+ 		np->irqmask |= NVREG_IRQ_TIMER;
++	if (id->driver_data & DEV_NEED_LINKTIMER) {
++		dprintk(KERN_INFO "%s: link timer on.\n", pci_name(pci_dev));
++		np->need_linktimer = 1;
++		np->link_timeout = jiffies + LINK_TIMEOUT;
++	} else {
++		dprintk(KERN_INFO "%s: link timer off.\n", pci_name(pci_dev));
++		np->need_linktimer = 0;
++	}
+ 
+ 	/* find a suitable phy */
+ 	for (i = 1; i < 32; i++) {
+@@ -1909,21 +1935,21 @@ static struct pci_device_id pci_tbl[] = 
+ 		.device = PCI_DEVICE_ID_NVIDIA_NVENET_1,
+ 		.subvendor = PCI_ANY_ID,
+ 		.subdevice = PCI_ANY_ID,
+-		.driver_data = DEV_IRQMASK_1|DEV_NEED_TIMERIRQ,
++		.driver_data = DEV_IRQMASK_1|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
+ 	},
+ 	{	/* nForce2 Ethernet Controller */
+ 		.vendor = PCI_VENDOR_ID_NVIDIA,
+ 		.device = PCI_DEVICE_ID_NVIDIA_NVENET_2,
+ 		.subvendor = PCI_ANY_ID,
+ 		.subdevice = PCI_ANY_ID,
+-		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ,
++		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
+ 	},
+ 	{	/* nForce3 Ethernet Controller */
+ 		.vendor = PCI_VENDOR_ID_NVIDIA,
+ 		.device = PCI_DEVICE_ID_NVIDIA_NVENET_3,
+ 		.subvendor = PCI_ANY_ID,
+ 		.subdevice = PCI_ANY_ID,
+-		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ,
++		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
+ 	},
+ 	{	/* nForce3 Ethernet Controller */
+ 		.vendor = PCI_VENDOR_ID_NVIDIA,

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fs-asfs.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fs-asfs.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fs-asfs.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,5026 @@
+#! /bin/sh -e 
+## fs-asfs.dpatch by Sven Luther <luther at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: add support for the Amiga SmartFilesystem (asfs), 1.0beta7
+## DP: Patch author: Marek Szyprowski marek at amiga.pl
+## DP: Upstream status: not submitted
+## DP: Reference: http://home.elka.pw.edu.pl/~mszyprow/programy/asfs/
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -urN linux-2.6.3/Documentation/filesystems/00-INDEX linux-2.6.3-asfs-1.0b7/Documentation/filesystems/00-INDEX
+--- linux-2.6.3/Documentation/filesystems/00-INDEX	2004-03-22 17:34:00.000000000 +0100
++++ linux-2.6.3-asfs-1.0b7/Documentation/filesystems/00-INDEX	2004-03-22 17:34:00.000000000 +0100
+@@ -6,6 +6,8 @@
+ 	- info and mount options for the Acorn Advanced Disc Filing System.
+ affs.txt
+ 	- info and mount options for the Amiga Fast File System.
++asfs.txt
++	- info and mount options for the Amiga Smart File System.
+ bfs.txt
+ 	- info for the SCO UnixWare Boot Filesystem (BFS).
+ cifs.txt
+diff -urN linux-2.6.3/Documentation/filesystems/asfs.txt linux-2.6.3-asfs-1.0b7/Documentation/filesystems/asfs.txt
+--- linux-2.6.3/Documentation/filesystems/asfs.txt	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.3-asfs-1.0b7/Documentation/filesystems/asfs.txt	2004-06-17 00:47:17.000000000 +0200
+@@ -0,0 +1,150 @@
++
++Amiga SmartFileSystem, Linux implementation
++===========================================
++
++ASFS is a Amiga Smart FileSystem driver for Linux. It supports reading
++files and directories. From version 1.0 there is also an experimental 
++(almost full) write support. Experimental means that it hasn't been 
++tested enough yet, so use it with care. Symbolic links (in AmigaOS
++called soft links) are also supported read/write. Read notes below 
++about symlinks support.
++
++
++Unsupported features of Amiga SFS
++================================
++
++ASFS currently does not support safe-delete feature of Amiga SFS 
++filesystem. It simply deletes files instead of moving them to 
++".recycled" directory. It also doesn't remove files from ".recycled" 
++directory, when there is no space left on drive. 
++
++If there is no space left, you need to manually remove files from 
++".recycled" directory. Also if you want to delete a file in a safe 
++way, you need to move it to ".recycled" directory by hand.
++
++Because of all of above, the amount of free space on disk does not 
++include space used by all files from ".recycled" directory.
++
++
++Limitations
++===========
++
++There is no Amiga protection bits into Linux permission bits tranlation
++and vice versa. If you need this feature, mail me.
++
++ASFS will always keep some amount of blocks free. This means that you 
++cannot fill the drive completely. It is because Amiga SFS uses some 
++special methods of writing data (called safe write), which needs some
++additional free space.
++
++File systems with unfinished transactions (this happens when system crashed
++during writing data to disk on AmigaOS/MorphOS) will be mounted read-only
++to protect data. The only way to fix such filesystem is to mount it under
++AmigaOS or MorphOS.
++
++Do not try to mount and write to filesystem with errors. Bad things will
++happen.
++
++
++Mount options for the ASFS
++==========================
++
++setuid=uid	
++		This sets the owner of all files and directories in the file
++		system to uid.
++
++setgid=gid	
++		Same as above, but for gid.
++
++mode=mode	
++		Sets the mode flags to the given (octal) value. Directories 
++		will get an x permission if the corresponding r bit is set.
++		The default mode is 0644, which means that everybody are allowed 
++		to read files, but only root can write to them.
++		(for directories this means also that search bits are set).
++
++prefix=path	
++		Path will be prefixed to every absolute path name of symbolic 
++		links on an ASFS/AFFS partition. Default = "/". (See below.)
++
++volume=name
++		When symbolic links with an absolute path are created
++		on an ASFS/AFFS partition, name will be prepended as the
++		volume name. Default = "" (empty string). (See below.)
++
++lowercasevol
++		Translate all volume names in symlinks to lower case.
++		Disabled by default. (See below.)
++
++Symbolic links
++==============
++
++Although the Amiga and Linux file systems resemble each other, there
++are some, not always subtle, differences. One of them becomes apparent
++with symbolic links. While Linux has a file system with exactly one
++root directory, the Amiga has a separate root directory for each
++file system (for example, partition, floppy disk, ...). With the Amiga,
++these entities are called "volumes". They have symbolic names which
++can be used to access them. Thus, symbolic links can point to a
++different volume. ASFS turns the volume name into a directory name
++and prepends the prefix path (see prefix option) to it. When option
++"lowercasevol" is set, it also translates volume names to lower case.
++If the volume name is the same as a name given in "volume" option,
++it will be ignored and an absolute path will be created.
++
++Example:
++You mount all your Amiga partitions under /amiga/<volume> (where
++<volume> is the name of the volume), and you give options
++`prefix="/amiga/",volume="Linux",lowercasevol' when mounting all your 
++ASFS partitions. (They might be "User", "WB" and "Graphics", the mount 
++points /amiga/user, /amiga/wb and /amiga/graphics). 
++
++A symbolic link referring to "USER:sc/include/dos/dos.h" will be 
++translated to "/amiga/user/sc/include/dos/dos.h".
++A symbolic link referring to "Linux:etc/fstab" will be translated to
++"/etc/fstab".
++If you create a symlink referring to "/amiga/graphics/data/pict.jpg",
++it will be saved as "graphics:data/pict.jpg".
++If you create a symlink referring to "/boot/System.map", it will be 
++saved as "Linux:boot/System.map".
++
++
++Other information
++=================
++
++Supported block sizes are: 512, 1024, 2048 and 4096 bytes. Larger blocks
++speed up almost everything at the expense of wasted disk space. The speed
++gain above 4K seems not really worth the price, so you don't lose too
++much here, either.
++
++This file system has been tested on Motorola PPC and 68k, as well as 
++Intel x86 systems. I don't know, if it works on other Linux systems.
++
++This filesystem is in BETA STAGE. This means that driver MIGHT corrupt
++or damage data on your disk. Remember! YOU USE IT ON YOUR OWN RISK! 
++
++I made almost all I could to minimalize this risk. On my systems several 
++gigabytes has been succesfully copied from and to SFS disks. I would also 
++appreciate any infomation if this filesystem works on your system or not. 
++See next paragraph for my email.
++
++Some parts of this documentation has been adapted from AFFS driver docs.
++
++
++Author, contact and copyright infos
++===================================
++
++ASFS has been written by Marek 'March' Szyprowski <marek at amiga.pl>.
++Mail me if you have any suggestions or found a bug.
++
++Copyright (C) 2003,2004  Marek 'March' Szyprowski <marek at amiga.pl>
++
++Thanks to Marcin Kurek (Morgoth/Dreamolers-CAPS) for help and parts 
++of original amiga version of SmartFilesystem source code. 
++
++SmartFilesystem is copyrighted (C) 2003,2004 by: John Hendrikx, 
++Ralph Schmidt, Emmanuel Lesueur, David Gerber and Marcin Kurek
++
++The ASFS driver is realased under the terms of of the GNU General 
++Public License. See source code for more details.
++
+diff -urN linux-2.6.3/fs/asfs/adminspace.c linux-2.6.3-asfs-1.0b7/fs/asfs/adminspace.c
+--- linux-2.6.3/fs/asfs/adminspace.c	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.3-asfs-1.0b7/fs/asfs/adminspace.c	2004-06-13 21:03:49.000000000 +0200
+@@ -0,0 +1,446 @@
++/*
++ *
++ * Amiga Smart File System, Linux implementation
++ * version: 1.0beta7
++ *
++ * This file contains some parts of the original amiga version of 
++ * SmartFilesystem source code.
++ *
++ * SmartFilesystem is copyrighted (C) 2003 by: John Hendrikx, 
++ * Ralph Schmidt, Emmanuel Lesueur, David Gerber, and Marcin Kurek
++ * 
++ * Adapted and modified by Marek 'March' Szyprowski <marek at amiga.pl>
++ *
++ */
++
++#include <linux/types.h>
++#include <linux/errno.h>
++#include <linux/slab.h>
++#include <linux/fs.h>
++#include <linux/buffer_head.h>
++#include <linux/vfs.h>
++#include "asfs_fs.h"
++#include "bitfuncs.h"
++
++#include <asm/byteorder.h>
++
++#ifdef CONFIG_ASFS_RW
++
++static int setfreeblocks(struct super_block *sb, u32 freeblocks)
++{
++	struct buffer_head *bh;
++	if ((bh = asfs_breadcheck(sb, ASFS_SB(sb)->rootobjectcontainer, ASFS_OBJECTCONTAINER_ID))) {
++		struct fsRootInfo *ri = (struct fsRootInfo *) ((u8 *) bh->b_data + sb->s_blocksize - sizeof(struct fsRootInfo));
++		ASFS_SB(sb)->freeblocks = freeblocks;
++		ri->freeblocks = cpu_to_be32(freeblocks);
++		asfs_bstore(sb, bh);
++		asfs_brelse(bh);
++		return 0;
++	}
++	return -EIO;
++}
++
++static inline int enoughspace(struct super_block *sb, u32 blocks)
++{
++	if (ASFS_SB(sb)->freeblocks - ASFS_ALWAYSFREE < blocks)
++		return FALSE;
++
++	return TRUE;
++}
++
++	/* Determines the amount of free blocks starting from block /block/.
++	   If there are no blocks found or if there was an error -1 is returned,
++	   otherwise this function will count the number of free blocks until
++	   an allocated block is encountered or until maxneeded has been
++	   exceeded. */
++
++static int availablespace(struct super_block *sb, u32 block, u32 maxneeded)
++{
++	struct buffer_head *bh = NULL;
++	struct fsBitmap *b;
++	u32 longs = ASFS_SB(sb)->blocks_inbitmap >> 5;
++	u32 maxbitmapblock = ASFS_SB(sb)->bitmapbase + ASFS_SB(sb)->blocks_bitmap;
++	int blocksfound = 0;
++	u32 bitstart;
++	int bitend;
++	u32 nextblock = ASFS_SB(sb)->bitmapbase + block / ASFS_SB(sb)->blocks_inbitmap;
++
++	bitstart = block % ASFS_SB(sb)->blocks_inbitmap;
++
++	while (nextblock < maxbitmapblock && (bh = asfs_breadcheck(sb, nextblock++, ASFS_BITMAP_ID))) {
++		b = (void *) bh->b_data;
++
++		if ((bitend = bmffz(b->bitmap, longs, bitstart)) >= 0) {
++			blocksfound += bitend - bitstart;
++			asfs_brelse(bh);
++			return blocksfound;
++		}
++		blocksfound += ASFS_SB(sb)->blocks_inbitmap - bitstart;
++		if (blocksfound >= maxneeded) {
++			asfs_brelse(bh);
++			return blocksfound;
++		}
++		bitstart = 0;
++		asfs_brelse(bh);
++	}
++
++	if (bh == NULL)
++		return (-1);
++
++	return (blocksfound);
++}
++
++int asfs_findspace(struct super_block *sb, u32 maxneeded, u32 start, u32 end, u32 * returned_block, u32 * returned_blocks)
++{
++	struct buffer_head *bh;
++	u32 longs = ASFS_SB(sb)->blocks_inbitmap >> 5;
++	u32 space = 0;
++	u32 block;
++	u32 bitmapblock = ASFS_SB(sb)->bitmapbase + start / ASFS_SB(sb)->blocks_inbitmap;
++	u32 breakpoint;
++	int bitstart, bitend;
++	int reads;
++
++	if (enoughspace(sb, maxneeded) == FALSE) {
++		*returned_block = 0;
++		*returned_blocks = 0;
++		return -ENOSPC;
++	}
++
++	if (start >= ASFS_SB(sb)->totalblocks)
++		start -= ASFS_SB(sb)->totalblocks;
++
++	if (end == 0)
++		end = ASFS_SB(sb)->totalblocks;
++
++	reads = ((end - 1) / ASFS_SB(sb)->blocks_inbitmap) + 1 - start / ASFS_SB(sb)->blocks_inbitmap;
++
++	if (start >= end)
++		reads += (ASFS_SB(sb)->totalblocks - 1) / ASFS_SB(sb)->blocks_inbitmap + 1;
++
++	breakpoint = (start < end ? end : ASFS_SB(sb)->totalblocks);
++
++	*returned_block = 0;
++	*returned_blocks = 0;
++
++	bitend = start % ASFS_SB(sb)->blocks_inbitmap;
++	block = start - bitend;
++
++	while ((bh = asfs_breadcheck(sb, bitmapblock++, ASFS_BITMAP_ID))) {
++		struct fsBitmap *b = (void *) bh->b_data;
++		u32 localbreakpoint = breakpoint - block;
++
++		if (localbreakpoint > ASFS_SB(sb)->blocks_inbitmap)
++			localbreakpoint = ASFS_SB(sb)->blocks_inbitmap;
++
++		/* At this point space contains the amount of free blocks at
++		   the end of the previous bitmap block.  If there are no
++		   free blocks at the start of this bitmap block, space will
++		   be set to zero, since in that case the space isn't adjacent. */
++
++		while ((bitstart = bmffo(b->bitmap, longs, bitend)) < ASFS_SB(sb)->blocks_inbitmap) {
++			/* found the start of an empty space, now find out how large it is */
++
++			if (bitstart >= localbreakpoint)
++				break;
++
++			if (bitstart != 0)
++				space = 0;
++
++			bitend = bmffz(b->bitmap, longs, bitstart);
++
++			if (bitend > localbreakpoint)
++				bitend = localbreakpoint;
++
++			space += bitend - bitstart;
++
++			if (*returned_blocks < space) {
++				*returned_block = block + bitend - space;
++				if (space >= maxneeded) {
++					*returned_blocks = maxneeded;
++					asfs_brelse(bh);
++					return 0;
++				}
++				*returned_blocks = space;
++			}
++
++			if (bitend >= localbreakpoint)
++				break;
++		}
++
++		if (--reads == 0)
++			break;
++
++		/* no (more) empty spaces found in this block */
++
++		if (bitend != ASFS_SB(sb)->blocks_inbitmap)
++			space = 0;
++
++		bitend = 0;
++		block += ASFS_SB(sb)->blocks_inbitmap;
++
++		if (block >= ASFS_SB(sb)->totalblocks) {
++			block = 0;
++			space = 0;
++			breakpoint = end;
++			bitmapblock = ASFS_SB(sb)->bitmapbase;
++		}
++		asfs_brelse(bh);
++	}
++
++	if (bh == NULL)
++		return -EIO;
++
++	asfs_brelse(bh);
++
++	if (*returned_blocks == 0)
++		return -ENOSPC;
++	else
++		return 0;
++}
++
++int asfs_markspace(struct super_block *sb, u32 block, u32 blocks)
++{
++	int errorcode;
++
++	asfs_debug("markspace: Marking %d blocks from block %d\n", blocks, block);
++
++	if ((availablespace(sb, block, blocks)) < blocks) {
++		printk("ASFS: Attempted to mark %d blocks from block %d, but some of them were already full!\n", blocks, block);
++		return -EIO;
++	}
++
++	if ((errorcode = setfreeblocks(sb, ASFS_SB(sb)->freeblocks - blocks)) == 0) {
++		struct buffer_head *bh;
++		u32 skipblocks = block / ASFS_SB(sb)->blocks_inbitmap;
++		u32 longs = (sb->s_blocksize - sizeof(struct fsBitmap)) >> 2;
++		u32 bitmapblock;
++
++		block -= skipblocks * ASFS_SB(sb)->blocks_inbitmap;
++		bitmapblock = ASFS_SB(sb)->bitmapbase + skipblocks;
++
++		while (blocks > 0) {
++			if ((bh = asfs_breadcheck(sb, bitmapblock++, ASFS_BITMAP_ID))) {
++				struct fsBitmap *b = (void *) bh->b_data;
++
++				blocks -= bmclr(b->bitmap, longs, block, blocks);
++				block = 0;
++
++				asfs_bstore(sb, bh);
++				asfs_brelse(bh);
++			} else
++				return -EIO;
++		}
++	}
++
++	return (errorcode);
++}
++
++	/* This function checks the bitmap and tries to locate at least /blocksneeded/
++	   adjacent unused blocks.  If found it sets returned_block to the start block
++	   and returns no error.  If not found, ERROR_DISK_IS_FULL is returned and
++	   returned_block is set to zero.  Any other errors are returned as well. */
++
++static inline int internalfindspace(struct super_block *sb, u32 blocksneeded, u32 startblock, u32 endblock, u32 * returned_block)
++{
++	u32 blocks;
++	int errorcode;
++
++	if ((errorcode = asfs_findspace(sb, blocksneeded, startblock, endblock, returned_block, &blocks)) == 0)
++		if (blocks != blocksneeded)
++			return -ENOSPC;
++
++	return errorcode;
++}
++
++static int findandmarkspace(struct super_block *sb, u32 blocksneeded, u32 * returned_block)
++{
++	int errorcode;
++
++	if (enoughspace(sb, blocksneeded) != FALSE) {
++		if ((errorcode = internalfindspace(sb, blocksneeded, 0, ASFS_SB(sb)->totalblocks, returned_block)) == 0)
++			errorcode = asfs_markspace(sb, *returned_block, blocksneeded);
++	} else
++		errorcode = -ENOSPC;
++
++	return (errorcode);
++}
++
++/* ************************** */
++
++int asfs_freespace(struct super_block *sb, u32 block, u32 blocks)
++{
++	int errorcode;
++
++	asfs_debug("freespace: Freeing %d blocks from block %d\n", blocks, block);
++
++	if ((errorcode = setfreeblocks(sb, ASFS_SB(sb)->freeblocks + blocks)) == 0) {
++		struct buffer_head *bh;
++		u32 skipblocks = block / ASFS_SB(sb)->blocks_inbitmap;
++		u32 longs = (sb->s_blocksize - sizeof(struct fsBitmap)) >> 2;
++		u32 bitmapblock;
++
++		block -= skipblocks * ASFS_SB(sb)->blocks_inbitmap;
++		bitmapblock = ASFS_SB(sb)->bitmapbase + skipblocks;
++
++		while (blocks > 0) {
++			if ((bh = asfs_breadcheck(sb, bitmapblock++, ASFS_BITMAP_ID))) {
++				struct fsBitmap *b = (void *) bh->b_data;
++
++				blocks -= bmset(b->bitmap, longs, block, blocks);
++				block = 0;
++
++				asfs_bstore(sb, bh);
++				asfs_brelse(bh);
++			} else
++				return -EIO;
++		}
++	}
++
++	return (errorcode);
++}
++
++/*************** admin space containers ****************/
++
++int asfs_allocadminspace(struct super_block *sb, u32 *returned_block)
++{
++	struct buffer_head *bh;
++	u32 adminspaceblock = ASFS_SB(sb)->adminspacecontainer;
++	int errorcode = -EIO;
++
++	asfs_debug("allocadminspace: allocating new block\n");
++
++	while ((bh = asfs_breadcheck(sb, adminspaceblock, ASFS_ADMINSPACECONTAINER_ID))) {
++		struct fsAdminSpaceContainer *asc1 = (void *) bh->b_data;
++		struct fsAdminSpace *as1 = asc1->adminspace;
++		int adminspaces1 = (sb->s_blocksize - sizeof(struct fsAdminSpaceContainer)) / sizeof(struct fsAdminSpace);
++
++		while (adminspaces1-- > 0) {
++			s16 bitoffset;
++
++			if (as1->space != 0 && (bitoffset = bfffz(be32_to_cpu(as1->bits), 0)) >= 0) {
++				u32 emptyadminblock = be32_to_cpu(as1->space) + bitoffset;
++				as1->bits |= cpu_to_be32(1 << (31 - bitoffset));
++				asfs_bstore(sb, bh);
++				*returned_block = emptyadminblock;
++				asfs_brelse(bh);
++				asfs_debug("allocadminspace: found block %d\n", *returned_block);
++				return 0;
++			}
++			as1++;
++		}
++
++		adminspaceblock = be32_to_cpu(asc1->next);
++		asfs_brelse(bh);
++
++		if (adminspaceblock == 0) {
++			u32 startblock;
++
++			asfs_debug("allocadminspace: allocating new adminspace area\n");
++
++			/* If we get here it means current adminspace areas are all filled.
++			   We would now need to find a new area and create a fsAdminSpace
++			   structure in one of the AdminSpaceContainer blocks.  If these
++			   don't have any room left for new adminspace areas a new
++			   AdminSpaceContainer would have to be created first which is
++			   placed as the first block in the newly found admin area. */
++
++			adminspaceblock = ASFS_SB(sb)->adminspacecontainer;
++
++			if ((errorcode = findandmarkspace(sb, 32, &startblock)))
++				return errorcode;
++
++			while ((bh = asfs_breadcheck(sb, adminspaceblock, ASFS_ADMINSPACECONTAINER_ID))) {
++				struct fsAdminSpaceContainer *asc2 = (void *) bh->b_data;
++				struct fsAdminSpace *as2 = asc2->adminspace;
++				int adminspaces2 = (sb->s_blocksize - sizeof(struct fsAdminSpaceContainer)) / sizeof(struct fsAdminSpace);
++
++				while (adminspaces2-- > 0 && as2->space != 0)
++					as2++;
++
++				if (adminspaces2 >= 0) {	/* Found a unused AdminSpace in this AdminSpaceContainer! */
++					as2->space = cpu_to_be32(startblock);
++					as2->bits = 0;
++					asfs_bstore(sb, bh);
++					asfs_brelse(bh);
++					break;
++				}
++
++				if (asc2->next == 0) {
++					/* Oh-oh... we marked our new adminspace area in use, but we couldn't
++					   find space to store a fsAdminSpace structure in the existing
++					   fsAdminSpaceContainer blocks.  This means we need to create and
++					   link a new fsAdminSpaceContainer as the first block in our newly
++					   marked adminspace. */
++
++					asc2->next = cpu_to_be32(startblock);
++					asfs_bstore(sb, bh);
++					asfs_brelse(bh);
++
++					/* Now preparing new AdminSpaceContainer */
++
++					if ((bh = asfs_getzeroblk(sb, startblock)) == NULL)
++						return -EIO;
++
++					asc2 = (void *) bh->b_data;
++					asc2->bheader.id = cpu_to_be32(ASFS_ADMINSPACECONTAINER_ID);
++					asc2->bheader.ownblock = cpu_to_be32(startblock);
++					asc2->previous = cpu_to_be32(adminspaceblock);
++					asc2->adminspace[0].space = cpu_to_be32(startblock);
++					asc2->adminspace[0].bits = cpu_to_be32(0x80000000);
++					asc2->bits = 32;
++
++					asfs_bstore(sb, bh);
++					asfs_brelse(bh);
++
++					adminspaceblock = startblock;
++					break;	/* Breaks through to outer loop! */
++				}
++				adminspaceblock = be32_to_cpu(asc2->next);
++				asfs_brelse(bh);
++			}
++		}
++	}
++	return errorcode;
++}
++
++int asfs_freeadminspace(struct super_block *sb, u32 block)
++{
++	struct buffer_head *bh;
++	u32 adminspaceblock = ASFS_SB(sb)->adminspacecontainer;
++
++	asfs_debug("freeadminspace: Entry -- freeing block %d\n", block);
++
++	while ((bh = asfs_breadcheck(sb, adminspaceblock, ASFS_ADMINSPACECONTAINER_ID))) {
++		struct fsAdminSpaceContainer *asc = (void *) bh->b_data;
++		struct fsAdminSpace *as = asc->adminspace;
++		int adminspaces = (sb->s_blocksize - sizeof(struct fsAdminSpaceContainer)) / sizeof(struct fsAdminSpace);
++
++		while (adminspaces-- > 0) {
++			if (block >= be32_to_cpu(as->space) && block < be32_to_cpu(as->space) + 32) {
++				s16 bitoffset = block - be32_to_cpu(as->space);
++				asfs_debug("freeadminspace: Block to be freed is located in AdminSpaceContainer block at %d\n", adminspaceblock);
++				as->bits &= cpu_to_be32(~(1 << (31 - bitoffset)));
++				asfs_bstore(sb, bh);
++				asfs_brelse(bh);
++				return 0;
++			}
++			as++;
++		}
++
++		if ((adminspaceblock = be32_to_cpu(asc->next)) == 0)
++			break;
++
++		asfs_brelse(bh);
++	}
++
++	if (bh != NULL) {
++		asfs_brelse(bh);
++		printk("ASFS: Unable to free an administration block. The block cannot be found.");
++		return -ENOENT;
++	}
++
++	return -EIO;
++}
++
++#endif
+diff -urN linux-2.6.3/fs/asfs/asfs_fs.h linux-2.6.3-asfs-1.0b7/fs/asfs/asfs_fs.h
+--- linux-2.6.3/fs/asfs/asfs_fs.h	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.3-asfs-1.0b7/fs/asfs/asfs_fs.h	2004-06-10 19:28:16.000000000 +0200
+@@ -0,0 +1,227 @@
++#ifndef __LINUX_ASFS_FS_H
++#define __LINUX_ASFS_FS_H
++
++#include <linux/types.h>
++#include <linux/fs.h>
++#include <linux/buffer_head.h>
++#include <asm/byteorder.h>
++#include <linux/amigasfs.h>
++
++#define asfs_debug(fmt,arg...) /* no debug at all */
++//#define asfs_debug(fmt,arg...) printk(fmt,##arg)  /* general debug infos */
++
++#if !defined (__BIG_ENDIAN) && !defined (__LITTLE_ENDIAN)
++#error Endianes must be known for ASFS to work. Sorry.
++#endif
++
++#define ASFS_DEFAULT_UID 0
++#define ASFS_DEFAULT_GID 0
++#define ASFS_DEFAULT_MODE 0644	/* default permission bits for files, dirs have same permission, but with "x" set */
++
++/* Extent structure located in RAM (e.g. inside inode structure), 
++   currently used to store last used extent */
++
++struct inramExtent {
++	u32 startblock;	/* Block from begginig of the file */
++	u32 key;
++	u32 next;
++	u16 blocks;
++};
++
++/* inode in-kernel data */
++
++struct asfs_inode_info {
++	u32 firstblock;
++	u32 hashtable;
++	int modified;
++	loff_t mmu_private;
++	struct inramExtent ext_cache;
++	struct inode vfs_inode;
++};
++
++/* short cut to get to the asfs specific inode data */
++static inline struct asfs_inode_info *ASFS_I(struct inode *inode)
++{
++   return list_entry(inode, struct asfs_inode_info, vfs_inode);
++}
++
++/* Amiga SFS superblock in-core data */
++
++struct asfs_sb_info {
++	u32 totalblocks;
++	u32 rootobjectcontainer;
++	u32 extentbnoderoot;
++	u32 objectnoderoot;
++
++	u32 adminspacecontainer;
++	u32 bitmapbase;
++	u32 freeblocks;
++	u32 blocks_inbitmap;
++	u32 blocks_bitmap;
++	u32 block_rovingblockptr;
++
++	uid_t uid;
++	gid_t gid;
++	umode_t mode;
++	u16 flags;
++	char *prefix;
++	char *root_volume;		/* Volume prefix for absolute symlinks. */
++};
++
++/* short cut to get to the asfs specific sb data */
++static inline struct asfs_sb_info *ASFS_SB(struct super_block *sb)
++{
++	return sb->s_fs_info;
++}
++ 
++/* io inline code */
++
++u32 asfs_calcchecksum(void *block, u32 blocksize);
++
++static inline int
++asfs_check_block(struct fsBlockHeader *block, u32 blocksize, u32 n, u32 id)
++{
++	if (asfs_calcchecksum(block, blocksize) ==
++	    be32_to_cpu(((struct fsBlockHeader *) block)->checksum) &&
++	    n == be32_to_cpu(((struct fsBlockHeader *) block)->ownblock) &&
++	    id == be32_to_cpu(((struct fsBlockHeader *) block)->id))
++		return TRUE;
++	return FALSE;
++}
++
++/* get fs structure from block and do some checks... */
++static inline struct buffer_head *
++asfs_breadcheck(struct super_block *sb, u32 n, u32 type)
++{
++	struct buffer_head *bh;
++	if ((bh = sb_bread(sb, n))) {
++		if (asfs_check_block ((void *)bh->b_data, sb->s_blocksize, n, type)) {
++			return bh;	/* all okay */
++		}
++		brelse(bh);
++	}
++	return NULL;		/* error */
++}
++
++static inline struct buffer_head *
++asfs_getzeroblk(struct super_block *sb, int block)
++{
++	struct buffer_head *bh;
++	bh = sb_getblk(sb, block);
++	lock_buffer(bh);
++	memset(bh->b_data, 0, sb->s_blocksize);
++	set_buffer_uptodate(bh);
++	unlock_buffer(bh);
++	return bh;
++}
++
++static inline void 
++asfs_bstore(struct super_block *sb, struct buffer_head *bh)
++{
++	((struct fsBlockHeader *) (bh->b_data))->checksum =
++	    cpu_to_be32(asfs_calcchecksum(bh->b_data, sb->s_blocksize));
++	mark_buffer_dirty(bh);
++}
++
++static inline void asfs_brelse(struct buffer_head *bh)
++{
++	brelse(bh);
++}
++
++static inline void dec_count(struct inode *inode)
++{
++	inode->i_nlink--;
++	mark_inode_dirty(inode);
++}
++
++/* all prototypes */
++
++/* adminspace.c */
++int asfs_allocadminspace(struct super_block *sb, u32 * block);
++int asfs_freeadminspace(struct super_block *sb, u32 block);
++int asfs_markspace(struct super_block *sb, u32 block, u32 blocks);
++int asfs_freespace(struct super_block *sb, u32 block, u32 blocks);
++int asfs_findspace(struct super_block *sb, u32 maxneeded, u32 start, u32 end,
++	      u32 * returned_block, u32 * returned_blocks);
++
++/* dir.c */
++int asfs_readdir(struct file *filp, void *dirent, filldir_t filldir);
++struct dentry *asfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd);
++
++/* extents.c */
++int asfs_getextent(struct super_block *sb, u32 key, struct buffer_head **ret_bh,
++	      struct fsExtentBNode **ret_ebn);
++int asfs_deletebnode(struct super_block *sb, struct buffer_head *cb, u32 key);
++int asfs_deleteextents(struct super_block *sb, u32 key);
++int asfs_addblocks(struct super_block *sb, u16 blocks, u32 newspace,
++	      u32 objectnode, u32 * io_lastextentbnode);
++
++/* file.c */
++int asfs_readpage(struct file *file, struct page *page);
++sector_t asfs_bmap(struct address_space *mapping, sector_t block);
++int asfs_writepage(struct page *page, struct writeback_control *wbc);
++int asfs_prepare_write(struct file *file, struct page *page, unsigned from,
++		       unsigned to);
++void asfs_truncate(struct inode *inode);
++int asfs_file_open(struct inode *inode, struct file *filp);
++int asfs_file_release(struct inode *inode, struct file *filp);
++
++/* inode.c */
++struct inode *asfs_get_root_inode(struct super_block *sb);
++void asfs_read_locked_inode(struct inode *inode, void *arg);
++int asfs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd);
++int asfs_mkdir(struct inode *dir, struct dentry *dentry, int mode);
++int asfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname);
++int asfs_rmdir(struct inode *dir, struct dentry *dentry);
++int asfs_unlink(struct inode *dir, struct dentry *dentry);
++int asfs_rename(struct inode *old_dir, struct dentry *old_dentry,
++		struct inode *new_dir, struct dentry *new_dentry);
++int asfs_notify_change(struct dentry *dentry, struct iattr *attr);
++
++/* namei */
++u8 asfs_lowerchar(u8 c);
++int asfs_namecmp(u8 *s, u8 *ct, int casesensitive);
++u16 asfs_hash(u8 *name, int casesensitive);
++
++/* nodes */
++int asfs_getnode(struct super_block *sb, u32 nodeno,
++	    struct buffer_head **ret_bh, struct fsObjectNode **ret_node);
++int asfs_createnode(struct super_block *sb, struct buffer_head **returned_cb,
++	       struct fsNode **returned_node, u32 * returned_nodeno);
++int asfs_deletenode(struct super_block *sb, u32 objectnode);
++
++/* objects */
++struct fsObject *asfs_nextobject(struct fsObject *obj);
++struct fsObject *asfs_find_obj_by_name(struct super_block *sb,
++		struct fsObjectContainer *objcont, u8 * name);
++int asfs_readobject(struct super_block *sb, u32 objectnode,
++	       struct buffer_head **cb, struct fsObject **returned_object);
++int asfs_createobject(struct super_block *sb, struct buffer_head **io_cb,
++		 struct fsObject **io_o, struct fsObject *src_o,
++		 u8 * objname, int force);
++int asfs_deleteobject(struct super_block *sb, struct buffer_head *cb,
++		 struct fsObject *o);
++int asfs_renameobject(struct super_block *sb, struct buffer_head *cb1,
++		 struct fsObject *o1, struct buffer_head *cbparent,
++		 struct fsObject *oparent, u8 * newname);
++
++int asfs_addblockstofile(struct super_block *sb, struct buffer_head *objcb,
++		    struct fsObject *o, u32 blocks, u32 * newspace,
++		    u32 * addedblocks);
++int asfs_truncateblocksinfile(struct super_block *sb, struct buffer_head *bh,
++			 struct fsObject *o, u32 newsize);
++
++/* super.c */
++struct super_block *asfs_read_super(struct super_block *sb, void *data,
++				    int silent);
++void asfs_put_super(struct super_block *sb);
++int asfs_statfs(struct super_block *sb, struct kstatfs *buf);
++int asfs_remount(struct super_block *sb, int *flags, char *data);
++struct inode *asfs_alloc_inode(struct super_block *sb);
++void asfs_destroy_inode(struct inode *inode);
++
++/* symlink.c */
++int asfs_symlink_readpage(struct file *file, struct page *page);
++int asfs_write_symlink(struct inode *symfile, const char *symname);
++
++#endif
+diff -urN linux-2.6.3/fs/asfs/bitfuncs.c linux-2.6.3-asfs-1.0b7/fs/asfs/bitfuncs.c
+--- linux-2.6.3/fs/asfs/bitfuncs.c	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.3-asfs-1.0b7/fs/asfs/bitfuncs.c	2004-06-14 17:38:04.000000000 +0200
+@@ -0,0 +1,171 @@
++/*
++ *
++ * 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.
++ *
++ */
++
++#include <linux/types.h>
++#include <asm/byteorder.h>
++#include "bitfuncs.h"
++
++/* Bitmap (bm) functions:
++   These functions perform bit-operations on regions of memory which
++   are a multiple of 4 bytes in length. Bitmap is in bigendian byte order.
++*/
++
++/* This function finds the first set bit in a region of memory starting
++   with /bitoffset/.  The region of memory is /longs/ longs long.  It
++   returns the bitoffset of the first set bit it finds. */
++
++int bmffo(u32 *bitmap, int longs, int bitoffset)
++{
++	u32 *scan = bitmap;
++	int longoffset, bit;
++
++	longoffset = bitoffset >> 5;
++	longs -= longoffset;
++	scan += longoffset;
++
++	bitoffset = bitoffset & 0x1F;
++
++	if (bitoffset != 0) {
++		if ((bit = bfffo(be32_to_cpu(*scan), bitoffset)) >= 0) {
++			return (bit + ((scan - bitmap) << 5));
++		}
++		scan++;
++		longs--;
++	}
++
++	while (longs-- > 0) {
++		if (*scan++ != 0) {
++			return (bfffo(be32_to_cpu(*--scan), 0) + ((scan - bitmap) << 5));
++		}
++	}
++
++	return (-1);
++}
++
++/* This function finds the first unset bit in a region of memory starting
++   with /bitoffset/.  The region of memory is /longs/ longs long.  It
++   returns the bitoffset of the first unset bit it finds. */
++
++int bmffz(u32 *bitmap, int longs, int bitoffset)
++{
++	u32 *scan = bitmap;
++	int longoffset, bit;
++
++	longoffset = bitoffset >> 5;
++	longs -= longoffset;
++	scan += longoffset;
++
++	bitoffset = bitoffset & 0x1F;
++
++	if (bitoffset != 0) {
++		if ((bit = bfffz(be32_to_cpu(*scan), bitoffset)) >= 0) {
++			return (bit + ((scan - bitmap) << 5));
++		}
++		scan++;
++		longs--;
++	}
++
++	while (longs-- > 0) {
++		if (*scan++ != 0xFFFFFFFF) {
++			return (bfffz(be32_to_cpu(*--scan), 0) + ((scan - bitmap) << 5));
++		}
++	}
++
++	return (-1);
++}
++
++/* This function clears /bits/ bits in a region of memory starting
++   with /bitoffset/.  The region of memory is /longs/ longs long.  If
++   the region of memory is too small to clear /bits/ bits then this
++   function exits after having cleared all bits till the end of the
++   memory region.  In any case it returns the number of bits which
++   were actually cleared. */
++
++int bmclr(u32 *bitmap, int longs, int bitoffset, int bits)
++{
++	u32 *scan = bitmap;
++	int longoffset;
++	int orgbits = bits;
++
++	longoffset = bitoffset >> 5;
++	longs -= longoffset;
++	scan += longoffset;
++
++	bitoffset = bitoffset & 0x1F;
++
++	if (bitoffset != 0) {
++		if (bits < 32) {
++			*scan = cpu_to_be32(bfclr(be32_to_cpu(*scan), bitoffset, bits));
++		} else {
++			*scan = cpu_to_be32(bfclr(be32_to_cpu(*scan), bitoffset, 32));
++		}
++		scan++;
++		longs--;
++		bits -= 32 - bitoffset;
++	}
++
++	while (bits > 0 && longs-- > 0) {
++		if (bits > 31) {
++			*scan++ = 0;
++		} else {
++			*scan = cpu_to_be32(bfclr(be32_to_cpu(*scan), 0, bits));
++		}
++		bits -= 32;
++	}
++
++	if (bits <= 0) {
++		return (orgbits);
++	}
++	return (orgbits - bits);
++}
++
++/* This function sets /bits/ bits in a region of memory starting
++   with /bitoffset/.  The region of memory is /longs/ longs long.  If
++   the region of memory is too small to set /bits/ bits then this
++   function exits after having set all bits till the end of the
++   memory region.  In any case it returns the number of bits which
++   were actually set. */
++
++int bmset(u32 *bitmap, int longs, int bitoffset, int bits)
++{
++	u32 *scan = bitmap;
++	int longoffset;
++	int orgbits = bits;
++
++	longoffset = bitoffset >> 5;
++	longs -= longoffset;
++	scan += longoffset;
++
++	bitoffset = bitoffset & 0x1F;
++
++	if (bitoffset != 0) {
++		if (bits < 32) {
++			*scan = cpu_to_be32(bfset(be32_to_cpu(*scan), bitoffset, bits));
++		} else {
++			*scan = cpu_to_be32(bfset(be32_to_cpu(*scan), bitoffset, 32));
++		}
++		scan++;
++		longs--;
++		bits -= 32 - bitoffset;
++	}
++
++	while (bits > 0 && longs-- > 0) {
++		if (bits > 31) {
++			*scan++ = 0xFFFFFFFF;
++		} else {
++			*scan = cpu_to_be32(bfset(be32_to_cpu(*scan), 0, bits));
++		}
++		bits -= 32;
++	}
++
++	if (bits <= 0) {
++		return (orgbits);
++	}
++	return (orgbits - bits);
++}
+diff -urN linux-2.6.3/fs/asfs/bitfuncs.h linux-2.6.3-asfs-1.0b7/fs/asfs/bitfuncs.h
+--- linux-2.6.3/fs/asfs/bitfuncs.h	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.3-asfs-1.0b7/fs/asfs/bitfuncs.h	2004-06-10 18:57:14.000000000 +0200
+@@ -0,0 +1,58 @@
++/*
++ *
++ * 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.
++ *
++ */
++
++#ifndef __BITFUNCS_H
++#define __BITFUNCS_H
++
++#include <linux/types.h>
++#include <asm/byteorder.h>
++
++#include <asm/bitops.h>
++
++/* Finds first set bit in /data/ starting at /bitoffset/.  This function
++   considers the MSB to be the first bit. */
++static inline int bfffo(u32 data, int bitoffset)
++{
++	u32 mask = 0xffffffff >> bitoffset;
++	data &= mask;
++	return data == 0 ? -1 : 32-fls(data);
++}
++
++/* Finds first zero bit in /data/ starting at /bitoffset/.  This function
++   considers the MSB to be the first bit. */
++static inline int bfffz(u32 data, int bitoffset)
++{
++	return bfffo(~data, bitoffset);
++}
++
++/* Sets /bits/ bits starting from /bitoffset/ in /data/.
++   /bits/ must be between 1 and 32. */
++static inline u32 bfset(u32 data, int bitoffset, int bits)
++{
++	u32 mask = ~((1 << (32 - bits)) - 1);
++	mask >>= bitoffset;
++	return data | mask;
++}
++
++/* Clears /bits/ bits starting from /bitoffset/ in /data/.
++   /bits/ must be between 1 and 32. */
++static inline u32 bfclr(u32 data, int bitoffset, int bits)
++{
++	u32 mask = ~((1 << (32 - bits)) - 1);
++	mask >>= bitoffset;
++	return data & ~mask;
++}
++
++/* bm??? functions assumes that in-memory bitmap is in bigendian byte order */
++int bmffo(u32 *, int, int);
++int bmffz(u32 *, int, int);
++int bmclr(u32 *, int, int, int);
++int bmset(u32 *, int, int, int);
++
++#endif
+diff -urN linux-2.6.3/fs/asfs/Changes linux-2.6.3-asfs-1.0b7/fs/asfs/Changes
+--- linux-2.6.3/fs/asfs/Changes	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.3-asfs-1.0b7/fs/asfs/Changes	2004-06-25 22:44:01.646070896 +0200
+@@ -0,0 +1,101 @@
++
++Amiga Smart File System, Linux implementation
++
++Please direct bug reports to: marek at amiga.pl
++
++History:
++
++v1.0beta7 (25.06.2004)
++- small changes in documentation
++- code clean up: bitfuncs.c, super.c, inode.c, *.h, Makefile, added 
++  asfs_ prefix to function names, made some functions static
++  (big thanks to Christoph Hellwig for advice!)
++- fixed minor bugs (inode leak in super.c, not-realesed buffer during 
++  object renaming in inode.c)
++- now files/dirs are created with global ownership/permission bits
++
++v1.0beta6 (04.06.2004)
++- fixed: ASFS_SB(sb)->flags was always zero in 2.6.x code
++
++v1.0beta5 (07.05.2004)
++- finally fixed a problem with file size attrib. not being written
++  to disk
++- fixed some problems with GCC 3.x and debug enabled
++
++v1.0beta4 (12.04.2004)
++- removed dummy asfs_notify_change (this fixes major bug introduced
++  in 1.0beta3 - file size wasn't written to disk) until it will 
++  be implemented completely
++
++v1.0beta3 (22.03.2004) - still beta
++- updated for 2.6.x kernels VFS changes
++- code clean-up 
++- added dummy asfs_notify_change (chmod now returns no errors)
++- added symlinks write support
++- fixed: ASFS_SB(sb)->flags was always zero
++
++v1.0beta2 (11.01.2004) - special version for Pegasos][ kernel
++- separated read and write functions, can be compiled also
++  as read-only fs
++
++v1.0beta1 (02.12.2003) - first public beta with write support
++- added dentry hashing/comparing routines
++- code clean-up
++
++v1.0aplha4 (30.11.2003) - preparing for first public beta
++- fixed some problems with renaming/moving files
++- fixed two major bugs, which didn't occur when fs was mounted
++  on loopback device (newly allocated blocks were not written to
++  disk and state bits were not set correctly on newly mapped file
++  blocks)
++- fixed many small bugs in io code (some buffers were not freed)
++- added/modified sb locks in asfs_lookup and asfs_getblock
++- fixed serious bug in file block allocation routines
++
++v1.0aplha3 (23.11.2003)
++- added (hopefully) all byteswap code, should now work again on 
++  little-endian systems (also with write support!)
++- updated documentation
++
++v1.0alpha2 (13.11.2003) 
++- now alocates file blocks in chunks during one request
++- fixed some dead-locks, other fixes
++
++v1.0alpha (02.11.2003) - first working version with full write support
++- too much to list it here ;)
++
++... (working on write support)
++
++v0.7 (12.10.2003) - internal realase
++- added asfs_breadcheck, modified asfs_get_node, asfs_search_BTree, 
++  no more from_be32/16 macros, other...
++- code splitted into several files
++
++v0.6 (04.09.2003) - final read-only version
++- added support for HashTables, directory scaning should be
++  MUCH faster now
++- added checking of block IDs before reading any data from block
++
++v0.5 (19.07.2003)
++- added simple but effective extent cache - real speed-up 
++  in reading large files
++- added read support for symlinks - based on AFFS symlinks
++
++v0.4 (10.07.2003)
++- third code clean-up (thanks to Roman Zippel for advice)
++- now uses generic readpage and readinode routines
++
++v0.3beta (17.06.2003)
++- second code clean-up
++
++v0.2beta2 (15.06.2003)
++- fixed yet another stupid bug - driver can't read root block on little-endian systems
++v0.2beta (15.06.2003)
++- fixed stupid bug - now files have 'file' flag (S_IFREG) set...
++- added mount options to set uid, gid and mode of files and dirs
++- made hidden files & dirs really hidden (= not listed in directories)
++- code clean-up
++
++v0.1beta (11.06.2003) 
++- after many kernel crashes, finally got it! 
++- first working read-only filesystem driver
+diff -urN linux-2.6.3/fs/asfs/dir.c linux-2.6.3-asfs-1.0b7/fs/asfs/dir.c
+--- linux-2.6.3/fs/asfs/dir.c	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.3-asfs-1.0b7/fs/asfs/dir.c	2004-06-17 00:44:35.000000000 +0200
+@@ -0,0 +1,217 @@
++/*
++ *
++ * Amiga Smart File System, Linux implementation
++ * version: 1.0beta7
++ *
++ * Copyright (C) 2003,2004  Marek 'March' Szyprowski <marek at amiga.pl>
++ *
++ *
++ * 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.
++ *
++ */
++
++#include <linux/types.h>
++#include <linux/errno.h>
++#include <linux/slab.h>
++#include <linux/fs.h>
++#include <linux/buffer_head.h>
++#include <linux/vfs.h>
++#include "asfs_fs.h"
++
++#include <asm/byteorder.h>
++
++extern struct dentry_operations asfs_dentry_operations;
++
++int asfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
++{
++	struct inode *dir = filp->f_dentry->d_inode;
++	struct super_block *sb = dir->i_sb;
++	unsigned long f_pos;
++	int stored = 0;
++
++	struct buffer_head *bh;
++	struct fsObjectContainer *objcont;
++	struct fsObject *obj;
++	u32 block;
++	int startnode;
++	int add;
++
++	asfs_debug("asfs_readdir:\n");
++
++	if (filp->f_pos == ASFS_SB(sb)->totalblocks)
++		return stored;
++
++	f_pos = filp->f_pos;
++
++	if (f_pos == 0) {
++		filp->private_data = (void *)0;
++		if (filldir(dirent, ".", 1, f_pos, dir->i_ino, DT_DIR) < 0)
++			return 0;
++		filp->f_pos = f_pos = 1;
++		stored++;
++	}
++	if (f_pos == 1) {
++		if (filldir(dirent, "..", 2, f_pos, parent_ino(filp->f_dentry), DT_DIR) < 0)
++			return stored;
++		filp->f_pos = f_pos = 2;
++		stored++;
++	}
++
++	if (ASFS_I(dir)->firstblock == 0) {	/* empty directory */
++		filp->f_pos = ASFS_SB(sb)->totalblocks;
++		ASFS_I(dir)->modified = 0;
++		return stored;
++	}
++
++	if (f_pos == 2) {	/* reading directory from its beginning */
++		block = ASFS_I(dir)->firstblock;
++		add = 1;
++		startnode = 0;
++	} else {
++		startnode = (int)filp->private_data;
++		add = 0;
++		if (ASFS_I(dir)->modified == 0)
++			block = f_pos;
++		else
++			block = ASFS_I(dir)->firstblock;
++	}
++
++	do {
++		if (!(bh = asfs_breadcheck(sb, block, ASFS_OBJECTCONTAINER_ID)))
++			return stored;
++		objcont = (struct fsObjectContainer *) bh->b_data;
++		obj = &(objcont->object[0]);
++
++		while (be32_to_cpu(obj->objectnode) > 0 && 
++		      ((char *)obj - (char *)objcont) + sizeof(struct fsObject) + 2 < sb->s_blocksize) {
++
++			if (!add && be32_to_cpu(obj->objectnode) == startnode)
++				add++;
++
++			if (add && !(obj->bits & OTYPE_HIDDEN)) {
++				unsigned int type;
++				asfs_debug("ASFS: DirFilling: entry #%d \"%s\" (node %u offset %u), type %x\n", \
++				           stored, obj->name, be32_to_cpu(obj->objectnode), block, obj->bits);
++				filp->f_pos = block;
++
++				if (obj->bits & OTYPE_DIR)
++					type = DT_DIR;
++				else if (obj->bits & OTYPE_LINK && !(obj->bits & OTYPE_HARDLINK))
++					type = DT_LNK;
++				else
++					type = DT_REG;
++
++				if (filldir(dirent, obj->name, strlen(obj->name), block, be32_to_cpu(obj->objectnode), type) < 0) {
++					filp->private_data = (void *)be32_to_cpu(obj->objectnode);
++					ASFS_I(dir)->modified = 0;
++					asfs_debug("ASFS: DirFilling: to be continued...\n");
++					asfs_brelse(bh);
++					return stored;
++				}
++				stored++;
++			}
++			obj = asfs_nextobject(obj);
++		}
++		block = be32_to_cpu(objcont->next);
++		asfs_brelse(bh);
++
++	} while (block != 0);
++
++	filp->f_pos = ASFS_SB(sb)->totalblocks;
++	ASFS_I(dir)->modified = 0;
++
++	return stored;
++}
++
++struct dentry *asfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
++{
++	int res = -EACCES;       /* placeholder for "no data here" */
++	struct inode *inode;
++	struct super_block *sb = dir->i_sb;
++	u8 *name = (u8 *) dentry->d_name.name;
++	struct buffer_head *bh;
++	struct fsObject *obj;
++
++	asfs_debug("asfs_lookup: (searching \"%s\"...) ", name);
++
++	lock_super(sb);
++
++	if (ASFS_I(dir)->hashtable != 0) {	/* hashtable block is available, quick search */
++		struct fsObjectNode *node_p;
++		struct buffer_head *node_bh;
++		u32 node;
++		u16 hash16;
++
++		asfs_debug("(quick search) ");
++
++		if (!(bh = asfs_breadcheck(sb, ASFS_I(dir)->hashtable, ASFS_HASHTABLE_ID))) {
++			unlock_super(sb);
++			return ERR_PTR(res);
++		}
++		hash16 = asfs_hash(name, ASFS_SB(sb)->flags & ASFS_ROOTBITS_CASESENSITIVE); 
++		node = be32_to_cpu(((struct fsHashTable *) bh->b_data)->hashentry[HASHCHAIN(hash16)]);
++		asfs_brelse(bh);
++
++		while (node != 0) {
++			if (asfs_getnode(sb, node, &node_bh, &node_p) != 0)
++				goto not_found;
++			if (be16_to_cpu(node_p->hash16) == hash16) {
++				if (!(bh = asfs_breadcheck(sb, be32_to_cpu(node_p->node.data), ASFS_OBJECTCONTAINER_ID))) {
++					asfs_brelse(node_bh);
++					unlock_super(sb);
++					return ERR_PTR(res);
++				}
++				if ((obj = asfs_find_obj_by_name(sb, (struct fsObjectContainer *) bh->b_data, name)) != NULL) {
++					asfs_brelse(node_bh);
++					goto found_inode;
++				}
++				asfs_brelse(bh);
++			}
++			node = be32_to_cpu(node_p->next);
++			asfs_brelse(node_bh);
++		}
++	} else { /* hashtable not available, long search */
++		struct fsObjectContainer *objcont;
++		u32 block;
++
++		asfs_debug("(long search) ");
++
++		block = ASFS_I(dir)->firstblock;
++		while (block != 0) {
++			if (!(bh = asfs_breadcheck(sb, block, ASFS_OBJECTCONTAINER_ID))) {
++				unlock_super(sb);
++				return ERR_PTR(res);
++			}
++			objcont = (struct fsObjectContainer *) bh->b_data;
++			if ((obj = asfs_find_obj_by_name(sb, objcont, name)) != NULL)
++				goto found_inode;
++			block = be32_to_cpu(objcont->next);
++			asfs_brelse(bh);
++		}
++	}
++
++not_found:
++	unlock_super(sb);
++	inode = NULL;
++	asfs_debug("object not found.\n");
++	if (0) {
++found_inode:
++		unlock_super(sb);
++		if (!(inode = iget_locked(sb, be32_to_cpu(obj->objectnode)))) {
++			asfs_debug("ASFS: Strange - no inode allocated.\n");
++			return ERR_PTR(res);
++		}
++		if (inode->i_state & I_NEW) {
++			asfs_read_locked_inode(inode, obj);
++			unlock_new_inode(inode);
++		}
++		asfs_brelse(bh);
++	}
++	res = 0;
++	dentry->d_op = &asfs_dentry_operations;
++	d_add(dentry, inode);
++	return ERR_PTR(res);
++}
+diff -urN linux-2.6.3/fs/asfs/extents.c linux-2.6.3-asfs-1.0b7/fs/asfs/extents.c
+--- linux-2.6.3/fs/asfs/extents.c	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.3-asfs-1.0b7/fs/asfs/extents.c	2004-06-10 17:56:26.000000000 +0200
+@@ -0,0 +1,586 @@
++/*
++ *
++ * Amiga Smart File System, Linux implementation
++ * version: 1.0beta7
++ *
++ * This file contains some parts of the original amiga version of 
++ * SmartFilesystem source code.
++ *
++ * SmartFilesystem is copyrighted (C) 2003 by: John Hendrikx, 
++ * Ralph Schmidt, Emmanuel Lesueur, David Gerber and Marcin Kurek
++ * 
++ * Adapted and modified by Marek 'March' Szyprowski <marek at amiga.pl>
++ *
++ */
++
++#include <linux/types.h>
++#include <linux/errno.h>
++#include <linux/slab.h>
++#include <linux/fs.h>
++#include <linux/buffer_head.h>
++#include <linux/vfs.h>
++#include "asfs_fs.h"
++
++#include <asm/byteorder.h>
++
++	/* This function looks for the BNode equal to the key.  If no
++	   exact match is available then the BNode which is slightly
++	   lower than key will be returned.  If no such BNode exists
++	   either, then the first BNode in this block is returned.
++
++	   This function will return the first BNode even if there
++	   are no BNode's at all in this block (this can only happen
++	   for the Root of the tree).  Be sure to check if the Root
++	   is not empty before calling this function. */
++
++static struct BNode *searchforbnode(u32 key, struct BTreeContainer *tc)
++{
++	struct BNode *tn;
++	s16 n = be16_to_cpu(tc->nodecount) - 1;
++
++	tn = (struct BNode *) ((u8 *) tc->bnode + n * tc->nodesize);
++	for (;;) {
++		if (n <= 0 || key >= be32_to_cpu(tn->key))
++			return tn;
++
++		tn = (struct BNode *) ((u8 *) tn - tc->nodesize);
++		n--;
++	}
++}
++
++/* This function finds the BNode with the given key.  If no exact match can be
++   found then this function will return either the next or previous closest
++   match (don't rely on this).
++
++   If there were no BNode's at all, then *returned_bh will be NULL. */
++
++static int findbnode(struct super_block *sb, u32 key, struct buffer_head **returned_bh, struct BNode **returned_bnode)
++{
++	u32 rootblock = ASFS_SB(sb)->extentbnoderoot;
++
++	asfs_debug("findbnode: Looking for BNode with key %d\n", key);
++
++	while ((*returned_bh = asfs_breadcheck(sb, rootblock, ASFS_BNODECONTAINER_ID))) {
++		struct fsBNodeContainer *bnc = (void *) (*returned_bh)->b_data;
++		struct BTreeContainer *btc = &bnc->btc;
++
++		if (btc->nodecount == 0) {
++			*returned_bnode = NULL;
++			break;
++		}
++
++		*returned_bnode = searchforbnode(key, btc);
++		if (btc->isleaf == TRUE)
++			break;
++
++		rootblock = be32_to_cpu((*returned_bnode)->data);
++		asfs_brelse(*returned_bh);
++	}
++
++	if (*returned_bh == NULL)
++		return -EIO;
++
++	return 0;
++}
++
++int asfs_getextent(struct super_block *sb, u32 key, struct buffer_head **ret_bh, struct fsExtentBNode **ret_ebn)
++{
++	int result;
++	if ((result = findbnode(sb, key, ret_bh, (struct BNode **)ret_ebn)) == 0) 
++		if (be32_to_cpu((*ret_ebn)->key) != key) {
++			brelse(*ret_bh);
++			*ret_bh = NULL;
++			return -ENOENT;
++		}
++
++	return result;
++}
++
++#ifdef CONFIG_ASFS_RW
++
++	/* This routine inserts a node sorted into a BTreeContainer.  It does
++	   this by starting at the end, and moving the nodes one by one to
++	   a higher slot until the empty slot has the correct position for
++	   this key.  Donot use this function on completely filled
++	   BTreeContainers! */
++
++static struct BNode *insertbnode(u32 key, struct BTreeContainer *btc)
++{
++	struct BNode *bn;
++	bn = (struct BNode *) ((u8 *) btc->bnode + btc->nodesize * (be16_to_cpu(btc->nodecount) - 1));
++
++	for (;;) {
++		if (bn < btc->bnode || key > be32_to_cpu(bn->key)) {
++			bn = (struct BNode *) ((u8 *) bn + btc->nodesize);
++			bn->key = cpu_to_be32(key);
++			btc->nodecount = cpu_to_be16(be16_to_cpu(btc->nodecount) + 1);
++			break;
++		} else 
++			memmove((u8 *)bn + btc->nodesize, bn, btc->nodesize);
++
++		bn = (struct BNode *) ((u8 *) bn - btc->nodesize);
++	}
++
++	return bn;
++}
++
++static int getparentbtreecontainer(struct super_block *sb, struct buffer_head *bh, struct buffer_head **parent_bh)
++{
++	u32 rootblock = ASFS_SB(sb)->extentbnoderoot;
++	u32 childkey = be32_to_cpu(((struct fsBNodeContainer *) bh->b_data)->btc.bnode[0].key);
++	u32 childblock = be32_to_cpu(((struct fsBNodeContainer *) bh->b_data)->bheader.ownblock);
++
++	asfs_debug("getparentbtreecontainer: Getting parent of block %d\n", childblock);
++
++	/* This function gets the BTreeContainer parent of the passed in buffer_head. If
++	   there is no parent this function sets dest_cont io_bh to NULL */
++
++	if (rootblock != childblock) {
++		while ((*parent_bh = asfs_breadcheck(sb, rootblock, ASFS_BNODECONTAINER_ID))) {
++			struct fsBNodeContainer *bnc = (void *) (*parent_bh)->b_data;
++			struct BTreeContainer *btc = &bnc->btc;
++			struct BNode *bn;
++			s16 n = be16_to_cpu(btc->nodecount);
++
++			if (btc->isleaf == TRUE) {
++				asfs_brelse(*parent_bh);
++				break;
++			}
++
++			while (n-- > 0)
++				if (be32_to_cpu(btc->bnode[n].data) == childblock)
++					return 0;	/* Found parent!! */
++
++			bn = searchforbnode(childkey, btc);	/* This searchforbnode() doesn't have to get EXACT key matches. */
++			rootblock = be32_to_cpu(bn->data);
++			asfs_brelse(*parent_bh);
++		}
++		if (*parent_bh == NULL)
++			return -EIO;
++	}
++
++	*parent_bh = NULL;
++	return 0;
++}
++
++/* Spits a btreecontainer. It realses passed in bh! */
++
++static int splitbtreecontainer(struct super_block *sb, struct buffer_head *bh)
++{
++	struct buffer_head *bhparent;
++	struct BNode *bn;
++	int errorcode;
++
++	asfs_debug("splitbtreecontainer: splitting block %u\n", be32_to_cpu(((struct fsBlockHeader *) bh->b_data)->ownblock));
++
++	if ((errorcode = getparentbtreecontainer(sb, bh, &bhparent)) == 0) {
++		if (bhparent == NULL) {
++			u32 newbcontblock;
++			u32 bcontblock;
++			/* We need to create Root tree-container - adding new level to extent tree */
++
++			asfs_debug("splitbtreecontainer: creating root tree-container.\n");
++
++			bhparent = bh;
++			if ((errorcode = asfs_allocadminspace(sb, &newbcontblock)) == 0 && (bh = asfs_getzeroblk(sb, newbcontblock))) {
++				struct fsBNodeContainer *bnc = (void *) bh->b_data;
++				struct fsBNodeContainer *bncparent = (void *) bhparent->b_data;
++				struct BTreeContainer *btcparent = &bncparent->btc;
++
++				bcontblock = be32_to_cpu(bncparent->bheader.ownblock);
++				memcpy(bh->b_data, bhparent->b_data, sb->s_blocksize);
++				bnc->bheader.ownblock = cpu_to_be32(newbcontblock);
++				asfs_bstore(sb, bh);
++
++				memset(bhparent->b_data, '\0', sb->s_blocksize);	/* Not strictly needed, but makes things more clear. */
++				bncparent->bheader.id = cpu_to_be32(ASFS_BNODECONTAINER_ID);
++				bncparent->bheader.ownblock = cpu_to_be32(bcontblock);
++				btcparent->isleaf = FALSE;
++				btcparent->nodesize = sizeof(struct BNode);
++				btcparent->nodecount = 0;
++
++				bn = insertbnode(0, btcparent);
++				bn->data = cpu_to_be32(newbcontblock);
++
++				asfs_bstore(sb, bhparent);
++			}
++			if (bh == NULL)
++				errorcode = -EIO;
++		}
++
++		if (errorcode == 0) {
++			struct fsBNodeContainer *bncparent = (void *) bhparent->b_data;
++			struct BTreeContainer *btcparent = &bncparent->btc;
++			int branches1 = (sb->s_blocksize - sizeof(struct fsBNodeContainer)) / btcparent->nodesize;
++
++			if (be16_to_cpu(btcparent->nodecount) == branches1) {
++				/* We need to split the parent tree-container first! */
++				if ((errorcode = splitbtreecontainer(sb, bhparent)) == 0) {
++					/* bhparent might have changed after the split and has been released */
++					if ((errorcode = getparentbtreecontainer(sb, bh, &bhparent)) == 0) {	
++						bncparent = (void *) bhparent->b_data;
++						btcparent = &bncparent->btc;
++					}
++				}
++			}
++
++			if (errorcode == 0) {
++				u32 newbcontblock;
++				struct buffer_head *bhnew;
++
++				/* We can split this container and add it to the parent
++				   because the parent has enough room. */
++
++				if ((errorcode = asfs_allocadminspace(sb, &newbcontblock)) == 0 && (bhnew = asfs_getzeroblk(sb, newbcontblock))) {
++					struct fsBNodeContainer *bncnew = (void *) bhnew->b_data;
++					struct BTreeContainer *btcnew = &bncnew->btc;
++					struct fsBNodeContainer *bnc = (void *) bh->b_data;
++					struct BTreeContainer *btc = &bnc->btc;
++					int branches2 = (sb->s_blocksize - sizeof(struct fsBNodeContainer)) / btc->nodesize;
++					u32 newkey;
++
++					bncnew->bheader.id = cpu_to_be32(ASFS_BNODECONTAINER_ID);
++					bncnew->bheader.ownblock = cpu_to_be32(newbcontblock);
++
++					btcnew->isleaf = btc->isleaf;
++					btcnew->nodesize = btc->nodesize;
++
++					btcnew->nodecount = cpu_to_be16(branches2 - branches2 / 2);
++
++					memcpy(btcnew->bnode, (u8 *) btc->bnode + branches2 / 2 * btc->nodesize, (branches2 - branches2 / 2) * btc->nodesize);
++					newkey = be32_to_cpu(btcnew->bnode[0].key);
++
++					asfs_bstore(sb, bhnew);
++					asfs_brelse(bhnew);
++
++					btc->nodecount = cpu_to_be16(branches2 / 2);
++					asfs_bstore(sb, bh);
++
++					bn = insertbnode(newkey, btcparent);
++					bn->data = cpu_to_be32(newbcontblock);
++					asfs_bstore(sb, bhparent);
++				}
++			}
++		}
++		asfs_brelse(bhparent);
++	}
++	asfs_brelse(bh);
++
++	return errorcode;
++}
++
++/* Returns created extentbnode - returned_bh need to saved and realesed in caller funkction! */
++
++int createextentbnode(struct super_block *sb, u32 key, struct buffer_head **returned_bh, struct BNode **returned_bnode)
++{
++	int errorcode;
++
++	asfs_debug("createbnode: Creating BNode with key %d\n", key);
++
++	while ((errorcode = findbnode(sb, key, returned_bh, returned_bnode)) == 0) {
++		struct fsBNodeContainer *bnc = (void *) (*returned_bh)->b_data;
++		struct BTreeContainer *btc = &bnc->btc;
++		int extbranches = (sb->s_blocksize - sizeof(struct fsBNodeContainer)) / btc->nodesize;
++
++		asfs_debug("createbnode: findbnode found block %d\n", be32_to_cpu(((struct fsBlockHeader *) (*returned_bh)->b_data)->ownblock));
++
++		if (be16_to_cpu(btc->nodecount) < extbranches) {
++			/* Simply insert new node in this BTreeContainer */
++			asfs_debug("createbnode: Simple insert\n");
++			*returned_bnode = insertbnode(key, btc);
++			break;
++		} else if ((errorcode = splitbtreecontainer(sb, *returned_bh)) != 0)
++			break;
++
++		/* Loop and try insert it the normal way again :-) */
++	}
++
++	return (errorcode);
++}
++
++
++/* This routine removes a node from a BTreeContainer indentified
++   by its key.  If no such key exists this routine does nothing.
++   It correctly handles empty BTreeContainers. */
++
++static void removebnode(u32 key, struct BTreeContainer *btc)
++{
++	struct BNode *bn = btc->bnode;
++	int n = 0;
++
++	asfs_debug("removebnode: key %d\n", key);
++
++	while (n < be16_to_cpu(btc->nodecount)) {
++		if (be32_to_cpu(bn->key) == key) {
++			btc->nodecount = cpu_to_be16(be16_to_cpu(btc->nodecount) - 1);
++			memmove(bn, (u8 *) bn + btc->nodesize, (be16_to_cpu(btc->nodecount) - n) * btc->nodesize);
++			break;
++		}
++		bn = (struct BNode *) ((u8 *) bn + btc->nodesize);
++		n++;
++	}
++}
++
++int asfs_deletebnode(struct super_block *sb, struct buffer_head *bh, u32 key)
++{
++	struct fsBNodeContainer *bnc1 = (void *) bh->b_data;
++	struct BTreeContainer *btc = &bnc1->btc;
++	u16 branches = (sb->s_blocksize - sizeof(struct fsBNodeContainer)) / btc->nodesize;
++	int errorcode = 0;
++
++	/* Deletes specified internal node. */
++
++	removebnode(key, btc);
++	asfs_bstore(sb, bh);
++
++	/* Now checks if the container still contains enough nodes,
++	   and takes action accordingly. */
++
++	asfs_debug("deletebnode: branches = %d, btc->nodecount = %d\n", branches, be16_to_cpu(btc->nodecount));
++
++	if (be16_to_cpu(btc->nodecount) < (branches + 1) / 2) {
++		struct buffer_head *bhparent;
++		struct buffer_head *bhsec;
++
++		/* nodecount has become to low.  We need to merge this Container
++		   with a neighbouring Container, or we need to steal a few nodes
++		   from a neighbouring Container. */
++
++		/* We get the parent of the container here, so we can find out what
++		   containers neighbour the container which currently hasn't got enough nodes. */
++
++		if ((errorcode = getparentbtreecontainer(sb, bh, &bhparent)) == 0) {
++			if (bhparent != NULL) {
++				struct fsBNodeContainer *bncparent = (void *) bhparent->b_data;
++				struct BTreeContainer *btcparent = &bncparent->btc;
++				s16 n;
++
++				asfs_debug("deletebnode: get parent returned block %d.\n", be32_to_cpu(((struct fsBlockHeader *) bhparent->b_data)->ownblock));
++
++				for (n = 0; n < be16_to_cpu(btcparent->nodecount); n++)
++					if (btcparent->bnode[n].data == bnc1->bheader.ownblock)
++						break;
++				/* n is now the offset of our own bnode. */
++
++				if (n < be16_to_cpu(btcparent->nodecount) - 1) {	/* Check if we have a next neighbour. */
++					asfs_debug("deletebnode: using next container - merging blocks %d and %d\n", be32_to_cpu(bnc1->bheader.ownblock), be32_to_cpu(btcparent->bnode[n+1].data));
++
++					if ((bhsec = asfs_breadcheck(sb, be32_to_cpu(btcparent->bnode[n + 1].data), ASFS_BNODECONTAINER_ID))) {
++						struct fsBNodeContainer *bnc_next = (void *) bhsec->b_data;
++						struct BTreeContainer *btc_next = &bnc_next->btc;
++
++						if (be16_to_cpu(btc_next->nodecount) + be16_to_cpu(btc->nodecount) > branches) {	/* Check if we need to steal nodes. */
++							s16 nodestosteal = (be16_to_cpu(btc_next->nodecount) + be16_to_cpu(btc->nodecount)) / 2 - be16_to_cpu(btc->nodecount);
++
++							/* Merging them is not possible.  Steal a few nodes then. */
++							memcpy((u8 *) btc->bnode + be16_to_cpu(btc->nodecount) * btc->nodesize, btc_next->bnode, nodestosteal * btc->nodesize);
++							btc->nodecount = cpu_to_be16(be16_to_cpu(btc->nodecount) + nodestosteal);
++							asfs_bstore(sb, bh);
++
++							memcpy(btc_next->bnode, (u8 *) btc_next->bnode + btc_next->nodesize * nodestosteal,
++							       btc->nodesize * (be16_to_cpu(btc_next->nodecount) - nodestosteal));
++							btc_next->nodecount = cpu_to_be16(be16_to_cpu(btc_next->nodecount) - nodestosteal);
++							asfs_bstore(sb, bhsec);
++
++							btcparent->bnode[n + 1].key = btc_next->bnode[0].key;
++							asfs_bstore(sb, bhparent);
++						} else {	/* Merging is possible. */
++							memcpy((u8 *) btc->bnode + btc->nodesize * be16_to_cpu(btc->nodecount), btc_next->bnode, btc->nodesize * be16_to_cpu(btc_next->nodecount));
++							btc->nodecount = cpu_to_be16(be16_to_cpu(btc->nodecount) + be16_to_cpu(btc_next->nodecount));
++							asfs_bstore(sb, bh);
++
++							if ((errorcode = asfs_freeadminspace(sb, be32_to_cpu(((struct fsBlockHeader *) bhsec->b_data)->ownblock))) == 0)
++								errorcode = asfs_deletebnode(sb, bhparent, be32_to_cpu(btcparent->bnode[n + 1].key));
++						}
++						asfs_brelse(bhsec);
++					}
++				} else if (n > 0) {	/* Check if we have a previous neighbour. */
++					asfs_debug("deletebnode: using prev container.\n");
++
++					if ((bhsec = asfs_breadcheck(sb, be32_to_cpu(btcparent->bnode[n - 1].data), ASFS_BNODECONTAINER_ID)) == 0) {
++						struct fsBNodeContainer *bnc2 = (void *) bhsec->b_data;
++						struct BTreeContainer *btc2 = &bnc2->btc;
++
++						if (be16_to_cpu(btc2->nodecount) + be16_to_cpu(btc->nodecount) > branches) {
++							/* Merging them is not possible.  Steal a few nodes then. */
++							s16 nodestosteal = (be16_to_cpu(btc2->nodecount) + be16_to_cpu(btc->nodecount)) / 2 - be16_to_cpu(btc->nodecount);
++
++							memmove((u8 *) btc->bnode + nodestosteal * btc->nodesize, btc->bnode, be16_to_cpu(btc->nodecount) * btc->nodesize);
++							btc->nodecount = cpu_to_be16(be16_to_cpu(btc->nodecount) + nodestosteal);
++							memcpy(btc->bnode, (u8 *) btc2->bnode + (be16_to_cpu(btc2->nodecount) - nodestosteal) * btc2->nodesize, nodestosteal * btc->nodesize);
++
++							asfs_bstore(sb, bh);
++
++							btc2->nodecount = cpu_to_be16(be16_to_cpu(btc2->nodecount) - nodestosteal);
++							asfs_bstore(sb, bhsec);
++
++							btcparent->bnode[n].key = btc->bnode[0].key;
++							asfs_bstore(sb, bhparent);
++						} else {	/* Merging is possible. */
++							memcpy((u8 *) btc2->bnode + be16_to_cpu(btc2->nodecount) * btc2->nodesize, btc->bnode, be16_to_cpu(btc->nodecount) * btc->nodesize);
++							btc2->nodecount = cpu_to_be16(be16_to_cpu(btc2->nodecount) + be16_to_cpu(btc->nodecount));
++							asfs_bstore(sb, bhsec);
++
++							if ((errorcode = asfs_freeadminspace(sb, be32_to_cpu(((struct fsBlockHeader *) bhsec->b_data)->ownblock))) == 0)
++								errorcode = asfs_deletebnode(sb, bhparent, be32_to_cpu(btcparent->bnode[n].key));
++						}
++						asfs_brelse(bhsec);
++					}
++				}
++				/*      else    
++				   {
++				   // Never happens, except for root and then we don't care.
++				   } */
++			} else if (btc->nodecount == 1) {
++				/* No parent, so must be root. */
++
++				asfs_debug("deletebnode: no parent so must be root\n");
++
++				if (btc->isleaf == FALSE) {
++					struct fsBNodeContainer *bnc3 = (void *) bh->b_data;
++
++					/* The current root has only 1 node.  We now copy the data of this node into the
++					   root and promote that data to be the new root.  The rootblock number stays the
++					   same that way. */
++
++					if ((bhsec = asfs_breadcheck(sb, be32_to_cpu(btc->bnode[0].data), ASFS_BNODECONTAINER_ID))) {
++						u32 blockno = be32_to_cpu(((struct fsBlockHeader *) bh->b_data)->ownblock);
++						memcpy(bh->b_data, bhsec->b_data, sb->s_blocksize);
++						bnc3->bheader.ownblock = cpu_to_be32(blockno);
++
++						asfs_bstore(sb, bh);
++						errorcode = asfs_freeadminspace(sb, be32_to_cpu(((struct fsBlockHeader *) bhsec->b_data)->ownblock));
++						asfs_brelse(bhsec);
++					} else
++						errorcode = -EIO;
++				}
++				/* If not, then root contains leafs. */
++			}
++
++			asfs_debug("deletebnode: almost done\n");
++			/* otherwise, it must be the root, and the root is allowed
++			   to contain less than the minimum amount of nodes. */
++
++		}
++		if (bhparent != NULL)
++			asfs_brelse(bhparent);
++	}
++
++	return errorcode;
++}
++
++   /* Deletes an fsExtentBNode structure by key and any fsExtentBNodes linked to it.
++      This function DOES NOT fix the next pointer in a possible fsExtentBNode which
++      might have been pointing to the first BNode we are deleting.  Make sure you check
++      this yourself, if needed.
++
++      If key is zero, than this function does nothing. */
++
++int asfs_deleteextents(struct super_block *sb, u32 key)
++{
++	struct buffer_head *bh;
++	struct fsExtentBNode *ebn;
++	int errorcode = 0;
++
++	asfs_debug("deleteextents: Entry -- deleting extents from key %d\n", key);
++
++	while (key != 0 && (errorcode = findbnode(sb, key, &bh, (struct BNode **) &ebn)) == 0) {
++		/* node to be deleted located. */
++		key = be32_to_cpu(ebn->next);
++		if ((errorcode = asfs_freespace(sb, be32_to_cpu(ebn->key), be16_to_cpu(ebn->blocks))) != 0)
++			break;
++
++		if ((errorcode = asfs_deletebnode(sb, bh, be32_to_cpu(ebn->key))) != 0)
++			break;
++
++		asfs_brelse(bh);
++	}
++
++	return (errorcode);
++}
++
++   /* This function adds /blocks/ blocks starting at block /newspace/ to a file
++      identified by /objectnode/ and /lastextentbnode/.  /io_lastextentbnode/ can
++      be zero if there is no ExtentBNode chain attached to this file yet.
++      /blocks/ ranges from 1 to 8192.  To be able to extend Extents which are
++      almost full, it is wise to make this value no higher than 8192 blocks.
++      /io_lastextentbnode/ will contain the new lastextentbnode value when this
++      function completes.
++      If there was no chain yet, then this function will create a new one.  */
++
++int asfs_addblocks(struct super_block *sb, u16 blocks, u32 newspace, u32 objectnode, u32 *io_lastextentbnode)
++{
++	struct buffer_head *bh;
++	struct fsExtentBNode *ebn;
++	int errorcode = 0;
++
++	if (*io_lastextentbnode != 0) {
++		/* There was already a ExtentBNode chain for this file.  Extending it. */
++
++		asfs_debug("  addblocks: Extending existing ExtentBNode chain.\n");
++
++		if ((errorcode = asfs_getextent(sb, *io_lastextentbnode, &bh, &ebn)) == 0) {
++			if (be32_to_cpu(ebn->key) + be16_to_cpu(ebn->blocks) == newspace && be16_to_cpu(ebn->blocks) + blocks < 65536) {
++				/* It is possible to extent the last ExtentBNode! */
++				asfs_debug("  addblocks: Extending last ExtentBNode.\n");
++
++				ebn->blocks = cpu_to_be16(be16_to_cpu(ebn->blocks) + blocks);
++
++				asfs_bstore(sb, bh);
++				asfs_brelse(bh);
++			} else {
++				/* It isn't possible to extent the last ExtentBNode so we create
++				   a new one and link it to the last ExtentBNode. */
++
++				ebn->next = cpu_to_be32(newspace);
++				asfs_bstore(sb, bh);
++				asfs_brelse(bh);
++
++				if ((errorcode = createextentbnode(sb, newspace, &bh, (struct BNode **) &ebn)) == 0) {
++					asfs_debug("  addblocks: Created new ExtentBNode.\n");
++
++					ebn->key = cpu_to_be32(newspace);
++					ebn->prev = cpu_to_be32(*io_lastextentbnode);
++					ebn->next = 0;
++					ebn->blocks = cpu_to_be16(blocks);
++
++					*io_lastextentbnode = newspace;
++
++					asfs_bstore(sb, bh);
++					asfs_brelse(bh);
++
++					ASFS_SB(sb)->block_rovingblockptr = newspace + blocks;
++
++	/* to be changed in the future */
++/*					if (ASFS_SB(sb)->block_rovingblockptr >= ASFS_SB(sb)->totalblocks)
++						ASFS_SB(sb)->block_rovingblockptr = 0;*/
++				}
++			}
++		}
++	} else {
++		/* There is no ExtentBNode chain yet for this file.  Attaching one! */
++		if ((errorcode = createextentbnode(sb, newspace, &bh, (struct BNode **) &ebn)) == 0) {
++			asfs_debug("  addblocks: Created new ExtentBNode chain.\n");
++
++			ebn->key = cpu_to_be32(newspace);
++			ebn->prev = cpu_to_be32(objectnode + 0x80000000);
++			ebn->next = 0;
++			ebn->blocks = cpu_to_be16(blocks);
++
++			*io_lastextentbnode = newspace;
++
++			asfs_bstore(sb, bh);
++			asfs_brelse(bh);
++
++			ASFS_SB(sb)->block_rovingblockptr = newspace + blocks;
++
++/*			if (ASFS_SB(sb)->block_rovingblockptr >= ASFS_SB(sb)->totalblocks)
++				ASFS_SB(sb)->block_rovingblockptr = 0;*/
++		}
++	}
++
++	asfs_debug("  addblocks: done.\n");
++
++	return errorcode;
++}
++#endif
+diff -urN linux-2.6.3/fs/asfs/file.c linux-2.6.3-asfs-1.0b7/fs/asfs/file.c
+--- linux-2.6.3/fs/asfs/file.c	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.3-asfs-1.0b7/fs/asfs/file.c	2004-06-10 01:42:01.000000000 +0200
+@@ -0,0 +1,251 @@
++/*
++ *
++ * Amiga Smart File System, Linux implementation
++ * version: 1.0beta7
++ *  
++ * Copyright (C) 2003,2004  Marek 'March' Szyprowski <marek at amiga.pl>
++ *
++ *
++ * 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.
++ *
++ */
++
++#include <linux/types.h>
++#include <linux/errno.h>
++#include <linux/slab.h>
++#include <linux/fs.h>
++#include <linux/pagemap.h>
++#include <linux/buffer_head.h>
++#include <linux/vfs.h>
++#include "asfs_fs.h"
++
++#include <asm/byteorder.h>
++
++static int
++asfs_get_block(struct inode *inode, sector_t block, struct buffer_head *bh_result, int create)
++{
++	struct buffer_head *ebn_bh;
++	struct fsExtentBNode extent, *ebn_p;
++	u32 filedata;
++	unsigned long pos;
++	struct super_block *sb = inode->i_sb;
++#ifdef CONFIG_ASFS_RW
++	int error;
++	struct buffer_head *bh;
++	struct fsObject *obj;
++#endif
++
++	asfs_debug("ASFS: get_block(%lu, %ld, %d)\n", inode->i_ino, block, create);
++
++	if (block < 0) {
++		printk(KERN_ERR "ASFS: asfsget_block: requested block (%ld) < 0!\n", block);
++		return -EIO;
++	} else if (block >= inode->i_blocks && !create) {
++		printk(KERN_ERR "ASFS: asfsget_block: strange block request %ld!\n", block);
++		return -EIO;
++	} 
++
++	if (create)
++#ifdef CONFIG_ASFS_RW
++		ASFS_I(inode)->modified = TRUE;
++#else
++		return -EROFS;
++#endif
++
++	if (block < inode->i_blocks)
++		create = 0;
++
++	lock_super(sb);
++
++#ifdef CONFIG_ASFS_RW
++	if (create) {
++		int blockstoadd;
++		u32 newspace, addedblocks;
++
++		blockstoadd = block - inode->i_blocks + 1;
++
++		if (blockstoadd < ASFS_BLOCKCHUNKS)
++			blockstoadd = ASFS_BLOCKCHUNKS;
++ 
++		asfs_debug("ASFS get_block: Trying to add %d blocks to file\n", blockstoadd);
++		
++		if ((error = asfs_readobject(sb, inode->i_ino, &bh, &obj)) != 0) {
++			unlock_super(sb);
++			return error;
++		}
++
++		if ((error = asfs_addblockstofile(sb, bh, obj, blockstoadd, &newspace, &addedblocks)) != 0) {
++			asfs_brelse(bh);
++			unlock_super(sb);
++			return error;
++		}
++		ASFS_I(inode)->mmu_private += addedblocks * sb->s_blocksize;
++		inode->i_blocks += addedblocks;
++		ASFS_I(inode)->ext_cache.key = 0;
++		ASFS_I(inode)->firstblock = be32_to_cpu(obj->object.file.data);
++		asfs_brelse(bh);
++	}
++#endif
++
++	if (ASFS_I(inode)->ext_cache.key > 0 && ASFS_I(inode)->ext_cache.startblock <= block) {
++		extent.key = ASFS_I(inode)->ext_cache.key;
++		extent.next = ASFS_I(inode)->ext_cache.next;
++		extent.blocks = ASFS_I(inode)->ext_cache.blocks;
++		pos = ASFS_I(inode)->ext_cache.startblock;
++	} else {
++		if (asfs_getextent(inode->i_sb, ASFS_I(inode)->firstblock, &ebn_bh, &ebn_p) != 0) {
++			unlock_super(sb);
++			return -EIO;
++		}
++		extent.key = be32_to_cpu(ebn_p->key);
++		extent.next = be32_to_cpu(ebn_p->next);
++		extent.blocks = be16_to_cpu(ebn_p->blocks);
++		pos = 0;
++		asfs_brelse(ebn_bh);
++	}
++	ebn_p = &extent;
++	filedata = ebn_p->next;
++
++	while (pos + ebn_p->blocks <= block && ebn_p->next != 0 && pos < inode->i_blocks) {
++		pos += ebn_p->blocks;
++		if (asfs_getextent(inode->i_sb, filedata, &ebn_bh, &ebn_p) != 0) {
++			unlock_super(sb);
++			return -EIO;
++		}
++		extent.key = be32_to_cpu(ebn_p->key);
++		extent.next = be32_to_cpu(ebn_p->next);
++		extent.blocks = be16_to_cpu(ebn_p->blocks);
++		ebn_p = &extent;	
++		filedata = ebn_p->next;
++		asfs_brelse(ebn_bh);
++	}
++
++	unlock_super(sb);
++
++	map_bh(bh_result, inode->i_sb, (sector_t) (ebn_p->key + block - pos));
++
++	if (create)
++		set_buffer_new(bh_result);
++
++	asfs_debug("ASFS: get_block - mapped block %lu\n", ebn_p->key + block - pos);
++
++	ASFS_I(inode)->ext_cache.startblock = pos;
++	ASFS_I(inode)->ext_cache.key = ebn_p->key;
++	ASFS_I(inode)->ext_cache.next = ebn_p->next;
++	ASFS_I(inode)->ext_cache.blocks = ebn_p->blocks;
++
++	return 0;
++}
++
++int asfs_readpage(struct file *file, struct page *page)
++{
++	asfs_debug("ASFS: %s\n", __FUNCTION__);
++	return block_read_full_page(page, asfs_get_block);
++}
++
++sector_t asfs_bmap(struct address_space *mapping, sector_t block)
++{
++	asfs_debug("ASFS: %s\n", __FUNCTION__);
++	return generic_block_bmap(mapping,block,asfs_get_block);
++}
++
++#ifdef CONFIG_ASFS_RW
++
++int asfs_writepage(struct page *page, struct writeback_control *wbc)
++{
++	asfs_debug("ASFS: %s\n", __FUNCTION__);
++	return block_write_full_page(page, asfs_get_block, wbc);
++}
++
++int asfs_prepare_write(struct file *file, struct page *page, unsigned from, unsigned to)
++{
++	asfs_debug("ASFS: %s\n", __FUNCTION__);
++	return cont_prepare_write(page, from, to, asfs_get_block, &ASFS_I(page->mapping->host)->mmu_private);
++}
++
++void asfs_truncate(struct inode *inode)
++{
++	struct super_block *sb = inode->i_sb;
++	struct buffer_head *bh;
++	struct fsObject *obj;
++
++	asfs_debug("AFFS: truncate(inode=%d, oldsize=%u, newsize=%u)\n",
++		 (u32)inode->i_ino, (u32)ASFS_I(inode)->mmu_private, (u32)inode->i_size);
++
++	if (inode->i_size > ASFS_I(inode)->mmu_private) {
++		printk("ASFS: enlarging file is not supported yet\n");
++		return;
++	}
++
++	lock_super(sb);
++
++	if ((asfs_readobject(sb, inode->i_ino, &bh, &obj)) != 0) {
++		unlock_super(sb);
++		return;
++	}
++
++	if (asfs_truncateblocksinfile(sb, bh, obj, inode->i_size) != 0) {
++		asfs_brelse(bh);
++		unlock_super(sb);
++		return;
++	}
++		
++	obj->object.file.size = cpu_to_be32(inode->i_size);
++	ASFS_I(inode)->mmu_private = inode->i_size;
++	ASFS_I(inode)->modified = TRUE;
++	inode->i_blocks = (be32_to_cpu(obj->object.file.size) + sb->s_blocksize - 1) >> sb->s_blocksize_bits;
++	asfs_bstore(sb, bh);
++	asfs_brelse(bh);
++
++	unlock_super(sb);
++}
++
++int asfs_file_open(struct inode *inode, struct file *filp)
++{
++	if (atomic_read(&filp->f_count) != 1)
++		return 0;
++	asfs_debug("ASFS: file open (node %d)\n", (int)inode->i_ino);
++	return 0;
++}
++
++int asfs_file_release(struct inode *inode, struct file *filp)
++{
++	int error = 0;
++
++	asfs_debug("ASFS: file release (node %d oc %d)\n", (int)inode->i_ino, atomic_read(&filp->f_count));
++
++	if (atomic_read(&filp->f_count) != 0)
++		return 0;
++
++	if (ASFS_I(inode)->modified == TRUE) {
++		struct buffer_head *bh;
++		struct fsObject *obj;
++		lock_super(inode->i_sb);
++
++		if ((error = asfs_readobject(inode->i_sb, inode->i_ino, &bh, &obj)) != 0) {
++			unlock_super(inode->i_sb);
++			return error;
++		}
++
++		obj->datemodified = cpu_to_be32(inode->i_mtime.tv_sec - (365*8+2)*24*60*60);
++		if (inode->i_mode & S_IFREG) {
++			error = asfs_truncateblocksinfile(inode->i_sb, bh, obj, (u32)inode->i_size);
++			obj->object.file.size = cpu_to_be32(inode->i_size);
++			ASFS_I(inode)->mmu_private = inode->i_size;
++			inode->i_blocks = (be32_to_cpu(obj->object.file.size) + inode->i_sb->s_blocksize - 1) >> inode->i_sb->s_blocksize_bits;
++		}
++		asfs_bstore(inode->i_sb, bh);
++
++		unlock_super(inode->i_sb);
++
++		asfs_brelse(bh);
++	}
++	ASFS_I(inode)->modified = FALSE;
++
++	return error;
++}
++
++#endif
+diff -urN linux-2.6.3/fs/asfs/inode.c linux-2.6.3-asfs-1.0b7/fs/asfs/inode.c
+--- linux-2.6.3/fs/asfs/inode.c	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.3-asfs-1.0b7/fs/asfs/inode.c	2004-06-17 00:39:10.000000000 +0200
+@@ -0,0 +1,414 @@
++/*
++ *
++ * Amiga Smart File System, Linux implementation
++ * version: 1.0beta7
++ *  
++ * Copyright (C) 2003,2004  Marek 'March' Szyprowski <marek at amiga.pl>
++ *
++ *
++ * 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.
++ *
++ */
++
++#include <linux/types.h>
++#include <linux/errno.h>
++#include <linux/slab.h>
++#include <linux/fs.h>
++#include <linux/smp_lock.h>
++#include <linux/time.h>
++#include <linux/buffer_head.h>
++#include <linux/vfs.h>
++#include <linux/dirent.h>
++#include "asfs_fs.h"
++
++#include <asm/byteorder.h>
++
++/* Mapping from our types to the kernel */
++
++static struct address_space_operations asfs_aops = {
++	.readpage	= asfs_readpage,
++	.sync_page	= block_sync_page,
++	.bmap		= asfs_bmap,
++#ifdef CONFIG_ASFS_RW
++	.writepage	= asfs_writepage,
++	.prepare_write = asfs_prepare_write,
++	.commit_write = generic_commit_write,
++#endif
++};
++
++static struct file_operations asfs_file_operations = {
++	.llseek		= generic_file_llseek,
++	.read		= generic_file_read,
++	.mmap		= generic_file_mmap,
++#ifdef CONFIG_ASFS_RW
++	.write		= generic_file_write,
++	.open		= asfs_file_open,
++	.release	= asfs_file_release,
++	.fsync		= file_fsync,
++#endif
++};
++
++static struct file_operations asfs_dir_operations = {
++	.read		= generic_read_dir,
++	.readdir	= asfs_readdir,
++};
++
++static struct inode_operations asfs_dir_inode_operations = {
++	.lookup		= asfs_lookup,
++#ifdef CONFIG_ASFS_RW
++	.create		= asfs_create,
++	.unlink		= asfs_unlink,
++	.symlink	= asfs_symlink,
++	.mkdir		= asfs_mkdir,
++	.rmdir		= asfs_rmdir,
++	.rename		= asfs_rename,
++/*	.setattr	= asfs_notify_change,*/
++#endif
++};
++
++static struct inode_operations asfs_file_inode_operations = {
++#ifdef CONFIG_ASFS_RW
++	.truncate	= asfs_truncate,
++/*	.setattr		= asfs_notify_change,*/
++#endif
++};
++
++static struct address_space_operations asfs_symlink_aops = {
++	.readpage	= asfs_symlink_readpage,
++};
++
++static struct inode_operations asfs_symlink_inode_operations = {
++	.readlink	= page_readlink,
++	.follow_link	= page_follow_link,
++#ifdef CONFIG_ASFS_RW
++/*	.setattr	= asfs_notify_change,*/
++#endif
++};
++
++void asfs_read_locked_inode(struct inode *inode, void *arg)
++{
++	struct super_block *sb = inode->i_sb;
++	struct fsObject *obj = arg;
++
++	inode->i_mode = ASFS_SB(sb)->mode;
++	inode->i_mtime.tv_sec = inode->i_atime.tv_sec = inode->i_ctime.tv_sec = be32_to_cpu(obj->datemodified) + (365*8+2)*24*60*60;  
++	/* Linux: seconds since 01-01-1970, AmigaSFS: seconds since 01-01-1978 */
++	inode->i_mtime.tv_nsec = inode->i_ctime.tv_nsec = inode->i_atime.tv_nsec = 0;
++	inode->i_uid = ASFS_SB(sb)->uid;
++	inode->i_gid = ASFS_SB(sb)->gid;
++
++	asfs_debug("asfs_read_inode2: Setting-up node %lu... ", inode->i_ino);
++
++	if (obj->bits & OTYPE_DIR) {
++		asfs_debug("dir (FirstdirBlock: %u, HashTable %u)\n", \
++		           be32_to_cpu(obj->object.dir.firstdirblock), be32_to_cpu(obj->object.dir.hashtable));
++
++		inode->i_size = 0;
++		inode->i_op = &asfs_dir_inode_operations;
++		inode->i_fop = &asfs_dir_operations;
++		inode->i_mode |= S_IFDIR | ((inode->i_mode & 0400) ? 0100 : 0) | 
++		              ((inode->i_mode & 0040) ? 0010 : 0) | ((inode->i_mode & 0004) ? 0001 : 0);
++		ASFS_I(inode)->firstblock = be32_to_cpu(obj->object.dir.firstdirblock);
++		ASFS_I(inode)->hashtable = be32_to_cpu(obj->object.dir.hashtable);
++		ASFS_I(inode)->modified = 0;
++	} else if (obj->bits & OTYPE_LINK && !(obj->bits & OTYPE_HARDLINK)) {
++		asfs_debug("symlink\n");
++		inode->i_size = 0;
++		inode->i_op = &asfs_symlink_inode_operations;
++		inode->i_mapping->a_ops = &asfs_symlink_aops;
++		inode->i_mode |= S_IFLNK | S_IRWXUGO;
++		ASFS_I(inode)->firstblock = be32_to_cpu(obj->object.file.data);
++	} else {
++		asfs_debug("file (Size: %u, FirstBlock: %u)\n", be32_to_cpu(obj->object.file.size), be32_to_cpu(obj->object.file.data));
++		inode->i_size = be32_to_cpu(obj->object.file.size);
++		inode->i_blocks = (be32_to_cpu(obj->object.file.size) + sb->s_blocksize - 1) >> sb->s_blocksize_bits;
++		inode->i_op = &asfs_file_inode_operations;
++		inode->i_fop = &asfs_file_operations;
++		inode->i_mapping->a_ops = &asfs_aops;
++		inode->i_mode |= S_IFREG;
++		ASFS_I(inode)->firstblock = be32_to_cpu(obj->object.file.data);
++		ASFS_I(inode)->ext_cache.startblock = 0;
++		ASFS_I(inode)->ext_cache.key = 0;
++		ASFS_I(inode)->mmu_private = inode->i_size;
++	}
++	return;	
++}
++
++struct inode *asfs_get_root_inode(struct super_block *sb)
++{
++	struct inode *result = NULL;
++	struct fsObject *obj;
++	struct buffer_head *bh;
++
++	asfs_debug("asfs_get_root_inode\n");
++
++	if ((bh = asfs_breadcheck(sb, ASFS_SB(sb)->rootobjectcontainer, ASFS_OBJECTCONTAINER_ID))) {
++		obj = &(((struct fsObjectContainer *)bh->b_data)->object[0]);
++		if (be32_to_cpu(obj->objectnode) > 0)
++			result = iget_locked(sb, be32_to_cpu(obj->objectnode));
++
++		if (result != NULL && result->i_state & I_NEW) {
++			asfs_read_locked_inode(result, obj);
++			unlock_new_inode(result);
++		}
++		asfs_brelse(bh);
++	}
++	return result;
++}
++
++#ifdef CONFIG_ASFS_RW
++
++static void asfs_sync_dir_inode(struct inode *dir, struct fsObject *obj)
++{
++	ASFS_I(dir)->firstblock = be32_to_cpu(obj->object.dir.firstdirblock);
++	ASFS_I(dir)->modified = 1;
++	dir->i_mtime = dir->i_atime = dir->i_ctime = CURRENT_TIME;
++	obj->datemodified = cpu_to_be32(dir->i_mtime.tv_sec - (365*8+2)*24*60*60);
++}
++
++enum { it_file, it_dir, it_link };
++
++static int asfs_create_object(struct inode *dir, struct dentry *dentry, int mode, int type, const char *symname)
++{
++	int error;
++	struct super_block *sb = dir->i_sb;
++	struct inode *inode;
++	struct buffer_head *bh, *dir_bh;
++	struct fsObject obj_data, *dir_obj, *obj;
++	u8 *name = (u8 *) dentry->d_name.name;
++
++	asfs_debug("asfs_create_obj %s in dir node %d\n", name, (int)dir->i_ino);
++
++	sb = dir->i_sb;
++	inode = new_inode(sb);
++	if (!inode)
++		return -ENOMEM;
++
++	memset(&obj_data, 0, sizeof(struct fsObject));
++
++	obj_data.protection = cpu_to_be32(FIBF_READ|FIBF_WRITE|FIBF_EXECUTE|FIBF_DELETE);
++	obj_data.datemodified = cpu_to_be32(inode->i_mtime.tv_sec - (365*8+2)*24*60*60);
++	switch (type) {
++	case it_dir:
++		obj_data.bits = OTYPE_DIR;
++		break;
++	case it_link:
++		obj_data.bits = OTYPE_LINK;
++		break;
++	default:
++		break;
++	}
++
++	lock_super(sb);
++
++	if ((error = asfs_readobject(sb, dir->i_ino, &dir_bh, &dir_obj)) != 0) {
++		dec_count(inode);
++		unlock_super(sb);
++		return error;
++	}
++
++	bh = dir_bh;
++	obj = dir_obj;
++
++	if ((error = asfs_createobject(sb, &bh, &obj, &obj_data, name, FALSE)) != 0) {
++		asfs_brelse(dir_bh);
++		dec_count(inode);
++		unlock_super(sb);
++		return error;
++	}
++
++	inode->i_ino = be32_to_cpu(obj->objectnode);
++	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
++	inode->i_size = inode->i_blocks = inode->i_blksize = 0;
++	inode->i_uid = dir->i_uid;
++	inode->i_gid = dir->i_gid;
++	inode->i_mode = mode | ASFS_SB(sb)->mode;
++
++	switch (type) {
++	case it_dir:
++		inode->i_mode |= S_IFDIR;
++		inode->i_op = &asfs_dir_inode_operations;
++		inode->i_fop = &asfs_dir_operations;
++		ASFS_I(inode)->firstblock = be32_to_cpu(obj->object.dir.firstdirblock);
++		ASFS_I(inode)->hashtable = be32_to_cpu(obj->object.dir.hashtable);
++		ASFS_I(inode)->modified = 0;
++		break;
++	case it_file:
++		inode->i_mode |= S_IFREG;
++		inode->i_op = &asfs_file_inode_operations;
++		inode->i_fop = &asfs_file_operations;
++		inode->i_mapping->a_ops = &asfs_aops;
++		ASFS_I(inode)->firstblock = be32_to_cpu(obj->object.file.data);
++		ASFS_I(inode)->ext_cache.startblock = 0;
++		ASFS_I(inode)->ext_cache.key = 0;
++		ASFS_I(inode)->mmu_private = inode->i_size;
++		break;
++	case it_link:
++		inode->i_mode = S_IFLNK | S_IRWXUGO;
++		inode->i_op = &page_symlink_inode_operations;
++		inode->i_mapping->a_ops = &asfs_symlink_aops;
++		ASFS_I(inode)->firstblock = be32_to_cpu(obj->object.file.data);
++		error = asfs_write_symlink(inode, symname);
++		break;
++	default:
++		break;
++	}
++
++	asfs_bstore(sb, bh);
++	insert_inode_hash(inode);
++	mark_inode_dirty(inode);
++	d_instantiate(dentry, inode);
++	asfs_sync_dir_inode(dir, dir_obj);
++	asfs_bstore(sb, dir_bh); 
++
++	unlock_super(sb);
++	asfs_brelse(bh);
++	asfs_brelse(dir_bh);
++	
++	return error;
++}
++
++int asfs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd)
++{
++	return asfs_create_object(dir, dentry, mode, it_file, NULL);
++}
++
++int asfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
++{
++	return asfs_create_object(dir, dentry, mode, it_dir, NULL);
++}
++
++int asfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname)
++{
++	return asfs_create_object(dir, dentry, 0, it_link, symname);
++}
++
++int asfs_rmdir(struct inode *dir, struct dentry *dentry)
++{
++	asfs_debug("ASFS: %s\n", __FUNCTION__);
++
++	if (ASFS_I(dentry->d_inode)->firstblock != 0)
++		return -ENOTEMPTY;
++	
++	return asfs_unlink(dir, dentry);
++}
++
++int asfs_unlink(struct inode *dir, struct dentry *dentry)
++{
++	struct inode *inode = dentry->d_inode;
++	int error;
++	struct super_block *sb = dir->i_sb;
++	struct buffer_head *bh, *dir_bh;
++	struct fsObject *dir_obj, *obj;
++
++	asfs_debug("ASFS: %s\n", __FUNCTION__);
++
++	lock_super(sb);
++
++	if ((error = asfs_readobject(sb, inode->i_ino, &bh, &obj)) != 0) {
++		unlock_super(sb);
++		return error;
++	}
++	if ((error = asfs_deleteobject(sb, bh, obj)) != 0) {
++		asfs_brelse(bh);
++		unlock_super(sb);
++		return error;
++	}
++	asfs_brelse(bh);
++
++	/* directory data could change after removing the object */
++	if ((error = asfs_readobject(sb, dir->i_ino, &dir_bh, &dir_obj)) != 0) {
++		unlock_super(sb);
++		return error;
++	}
++
++	asfs_sync_dir_inode(dir, dir_obj);
++	asfs_bstore(sb, dir_bh); 
++
++	dec_count(inode);
++	unlock_super(sb);
++	asfs_brelse(dir_bh);
++
++	return 0;
++}
++
++int asfs_rename(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry)
++{
++	struct super_block *sb = old_dir->i_sb;
++	struct buffer_head *src_bh, *old_bh, *new_bh;
++	int error;
++	struct fsObject *src_obj, *old_obj, *new_obj;
++
++	asfs_debug("ASFS: rename (old=%u,\"%*s\" to new=%u,\"%*s\")\n",
++		 (u32)old_dir->i_ino, (int)old_dentry->d_name.len, old_dentry->d_name.name,
++		 (u32)new_dir->i_ino, (int)new_dentry->d_name.len, new_dentry->d_name.name);
++
++	/* Unlink destination if it already exists */
++	if (new_dentry->d_inode) 
++		if ((error = asfs_unlink(new_dir, new_dentry)) != 0)
++			return error;
++
++	lock_super(sb);
++
++	if ((error = asfs_readobject(sb, old_dentry->d_inode->i_ino, &src_bh, &src_obj)) != 0) {
++		unlock_super(sb);
++		return error;
++	}
++	if ((error = asfs_readobject(sb, new_dir->i_ino, &new_bh, &new_obj)) != 0) {
++		asfs_brelse(src_bh);
++		unlock_super(sb);
++		return error;
++	}
++
++	if ((error = asfs_renameobject(sb, src_bh, src_obj, new_bh, new_obj, (u8 *) new_dentry->d_name.name)) != 0) {
++		asfs_brelse(src_bh);
++		asfs_brelse(new_bh);
++		unlock_super(sb);
++		return error;
++	}
++	asfs_brelse(src_bh);
++	asfs_brelse(new_bh);
++
++	if ((error = asfs_readobject(sb, old_dir->i_ino, &old_bh, &old_obj)) != 0) {
++		unlock_super(sb);
++		return error;
++	}
++	if ((error = asfs_readobject(sb, new_dir->i_ino, &new_bh, &new_obj)) != 0) {
++		asfs_brelse(old_bh);
++		unlock_super(sb);
++		return error;
++	}
++
++	asfs_sync_dir_inode(old_dir, old_obj);
++	asfs_sync_dir_inode(new_dir, new_obj);
++
++	asfs_bstore(sb, new_bh);	
++	asfs_bstore(sb, old_bh);
++
++	unlock_super(sb);
++	asfs_brelse(old_bh);
++	asfs_brelse(new_bh);
++
++	mark_inode_dirty(old_dir);
++	mark_inode_dirty(new_dir);
++
++	return 0;
++}
++
++/*
++int asfs_notify_change(struct dentry *dentry, struct iattr *attr)
++{
++	struct inode *inode = dentry->d_inode;
++	int error = 0;
++
++	asfs_debug("ASFS: notify_change(%lu,0x%x)\n",inode->i_ino,attr->ia_valid);
++
++	error = inode_change_ok(inode,attr);
++
++	return error;
++}
++*/
++#endif
+diff -urN linux-2.6.3/fs/asfs/Makefile linux-2.6.3-asfs-1.0b7/fs/asfs/Makefile
+--- linux-2.6.3/fs/asfs/Makefile	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.3-asfs-1.0b7/fs/asfs/Makefile	2004-06-09 21:23:40.000000000 +0200
+@@ -0,0 +1,8 @@
++#
++# Makefile for the linux asfs filesystem routines.
++#
++
++obj-$(CONFIG_ASFS_FS) += asfs.o
++
++asfs-y += dir.o extents.o file.o inode.o namei.o nodes.o objects.o super.o symlink.o
++asfs-$(CONFIG_ASFS_RW) += adminspace.o bitfuncs.o 
+diff -urN linux-2.6.3/fs/asfs/namei.c linux-2.6.3-asfs-1.0b7/fs/asfs/namei.c
+--- linux-2.6.3/fs/asfs/namei.c	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.3-asfs-1.0b7/fs/asfs/namei.c	2004-06-10 01:41:51.000000000 +0200
+@@ -0,0 +1,155 @@
++/*
++ *
++ * Amiga Smart File System, Linux implementation
++ * version: 1.0beta7
++ *
++ * Copyright (C) 2003,2004  Marek 'March' Szyprowski <marek at amiga.pl>
++ *
++ *
++ * 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.
++ *
++ */
++
++#include <linux/types.h>
++#include <linux/errno.h>
++#include <linux/slab.h>
++#include <linux/string.h>
++#include <linux/fs.h>
++#include <linux/buffer_head.h>
++#include <linux/vfs.h>
++#include <linux/string.h>
++#include "asfs_fs.h"
++
++static inline u8 asfs_upperchar(u8 c)
++{
++	if ((c >= 224 && c <= 254 && c != 247) || (c >= 'a' && c <= 'z'))
++		c -= 32;
++	return (c);
++}
++
++u8 asfs_lowerchar(u8 c)
++{
++	if ((c >= 192 && c <= 222 && c != 215) || (c >= 'A' && c <= 'Z'))
++		c += 32;
++	return (c);
++}
++
++/* Check if the name is valid for a asfs object. */
++
++static inline int asfs_check_name(const u8 *name, int len)
++{
++	int i;
++
++	if (len > ASFS_MAXFN)
++		return -ENAMETOOLONG;
++
++	for (i = 0; i < len; i++)
++		if (name[i] < ' ' || name[i] == ':' || (name[i] > 0x7e && name[i] < 0xa0))
++			return -EINVAL;
++
++	return 0;
++}
++
++/* Note: the dentry argument is the parent dentry. */
++
++static int asfs_hash_dentry(struct dentry *dentry, struct qstr *qstr)
++{
++	struct super_block *sb = dentry->d_inode->i_sb;
++	const u8 *name = qstr->name;
++	unsigned long hash;
++	int i;
++
++	i = asfs_check_name(qstr->name,qstr->len);
++	if (i)
++		return i;
++
++	hash = init_name_hash();
++
++	if (ASFS_SB(sb)->flags & ASFS_ROOTBITS_CASESENSITIVE)
++		for (i=qstr->len; i > 0; name++, i--)
++			hash = partial_name_hash(*name, hash);
++	else
++		for (i=qstr->len; i > 0; name++, i--)
++			hash = partial_name_hash(asfs_upperchar(*name), hash);
++
++	qstr->hash = end_name_hash(hash);
++
++	return 0;
++}
++
++static int asfs_compare_dentry(struct dentry *dentry, struct qstr *a, struct qstr *b)
++{
++	struct super_block *sb = dentry->d_inode->i_sb;
++	const u8 *aname = a->name;
++	const u8 *bname = b->name;
++	int len;
++
++	/* 'a' is the qstr of an already existing dentry, so the name
++	 * must be valid. 'b' must be validated first.
++	 */
++
++	if (asfs_check_name(b->name,b->len))
++		return 1;
++
++	if (a->len != b->len)
++		return 1;
++
++	if (ASFS_SB(sb)->flags & ASFS_ROOTBITS_CASESENSITIVE) {
++		for (len=a->len; len > 0; len--)
++			if (*aname++ != *bname++)
++				return 1;
++	} else {
++		for (len=a->len; len > 0; len--)
++			if (asfs_upperchar(*aname++) != asfs_upperchar(*bname++))
++				return 1;
++	}
++
++	return 0;
++}
++
++struct dentry_operations asfs_dentry_operations = {
++	d_hash:		asfs_hash_dentry,
++	d_compare:	asfs_compare_dentry,
++};
++
++int asfs_namecmp(u8 *s, u8 *ct, int casesensitive)
++{
++	if (casesensitive) {
++		while (*s == *ct && *ct != '\0' && *ct != '/') {
++			s++;
++			ct++;
++		}
++	} else {
++		while (asfs_upperchar(*s) == asfs_upperchar(*ct) && *ct != '\0'
++		       && *ct != '/') {
++			s++;
++			ct++;
++		}
++	}
++	return (*s == '\0' && (*ct == '\0' || *ct == '/')) ? 0 : *ct - *s;
++}
++
++u16 asfs_hash(u8 *name, int casesensitive)
++{
++	u16 hashval = 0;
++	while (name[hashval] != 0 && name[hashval] != '/')
++		hashval++;
++	if (casesensitive) {
++		u8 c = *name;
++		while (c != 0 && c != '/') {
++			hashval = hashval * 13 + c;
++			c = *++name;
++		}
++	} else {
++		u8 c = *name;
++		while (c != 0 && c != '/') {
++			hashval = hashval * 13 + asfs_upperchar(c);
++			c = *++name;
++		}
++	}
++	return hashval;
++}
++
+diff -urN linux-2.6.3/fs/asfs/nodes.c linux-2.6.3-asfs-1.0b7/fs/asfs/nodes.c
+--- linux-2.6.3/fs/asfs/nodes.c	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.3-asfs-1.0b7/fs/asfs/nodes.c	2004-06-10 01:41:46.000000000 +0200
+@@ -0,0 +1,455 @@
++/*
++ *
++ * Amiga Smart File System, Linux implementation
++ * version: 1.0beta7
++ *
++ * This file contains some parts of the original amiga version of 
++ * SmartFilesystem source code.
++ *
++ * SmartFilesystem is copyrighted (C) 2003 by: John Hendrikx, 
++ * Ralph Schmidt, Emmanuel Lesueur, David Gerber and Marcin Kurek
++ * 
++ * Adapted and modified by Marek 'March' Szyprowski <marek at amiga.pl>
++ *
++ */
++
++#include <linux/types.h>
++#include <linux/errno.h>
++#include <linux/slab.h>
++#include <linux/fs.h>
++#include <linux/buffer_head.h>
++#include <linux/vfs.h>
++#include "asfs_fs.h"
++
++#include <asm/byteorder.h>
++
++/* Finds a specific node by number. */
++int asfs_getnode(struct super_block *sb, u32 nodeno, struct buffer_head **ret_bh, struct fsObjectNode **ret_node)
++{
++	struct buffer_head *bh;
++	struct fsNodeContainer *nodecont;
++	u32 nodeindex = ASFS_SB(sb)->objectnoderoot;
++
++	while ((bh = asfs_breadcheck(sb, nodeindex, ASFS_NODECONTAINER_ID))) {
++		nodecont = (struct fsNodeContainer *) bh->b_data;
++
++		if (be32_to_cpu(nodecont->nodes) == 1) {
++			*ret_node = (struct fsObjectNode *) ((u8 *) nodecont->node + NODE_STRUCT_SIZE * (nodeno - be32_to_cpu(nodecont->nodenumber)));
++			*ret_bh = bh;
++			return 0;
++		} else {
++			u16 containerentry = (nodeno - be32_to_cpu(nodecont->nodenumber)) / be32_to_cpu(nodecont->nodes);
++			nodeindex = be32_to_cpu(nodecont->node[containerentry]) >> (sb->s_blocksize_bits - ASFS_BLCKFACCURACY);
++		}
++		asfs_brelse(bh);
++	}
++	if (bh == NULL)
++		return -EIO;
++	return -ENOENT;
++}
++
++#ifdef CONFIG_ASFS_RW
++
++	/* Looks for the parent of the passed-in buffer_head (fsNodeContainer)
++	   starting from the root.  It returns an error if any error occured.
++	   If error is 0 and io_bh is NULL as well, then there was no parent (ie,
++	   you asked parent of the root).  Otherwise io_bh should contain the
++	   parent of the passed-in NodeContainer. */
++
++static int parentnodecontainer(struct super_block *sb, struct buffer_head **io_bh)
++{
++	u32 noderoot = ASFS_SB(sb)->objectnoderoot;
++	u32 childblock = be32_to_cpu(((struct fsBlockHeader *) (*io_bh)->b_data)->ownblock);
++	u32 nodenumber = be32_to_cpu(((struct fsNodeContainer *) (*io_bh)->b_data)->nodenumber);
++	int errorcode = 0;
++
++	if (noderoot == childblock) {
++		*io_bh = NULL;
++		return 0;
++	}
++
++	while ((*io_bh = asfs_breadcheck(sb, noderoot, ASFS_NODECONTAINER_ID))) {
++		struct fsNodeContainer *nc = (void *) (*io_bh)->b_data;
++
++		if (be32_to_cpu(nc->nodes) == 1) {
++			/* We've descended the tree to a leaf NodeContainer, something
++			   which should never happen if the passed-in io_bh had
++			   contained a valid fsNodeContainer. */
++			printk("ASFS: Failed to locate the parent NodeContainer - node tree is corrupted!\n");
++			*io_bh = NULL;
++			return -EIO;
++		} else {
++			u16 containerentry = (nodenumber - be32_to_cpu(nc->nodenumber)) / be32_to_cpu(nc->nodes);
++			noderoot = be32_to_cpu(nc->node[containerentry]) >> (sb->s_blocksize_bits - ASFS_BLCKFACCURACY);
++		}
++
++		if (noderoot == childblock)
++			break;
++
++		asfs_brelse(*io_bh);
++	}
++
++	if (*io_bh == NULL)
++		return -EIO;
++
++	return errorcode;
++}
++
++
++static int isfull(struct super_block *sb, struct fsNodeContainer *nc)
++{
++	u32 *p = nc->node;
++	s16 n = NODECONT_BLOCK_COUNT;
++
++	while (--n >= 0) {
++		if (*p == 0 || (be32_to_cpu(*p) & 0x00000001) == 0) {
++			break;
++		}
++		p++;
++	}
++
++	return n < 0;
++}
++
++static int markparentfull(struct super_block *sb, struct buffer_head *bh)
++{
++	u32 nodenumber = be32_to_cpu(((struct fsNodeContainer *) (bh->b_data))->nodenumber);
++	int errorcode;
++
++	if ((errorcode = parentnodecontainer(sb, &bh)) == 0 && bh != 0) {
++		struct fsNodeContainer *nc = (void *) bh->b_data;
++		u16 containerentry = (nodenumber - be32_to_cpu(nc->nodenumber)) / be32_to_cpu(nc->nodes);
++
++		nc->node[containerentry] = cpu_to_be32(be32_to_cpu(nc->node[containerentry]) | 0x00000001);
++
++		asfs_bstore(sb, bh);
++
++		if (isfull(sb, nc)) {	/* This container now is full as well!  Mark the next higher up container too then! */
++			return markparentfull(sb, bh);
++		}
++		asfs_brelse(bh);
++	}
++
++	return errorcode;
++}
++
++static int addnewnodelevel(struct super_block *sb, u16 nodesize)
++{
++	struct buffer_head *bh;
++	u32 noderoot = ASFS_SB(sb)->objectnoderoot;
++	int errorcode;
++
++	/* Adds a new level to the Node tree. */
++
++	asfs_debug("addnewnodelevel: Entry\n");
++
++	if ((bh = asfs_breadcheck(sb, noderoot, ASFS_NODECONTAINER_ID))) {
++		struct buffer_head *newbh;
++		u32 newblock;
++
++		if ((errorcode = asfs_allocadminspace(sb, &newblock)) == 0 && (newbh = asfs_getzeroblk(sb, newblock))) {
++			struct fsNodeContainer *nc = (void *) bh->b_data;
++			struct fsNodeContainer *newnc = (void *) newbh->b_data;
++
++			/* The newly allocated block will become a copy of the current root. */
++
++			newnc->bheader.id = cpu_to_be32(ASFS_NODECONTAINER_ID);
++			newnc->bheader.ownblock = cpu_to_be32(newblock);
++			newnc->nodenumber = nc->nodenumber;
++			newnc->nodes = nc->nodes;
++			memcpy(newnc->node, nc->node, sb->s_blocksize - sizeof(struct fsNodeContainer));
++
++			asfs_bstore(sb, newbh);
++			asfs_brelse(newbh);
++
++			/* The current root will now be transformed into a new root. */
++
++			if (be32_to_cpu(nc->nodes) == 1)
++				nc->nodes = cpu_to_be32((sb->s_blocksize - sizeof(struct fsNodeContainer)) / nodesize);
++			else
++				nc->nodes = cpu_to_be32(be32_to_cpu(nc->nodes) * NODECONT_BLOCK_COUNT);
++
++			nc->node[0] = cpu_to_be32((newblock << (sb->s_blocksize_bits - ASFS_BLCKFACCURACY)) + 1);	/* Tree is full from that point! */
++			memset(&nc->node[1], 0, sb->s_blocksize - sizeof(struct fsNodeContainer) - 4);
++
++			asfs_bstore(sb, bh);
++		}
++		asfs_brelse(bh);
++	} else
++		errorcode = -EIO;
++
++	return errorcode;
++}
++
++static int createnodecontainer(struct super_block *sb, u32 nodenumber, u32 nodes, u32 * returned_block)
++{
++	struct buffer_head *bh;
++	int errorcode;
++	u32 newblock;
++
++	asfs_debug("createnodecontainer: nodenumber = %u, nodes = %u\n", nodenumber, nodes);
++
++	if ((errorcode = asfs_allocadminspace(sb, &newblock)) == 0 && (bh = asfs_getzeroblk(sb, newblock))) {
++		struct fsNodeContainer *nc = (void *) bh->b_data;
++
++		nc->bheader.id = cpu_to_be32(ASFS_NODECONTAINER_ID);
++		nc->bheader.ownblock = cpu_to_be32(newblock);
++
++		nc->nodenumber = cpu_to_be32(nodenumber);
++		nc->nodes = cpu_to_be32(nodes);
++
++		asfs_bstore(sb, bh);
++		asfs_brelse(bh);
++		*returned_block = newblock;
++	}
++
++	return errorcode;
++}
++
++	/* This function creates a new fsNode structure in a fsNodeContainer.  If needed
++	   it will create a new fsNodeContainers and a new fsNodeIndexContainer. */
++
++int asfs_createnode(struct super_block *sb, struct buffer_head **returned_bh, struct fsNode **returned_node, u32 * returned_nodeno)
++{
++	u16 nodecount = (sb->s_blocksize - sizeof(struct fsNodeContainer)) / NODE_STRUCT_SIZE;
++	u32 noderoot = ASFS_SB(sb)->objectnoderoot;
++	u32 nodeindex = noderoot;
++	int errorcode = 0;
++
++	while ((*returned_bh = asfs_breadcheck(sb, nodeindex, ASFS_NODECONTAINER_ID))) {
++		struct fsNodeContainer *nc = (void *) (*returned_bh)->b_data;
++
++		if (be32_to_cpu(nc->nodes) == 1) {	/* Is it a leaf-container? */
++			struct fsNode *n;
++			s16 i = nodecount;
++
++			n = (struct fsNode *) nc->node;
++
++			while (i-- > 0) {
++				if (n->data == 0)
++					break;
++
++				n = (struct fsNode *) ((u8 *) n + NODE_STRUCT_SIZE);
++			}
++
++			if (i >= 0) {
++				/* Found an empty fsNode structure! */
++				*returned_node = n;
++				*returned_nodeno = be32_to_cpu(nc->nodenumber) + ((u8 *) n - (u8 *) nc->node) / NODE_STRUCT_SIZE;
++
++				asfs_debug("createnode: Created Node %d\n", *returned_nodeno);
++
++				/* Below we continue to look through the NodeContainer block.  We skip the entry
++				   we found to be unused, and see if there are any more unused entries.  If we
++				   do not find any more unused entries then this container is now full. */
++
++				n = (struct fsNode *) ((u8 *) n + NODE_STRUCT_SIZE);
++
++				while (i-- > 0) {
++					if (n->data == 0)
++						break;
++
++					n = (struct fsNode *) ((u8 *) n + NODE_STRUCT_SIZE);
++				}
++
++				if (i < 0) {
++					/* No more empty fsNode structures in this block.  Mark parent full. */
++					errorcode = markparentfull(sb, *returned_bh);
++				}
++
++				return errorcode;
++			} else {
++				/* What happened now is that we found a leaf-container which was
++				   completely filled.  In practice this should only happen when there
++				   is only a single NodeContainer (only this container), or when there
++				   was an error in one of the full-bits in a higher level container. */
++
++				if (noderoot != nodeindex) {
++					/*** Hmmm... it looks like there was a damaged full-bit or something.
++					     In this case we'd probably better call markcontainerfull. */
++
++					printk("ASFS: Couldn't find empty Node in NodeContainer while NodeIndexContainer indicated there should be one!\n");
++
++					errorcode = -ENOSPC;
++					break;
++				} else {
++					/* Container is completely filled. */
++
++					if ((errorcode = addnewnodelevel(sb, NODE_STRUCT_SIZE)) != 0)
++						return errorcode;
++
++					nodeindex = noderoot;
++				}
++			}
++		} else {	/* This isn't a leaf container */
++			u32 *p = nc->node;
++			s16 i = NODECONT_BLOCK_COUNT;
++
++			/* We've read a normal container */
++
++			while (i-- > 0) {
++				if (*p != 0 && (be32_to_cpu(*p) & 0x00000001) == 0)
++					break;
++
++				p++;
++			}
++
++			if (i >= 0) {
++				/* Found a not completely filled Container */
++
++				nodeindex = be32_to_cpu(*p) >> (sb->s_blocksize_bits - ASFS_BLCKFACCURACY);
++			} else {
++				/* Everything in the NodeIndexContainer was completely filled.  There possibly
++				   are some unused pointers in this block however.  */
++
++				asfs_debug("createnode: NodeContainer at block has no empty Nodes.\n");
++
++				p = nc->node;
++				i = NODECONT_BLOCK_COUNT;
++
++				while (i-- > 0) {
++					if (*p == 0)
++						break;
++
++					p++;
++				}
++
++				if (i >= 0) {
++					u32 newblock;
++					u32 nodes;
++
++					/* Found an unused Container pointer */
++
++					if (be32_to_cpu(nc->nodes) == (sb->s_blocksize - sizeof(struct fsNodeContainer)) / NODE_STRUCT_SIZE) {
++						nodes = 1;
++					} else {
++						nodes = be32_to_cpu(nc->nodes) / NODECONT_BLOCK_COUNT;
++					}
++
++					if ((errorcode = createnodecontainer(sb, be32_to_cpu(nc->nodenumber) + (p - nc->node) * be32_to_cpu(nc->nodes), nodes, &newblock)) != 0) {
++						break;
++					}
++
++					*p = cpu_to_be32(newblock << (sb->s_blocksize_bits - ASFS_BLCKFACCURACY));
++
++					asfs_bstore(sb, *returned_bh);
++				} else {
++					/* Container is completely filled.  This must be the top-level NodeIndex container
++					   as otherwise the full-bit would have been wrong! */
++
++					if ((errorcode = addnewnodelevel(sb, NODE_STRUCT_SIZE)) != 0)
++						break;
++
++					nodeindex = noderoot;
++				}
++			}
++		}
++		asfs_brelse(*returned_bh);
++	}
++
++	if (*returned_bh == NULL)
++		return -EIO;
++
++	return (errorcode);
++}
++
++static int markparentempty(struct super_block *sb, struct buffer_head *bh)
++{
++	u32 nodenumber = be32_to_cpu(((struct fsNodeContainer *) bh->b_data)->nodenumber);
++	int errorcode;
++
++	if ((errorcode = parentnodecontainer(sb, &bh)) == 0 && bh != 0) {
++		struct fsNodeContainer *nc = (void *) bh->b_data;
++		int wasfull;
++		u16 containerentry = (nodenumber - be32_to_cpu(nc->nodenumber)) / be32_to_cpu(nc->nodes);
++
++		wasfull = isfull(sb, nc);
++
++		nc->node[containerentry] = cpu_to_be32(be32_to_cpu(nc->node[containerentry]) & ~0x00000001);
++
++		asfs_bstore(sb, bh);
++
++		if (wasfull) {
++			/* This container was completely full before!  Mark the next higher up container too then! */
++			return markparentempty(sb, bh);
++		}
++		asfs_brelse(bh);
++	}
++
++	return errorcode;
++}
++
++static int freecontainer(struct super_block *sb, struct buffer_head *bh)
++{
++	u32 nodenumber = be32_to_cpu(((struct fsNodeContainer *) bh->b_data)->nodenumber);
++	int errorcode;
++
++	if ((errorcode = parentnodecontainer(sb, &bh)) == 0 && bh != NULL) {	/* This line also prevents the freeing of the noderoot. */
++		struct fsNodeContainer *nc = (void *) bh->b_data;
++		u16 containerindex = (nodenumber - be32_to_cpu(nc->nodenumber)) / be32_to_cpu(nc->nodes);
++
++		if ((errorcode = asfs_freeadminspace(sb, be32_to_cpu(nc->node[containerindex]) >> (sb->s_blocksize_bits - ASFS_BLCKFACCURACY))) == 0) {
++			u32 *p = nc->node;
++			s16 n = NODECONT_BLOCK_COUNT;
++
++			nc->node[containerindex] = 0;
++			asfs_bstore(sb, bh);
++
++			while (n-- > 0)
++				if (*p++ != 0)
++					break;
++
++			if (n < 0) {	/* This container is now completely empty!  Free this NodeIndexContainer too then! */
++				return freecontainer(sb, bh);
++			}
++		}
++		asfs_brelse(bh);
++	}
++
++	return errorcode;
++}
++
++static int internaldeletenode(struct super_block *sb, struct buffer_head *bh, struct fsNode *n)
++{
++	struct fsNodeContainer *nc = (void *) bh->b_data;
++	u16 nodecount = (sb->s_blocksize - sizeof(struct fsNodeContainer)) / NODE_STRUCT_SIZE;
++	s16 i = nodecount;
++	s16 empty = 0;
++	int errorcode = 0;
++
++	n->data = 0;
++	n = (struct fsNode *) nc->node;
++
++	while (i-- > 0) {
++		if (n->data == 0)
++			empty++;
++
++		n = (struct fsNode *) ((u8 *) n + NODE_STRUCT_SIZE);
++	}
++
++	asfs_bstore(sb, bh);
++
++	if (empty == 1)		/* NodeContainer was completely full before, so we need to mark it empty now. */
++		errorcode = markparentempty(sb, bh);
++	else if (empty == nodecount)	/* NodeContainer is now completely empty!  Free it! */
++		errorcode = freecontainer(sb, bh);
++
++	return (errorcode);
++}
++
++int asfs_deletenode(struct super_block *sb, u32 objectnode)
++{
++	struct buffer_head *bh;
++	struct fsObjectNode *on;
++	int errorcode;
++
++	asfs_debug("deletenode: Deleting Node %d\n", objectnode);
++
++	if ((errorcode = asfs_getnode(sb, objectnode, &bh, &on)) == 0)
++		errorcode = internaldeletenode(sb, bh, (struct fsNode *) on);
++
++	asfs_brelse(bh);
++	return (errorcode);
++}
++
++#endif
+diff -urN linux-2.6.3/fs/asfs/objects.c linux-2.6.3-asfs-1.0b7/fs/asfs/objects.c
+--- linux-2.6.3/fs/asfs/objects.c	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.3-asfs-1.0b7/fs/asfs/objects.c	2004-06-10 17:16:10.000000000 +0200
+@@ -0,0 +1,765 @@
++/*
++ *
++ * Amiga Smart File System, Linux implementation
++ * version: 1.0beta7
++ *
++ * This file contains some parts of the original amiga version of 
++ * SmartFilesystem source code.
++ *
++ * SmartFilesystem is copyrighted (C) 2003 by: John Hendrikx, 
++ * Ralph Schmidt, Emmanuel Lesueur, David Gerber, and Marcin Kurek
++ * 
++ * Adapted and modified by Marek 'March' Szyprowski <marek at amiga.pl>
++ *
++ */
++
++#include <linux/types.h>
++#include <linux/errno.h>
++#include <linux/slab.h>
++#include <linux/fs.h>
++#include <linux/buffer_head.h>
++#include <linux/vfs.h>
++#include "asfs_fs.h"
++
++#include <asm/byteorder.h>
++
++struct fsObject *asfs_nextobject(struct fsObject *obj)
++{
++	int i;
++	u8 *p = obj->name;
++
++	for (i = 2; i > 0; p++)
++		if (*p == '\0')
++			i--;
++	if ((p - (u8 *) obj) & 0x01)
++		p++;
++
++	return ((struct fsObject *) p);
++}
++
++struct fsObject *asfs_find_obj_by_name(struct super_block *sb, struct fsObjectContainer *objcont, u8 * name)
++{
++	struct fsObject *obj;
++
++	obj = &(objcont->object[0]);
++	while (be32_to_cpu(obj->objectnode) > 0 && ((char *) obj - (char *) objcont) + sizeof(struct fsObject) + 2 < sb->s_blocksize) {
++		if (asfs_namecmp(obj->name, name, ASFS_SB(sb)->flags & ASFS_ROOTBITS_CASESENSITIVE) == 0) {
++			asfs_debug("Object found! Node %u, Name %s, Type %x, inCont %u\n", be32_to_cpu(obj->objectnode), obj->name, obj->bits, be32_to_cpu(objcont->bheader.ownblock));
++			return obj;
++		}
++		obj = asfs_nextobject(obj);
++	}
++	return NULL;
++}
++
++#ifdef CONFIG_ASFS_RW
++
++struct fsObject *find_obj_by_node(struct super_block *sb, struct fsObjectContainer *objcont, u32 objnode)
++{
++	struct fsObject *obj;
++
++	obj = &(objcont->object[0]);
++	while (be32_to_cpu(obj->objectnode) > 0 && ((char *) obj - (char *) objcont) + sizeof(struct fsObject) + 2 < sb->s_blocksize) {
++		if (be32_to_cpu(obj->objectnode) == objnode) {
++			return obj;
++		}
++		obj = asfs_nextobject(obj);
++	}
++	return NULL;
++}
++
++int asfs_readobject(struct super_block *sb, u32 objectnode, struct buffer_head **bh, struct fsObject **returned_object)
++{
++	struct fsObjectNode *on;
++	int errorcode;
++	u32 contblock;
++
++	asfs_debug("Seaching object - node %d\n", objectnode);
++
++	if ((errorcode = asfs_getnode(sb, objectnode, bh, &on)) != 0)
++		return errorcode;
++	contblock = be32_to_cpu(on->node.data);
++	asfs_brelse(*bh);
++
++	if (contblock > 0 && (*bh = asfs_breadcheck(sb, contblock, ASFS_OBJECTCONTAINER_ID))) {
++		*returned_object = find_obj_by_node(sb, (void *) (*bh)->b_data, objectnode);
++		if (*returned_object == NULL) {
++			brelse(*bh);
++			*bh = NULL;
++			return -ENOENT;
++		}
++		return 0;
++	} else
++		return -EIO;
++}
++
++static int removeobjectcontainer(struct super_block *sb, struct buffer_head *bh)
++{
++	struct fsObjectContainer *oc = (void *) bh->b_data;
++	int errorcode;
++	struct buffer_head *block;
++
++	asfs_debug("removeobjectcontainer: block %u\n", be32_to_cpu(oc->bheader.ownblock));
++
++	if (oc->next != 0 && oc->next != oc->bheader.ownblock) {
++		struct fsObjectContainer *next_oc;
++
++		if ((block = asfs_breadcheck(sb, be32_to_cpu(oc->next), ASFS_OBJECTCONTAINER_ID)) == NULL)
++			return -EIO;
++
++		next_oc = (void *) block->b_data;
++		next_oc->previous = oc->previous;
++
++		asfs_bstore(sb, block);
++		asfs_brelse(block);
++	}
++
++	if (oc->previous != 0 && oc->previous != oc->bheader.ownblock) {
++		struct fsObjectContainer *previous_oc;
++
++		if ((block = asfs_breadcheck(sb, be32_to_cpu(oc->previous), ASFS_OBJECTCONTAINER_ID)) == NULL)
++			return -EIO;
++
++		previous_oc = (void *) block->b_data;
++		previous_oc->next = oc->next;
++
++		asfs_bstore(sb, block);
++		asfs_brelse(block);
++	} else {
++		struct fsObject *parent_o;
++
++		if ((errorcode = asfs_readobject(sb, be32_to_cpu(oc->parent), &block, &parent_o)) != 0)
++			return (errorcode);
++
++		parent_o->object.dir.firstdirblock = oc->next;
++
++		asfs_bstore(sb, block);
++		asfs_brelse(block);
++	}
++
++	if ((errorcode = asfs_freeadminspace(sb, be32_to_cpu(oc->bheader.ownblock))) != 0)
++		return (errorcode);
++
++	return (0);
++}
++
++static int setrecycledinfodiff(struct super_block *sb, s32 deletedfiles, s32 deletedblocks)
++{
++	struct buffer_head *bh;
++
++	if ((bh = asfs_breadcheck(sb, ASFS_SB(sb)->rootobjectcontainer, ASFS_OBJECTCONTAINER_ID))) {
++		struct fsRootInfo *ri = (struct fsRootInfo *) ((u8 *) bh->b_data + sb->s_blocksize - sizeof(struct fsRootInfo));
++
++		ri->deletedfiles = cpu_to_be32(be32_to_cpu(ri->deletedfiles) + deletedfiles);
++		ri->deletedblocks = cpu_to_be32(be32_to_cpu(ri->deletedblocks) + deletedblocks);
++
++		asfs_bstore(sb, bh);
++		asfs_brelse(bh);
++	} else
++		return -EIO;
++	return 0;
++}
++
++	/* This function removes the fsObject structure passed in from the passed
++	   buffer_head.  If the ObjectContainer becomes completely empty it will be 
++	   delinked from the ObjectContainer chain and marked free for reuse.
++	   This function doesn't delink the object from the hashchain! */
++
++static int simpleremoveobject(struct super_block *sb, struct buffer_head *bh, struct fsObject *o)
++{
++	struct fsObjectContainer *oc = (void *) bh->b_data;
++	int errorcode = 0;
++
++	asfs_debug("simpleremoveobject:\n");
++
++	if (be32_to_cpu(oc->parent) == ASFS_RECYCLEDNODE) {
++		/* This object is removed from the Recycled directory. */
++		if ((errorcode = setrecycledinfodiff(sb, -1, -((be32_to_cpu(o->object.file.size) + sb->s_blocksize - 1) >> sb->s_blocksize_bits))) != 0)
++			return errorcode;
++	}
++
++	if ((asfs_nextobject(oc->object))->name[0] == '\0')
++		errorcode = removeobjectcontainer(sb, bh);
++	else {
++		struct fsObject *nexto;
++		int objlen;
++
++		nexto = asfs_nextobject(o);
++		objlen = (u8 *) nexto - (u8 *) o;
++
++		memmove(o, nexto, sb->s_blocksize - ((u8 *) nexto - (u8 *) oc));
++		memset((u8 *) oc + sb->s_blocksize - objlen, 0, objlen);
++
++		asfs_bstore(sb, bh);
++	}
++	return errorcode;
++}
++
++/* This function delinks the passed in ObjectNode from its hash-chain.  Handy when deleting
++   the object, or when renaming/moving it. */
++
++static int dehashobjectquick(struct super_block *sb, u32 objectnode, u8 *name, u32 parentobjectnode)
++{
++	struct fsObject *o;
++	int errorcode;
++	struct buffer_head *block;
++
++	asfs_debug("dehashobject: Delinking object %d (=ObjectNode) from hashchain. Parentnode = %d\n", objectnode, parentobjectnode);
++
++	if ((errorcode = asfs_readobject(sb, parentobjectnode, &block, &o)) == 0 && o->object.dir.hashtable != 0) {
++		u32 hashtable = be32_to_cpu(o->object.dir.hashtable);
++		asfs_brelse(block);
++
++		if ((block = asfs_breadcheck(sb, hashtable, ASFS_HASHTABLE_ID))) {
++			struct buffer_head *node_bh;
++			struct fsObjectNode *onptr, on;
++			struct fsHashTable *ht = (void *) block->b_data;
++			u32 nexthash;
++
++			if ((errorcode = asfs_getnode(sb, objectnode, &node_bh, &onptr)) == 0) {
++				u16 hashchain;
++
++				asfs_debug("dehashobject: Read HashTable block of parent object of object to be delinked\n");
++
++				hashchain = HASHCHAIN(asfs_hash(name, ASFS_SB(sb)->flags & ASFS_ROOTBITS_CASESENSITIVE));
++				nexthash = be32_to_cpu(ht->hashentry[hashchain]);
++
++				if (nexthash == objectnode) {
++					/* The hashtable directly points to the fsObject to be delinked.  We simply
++					   modify the Hashtable to point to the new nexthash entry. */
++
++					asfs_debug("dehashobject: The hashtable points directly to the to be delinked object\n");
++
++					ht->hashentry[hashchain] = onptr->next;
++					asfs_bstore(sb, block);
++				} else {
++					struct fsObjectNode *onsearch = 0;
++
++					on = *onptr;
++
++					asfs_debug("dehashobject: Walking through hashchain\n");
++
++					while (nexthash != 0 && nexthash != objectnode) {
++						asfs_brelse(node_bh);
++						if ((errorcode = asfs_getnode(sb, nexthash, &node_bh, &onsearch)) != 0)
++							break;
++						nexthash = be32_to_cpu(onsearch->next);
++					}
++
++					if (errorcode == 0) {
++						if (nexthash != 0) {
++							/* Previous fsObjectNode found in hash chain.  Modify the fsObjectNode to 'skip' the
++							   ObjectNode which is being delinked from the hash chain. */
++
++							onsearch->next = on.next;
++							asfs_bstore(sb, node_bh);
++						} else {
++							printk("ASFS: Hashchain of object %d is corrupt or incorrectly linked.", objectnode);
++
++							/*** This is strange.  We have been looking for the fsObjectNode which is located before the
++							     passed in fsObjectNode in the hash-chain.  However, we never found the
++							     fsObjectNode reffered to in the hash-chain!  Has to be somekind
++							     of internal error... */
++
++							errorcode = -ENOENT;
++						}
++					}
++				}
++				asfs_brelse(node_bh);
++			}
++			asfs_brelse(block);
++		}
++	}
++	return errorcode;
++}
++
++
++	/* This function removes an object from any directory.  It takes care
++	   of delinking the object from the hashchain and also frees the
++	   objectnode number. */
++
++static int removeobject(struct super_block *sb, struct buffer_head *bh, struct fsObject *o)
++{
++	struct fsObjectContainer *oc = (void *) bh->b_data;
++	int errorcode;
++
++	asfs_debug("removeobject\n");
++
++	if ((errorcode = dehashobjectquick(sb, be32_to_cpu(o->objectnode), o->name, be32_to_cpu(oc->parent))) == 0) {
++		u32 objectnode = be32_to_cpu(o->objectnode);
++
++		if ((errorcode = simpleremoveobject(sb, bh, o)) == 0)
++			errorcode = asfs_deletenode(sb, objectnode);
++	}
++
++	return (errorcode);
++}
++
++	/* This function deletes the specified object. */
++int asfs_deleteobject(struct super_block *sb, struct buffer_head *bh, struct fsObject *o)
++{
++	int errorcode = 0;
++
++	asfs_debug("deleteobject: Entry -- deleting object %d (%s)\n", be32_to_cpu(o->objectnode), o->name);
++
++	if ((o->bits & OTYPE_DIR) == 0 || o->object.dir.firstdirblock == 0) {
++		u8 bits = o->bits;
++		u32 hashblckno = be32_to_cpu(o->object.dir.hashtable);
++		u32 extentbnode = be32_to_cpu(o->object.file.data);
++
++		if ((errorcode = removeobject(sb, bh, o)) == 0) {
++			if ((bits & OTYPE_LINK) != 0) {
++				asfs_debug("deleteobject: Object is soft link!\n");
++				errorcode = asfs_freeadminspace(sb, extentbnode);
++			} else if ((bits & OTYPE_DIR) != 0) {
++				asfs_debug("deleteobject: Object is a directory!\n");
++				errorcode = asfs_freeadminspace(sb, hashblckno);
++			} else {
++				asfs_debug("deleteobject: Object is a file\n");
++				if (extentbnode != 0)
++					errorcode = asfs_deleteextents(sb, extentbnode);
++			}
++		}
++	}
++
++	return (errorcode);
++}
++
++	/* This function takes a HashBlock pointer, an ObjectNode and an ObjectName.
++	   If there is a hashblock, then this function will correctly link the object
++	   into the hashchain.  If there isn't a hashblock (=0) then this function
++	   does nothing.  */
++
++static int hashobject(struct super_block *sb, u32 hashblock, struct fsObjectNode *on, u32 nodeno, u8 *objectname)
++{
++	struct buffer_head *hash_bh;
++
++	asfs_debug("hashobject, using hashblock %d\n", hashblock);
++	if (hashblock == 0)
++		return 0;
++
++	if ((hash_bh = asfs_breadcheck(sb, hashblock, ASFS_HASHTABLE_ID))) {
++		struct fsHashTable *ht = (void *) hash_bh->b_data;
++		u32 nexthash;
++		u16 hashvalue, hashchain;
++
++		hashvalue = asfs_hash(objectname, ASFS_SB(sb)->flags & ASFS_ROOTBITS_CASESENSITIVE);
++		hashchain = HASHCHAIN(hashvalue);
++		nexthash = be32_to_cpu(ht->hashentry[hashchain]);
++
++		ht->hashentry[hashchain] = cpu_to_be32(nodeno);
++
++		asfs_bstore(sb, hash_bh);
++		asfs_brelse(hash_bh);
++
++		on->next = cpu_to_be32(nexthash);
++		on->hash16 = cpu_to_be16(hashvalue);
++	} else
++		return -EIO;
++
++	return 0;
++}
++
++	/* This function returns a pointer to the first unused byte in
++	   an ObjectContainer. */
++
++static u8 *emptyspaceinobjectcontainer(struct super_block *sb, struct fsObjectContainer *oc)
++{
++	struct fsObject *o = oc->object;
++	u8 *endadr;
++
++	endadr = (u8 *) oc + sb->s_blocksize - sizeof(struct fsObject) - 2;
++
++	while ((u8 *) o < endadr && o->name[0] != 0)
++		o = asfs_nextobject(o);
++
++	return (u8 *) o;
++}
++
++	/* This function will look in the directory indicated by io_o
++	   for an ObjectContainer block which contains bytesneeded free
++	   bytes.  If none is found then this function simply creates a
++	   new ObjectContainer and adds that to the indicated directory. */
++
++static int findobjectspace(struct super_block *sb, struct buffer_head **io_bh, struct fsObject **io_o, u32 bytesneeded)
++{
++	struct buffer_head *bhparent = *io_bh;
++	struct fsObject *oparent = *io_o;
++	struct buffer_head *bh;
++	u32 nextblock = be32_to_cpu(oparent->object.dir.firstdirblock);
++	int errorcode = 0;
++
++	asfs_debug("findobjectspace: Looking for %u bytes in directory with ObjectNode number %d (in block %d)\n", bytesneeded, be32_to_cpu((*io_o)->objectnode),
++		   be32_to_cpu(((struct fsBlockHeader *) (*io_bh)->b_data)->ownblock));
++
++	while (nextblock != 0 && (bh = asfs_breadcheck(sb, nextblock, ASFS_OBJECTCONTAINER_ID))) {
++		struct fsObjectContainer *oc = (void *) bh->b_data;
++		u8 *emptyspace;
++
++		/* We need to find out how much free space this ObjectContainer has */
++
++		emptyspace = emptyspaceinobjectcontainer(sb, oc);
++
++		if ((u8 *) oc + sb->s_blocksize - emptyspace >= bytesneeded) {
++			/* We found enough space in one of the ObjectContainer blocks!!
++			   We return a struct fsObject *. */
++			*io_bh = bh;
++			*io_o = (struct fsObject *) emptyspace;
++			break;
++		}
++		nextblock = be32_to_cpu(oc->next);
++		asfs_brelse(bh);
++	}
++
++	if (nextblock == 0) {
++		u32 newcontblock;
++		/* If we get here, we traversed the *entire* directory (ough!) and found no empty
++		   space large enough for our entry.  We allocate new space and add it to this
++		   directory. */
++
++		if ((errorcode = asfs_allocadminspace(sb, &newcontblock)) == 0 && (bh = asfs_getzeroblk(sb, newcontblock))) {
++			struct fsObjectContainer *oc = (void *) bh->b_data;
++			struct buffer_head *bhnext;
++
++			asfs_debug("findobjectspace: No room was found, allocated new block at %u\n", newcontblock);
++
++			/* Allocated new block.  We will now link it to the START of the directory chain
++			   so the new free space can be found quickly when more entries need to be added. */
++
++			oc->bheader.id = cpu_to_be32(ASFS_OBJECTCONTAINER_ID);
++			oc->bheader.ownblock = cpu_to_be32(newcontblock);
++			oc->parent = oparent->objectnode;
++			oc->next = oparent->object.dir.firstdirblock;
++			oc->previous = 0;
++
++			oparent->object.dir.firstdirblock = cpu_to_be32(newcontblock);
++
++			asfs_bstore(sb, bhparent);
++
++			if (oc->next != 0 && (bhnext = asfs_breadcheck(sb, be32_to_cpu(oc->next), ASFS_OBJECTCONTAINER_ID))) {
++				struct fsObjectContainer *ocnext = (void *) bhnext->b_data;
++				ocnext->previous = cpu_to_be32(newcontblock);
++				asfs_bstore(sb, bhnext);
++				asfs_brelse(bhnext);
++			}
++
++			*io_bh = bh;
++			*io_o = oc->object;
++		}
++	}
++
++	asfs_debug("findobjectspace: new object will be in container block %u\n", be32_to_cpu(((struct fsBlockHeader *) (*io_bh)->b_data)->ownblock));
++
++	return (errorcode);
++}
++
++/* io_bh & io_o refer to the direct parent of the new object.  Objectname is the
++	name of the new object (name only). Does not realese io_bh !!! */
++
++int asfs_createobject(struct super_block *sb, struct buffer_head **io_bh, struct fsObject **io_o, struct fsObject *src_o, u8 *objectname, int force)
++{
++	int errorcode;
++	u32 object_size;
++	u32 hashblock = be32_to_cpu((*io_o)->object.dir.hashtable);
++
++	asfs_debug("createobject: Creating object '%s' in dir '%s'.\n", objectname, (*io_o)->name);
++
++	if (!force && ASFS_SB(sb)->freeblocks < ASFS_ALWAYSFREE)
++		return -ENOSPC;
++
++	if (!force && be32_to_cpu((*io_o)->objectnode) == ASFS_RECYCLEDNODE)
++		return -EINVAL;
++
++	object_size = sizeof(struct fsObject) + strlen(objectname) + 2;
++
++	if ((errorcode = findobjectspace(sb, io_bh, io_o, object_size)) == 0) {
++		struct fsObject *o2 = *io_o;
++		u8 *name = o2->name;
++		u8 *objname = objectname;
++		struct buffer_head *node_bh;
++		struct fsObjectNode *on;
++		u32 nodeno;
++
++		**io_o = *src_o;	/* Copying whole object data... */
++
++		while (*objname != 0)	/* Copying name */
++			*name++ = *objname++;
++
++		*name++ = 0;
++		*name = 0;	/* zero byte for comment */
++
++		if (o2->objectnode != 0)	/* ObjectNode reuse or creation */
++			errorcode = asfs_getnode(sb, o2->objectnode, &node_bh, &on);
++		else {
++			if ((errorcode = asfs_createnode(sb, &node_bh, (struct fsNode **) &on, &nodeno)) == 0) {
++				on->hash16 = cpu_to_be16(asfs_hash(o2->name, ASFS_SB(sb)->flags & ASFS_ROOTBITS_CASESENSITIVE));
++				o2->objectnode = cpu_to_be32(nodeno);
++			}
++			asfs_debug("createnode returned with errorcode: %d\n", errorcode);
++		}
++
++		if (errorcode == 0) {	/* in io_bh there is a container with created object */
++			on->node.data = ((struct fsBlockHeader *) (*io_bh)->b_data)->ownblock;
++			if ((errorcode = hashobject(sb, hashblock, on, be32_to_cpu(o2->objectnode), objectname)) == 0) {
++				asfs_bstore(sb, node_bh);
++				asfs_brelse(node_bh);
++			} else
++				errorcode = -EIO;
++		}
++
++		if (errorcode == 0) {	/* HashBlock reuse or creation:*/
++
++			if ((o2->bits & OTYPE_DIR) != 0 && o2->object.dir.hashtable == 0) {
++				struct buffer_head *hashbh;
++				u32 hashblock;
++
++				asfs_debug("creating Hashblock\n");
++
++				if ((errorcode = asfs_allocadminspace(sb, &hashblock)) == 0 && (hashbh = asfs_getzeroblk(sb, hashblock))) {	    
++					struct fsHashTable *ht = (void *) hashbh->b_data;
++
++					o2->object.dir.hashtable = cpu_to_be32(hashblock);
++
++					ht->bheader.id = cpu_to_be32(ASFS_HASHTABLE_ID);
++					ht->bheader.ownblock = cpu_to_be32(hashblock);
++					ht->parent = o2->objectnode;
++
++					asfs_bstore(sb, hashbh);
++					asfs_brelse(hashbh);
++				}
++			}
++		}
++
++		if (errorcode == 0) {	/* SoftLink creation: */
++			if ((o2->bits & (OTYPE_LINK | OTYPE_HARDLINK)) == OTYPE_LINK && o2->object.file.data == 0) {
++				struct buffer_head *bh2;
++				u32 slinkblock;
++
++				if ((errorcode = asfs_allocadminspace(sb, &slinkblock)) == 0 && (bh2 = asfs_getzeroblk(sb, slinkblock))) {
++					struct fsSoftLink *sl = (void *) bh2->b_data;
++					o2->object.file.data = cpu_to_be32(slinkblock);
++					sl->bheader.id = cpu_to_be32(ASFS_SOFTLINK_ID);
++					sl->bheader.ownblock = cpu_to_be32(slinkblock);
++					sl->parent = o2->objectnode;
++					sl->next = 0;
++					sl->previous = 0;
++					asfs_bstore(sb, bh2);
++					asfs_brelse(bh2);
++				}
++			}
++		}
++	}
++	asfs_debug("createobject: done.\n");
++
++	return (errorcode);
++}
++
++	/* This function extends the file object 'o' with a number  of blocks 
++		(hopefully, if any blocks has been found!). Only new Extents will 
++      be created -- the size of the file will not be altered, and changing 
++		it is left up to the caller.  If the file did not have any blocks 
++		yet, then the o->object.file.data will be set to the first (new) 
++		ExtentBNode. It returns the number of added blocks through 
++		addedblocks pointer */
++
++int asfs_addblockstofile(struct super_block *sb, struct buffer_head *objbh, struct fsObject *o, u32 blocks, u32 * newspace, u32 * addedblocks)
++{
++	u32 lastextentbnode;
++	int errorcode = 0;
++	struct fsExtentBNode *ebnp;
++	struct buffer_head *block = NULL;
++
++
++	asfs_debug("extendblocksinfile: Trying to increasing number of blocks by %d.\n", blocks);
++
++	lastextentbnode = be32_to_cpu(o->object.file.data);
++
++	if (lastextentbnode != 0) {
++		while (lastextentbnode != 0 && errorcode == 0) {
++			if (block != NULL)
++				asfs_brelse(block);
++			errorcode = asfs_getextent(sb, lastextentbnode, &block, &ebnp);
++			lastextentbnode = be32_to_cpu(ebnp->next);
++		}
++		lastextentbnode = be32_to_cpu(ebnp->key);
++	}
++
++	if (errorcode == 0) {
++		u32 searchstart;
++
++		u32 found_block;
++		u32 found_blocks;
++
++		*addedblocks = 0;
++		*newspace = 0;
++
++		if (lastextentbnode != 0)
++			searchstart = be32_to_cpu(ebnp->key) + be16_to_cpu(ebnp->blocks);
++		else
++			searchstart = 0; //ASFS_SB(sb)->block_rovingblockptr;
++
++		if ((errorcode = asfs_findspace(sb, blocks, searchstart, searchstart, &found_block, &found_blocks)) != 0) {
++			asfs_brelse(block);
++			asfs_debug("extendblocksinfile: findspace returned %s\n", errorcode == -ENOSPC ? "ENOSPC" : "error");
++			return errorcode;
++		}
++
++		blocks = found_blocks;
++		errorcode = asfs_markspace(sb, found_block, found_blocks);
++		*addedblocks = found_blocks;
++		*newspace = found_block;
++
++		asfs_debug("extendblocksinfile: block = %u, lastextentbnode = %u, extentblocks = %d\n", found_block, lastextentbnode, blocks);
++
++		if ((errorcode = asfs_addblocks(sb, blocks, found_block, be32_to_cpu(o->objectnode), &lastextentbnode)) != 0) {
++			asfs_debug("extendblocksinfile: addblocks returned errorcode %d\n", errorcode);
++			return errorcode;
++		}
++
++		if (o->object.file.data == 0)
++			o->object.file.data = cpu_to_be32(lastextentbnode);
++	}
++
++	if (block)
++		asfs_brelse(block);
++	asfs_bstore(sb, objbh);
++
++	asfs_debug("addblockstofile: done. added %d blocks\n", *addedblocks);
++
++	return errorcode;
++}
++
++	/* The Object indicated by bh1 & o1, gets renamed to newname and placed
++	   in the directory indicated by bhparent & oparent. */
++
++int asfs_renameobject(struct super_block *sb, struct buffer_head *bh1, struct fsObject *o1, struct buffer_head *bhparent, struct fsObject *oparent, u8 * newname)
++{
++	struct fsObject object;
++	u32 oldparentnode = be32_to_cpu(((struct fsObjectContainer *) bh1->b_data)->parent);
++	u8 oldname[107];
++	int errorcode;
++
++	asfs_debug("renameobject: Renaming '%s' to '%s' in dir '%s'\n", o1->name, newname, oparent->name);
++
++	object = *o1;
++	strcpy(oldname, o1->name);
++
++	if ((errorcode = dehashobjectquick(sb, be32_to_cpu(o1->objectnode), o1->name, oldparentnode)) == 0) {
++		u32 parentobjectnode = be32_to_cpu(oparent->objectnode);
++
++		if ((errorcode = simpleremoveobject(sb, bh1, o1)) == 0) {
++			struct buffer_head *bh2 = bhparent;
++			struct fsObject *o2;
++
++			/* oparent might changed after simpleremoveobject */
++			oparent = o2 = find_obj_by_node(sb, (struct fsObjectContainer *) bhparent->b_data, parentobjectnode);
++
++			/* In goes the Parent bh & o, out comes the New object's bh & o :-) */
++			if ((errorcode = asfs_createobject(sb, &bh2, &o2, &object, newname, TRUE)) == 0) {
++				asfs_bstore(sb, bh2);
++				if (be32_to_cpu(oparent->objectnode) == ASFS_RECYCLEDNODE) {
++					asfs_debug("renameobject: Updating recycled dir info\n");
++					if ((errorcode = setrecycledinfodiff(sb, 1, (be32_to_cpu(o2->object.file.size) + sb->s_blocksize - 1) >> sb->s_blocksize_bits)) != 0) {
++						brelse(bh2);
++						return errorcode;
++					}
++				}
++				brelse(bh2);
++				asfs_debug("renameobject: Succesfully created & stored new object.\n");
++			} else { /* recreate object in old place, maybe this will not fail, but who knows... */
++				asfs_debug("renameobject: Creating new object failed. Trying to recreate it in source directory.\n");
++				if (asfs_readobject(sb, oldparentnode, &bh1, &o1) == 0) {
++					struct buffer_head *bh2 = bh1;
++					if (asfs_createobject(sb, &bh2, &o1, &object, oldname, TRUE) == 0) {
++						asfs_bstore(sb, bh2);
++						if (oldparentnode == ASFS_RECYCLEDNODE) {
++							asfs_debug("renameobject: Updating recycled dir info\n");
++							setrecycledinfodiff(sb, 1, (be32_to_cpu(o1->object.file.size) + sb->s_blocksize - 1) >> sb->s_blocksize_bits);
++						}
++						brelse(bh2);
++					}
++					brelse(bh1);
++				}
++			}
++		}
++	}
++	return errorcode;
++}
++
++		/* Truncates the specified file to /newsize/ bytes */
++
++int asfs_truncateblocksinfile(struct super_block *sb, struct buffer_head *bh, struct fsObject *o, u32 newsize)
++{
++	struct buffer_head *ebh;
++	struct fsExtentBNode *ebn;
++	int errorcode;
++	u32 pos = 0;
++	u32 newblocks = (newsize + sb->s_blocksize - 1) >> sb->s_blocksize_bits;
++	u32 filedata = be32_to_cpu(o->object.file.data);
++	u32 eprev, ekey;
++	u16 eblocks;
++
++	asfs_debug("trucateblocksinfile: newsize %u\n", newsize);
++
++	if (filedata == 0)
++		return 0;
++
++	for (;;) {
++		if ((errorcode = asfs_getextent(sb, filedata, &ebh, &ebn)) != 0)
++			return errorcode;
++		if (pos + be16_to_cpu(ebn->blocks) >= newblocks)
++			break;
++		pos += be16_to_cpu(ebn->blocks);
++		if ((filedata = be32_to_cpu(ebn->next)) == 0)
++			break;
++		asfs_brelse(ebh);
++	};
++
++	eblocks = newblocks - pos;
++	ekey = be32_to_cpu(ebn->key);
++	eprev = be32_to_cpu(ebn->prev);
++
++	if (be16_to_cpu(ebn->blocks) < eblocks) {
++		printk("ASFS: Extent chain is too short or damaged!\n");
++		asfs_brelse(ebh);
++		return -ENOENT;
++	}
++	if (be16_to_cpu(ebn->blocks) - eblocks > 0 && (errorcode = asfs_freespace(sb, be32_to_cpu(ebn->key) + eblocks, be16_to_cpu(ebn->blocks) - eblocks)) != 0) {
++		asfs_brelse(ebh);
++		return errorcode;
++	}
++	if (be32_to_cpu(ebn->next) > 0 && (errorcode = asfs_deleteextents(sb, be32_to_cpu(ebn->next))) != 0) {
++		asfs_brelse(ebh);
++		return errorcode;
++	}
++	ebn->blocks = cpu_to_be16(eblocks);
++	ebn->next = 0;
++	asfs_bstore(sb, ebh);
++
++	if (eblocks == 0) {
++		if (eprev & MSB_MASK) {
++			o->object.file.data = 0;
++			asfs_bstore(sb, bh);
++		} else {
++			struct buffer_head *ebhp;
++			struct fsExtentBNode *ebnp;
++
++			if ((errorcode = asfs_getextent(sb, eprev & !MSB_MASK, &ebhp, &ebnp)) != 0) {
++				asfs_brelse(ebh);
++				return errorcode;
++			}
++
++			ebnp->next = 0;
++			asfs_bstore(sb, ebhp);
++			asfs_brelse(ebhp);
++		}
++		if ((errorcode = asfs_deletebnode(sb, ebh, ekey)) != 0) {
++			asfs_brelse(ebh);
++			return errorcode;
++		}
++	}
++	asfs_brelse(ebh);
++
++	return 0;
++}
++#endif
+diff -urN linux-2.6.3/fs/asfs/super.c linux-2.6.3-asfs-1.0b7/fs/asfs/super.c
+--- linux-2.6.3/fs/asfs/super.c	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.3-asfs-1.0b7/fs/asfs/super.c	2004-06-25 22:44:25.119502392 +0200
+@@ -0,0 +1,437 @@
++/*
++ *
++ * Amiga Smart File System, Linux implementation
++ *
++ * version: 1.0beta7 for 2.6.x kernel
++ *  
++ * Copyright (C) 2003,2004  Marek 'March' Szyprowski <marek at amiga.pl>
++ *
++ *
++ * Thanks to Marcin Kurek (Morgoth/Dreamolers-CAPS) for help and parts 
++ * of original amiga version of SmartFilesystem source code. 
++ *
++ * SmartFilesystem is copyrighted (C) 2003 by: John Hendrikx, 
++ * Ralph Schmidt, Emmanuel Lesueur, David Gerber and Marcin Kurek
++ * 
++ *
++ * ASFS is based on the Amiga FFS filesystem for Linux
++ * Copyright (C) 1993  Ray Burr
++ * Copyright (C) 1996  Hans-Joachim Widmaier
++ *
++ * Earlier versions were based on the Linux implementation of 
++ * the ROMFS file system
++ * Copyright (C) 1997-1999  Janos Farkas <chexum at shadow.banki.hu>
++ *
++ * ASFS used some parts of the smbfs filesystem:
++ * Copyright (C) 1995, 1996 by Paal-Kr. Engstad and Volker Lendecke
++ * Copyright (C) 1997 by Volker Lendecke
++ *
++ * and parts of the Minix filesystem additionally
++ * Copyright (C) 1991, 1992  Linus Torvalds
++ * Copyright (C) 1996  Gertjan van Wingerde 
++ *
++ *
++ * 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.
++ *
++ */
++
++/* todo:
++ * - remove bugs
++ * - add missing features (maybe safe-delete, other...)
++ * - create other fs tools like mkfs.asfs and fsck.asfs, some data-recovery tools
++ */
++
++#define ASFS_VERSION "1.0beta7 (25.06.2004)"
++
++#include <linux/module.h>
++#include <linux/types.h>
++#include <linux/errno.h>
++#include <linux/slab.h>
++#include <linux/fs.h>
++#include <linux/init.h>
++#include <linux/smp_lock.h>
++#include <linux/buffer_head.h>
++#include <linux/vfs.h>
++#include <linux/parser.h>
++#include "asfs_fs.h"
++
++#include <asm/byteorder.h>
++#include <asm/uaccess.h>
++
++u32 asfs_calcchecksum(void *block, u32 blocksize)
++{
++	u32 *data = block, checksum = 1;
++	while (blocksize > 0) {
++		checksum += be32_to_cpu(*data++);
++		blocksize -= 4;
++	}
++	checksum -= be32_to_cpu(((struct fsBlockHeader *)block)->checksum);
++	return -checksum;
++}
++
++static struct super_operations asfs_ops = {
++	.alloc_inode	= asfs_alloc_inode,
++	.destroy_inode	= asfs_destroy_inode,
++	.put_super		= asfs_put_super,
++	.statfs			= asfs_statfs,
++#ifdef CONFIG_ASFS_RW
++	.remount_fs		= asfs_remount,
++#endif
++};
++
++extern struct dentry_operations asfs_dentry_operations;
++
++enum {
++	Opt_mode, Opt_setgid, Opt_setuid, Opt_prefix, Opt_volume, 
++	Opt_lcvol, Opt_ignore, Opt_err,
++};
++
++static match_table_t tokens = {
++	{Opt_mode, "mode=%o"},
++	{Opt_setgid, "setgid=%u"},
++	{Opt_setuid, "setuid=%u"},
++	{Opt_prefix, "prefix=%s"},
++	{Opt_volume, "volume=%s"},
++	{Opt_lcvol, "lowercasevol"},
++	{Opt_ignore, "grpquota"},
++	{Opt_ignore, "noquota"},
++	{Opt_ignore, "quota"},
++	{Opt_ignore, "usrquota"},
++	{Opt_err, NULL},
++};
++
++static int asfs_parse_options(char *options, struct super_block *sb)
++{
++	char *p;
++	substring_t args[MAX_OPT_ARGS];
++
++	if (!options)
++		return 1;
++	while ((p = strsep(&options, ",")) != NULL) {
++		int token, option;
++		if (!*p)
++			continue;
++		token = match_token(p, tokens, args);
++
++		switch (token) {
++		case Opt_mode:
++			if (match_octal(&args[0], &option))
++				goto no_arg;
++			ASFS_SB(sb)->mode = option & 0777;
++			break;
++		case Opt_setgid:
++			if (match_int(&args[0], &option))
++				goto no_arg;
++			ASFS_SB(sb)->gid = option;
++			break;
++		case Opt_setuid:
++			if (match_int(&args[0], &option))
++				goto no_arg;
++			ASFS_SB(sb)->uid = option;
++			break;
++		case Opt_prefix:
++			if (ASFS_SB(sb)->prefix) {
++				kfree(ASFS_SB(sb)->prefix);
++				ASFS_SB(sb)->prefix = NULL;
++			}
++			ASFS_SB(sb)->prefix = match_strdup(&args[0]);
++			if (! ASFS_SB(sb)->prefix)
++				return 0;
++			break;
++		case Opt_volume:
++			if (ASFS_SB(sb)->root_volume) {
++				kfree(ASFS_SB(sb)->root_volume);
++				ASFS_SB(sb)->root_volume = NULL;
++			}
++			ASFS_SB(sb)->root_volume = match_strdup(&args[0]);
++			if (! ASFS_SB(sb)->root_volume)
++				return 0;
++			break;
++		case Opt_lcvol:
++			ASFS_SB(sb)->flags |= ASFS_VOL_LOWERCASE;
++			break;
++		case Opt_ignore:
++		 	/* Silently ignore the quota options */
++			break;
++		default:
++no_arg:
++			printk("ASFS: Unrecognized mount option \"%s\" "
++					"or missing value\n", p);
++			return 0;
++		}
++	}
++	return 1;
++}
++
++static int asfs_fill_super(struct super_block *sb, void *data, int silent)
++{
++	struct asfs_sb_info *sbi;
++	struct buffer_head *bh;
++	struct fsRootBlock *rootblock;
++	struct inode *rootinode;
++
++	sbi = kmalloc(sizeof(struct asfs_sb_info), GFP_KERNEL);
++	if (!sbi)
++		return -ENOMEM;
++	sb->s_fs_info = sbi;
++
++	/* Fill in defaults */
++	ASFS_SB(sb)->uid = ASFS_DEFAULT_UID;
++	ASFS_SB(sb)->gid = ASFS_DEFAULT_GID;
++	ASFS_SB(sb)->mode = ASFS_DEFAULT_MODE;
++	ASFS_SB(sb)->prefix = NULL;
++	ASFS_SB(sb)->root_volume = NULL;
++	ASFS_SB(sb)->flags = 0;
++
++	if (!asfs_parse_options(data, sb)) {
++		printk(KERN_ERR "ASFS: Error parsing options\n");
++		return -EINVAL;
++	}
++
++	if (!sb_set_blocksize(sb, 512))
++		return -EINVAL;
++	sb->s_maxbytes = ASFS_MAXFILESIZE;
++
++	bh = sb_bread(sb, 0);
++	if (!bh) {
++		printk(KERN_ERR "ASFS: unable to read superblock\n");
++		return -EINVAL;
++	}
++
++	rootblock = (struct fsRootBlock *)bh->b_data;
++
++	if (be32_to_cpu(rootblock->bheader.id) == ASFS_ROOTID && 
++		be16_to_cpu(rootblock->version) == ASFS_STRUCTURE_VERISON) {
++
++		sb->s_blocksize = be32_to_cpu(rootblock->blocksize);
++		ASFS_SB(sb)->totalblocks = be32_to_cpu(rootblock->totalblocks);
++		ASFS_SB(sb)->rootobjectcontainer = be32_to_cpu(rootblock->rootobjectcontainer);
++		ASFS_SB(sb)->extentbnoderoot = be32_to_cpu(rootblock->extentbnoderoot);
++		ASFS_SB(sb)->objectnoderoot = be32_to_cpu(rootblock->objectnoderoot);
++		ASFS_SB(sb)->flags |= 0xff & rootblock->bits;
++		ASFS_SB(sb)->adminspacecontainer = be32_to_cpu(rootblock->adminspacecontainer);
++		ASFS_SB(sb)->bitmapbase = be32_to_cpu(rootblock->bitmapbase);
++		ASFS_SB(sb)->blocks_inbitmap = (sb->s_blocksize - sizeof(struct fsBitmap))<<3;  /* must be a multiple of 32 !! */
++		ASFS_SB(sb)->blocks_bitmap = (ASFS_SB(sb)->totalblocks + ASFS_SB(sb)->blocks_inbitmap - 1) / ASFS_SB(sb)->blocks_inbitmap;
++		ASFS_SB(sb)->block_rovingblockptr = 0;
++		asfs_brelse(bh);
++
++		if (!sb_set_blocksize(sb, sb->s_blocksize)) {
++			printk(KERN_ERR "ASFS: Found Amiga SFS RootBlock on dev %s, but blocksize %ld is not supported!\n", \
++			       sb->s_id, sb->s_blocksize);
++			return -EINVAL;
++		}
++
++		bh = sb_bread(sb, 0);
++		if (!bh) {
++			printk(KERN_ERR "ASFS: unable to read superblock\n");
++			goto out;
++		}
++		rootblock = (struct fsRootBlock *)bh->b_data;
++
++		if (asfs_check_block((void *)rootblock, sb->s_blocksize, 0, ASFS_ROOTID)) {
++#ifdef CONFIG_ASFS_RW
++			struct buffer_head *tmpbh;
++			if ((tmpbh = asfs_breadcheck(sb, ASFS_SB(sb)->rootobjectcontainer, ASFS_OBJECTCONTAINER_ID))) {
++				struct fsRootInfo *ri = (struct fsRootInfo *)((u8 *)tmpbh->b_data + sb->s_blocksize - sizeof(struct fsRootInfo));
++				ASFS_SB(sb)->freeblocks = be32_to_cpu(ri->freeblocks);
++				asfs_brelse(tmpbh);
++			} else
++				ASFS_SB(sb)->freeblocks = 0;
++
++			if ((tmpbh = asfs_breadcheck(sb, ASFS_SB(sb)->rootobjectcontainer+2, ASFS_TRANSACTIONFAILURE_ID))) {
++				printk(KERN_NOTICE "VFS: Found Amiga SFS RootBlock on dev %s, but it has unfinished transaction. Mounting read-only.\n", sb->s_id);
++				ASFS_SB(sb)->flags |= ASFS_READONLY;
++				asfs_brelse(tmpbh);
++			}
++
++			if ((tmpbh = asfs_breadcheck(sb, ASFS_SB(sb)->totalblocks-1, ASFS_ROOTID)) == NULL) {
++				printk(KERN_NOTICE "VFS: Found Amiga SFS RootBlock on dev %s, but there is no second RootBlock! Mounting read-only.\n", sb->s_id);
++				ASFS_SB(sb)->flags |= ASFS_READONLY;
++				asfs_brelse(tmpbh);
++			}
++			if (!(ASFS_SB(sb)->flags & ASFS_READONLY))
++				printk(KERN_NOTICE "VFS: Found Amiga SFS RootBlock on dev %s.\n", sb->s_id);
++#else
++			ASFS_SB(sb)->freeblocks = 0;
++			ASFS_SB(sb)->flags |= ASFS_READONLY;
++			printk(KERN_NOTICE "VFS: Found Amiga SFS RootBlock on dev %s.\n", sb->s_id);
++#endif
++		} else {
++			if (!silent)
++				printk(KERN_ERR "VFS: Found Amiga SFS RootBlock on dev %s, but it has checksum error!\n", \
++				       sb->s_id);
++			goto out;
++		}
++	} else {
++		if (!silent)
++			printk(KERN_ERR "VFS: Can't find a valid Amiga SFS filesystem on dev %s.\n", \
++			       sb->s_id);
++		goto out;
++	}
++
++	asfs_brelse(bh);
++
++	sb->s_magic = ASFS_MAGIC;
++	sb->s_flags |= MS_NODEV | MS_NOSUID;
++	if (ASFS_SB(sb)->flags & ASFS_READONLY) 
++		sb->s_flags |= MS_RDONLY;
++	sb->s_op = &asfs_ops;
++
++	if ((rootinode = asfs_get_root_inode(sb))) {
++		if ((sb->s_root = d_alloc_root(rootinode))) {
++			sb->s_root->d_op = &asfs_dentry_operations;
++			return 0;
++		}
++		iput(rootinode);
++	}
++	return -EINVAL;
++
++out:
++	asfs_brelse(bh);
++	return -EINVAL;
++
++}
++
++#ifdef CONFIG_ASFS_RW
++int asfs_remount(struct super_block *sb, int *flags, char *data)
++{
++	asfs_debug("ASFS: remount (flags=0x%x, opts=\"%s\")\n",*flags,data);
++
++	if (!asfs_parse_options(data,sb))
++		return -EINVAL;
++
++	if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY))
++		return 0;
++
++	if (*flags & MS_RDONLY) {
++		sb->s_flags |= MS_RDONLY;
++	} else if (!(ASFS_SB(sb)->flags & ASFS_READONLY)) {
++		sb->s_flags &= ~MS_RDONLY;
++	} else {
++		printk("VFS: Can't remount Amiga SFS on dev %s read/write because of errors.", sb->s_id);
++		return -EINVAL;
++	}
++	return 0;
++}
++#endif
++
++void asfs_put_super(struct super_block *sb)
++{
++	struct asfs_sb_info *sbi = ASFS_SB(sb);
++
++	if (ASFS_SB(sb)->prefix)
++		kfree(ASFS_SB(sb)->prefix);
++	if (ASFS_SB(sb)->root_volume)
++		kfree(ASFS_SB(sb)->root_volume);
++
++	kfree(sbi);
++	sb->s_fs_info = NULL;
++	return;
++}
++
++/* That's simple too. */
++int asfs_statfs(struct super_block *sb, struct kstatfs *buf)
++{
++	buf->f_type = ASFS_MAGIC;
++	buf->f_bsize = sb->s_blocksize;
++	buf->f_bfree = buf->f_bavail = ASFS_SB(sb)->freeblocks;
++	buf->f_blocks = ASFS_SB(sb)->totalblocks;
++	buf->f_namelen = ASFS_MAXFN;
++	return 0;
++}
++
++/* --- new in 2.6.x --- */
++static kmem_cache_t * asfs_inode_cachep;
++
++struct inode *asfs_alloc_inode(struct super_block *sb)
++{
++	struct asfs_inode_info *ei;
++	ei = (struct asfs_inode_info *)kmem_cache_alloc(asfs_inode_cachep, SLAB_KERNEL);
++	if (!ei)
++		return NULL;
++	return &ei->vfs_inode;
++}
++
++void asfs_destroy_inode(struct inode *inode)
++{
++	kmem_cache_free(asfs_inode_cachep, ASFS_I(inode));
++}
++
++static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags)
++{
++	struct asfs_inode_info *ei = (struct asfs_inode_info *) foo;
++
++	if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) ==
++	    SLAB_CTOR_CONSTRUCTOR) {
++		inode_init_once(&ei->vfs_inode);
++	}
++}
++
++static int init_inodecache(void)
++{
++	asfs_inode_cachep = kmem_cache_create("asfs_inode_cache",
++					     sizeof(struct asfs_inode_info),
++					     0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT,
++					     init_once, NULL);
++	if (asfs_inode_cachep == NULL)
++		return -ENOMEM;
++	return 0;
++}
++
++static void destroy_inodecache(void)
++{
++	if (kmem_cache_destroy(asfs_inode_cachep))
++		printk(KERN_INFO "asfs_inode_cache: not all structures were freed\n");
++}
++
++static struct super_block *asfs_get_sb(struct file_system_type *fs_type,
++	int flags, const char *dev_name, void *data)
++{
++	return get_sb_bdev(fs_type, flags, dev_name, data, asfs_fill_super);
++}
++
++static struct file_system_type asfs_fs_type = {
++	.owner		= THIS_MODULE,
++	.name		= "asfs",
++	.get_sb		= asfs_get_sb,
++	.kill_sb	= kill_block_super,
++	.fs_flags	= FS_REQUIRES_DEV,
++};
++
++static int __init init_asfs_fs(void)
++{
++	int err = init_inodecache();
++	if (err)
++		goto out1;
++	err = register_filesystem(&asfs_fs_type);
++	if (err)
++		goto out;
++	return 0;
++out:
++	destroy_inodecache();
++out1:
++	return err;
++}
++
++static void __exit exit_asfs_fs(void)
++{
++	unregister_filesystem(&asfs_fs_type);
++	destroy_inodecache();
++}
++
++/* Yes, works even as a module... :) */
++
++#ifdef CONFIG_ASFS_RW
++MODULE_DESCRIPTION("Amiga Smart File System (read/write) support for Linux kernel 2.6.x v" ASFS_VERSION);
++#else
++MODULE_DESCRIPTION("Amiga Smart File System (read-only) support for Linux kernel 2.6.x v" ASFS_VERSION);
++#endif
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Marek Szyprowski <marek at amiga.pl>");
++
++module_init(init_asfs_fs)
++module_exit(exit_asfs_fs)
+diff -urN linux-2.6.3/fs/asfs/symlink.c linux-2.6.3-asfs-1.0b7/fs/asfs/symlink.c
+--- linux-2.6.3/fs/asfs/symlink.c	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.3-asfs-1.0b7/fs/asfs/symlink.c	2004-06-10 01:41:24.000000000 +0200
+@@ -0,0 +1,165 @@
++/*
++ *
++ * Amiga Smart File System, Linux implementation
++ * version: 1.0beta7
++ *  
++ * Copyright (C) 2003,2004  Marek 'March' Szyprowski <marek at amiga.pl>
++ *
++ *
++ * 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.
++ *
++ */
++
++#include <linux/types.h>
++#include <linux/errno.h>
++#include <linux/slab.h>
++#include <linux/fs.h>
++#include <linux/buffer_head.h>
++#include <linux/vfs.h>
++#include <linux/pagemap.h>
++#include "asfs_fs.h"
++
++#include <asm/byteorder.h>
++#include <asm/uaccess.h>
++
++int asfs_symlink_readpage(struct file *file, struct page *page)
++{
++	struct buffer_head *bh;
++	struct fsSoftLink *slinkcont;
++	struct inode *inode = page->mapping->host;
++	struct super_block *sb = inode->i_sb;
++	char *link = kmap(page);
++	int i = 0, j = 0;
++	char c, lc = 0, *prefix, *lf, *p;
++
++	if (!(bh = asfs_breadcheck(sb, ASFS_I(inode)->firstblock, ASFS_SOFTLINK_ID))) {
++		SetPageError(page);
++		kunmap(page);
++		unlock_page(page);
++		return -EIO;
++	}
++	slinkcont = (struct fsSoftLink *) bh->b_data;
++
++	lf = slinkcont->string;
++	prefix = ASFS_SB(sb)->prefix ? ASFS_SB(sb)->prefix : "/";
++
++	if ((p = strchr(lf,':'))) {	/* Handle assign or volume name */
++		if (ASFS_SB(sb)->root_volume &&
++		    strncmp(lf, ASFS_SB(sb)->root_volume, strlen(ASFS_SB(sb)->root_volume)) == 0) {
++			/* global root volume name found */
++			link[i++] = '/';
++			lf = p+1;
++		} else {
++			/* adding volume prefix */ 
++			while (i < 1023 && (c = prefix[i]))
++				link[i++] = c;
++			if (ASFS_SB(sb)->flags & ASFS_VOL_LOWERCASE) {
++				while (i < 1023 && lf[j] != ':')
++					link[i++] = asfs_lowerchar(lf[j++]);
++			} else {
++				while (i < 1023 && lf[j] != ':')
++					link[i++] = lf[j++];
++			}
++			if (i < 1023)
++				link[i++] = '/';
++			j++;
++		}
++		lc = '/';
++	}
++
++	while (i < 1023 && (c = lf[j])) {
++		if (c == '/' && lc == '/' && i < 1020) {	/* parent dir */
++			link[i++] = '.';
++			link[i++] = '.';
++		}
++		link[i++] = c;
++		lc = c;
++		j++;
++	}
++	link[i] = '\0';
++	SetPageUptodate(page);
++	kunmap(page);
++	unlock_page(page);
++	asfs_brelse(bh);
++	return 0;
++}
++
++#ifdef CONFIG_ASFS_RW
++
++int asfs_write_symlink(struct inode *symfile, const char *symname)
++{
++	struct super_block *sb = symfile->i_sb;
++	struct buffer_head *bh;
++	struct fsSoftLink *slinkcont;
++	char *p, c, lc;
++	int i, maxlen, pflen;
++
++	asfs_debug("asfs_write_symlink %s to node %d\n", symname, (int)symfile->i_ino);
++
++	if (!(bh = asfs_breadcheck(sb, ASFS_I(symfile)->firstblock, ASFS_SOFTLINK_ID))) {
++		unlock_super(sb);
++		return -EIO;
++	}
++	slinkcont = (struct fsSoftLink *) bh->b_data;
++
++	/* translating symlink target path */
++
++	maxlen = sb->s_blocksize - sizeof(struct fsSoftLink) - 2;
++	i  = 0;
++	p  = slinkcont->string;
++	lc = '/';
++
++	if (*symname == '/') {
++		while (*symname == '/')
++			symname++;
++		if (ASFS_SB(sb)->prefix &&
++		    strncmp(symname-1, ASFS_SB(sb)->prefix, (pflen = strlen(ASFS_SB(sb)->prefix))) == 0) {
++			/* found volume prefix, ommiting it */
++			symname += pflen;
++			while ((c = *symname++) != '/' && c != '\0') {
++				*p++ = c;
++				i++;
++			}
++			*p++ = ':';
++		} else if (ASFS_SB(sb)->root_volume) {	/* adding root volume name */
++			while (ASFS_SB(sb)->root_volume[i])
++				*p++ = ASFS_SB(sb)->root_volume[i++];
++			*p++ = ':';
++		} else {	/* do nothing */
++			*p++ = '/';
++		}
++		i++;
++	}
++
++	while (i < maxlen && (c = *symname++)) {
++		if (c == '.' && lc == '/' && *symname == '.' && symname[1] == '/') {
++			*p++ = '/';
++			i++;
++			symname += 2;
++			lc = '/';
++		} else if (c == '.' && lc == '/' && *symname == '/') {
++			symname++;
++			lc = '/';
++		} else {
++			*p++ = c;
++			lc   = c;
++			i++;
++		}
++		if (lc == '/')
++			while (*symname == '/')
++				symname++;
++	}
++	*p = 0;
++
++	asfs_bstore(sb, bh);
++	asfs_brelse(bh);
++
++	unlock_super(sb);
++	
++	return 0;
++}
++
++#endif
+diff -urN linux-2.6.3/fs/Kconfig linux-2.6.3-asfs-1.0b7/fs/Kconfig
+--- linux-2.6.3/fs/Kconfig	2004-03-22 17:34:00.000000000 +0100
++++ linux-2.6.3-asfs-1.0b7/fs/Kconfig	2004-06-17 00:31:43.000000000 +0200
+@@ -963,6 +963,37 @@
+ 	  To compile this file system support as a module, choose M here: the
+ 	  module will be called affs.  If unsure, say N.
+ 
++config ASFS_FS
++	tristate "Amiga SFS file system support (EXPERIMENTAL)"
++	depends on EXPERIMENTAL
++	help
++
++	  The Amiga Smart FileSystem (SFS) is the file system used on hard 
++	  disks by Amiga(tm) and MorphOS(tm) systems.  Say Y if you want 
++	  to be able to read files from an Amiga SFS partition on your hard 
++	  drive.
++
++	  For more information read <file:Documentation/filesystems/asfs.txt>
++
++	  To compile this file system support as a module, choose M here: the
++	  module will be called asfs.
++
++	  If unsure, say N.
++
++config ASFS_RW
++	bool "Amiga SFS write support (DANGEROUS)"
++	depends on ASFS_FS
++	help
++
++	  If you say Y here, you will be able to write to ASFS file
++	  systems as well as read from them. The read-write support in ASFS
++	  is in beta stage. This means that useing it to write files to SFS 
++	  partitions is DANGEROUS and COULD corrupt the filesystem.
++
++	  For more information read <file:Documentation/filesystems/asfs.txt>
++
++	  If unsure, say N.
++
+ config HFS_FS
+ 	tristate "Apple Macintosh file system support (EXPERIMENTAL)"
+ 	depends on EXPERIMENTAL
+diff -urN linux-2.6.3/fs/Makefile linux-2.6.3-asfs-1.0b7/fs/Makefile
+--- linux-2.6.3/fs/Makefile	2004-03-22 17:34:00.000000000 +0100
++++ linux-2.6.3-asfs-1.0b7/fs/Makefile	2004-03-22 18:22:00.000000000 +0100
+@@ -80,6 +80,7 @@
+ obj-$(CONFIG_JFFS_FS)		+= jffs/
+ obj-$(CONFIG_JFFS2_FS)		+= jffs2/
+ obj-$(CONFIG_AFFS_FS)		+= affs/
++obj-$(CONFIG_ASFS_FS)		+= asfs/
+ obj-$(CONFIG_ROMFS_FS)		+= romfs/
+ obj-$(CONFIG_QNX4FS_FS)		+= qnx4/
+ obj-$(CONFIG_AUTOFS_FS)		+= autofs/
+diff -urN linux-2.6.3/include/linux/amigasfs.h linux-2.6.3-asfs-1.0b7/include/linux/amigasfs.h
+--- linux-2.6.3/include/linux/amigasfs.h	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.3-asfs-1.0b7/include/linux/amigasfs.h	2004-06-10 19:24:37.000000000 +0200
+@@ -0,0 +1,276 @@
++#ifndef __LINUX_AMIGASFS_H
++#define __LINUX_AMIGASFS_H
++
++#include <linux/types.h>
++
++/* some helper macros... */
++#define ASFS_MAKE_ID(a,b,c,d) (((a)&0xff)<<24|((b)&0xff)<<16|((c)&0xff)<<8|((d)&0xff))
++
++/* Amiga SFS block IDs */
++#define ASFS_ROOTID                 ASFS_MAKE_ID('S','F','S','\0')
++#define ASFS_OBJECTCONTAINER_ID     ASFS_MAKE_ID('O','B','J','C')
++#define ASFS_BNODECONTAINER_ID      ASFS_MAKE_ID('B','N','D','C')
++#define ASFS_NODECONTAINER_ID       ASFS_MAKE_ID('N','D','C',' ')
++#define ASFS_HASHTABLE_ID           ASFS_MAKE_ID('H','T','A','B')
++#define ASFS_SOFTLINK_ID            ASFS_MAKE_ID('S','L','N','K')
++#define ASFS_ADMINSPACECONTAINER_ID ASFS_MAKE_ID('A','D','M','C')
++#define ASFS_BITMAP_ID              ASFS_MAKE_ID('B','T','M','P')
++#define ASFS_TRANSACTIONFAILURE_ID  ASFS_MAKE_ID('T','R','F','A')
++
++/* Amiga SFS defines and magic values */
++
++#define ASFS_MAGIC 0xa0ff
++#define ASFS_MAXFN (105u)
++#define ASFS_MAXFILESIZE 0x8FFFFFFE
++
++#define ASFS_STRUCTURE_VERISON (3)
++#define ASFS_BLCKFACCURACY	(5)
++
++#define ASFS_ROOTBITS_CASESENSITIVE (128)
++#define ASFS_READONLY (512)
++#define ASFS_VOL_LOWERCASE (1024)
++
++#define ASFS_ROOTNODE   (1)
++#define ASFS_RECYCLEDNODE (2)
++
++#define OTYPE_HIDDEN      (1)
++#define OTYPE_HARDLINK    (32)
++#define OTYPE_LINK        (64)
++#define OTYPE_DIR         (128)
++
++#define MSB_MASK (1ul << 31)
++
++#define NODE_STRUCT_SIZE (10)	/* (sizeof(struct fsObjectNode)) */
++#define NODECONT_BLOCK_COUNT ((sb->s_blocksize - sizeof(struct fsNodeContainer)) / sizeof(u32))
++
++#define ASFS_ALWAYSFREE (16)		/* keep this amount of blocks free */
++
++#define ASFS_BLOCKCHUNKS (16)		/* try to allocate this number of blocks in one request */
++
++#ifndef TRUE
++#define TRUE		1
++#endif
++#ifndef FALSE
++#define FALSE		0
++#endif
++
++/* amigados protection bits */
++
++#define FIBB_SCRIPT    6	/* program is a script (execute) file */
++#define FIBB_PURE      5	/* program is reentrant and rexecutable */
++#define FIBB_ARCHIVE   4	/* cleared whenever file is changed */
++#define FIBB_READ      3	/* ignored by old filesystem */
++#define FIBB_WRITE     2	/* ignored by old filesystem */
++#define FIBB_EXECUTE   1	/* ignored by system, used by Shell */
++#define FIBB_DELETE    0	/* prevent file from being deleted */
++
++#define FIBF_SCRIPT    (1<<FIBB_SCRIPT)
++#define FIBF_PURE      (1<<FIBB_PURE)
++#define FIBF_ARCHIVE   (1<<FIBB_ARCHIVE)
++#define FIBF_READ      (1<<FIBB_READ)
++#define FIBF_WRITE     (1<<FIBB_WRITE)
++#define FIBF_EXECUTE   (1<<FIBB_EXECUTE)
++#define FIBF_DELETE    (1<<FIBB_DELETE)
++
++/* name hashing macro */
++
++#define HASHCHAIN(x) (u16)(x % (u16)(((sb->s_blocksize) - sizeof(struct fsHashTable))>>2))
++
++/* Each block has its own header with checksum and id, its called fsBlockHeader */
++
++struct fsBlockHeader {
++	u32 id;			/* 4 character id string of this block */
++	u32 checksum;		/* The checksum */
++	u32 ownblock;		/* The blocknumber of the block this block is stored at */
++};
++
++/* On-disk "super block", called fsRootBlock */
++
++struct fsRootBlock {
++	struct fsBlockHeader bheader;
++
++	u16 version;		/* Version number of the filesystem block structure */
++	u16 sequencenumber;	/* The Root with the highest sequencenumber is valid */
++
++	u32 datecreated;	/* Creation date (when first formatted).  Cannot be changed. */
++	u8 bits;		/* various settings, see defines below. */
++	u8 pad1;
++	u16 pad2;
++
++	u32 reserved1[2];
++
++	u32 firstbyteh;		/* The first byte of our partition from the start of the */
++	u32 firstbyte;		/* disk.  firstbyteh = upper 32 bits, firstbyte = lower 32 bits. */
++
++	u32 lastbyteh;		/* The last byte of our partition, excluding this one. */
++	u32 lastbyte;
++
++	u32 totalblocks;	/* size of this partition in blocks */
++	u32 blocksize;		/* blocksize used */
++
++	u32 reserved2[2];
++	u32 reserved3[8];
++
++	u32 bitmapbase;		/* location of the bitmap */
++	u32 adminspacecontainer;	/* location of first adminspace container */
++	u32 rootobjectcontainer;	/* location of the root objectcontainer */
++	u32 extentbnoderoot;	/* location of the root of the extentbnode B-tree */
++	u32 objectnoderoot;	/* location of the root of the objectnode tree */
++
++	u32 reserved4[3];
++};
++
++/* On disk inode, called fsObject */
++
++struct fsObject {
++	u16 owneruid;
++	u16 ownergid;
++	u32 objectnode;
++	u32 protection;
++
++	union {
++		struct {
++			u32 data;
++			u32 size;
++		} file;
++
++		struct {
++			u32 hashtable;	/* for directories & root, 0 means no hashblock */
++			u32 firstdirblock;
++		} dir;
++	} object;
++
++	u32 datemodified;
++	u8 bits;
++
++	u8 name[0];
++	u8 comment[0];
++};
++
++/* On disk block containging a number of fsObjects */
++
++struct fsObjectContainer {
++	struct fsBlockHeader bheader;
++
++	u32 parent;
++	u32 next;
++	u32 previous;		/* 0 for the first block in the directory chain */
++
++	struct fsObject object[0];
++};
++
++/* BTree structures, used to collect file data position on disk */
++
++struct fsExtentBNode {
++	u32 key;		/* data! */
++	u32 next;
++	u32 prev;
++	u16 blocks;		/* The size in blocks of the region this Extent controls */
++};
++
++struct BNode {
++	u32 key;
++	u32 data;
++};
++
++struct BTreeContainer {
++	u16 nodecount;
++	u8 isleaf;
++	u8 nodesize;		/* Must be a multiple of 2 */
++
++	struct BNode bnode[0];
++};
++
++/* On disk block with BTreeContainer */
++
++struct fsBNodeContainer {
++	struct fsBlockHeader bheader;
++	struct BTreeContainer btc;
++};
++
++/* On disk block  with soft link data */
++
++struct fsSoftLink {
++	struct fsBlockHeader bheader;
++	u32 parent;
++	u32 next;
++	u32 previous;
++	u8 string[0];
++};
++
++/* On disk block with hashtable data */
++
++struct fsHashTable {
++	struct fsBlockHeader bheader;
++	u32 parent;
++	u32 hashentry[0];
++};
++
++/* On disk block with node index and some helper structures */
++
++struct fsNodeContainer {
++	struct fsBlockHeader bheader;
++	u32 nodenumber;
++	u32 nodes;
++	u32 node[0];
++};
++
++struct fsNode {
++	u32 data;
++};
++
++struct fsObjectNode {
++	struct fsNode node;
++	u32 next;
++	u16 hash16;
++} __attribute__ ((packed));
++
++/* Some adminspace and bitmap block structures */
++
++struct fsAdminSpace {
++	u32 space;
++	u32 bits;		
++/* Set bits are used blocks, bit 31 is	the first block in the AdminSpace. */
++};
++
++struct fsAdminSpaceContainer {
++	struct fsBlockHeader bheader;
++
++	u32 next;
++	u32 previous;
++
++	u8 bits;
++	u8 pad1;
++	u16 pad2;
++
++	struct fsAdminSpace adminspace[0];
++};
++
++struct fsBitmap {
++	struct fsBlockHeader bheader;
++
++	u32 bitmap[0];
++
++/* Bits are 1 if the block is free, and 0 if full.
++   Bitmap must consist of an integral number of longwords. */
++};
++
++/* The fsRootInfo structure has all kinds of information about the format
++   of the disk. */
++
++struct fsRootInfo {
++	u32 deletedblocks;	/* Amount in blocks which deleted files consume. */
++	u32 deletedfiles;	/* Number of deleted files in recycled. */
++	u32 freeblocks;		/* Cached number of free blocks on disk. */
++
++	u32 datecreated;
++
++	u32 lastallocatedblock;	/* Block which was most recently allocated */
++	u32 lastallocatedadminspace;	/* AdminSpaceContainer which most recently was used to allocate a block */
++	u32 lastallocatedextentnode;	/* ExtentNode which was most recently created */
++	u32 lastallocatedobjectnode;	/* ObjectNode which was most recently created */
++
++	u32 rovingpointer;
++};
++
++#endif

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fs-ntfs-disconnect-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fs-ntfs-disconnect-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fs-ntfs-disconnect-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,133 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix disconnected dentries on NFS exports
+## DP: Patch author:  neilb at cse.unsw.edu.au
+## DP: Upstream status: backport 2.6.10-rc2
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- a/fs/dcache.c	2004-11-18 12:19:03 -08:00
++++ b/fs/dcache.c	2004-11-18 12:19:03 -08:00
+@@ -286,12 +286,11 @@
+  * any other hashed alias over that one.
+  */
+ 
+-struct dentry * d_find_alias(struct inode *inode)
++static struct dentry * __d_find_alias(struct inode *inode, int want_discon)
+ {
+ 	struct list_head *head, *next, *tmp;
+ 	struct dentry *alias, *discon_alias=NULL;
+ 
+-	spin_lock(&dcache_lock);
+ 	head = &inode->i_dentry;
+ 	next = inode->i_dentry.next;
+ 	while (next != head) {
+@@ -302,19 +301,26 @@
+  		if (!d_unhashed(alias)) {
+ 			if (alias->d_flags & DCACHE_DISCONNECTED)
+ 				discon_alias = alias;
+-			else {
++			else if (!want_discon) {
+ 				__dget_locked(alias);
+-				spin_unlock(&dcache_lock);
+ 				return alias;
+ 			}
+ 		}
+ 	}
+ 	if (discon_alias)
+ 		__dget_locked(discon_alias);
+-	spin_unlock(&dcache_lock);
+ 	return discon_alias;
+ }
+ 
++struct dentry * d_find_alias(struct inode *inode)
++{
++	struct dentry *de;
++	spin_lock(&dcache_lock);
++	de = __d_find_alias(inode, 0);
++	spin_unlock(&dcache_lock);
++	return de;
++}
++
+ /*
+  *	Try to kill dentries associated with this inode.
+  * WARNING: you must own a reference to inode.
+@@ -833,33 +839,27 @@
+ 	tmp->d_parent = tmp; /* make sure dput doesn't croak */
+ 	
+ 	spin_lock(&dcache_lock);
+-	if (S_ISDIR(inode->i_mode) && !list_empty(&inode->i_dentry)) {
+-		/* A directory can only have one dentry.
+-		 * This (now) has one, so use it.
+-		 */
+-		res = list_entry(inode->i_dentry.next, struct dentry, d_alias);
+-		__dget_locked(res);
+-	} else {
++	res = __d_find_alias(inode, 0);
++	if (!res) {
+ 		/* attach a disconnected dentry */
+ 		res = tmp;
+ 		tmp = NULL;
+-		if (res) {
+-			spin_lock(&res->d_lock);
+-			res->d_sb = inode->i_sb;
+-			res->d_parent = res;
+-			res->d_inode = inode;
++		spin_lock(&res->d_lock);
++		res->d_sb = inode->i_sb;
++		res->d_parent = res;
++		res->d_inode = inode;
++
++		/*
++		 * Set d_bucket to an "impossible" bucket address so
++		 * that d_move() doesn't get a false positive
++		 */
++		res->d_bucket = NULL;
++		res->d_flags |= DCACHE_DISCONNECTED;
++		res->d_flags &= ~DCACHE_UNHASHED;
++		list_add(&res->d_alias, &inode->i_dentry);
++		hlist_add_head(&res->d_hash, &inode->i_sb->s_anon);
++		spin_unlock(&res->d_lock);
+ 
+-			/*
+-			 * Set d_bucket to an "impossible" bucket address so
+-			 * that d_move() doesn't get a false positive
+-			 */
+-			res->d_bucket = NULL;
+-			res->d_flags |= DCACHE_DISCONNECTED;
+-			res->d_flags &= ~DCACHE_UNHASHED;
+-			list_add(&res->d_alias, &inode->i_dentry);
+-			hlist_add_head(&res->d_hash, &inode->i_sb->s_anon);
+-			spin_unlock(&res->d_lock);
+-		}
+ 		inode = NULL; /* don't drop reference */
+ 	}
+ 	spin_unlock(&dcache_lock);
+@@ -881,7 +881,7 @@
+  * DCACHE_DISCONNECTED), then d_move that in place of the given dentry
+  * and return it, else simply d_add the inode to the dentry and return NULL.
+  *
+- * This is (will be) needed in the lookup routine of any filesystem that is exportable
++ * This is needed in the lookup routine of any filesystem that is exportable
+  * (via knfsd) so that we can build dcache paths to directories effectively.
+  *
+  * If a dentry was found and moved, then it is returned.  Otherwise NULL
+@@ -892,11 +892,11 @@
+ {
+ 	struct dentry *new = NULL;
+ 
+-	if (inode && S_ISDIR(inode->i_mode)) {
++	if (inode) {
+ 		spin_lock(&dcache_lock);
+-		if (!list_empty(&inode->i_dentry)) {
+-			new = list_entry(inode->i_dentry.next, struct dentry, d_alias);
+-			__dget_locked(new);
++		new = __d_find_alias(inode, 1);
++		if (new) {
++			BUG_ON(!(new->d_flags & DCACHE_DISCONNECTED));
+ 			spin_unlock(&dcache_lock);
+ 			security_d_instantiate(new, inode);
+ 			d_rehash(dentry);

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fs-partitions-check.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fs-partitions-check.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fs-partitions-check.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,24 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: restore BLKRRPART ioctl semantics
+## DP: Patch author: Andries Brouwer
+## DP: Upstream status: backport 2.6.10-rc3-bk2
+## DP: Reference: http://marc.theaimsgroup.com/?l=linux-kernel&m=110229798426631&w=2
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -Nru a/fs/partitions/check.c b/fs/partitions/check.c
+--- a/fs/partitions/check.c	2004-12-07 15:08:27 -08:00
++++ b/fs/partitions/check.c	2004-12-07 15:08:27 -08:00
+@@ -395,7 +395,7 @@
+ 	if (disk->fops->revalidate_disk)
+ 		disk->fops->revalidate_disk(disk);
+ 	if (!get_capacity(disk) || !(state = check_partition(disk, bdev)))
+-		return -EIO;
++		return 0;
+ 	for (p = 1; p < state->limit; p++) {
+ 		sector_t size = state->parts[p].size;
+ 		sector_t from = state->parts[p].from;

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fs-tmpfs-free_inode-leak.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fs-tmpfs-free_inode-leak.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/fs-tmpfs-free_inode-leak.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,24 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: tmpfs free_inodes leak
+## DP: Patch author:  Hugh Dickins <hugh at veritas.com>
+## DP: Upstream status: backport 2.6.10-rc2
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- a/mm/shmem.c	2004-11-18 12:12:40 -08:00
++++ b/mm/shmem.c	2004-11-18 12:12:40 -08:00
+@@ -1221,6 +1221,10 @@
+ 		case S_IFLNK:
+ 			break;
+ 		}
++	} else if (sbinfo) {
++		spin_lock(&sbinfo->stat_lock);
++		sbinfo->free_inodes++;
++		spin_unlock(&sbinfo->stat_lock);
+ 	}
+ 	return inode;
+ }

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/hfs-loop-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/hfs-loop-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/hfs-loop-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,30 @@
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Add .sendfile method to hfs/hfsplus (needed by loop driver)
+## DP: Patch author: Christoph Hellwig
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- 1.16/fs/hfs/inode.c	2004-05-25 11:53:05 +02:00
++++ edited/fs/hfs/inode.c	2004-08-29 22:30:51 +02:00
+@@ -609,6 +609,7 @@
+ 	.read		= generic_file_read,
+ 	.write		= generic_file_write,
+ 	.mmap		= generic_file_mmap,
++	.sendfile	= generic_file_sendfile,
+ 	.fsync		= file_fsync,
+ 	.open		= hfs_file_open,
+ 	.release	= hfs_file_release,
+--- 1.5/fs/hfsplus/inode.c	2004-07-12 10:00:54 +02:00
++++ edited/fs/hfsplus/inode.c	2004-08-29 22:31:05 +02:00
+@@ -308,6 +308,7 @@
+ 	.read		= generic_file_read,
+ 	.write		= generic_file_write,
+ 	.mmap		= generic_file_mmap,
++	.sendfile	= generic_file_sendfile,
+ 	.fsync		= file_fsync,
+ 	.open		= hfsplus_file_open,
+ 	.release	= hfsplus_file_release,

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/i915-agp.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/i915-agp.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/i915-agp.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,21 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Really enable i915 support in agpgart
+## DP: Patch author: Kurt Garloff <garloff at suse.de>
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- linux/drivers/char/agp/intel-agp.c~	2004-10-02 18:33:09.031894000 +0200
++++ linux/drivers/char/agp/intel-agp.c	2004-10-02 18:33:29.638956320 +0200
+@@ -1770,6 +1770,7 @@
+ 	ID(PCI_DEVICE_ID_INTEL_82875_HB),
+ 	ID(PCI_DEVICE_ID_INTEL_7505_0),
+ 	ID(PCI_DEVICE_ID_INTEL_7205_0),	
++	ID(PCI_DEVICE_ID_INTEL_82915G_HB),
+ 	{ }
+ };
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-generic-no-smp-1-to-2.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-generic-no-smp-1-to-2.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-generic-no-smp-1-to-2.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,210 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: fix CONFIG_IA64_GENERIC compilation for UP (rev 2)
+## DP: Patch author: Jesse Barnes <jbarnes at sgi.com>
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -urN kernel-source-2.6.8.defconfig/arch/ia64/kernel/acpi.c kernel-source-2.6.8.newupfix.defconfig/arch/ia64/kernel/acpi.c
+--- kernel-source-2.6.8.defconfig/arch/ia64/kernel/acpi.c	2004-08-13 23:36:58.000000000 -0600
++++ kernel-source-2.6.8.newupfix.defconfig/arch/ia64/kernel/acpi.c	2004-08-15 15:49:38.000000000 -0600
+@@ -618,9 +618,11 @@
+ 			if (smp_boot_data.cpu_phys_id[cpu] != hard_smp_processor_id())
+ 				node_cpuid[i++].phys_id = smp_boot_data.cpu_phys_id[cpu];
+ 	}
+-	build_cpu_to_node_map();
+ # endif
+ #endif
++#ifdef CONFIG_ACPI_NUMA
++	build_cpu_to_node_map();
++#endif
+ 	/* Make boot-up look pretty */
+ 	printk(KERN_INFO "%d CPUs available, %d CPUs total\n", available_cpus, total_cpus);
+ 	return 0;
+diff -urN kernel-source-2.6.8.defconfig/arch/ia64/kernel/cyclone.c kernel-source-2.6.8.newupfix.defconfig/arch/ia64/kernel/cyclone.c
+--- kernel-source-2.6.8.defconfig/arch/ia64/kernel/cyclone.c	2004-08-14 13:07:37.000000000 -0600
++++ kernel-source-2.6.8.newupfix.defconfig/arch/ia64/kernel/cyclone.c	2004-08-15 15:49:31.000000000 -0600
+@@ -1,8 +1,6 @@
+-#include <linux/module.h>
+ #include <linux/smp.h>
+ #include <linux/time.h>
+ #include <linux/errno.h>
+-#include <asm/io.h>
+ 
+ /* IBM Summit (EXA) Cyclone counter code*/
+ #define CYCLONE_CBAR_ADDR 0xFEB00CD0
+diff -urN kernel-source-2.6.8.defconfig/arch/ia64/kernel/numa.c kernel-source-2.6.8.newupfix.defconfig/arch/ia64/kernel/numa.c
+--- kernel-source-2.6.8.defconfig/arch/ia64/kernel/numa.c	2004-08-14 13:07:37.000000000 -0600
++++ kernel-source-2.6.8.newupfix.defconfig/arch/ia64/kernel/numa.c	2004-08-15 15:49:38.000000000 -0600
+@@ -1,46 +1,57 @@
++/*
++ * 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 program 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, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ *
++ * ia64 kernel NUMA specific stuff
++ *
++ * Copyright (C) 2002 Erich Focht <efocht at ess.nec.de>
++ * Copyright (C) 2004 Silicon Graphics, Inc.
++ *   Jesse Barnes <jbarnes at sgi.com>
++ */
+ #include <linux/config.h>
+ #include <linux/topology.h>
+ #include <linux/module.h>
+ #include <asm/processor.h>
+ #include <asm/smp.h>
+ 
+-#ifdef CONFIG_NUMA
+-
+-/* on which node is each logical CPU (one cacheline even for 64 CPUs) */
+ u8 cpu_to_node_map[NR_CPUS] __cacheline_aligned;
+ EXPORT_SYMBOL(cpu_to_node_map);
+-/* which logical CPUs are on which nodes */
++
+ cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned;
+ 
+-/*
+- * Build cpu to node mapping and initialize the per node cpu masks.
++/**
++ * build_cpu_to_node_map - setup cpu to node and node to cpumask arrays
++ *
++ * Build cpu to node mapping and initialize the per node cpu masks using
++ * info from the node_cpuid array handed to us by ACPI.
+  */
+-void __init
+-build_cpu_to_node_map (void)
++void __init build_cpu_to_node_map(void)
+ {
+ 	int cpu, i, node;
+ 
+-	for(node=0; node<MAX_NUMNODES; node++)
++	for(node=0; node < MAX_NUMNODES; node++)
+ 		cpus_clear(node_to_cpu_mask[node]);
++
+ 	for(cpu = 0; cpu < NR_CPUS; ++cpu) {
+-		/*
+-		 * All Itanium NUMA platforms I know use ACPI, so maybe we
+-		 * can drop this ifdef completely.                    [EF]
+-		 */
+-#ifdef CONFIG_ACPI_NUMA
+ 		node = -1;
+ 		for (i = 0; i < NR_CPUS; ++i)
+ 			if (cpu_physical_id(cpu) == node_cpuid[i].phys_id) {
+ 				node = node_cpuid[i].nid;
+ 				break;
+ 			}
+-#else
+-#		error Fixme: Dunno how to build CPU-to-node map.
+-#endif
+ 		cpu_to_node_map[cpu] = (node >= 0) ? node : 0;
+ 		if (node >= 0)
+ 			cpu_set(cpu, node_to_cpu_mask[node]);
+ 	}
+ }
+-
+-#endif /* CONFIG_NUMA */
+diff -urN kernel-source-2.6.8.defconfig/arch/ia64/kernel/setup.c kernel-source-2.6.8.newupfix.defconfig/arch/ia64/kernel/setup.c
+--- kernel-source-2.6.8.defconfig/arch/ia64/kernel/setup.c	2004-08-13 23:36:17.000000000 -0600
++++ kernel-source-2.6.8.newupfix.defconfig/arch/ia64/kernel/setup.c	2004-08-15 15:49:38.000000000 -0600
+@@ -317,11 +317,9 @@
+ 	machvec_init(acpi_get_sysname());
+ #endif
+ 
+-#ifdef CONFIG_SMP
+ 	/* If we register an early console, allow CPU 0 to printk */
+ 	if (!early_console_setup())
+ 		cpu_set(smp_processor_id(), cpu_online_map);
+-#endif
+ 
+ #ifdef CONFIG_ACPI_BOOT
+ 	/* Initialize the ACPI boot-time table parser */
+diff -urN kernel-source-2.6.8.defconfig/arch/ia64/mm/discontig.c kernel-source-2.6.8.newupfix.defconfig/arch/ia64/mm/discontig.c
+--- kernel-source-2.6.8.defconfig/arch/ia64/mm/discontig.c	2004-08-14 13:07:37.000000000 -0600
++++ kernel-source-2.6.8.newupfix.defconfig/arch/ia64/mm/discontig.c	2004-08-15 15:49:38.000000000 -0600
+@@ -398,8 +398,8 @@
+  */
+ static void __init initialize_pernode_data(void)
+ {
+-	int cpu, node;
+ 	pg_data_t *pgdat_list[NR_NODES];
++	int cpu, node;
+ 
+ 	for (node = 0; node < numnodes; node++)
+ 		pgdat_list[node] = mem_data[node].pgdat;
+@@ -409,12 +409,22 @@
+ 		memcpy(mem_data[node].node_data->pg_data_ptrs, pgdat_list,
+ 		       sizeof(pgdat_list));
+ 	}
+-
++#ifdef CONFIG_SMP
+ 	/* Set the node_data pointer for each per-cpu struct */
+ 	for (cpu = 0; cpu < NR_CPUS; cpu++) {
+ 		node = node_cpuid[cpu].nid;
+ 		per_cpu(cpu_info, cpu).node_data = mem_data[node].node_data;
+ 	}
++#else
++	{
++		struct cpuinfo_ia64 *cpu0_cpu_info;
++		cpu = 0;
++		node = node_cpuid[cpu].nid;
++		cpu0_cpu_info = (struct cpuinfo_ia64 *)(__phys_per_cpu_start +
++			((char *)&per_cpu__cpu_info - __per_cpu_start));
++		cpu0_cpu_info->node_data = mem_data[node].node_data;
++	}
++#endif /* CONFIG_SMP */
+ }
+ 
+ /**
+@@ -489,12 +499,11 @@
+ {
+ 	int cpu;
+ 
+-	if (smp_processor_id() == 0) {
+-		for (cpu = 0; cpu < NR_CPUS; cpu++) {
+-			per_cpu(local_per_cpu_offset, cpu) =
+-				__per_cpu_offset[cpu];
+-		}
+-	}
++	if (smp_processor_id() != 0)
++		return __per_cpu_start + __per_cpu_offset[smp_processor_id()];
++
++	for (cpu = 0; cpu < NR_CPUS; cpu++)
++		per_cpu(local_per_cpu_offset, cpu) = __per_cpu_offset[cpu];
+ 
+ 	return __per_cpu_start + __per_cpu_offset[smp_processor_id()];
+ }
+diff -urN kernel-source-2.6.8.defconfig/drivers/serial/sn_console.c kernel-source-2.6.8.newupfix.defconfig/drivers/serial/sn_console.c
+--- kernel-source-2.6.8.defconfig/drivers/serial/sn_console.c	2004-08-14 13:07:37.000000000 -0600
++++ kernel-source-2.6.8.newupfix.defconfig/drivers/serial/sn_console.c	2004-08-15 15:49:31.000000000 -0600
+@@ -50,7 +50,6 @@
+ #include <linux/miscdevice.h>
+ #include <linux/serial_core.h>
+ 
+-#include <asm/io.h>
+ #include <asm/sn/simulator.h>
+ #include <asm/sn/sn2/sn_private.h>
+ #include <asm/sn/sn_sal.h>
+@@ -1086,9 +1085,7 @@
+ 			spin_unlock_irqrestore(&port->sc_port.lock, flags);
+ 
+ 			puts_raw_fixed(port->sc_ops->sal_puts_raw, s, count);
+-#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT)
+ 		}
+-#endif
+ 	}
+ 	else {
+ 		/* Not yet registered with serial core - simple case */

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-generic-no-smp.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-generic-no-smp.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-generic-no-smp.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,265 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: fix CONFIG_IA64_GENERIC compilation for UP
+## DP: Patch author: Jesse Barnes <jbarnes at sgi.com>
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -Nru a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
+--- a/arch/ia64/kernel/Makefile	2004-08-12 18:28:06 -07:00
++++ b/arch/ia64/kernel/Makefile	2004-08-12 18:28:06 -07:00
+@@ -15,6 +15,7 @@
+ obj-$(CONFIG_IOSAPIC)		+= iosapic.o
+ obj-$(CONFIG_MODULES)		+= module.o
+ obj-$(CONFIG_SMP)		+= smp.o smpboot.o
++obj-$(CONFIG_NUMA)		+= numa.o
+ obj-$(CONFIG_PERFMON)		+= perfmon_default_smpl.o
+ obj-$(CONFIG_IA64_CYCLONE)	+= cyclone.o
+ 
+diff -Nru a/arch/ia64/kernel/cyclone.c b/arch/ia64/kernel/cyclone.c
+--- a/arch/ia64/kernel/cyclone.c	2004-08-12 18:28:06 -07:00
++++ b/arch/ia64/kernel/cyclone.c	2004-08-12 18:28:06 -07:00
+@@ -1,6 +1,8 @@
++#include <linux/module.h>
+ #include <linux/smp.h>
+ #include <linux/time.h>
+ #include <linux/errno.h>
++#include <asm/io.h>
+ 
+ /* IBM Summit (EXA) Cyclone counter code*/
+ #define CYCLONE_CBAR_ADDR 0xFEB00CD0
+diff -Nru a/arch/ia64/kernel/numa.c b/arch/ia64/kernel/numa.c
+--- /dev/null	Wed Dec 31 16:00:00 196900
++++ b/arch/ia64/kernel/numa.c	2004-08-12 18:28:06 -07:00
+@@ -0,0 +1,46 @@
++#include <linux/config.h>
++#include <linux/topology.h>
++#include <linux/module.h>
++#include <asm/processor.h>
++#include <asm/smp.h>
++
++#ifdef CONFIG_NUMA
++
++/* on which node is each logical CPU (one cacheline even for 64 CPUs) */
++u8 cpu_to_node_map[NR_CPUS] __cacheline_aligned;
++EXPORT_SYMBOL(cpu_to_node_map);
++/* which logical CPUs are on which nodes */
++cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned;
++
++/*
++ * Build cpu to node mapping and initialize the per node cpu masks.
++ */
++void __init
++build_cpu_to_node_map (void)
++{
++	int cpu, i, node;
++
++	for(node=0; node<MAX_NUMNODES; node++)
++		cpus_clear(node_to_cpu_mask[node]);
++	for(cpu = 0; cpu < NR_CPUS; ++cpu) {
++		/*
++		 * All Itanium NUMA platforms I know use ACPI, so maybe we
++		 * can drop this ifdef completely.                    [EF]
++		 */
++#ifdef CONFIG_ACPI_NUMA
++		node = -1;
++		for (i = 0; i < NR_CPUS; ++i)
++			if (cpu_physical_id(cpu) == node_cpuid[i].phys_id) {
++				node = node_cpuid[i].nid;
++				break;
++			}
++#else
++#		error Fixme: Dunno how to build CPU-to-node map.
++#endif
++		cpu_to_node_map[cpu] = (node >= 0) ? node : 0;
++		if (node >= 0)
++			cpu_set(cpu, node_to_cpu_mask[node]);
++	}
++}
++
++#endif /* CONFIG_NUMA */
+diff -Nru a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
+--- a/arch/ia64/kernel/smpboot.c	2004-08-12 18:28:06 -07:00
++++ b/arch/ia64/kernel/smpboot.c	2004-08-12 18:28:06 -07:00
+@@ -491,47 +491,6 @@
+ 	}
+ }
+ 
+-#ifdef CONFIG_NUMA
+-
+-/* on which node is each logical CPU (one cacheline even for 64 CPUs) */
+-u8 cpu_to_node_map[NR_CPUS] __cacheline_aligned;
+-EXPORT_SYMBOL(cpu_to_node_map);
+-/* which logical CPUs are on which nodes */
+-cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned;
+-
+-/*
+- * Build cpu to node mapping and initialize the per node cpu masks.
+- */
+-void __init
+-build_cpu_to_node_map (void)
+-{
+-	int cpu, i, node;
+-
+-	for(node=0; node<MAX_NUMNODES; node++)
+-		cpus_clear(node_to_cpu_mask[node]);
+-	for(cpu = 0; cpu < NR_CPUS; ++cpu) {
+-		/*
+-		 * All Itanium NUMA platforms I know use ACPI, so maybe we
+-		 * can drop this ifdef completely.                    [EF]
+-		 */
+-#ifdef CONFIG_ACPI_NUMA
+-		node = -1;
+-		for (i = 0; i < NR_CPUS; ++i)
+-			if (cpu_physical_id(cpu) == node_cpuid[i].phys_id) {
+-				node = node_cpuid[i].nid;
+-				break;
+-			}
+-#else
+-#		error Fixme: Dunno how to build CPU-to-node map.
+-#endif
+-		cpu_to_node_map[cpu] = (node >= 0) ? node : 0;
+-		if (node >= 0)
+-			cpu_set(cpu, node_to_cpu_mask[node]);
+-	}
+-}
+-
+-#endif /* CONFIG_NUMA */
+-
+ /*
+  * Cycle through the APs sending Wakeup IPIs to boot each.
+  */
+diff -Nru a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
+--- a/arch/ia64/mm/discontig.c	2004-08-12 18:28:06 -07:00
++++ b/arch/ia64/mm/discontig.c	2004-08-12 18:28:06 -07:00
+@@ -225,6 +225,33 @@
+ }
+ 
+ /**
++ * per_cpu_node_setup - setup per-cpu areas on each node
++ * @cpu_data: per-cpu area on this node
++ * @node: node to setup
++ *
++ * Copy the static per-cpu data into the region we just set aside and then
++ * setup __per_cpu_offset for each CPU on this node.  Return a pointer to
++ * the end of the area.
++ */
++static void *per_cpu_node_setup(void *cpu_data, int node)
++{
++#ifdef CONFIG_SMP
++	int cpu;
++
++	for (cpu = 0; cpu < NR_CPUS; cpu++) {
++		if (node == node_cpuid[cpu].nid) {
++			memcpy(__va(cpu_data), __phys_per_cpu_start,
++			       __per_cpu_end - __per_cpu_start);
++			__per_cpu_offset[cpu] = (char*)__va(cpu_data) -
++				__per_cpu_start;
++			cpu_data += PERCPU_PAGE_SIZE;
++		}
++	}
++#endif
++	return cpu_data;
++}
++
++/**
+  * find_pernode_space - allocate memory for memory map and per-node structures
+  * @start: physical start of range
+  * @len: length of range
+@@ -255,7 +282,7 @@
+ static int __init find_pernode_space(unsigned long start, unsigned long len,
+ 				     int node)
+ {
+-	unsigned long epfn, cpu, cpus;
++	unsigned long epfn, cpus;
+ 	unsigned long pernodesize = 0, pernode, pages, mapsize;
+ 	void *cpu_data;
+ 	struct bootmem_data *bdp = &mem_data[node].bootmem_data;
+@@ -305,20 +332,7 @@
+ 		mem_data[node].pgdat->bdata = bdp;
+ 		pernode += L1_CACHE_ALIGN(sizeof(pg_data_t));
+ 
+-		/*
+-		 * Copy the static per-cpu data into the region we
+-		 * just set aside and then setup __per_cpu_offset
+-		 * for each CPU on this node.
+-		 */
+-		for (cpu = 0; cpu < NR_CPUS; cpu++) {
+-			if (node == node_cpuid[cpu].nid) {
+-				memcpy(__va(cpu_data), __phys_per_cpu_start,
+-				       __per_cpu_end - __per_cpu_start);
+-				__per_cpu_offset[cpu] = (char*)__va(cpu_data) -
+-					__per_cpu_start;
+-				cpu_data += PERCPU_PAGE_SIZE;
+-			}
+-		}
++		cpu_data = per_cpu_node_setup(cpu_data, node);
+ 	}
+ 
+ 	return 0;
+@@ -464,6 +478,7 @@
+ 	find_initrd();
+ }
+ 
++#ifdef CONFIG_SMP
+ /**
+  * per_cpu_init - setup per-cpu variables
+  *
+@@ -483,6 +498,7 @@
+ 
+ 	return __per_cpu_start + __per_cpu_offset[smp_processor_id()];
+ }
++#endif /* CONFIG_SMP */
+ 
+ /**
+  * show_mem - give short summary of memory stats
+diff -Nru a/drivers/serial/sn_console.c b/drivers/serial/sn_console.c
+--- a/drivers/serial/sn_console.c	2004-08-12 18:28:06 -07:00
++++ b/drivers/serial/sn_console.c	2004-08-12 18:28:06 -07:00
+@@ -50,6 +50,7 @@
+ #include <linux/miscdevice.h>
+ #include <linux/serial_core.h>
+ 
++#include <asm/io.h>
+ #include <asm/sn/simulator.h>
+ #include <asm/sn/sn2/sn_private.h>
+ #include <asm/sn/sn_sal.h>
+@@ -1085,7 +1086,9 @@
+ 			spin_unlock_irqrestore(&port->sc_port.lock, flags);
+ 
+ 			puts_raw_fixed(port->sc_ops->sal_puts_raw, s, count);
++#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT)
+ 		}
++#endif
+ 	}
+ 	else {
+ 		/* Not yet registered with serial core - simple case */
+diff -Nru a/include/asm-ia64/smp.h b/include/asm-ia64/smp.h
+--- a/include/asm-ia64/smp.h	2004-08-12 18:28:06 -07:00
++++ b/include/asm-ia64/smp.h	2004-08-12 18:28:06 -07:00
+@@ -126,6 +126,7 @@
+ #else
+ 
+ #define cpu_logical_id(cpuid)		0
++#define cpu_physical_id(i)	((ia64_getreg(_IA64_REG_CR_LID) >> 16) & 0xffff)
+ 
+ #endif /* CONFIG_SMP */
+ #endif /* _ASM_IA64_SMP_H */
+diff -Nru a/include/asm-ia64/sn/sn_cpuid.h b/include/asm-ia64/sn/sn_cpuid.h
+--- a/include/asm-ia64/sn/sn_cpuid.h	2004-08-12 18:28:06 -07:00
++++ b/include/asm-ia64/sn/sn_cpuid.h	2004-08-12 18:28:06 -07:00
+@@ -83,10 +83,6 @@
+  *
+  */
+ 
+-#ifndef CONFIG_SMP
+-#define cpu_physical_id(cpuid)			((ia64_getreg(_IA64_REG_CR_LID) >> 16) & 0xffff)
+-#endif
+-
+ /*
+  * macros for some of these exist in sn/addrs.h & sn/arch.h, etc. However, 
+  * trying #include these files here causes circular dependencies.

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-hp-sba_iommu-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-hp-sba_iommu-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-hp-sba_iommu-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,53 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix a DMA mapping resource issue on HP ia64 systems
+## DP: Patch author: Nigel Croxon <nigel.croxon at hp.com>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/11/03 14:46:01-08:00 nigel.croxon at hp.com 
+#   [IA64-HP] Fix for bits_wanted in sba_iommu.c
+#   
+#   bits_wanted is expanded to bytes using the wrong shift value
+#   (when iovp_shift != PAGE_SHIFT), resulting in an explosion of
+#   used iommu resources.
+#   
+#   This potentially results in mistakenly running out of DMA mapping
+#   resources when the system is under *heavy* i/o load.
+#   
+#   Signed-off-by: Nigel Croxon <nigel.croxon at hp.com>
+#   Signed-off by: Alex Williamson <alex.williamson at hp.com>
+#   Signed-off-by: Tony Luck <tony.luck at intel.com>
+# 
+# arch/ia64/hp/common/sba_iommu.c
+#   2004/11/03 14:43:08-08:00 nigel.croxon at hp.com +2 -2
+#   Fix for bits_wanted in sba_iommu.c
+# 
+diff -Nru a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
+--- a/arch/ia64/hp/common/sba_iommu.c	2004-11-04 18:28:50 -08:00
++++ b/arch/ia64/hp/common/sba_iommu.c	2004-11-04 18:28:50 -08:00
+@@ -479,7 +479,7 @@
+ 	 * purges IOTLB entries in power-of-two sizes, so we also
+ 	 * allocate IOVA space in power-of-two sizes.
+ 	 */
+-	bits_wanted = 1UL << get_iovp_order(bits_wanted << PAGE_SHIFT);
++	bits_wanted = 1UL << get_iovp_order(bits_wanted << iovp_shift);
+ 
+ 	if (likely(bits_wanted == 1)) {
+ 		unsigned int bitshiftcnt;
+@@ -688,7 +688,7 @@
+ 	unsigned long m;
+ 
+ 	/* Round up to power-of-two size: see AR2305 note above */
+-	bits_not_wanted = 1UL << get_iovp_order(bits_not_wanted << PAGE_SHIFT);
++	bits_not_wanted = 1UL << get_iovp_order(bits_not_wanted << iovp_shift);
+ 	for (; bits_not_wanted > 0 ; res_ptr++) {
+ 		
+ 		if (unlikely(bits_not_wanted > BITS_PER_LONG)) {

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-mem-boot-param-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-mem-boot-param-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-mem-boot-param-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,45 @@
+# origin: http://linux.bkbits.net:8080/linux-2.6/cset@412cd266M7BvuC6I6UQsOrdb3GOWWQ?nav=index.html|src/|src/arch|src/arch/ia64|src/arch/ia64/kernel|related/arch/ia64/kernel/efi.c (yanmin.zhang at intel.com)
+# cset: 1.1803.151.1
+# inclusion: in upstream
+# revision-date: 2004-08-25
+
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/08/25 17:54:46+00:00 yanmin.zhang at intel.com 
+#   [IA64] Fix boot problems when using "mem=" boot parameter.
+#   
+#   My tiger-4 machine has 16GB memory. Kernel 2.6.8 fails to boot on it
+#   when command line parameter mem=8G, and it also fails when mem being
+#   set to other value, such as 7G, 10G.
+#   
+#   Basically, in function efi_memmap_walk, md->num_pages might be decreased
+#   if mem_limit is set, and then at the next time when efi_memmap_walk is
+#   called, trim_top might trim the md again because of IA64_GRANULE_SIZE
+#   alignment, then another md which is beyond mem_limit at the beginning
+#   will be chosen, and its physical page number is larger than max_pfn. Then,
+#   a BUG check is triggered.
+#   
+#   Signed-off-by: Zhang Yanmin <yanmin.zhang at intel.com>
+#   Signed-off-by: Yao Jun      <junx.yao at intel.com>
+#   Signed-off-by: Tony Luck    <tony.luck at intel.com>
+# 
+# arch/ia64/kernel/efi.c
+#   2004/08/25 17:50:37+00:00 aegl at agluck-lia64.sc.intel.com +3 -1
+#   Fix boot problems when using "mem=" boot parameter.
+# 
+diff -Nru a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
+--- a/arch/ia64/kernel/efi.c	2004-10-12 17:30:06 -07:00
++++ b/arch/ia64/kernel/efi.c	2004-10-12 17:30:06 -07:00
+@@ -357,8 +357,10 @@
+ 			if (total_mem >= mem_limit)
+ 				continue;
+ 			total_mem += (md->num_pages << EFI_PAGE_SHIFT);
+-			if (total_mem > mem_limit)
++			if (total_mem > mem_limit) {
+ 				md->num_pages -= ((total_mem - mem_limit) >> EFI_PAGE_SHIFT);
++				max_addr = md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT);
++			}
+ 
+ 			if (md->num_pages == 0)
+ 				continue;

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-mem-max_addr-cmdline-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-mem-max_addr-cmdline-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-mem-max_addr-cmdline-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,89 @@
+# origin: linux-ia64 (Alex Williamson <awilliam at fc.hp.com>)
+# cset: n/a
+# inclusion: submitted upstream
+# revision-date: 2004-10-11
+
+   This should hopefully fix all strange behavior with using mem= or
+max_addr= when trying to limit memory usage.  The current code has
+several problems with splitting granules and removing the dangling
+pieces on subsequent passes.  This potentially happened when mem_limit
+hits total_mem and any time we reduced the page count of an entry
+without updating first_non_wb_addr.  There was also an off by one in
+max_addr that caused an extra granule to get dropped sometimes.
+
+   With this change, there's some extra fuzz introduced that a max_addr
+specification will get rounded down to a granule boundary and memory
+quantity, when using mem=, will be within a granule size of the
+requested amount.  Let me know if anyone finds more problems with it.
+Thanks,
+
+	Alex
+
+-- 
+Signed-off-by: Alex Williamson <alex.williamson at hp.com>
+
+===== arch/ia64/kernel/efi.c 1.36 vs edited =====
+--- 1.36/arch/ia64/kernel/efi.c	2004-08-25 11:50:37 -06:00
++++ edited/arch/ia64/kernel/efi.c	2004-10-07 15:59:50 -06:00
+@@ -348,19 +348,31 @@
+ 			trim_top(md, last_granule_addr);
+ 
+ 		if (is_available_memory(md)) {
+-			if (md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT) > max_addr) {
+-				if (md->phys_addr > max_addr)
++			if (md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT) >= max_addr) {
++				if (md->phys_addr >= max_addr)
+ 					continue;
+ 				md->num_pages = (max_addr - md->phys_addr) >> EFI_PAGE_SHIFT;
++				first_non_wb_addr = max_addr;
+ 			}
+ 
+ 			if (total_mem >= mem_limit)
+ 				continue;
+-			total_mem += (md->num_pages << EFI_PAGE_SHIFT);
+-			if (total_mem > mem_limit) {
+-				md->num_pages -= ((total_mem - mem_limit) >> EFI_PAGE_SHIFT);
+-				max_addr = md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT);
++
++			if (total_mem + (md->num_pages << EFI_PAGE_SHIFT) > mem_limit) {
++				unsigned long limit_addr = md->phys_addr;
++
++				limit_addr += mem_limit - total_mem;
++				limit_addr &= ~(IA64_GRANULE_SIZE - 1);
++
++				if (md->phys_addr > limit_addr)
++					continue;
++
++				md->num_pages = (limit_addr - md->phys_addr) >>
++				                EFI_PAGE_SHIFT;
++				first_non_wb_addr = max_addr = md->phys_addr +
++				              (md->num_pages << EFI_PAGE_SHIFT);
+ 			}
++			total_mem += (md->num_pages << EFI_PAGE_SHIFT);
+ 
+ 			if (md->num_pages == 0)
+ 				continue;
+@@ -495,13 +507,14 @@
+ 	for (cp = saved_command_line; *cp; ) {
+ 		if (memcmp(cp, "mem=", 4) == 0) {
+ 			cp += 4;
+-			mem_limit = memparse(cp, &end) - 2;
++			mem_limit = memparse(cp, &end);
+ 			if (end != cp)
+ 				break;
+ 			cp = end;
+ 		} else if (memcmp(cp, "max_addr=", 9) == 0) {
+ 			cp += 9;
+-			max_addr = memparse(cp, &end) - 1;
++			max_addr = (memparse(cp, &end) &
++			            ~(IA64_GRANULE_SIZE - 1));
+ 			if (end != cp)
+ 				break;
+ 			cp = end;
+
+
+-
+To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
+the body of a message to majordomo at vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-sparse-access_ok.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-sparse-access_ok.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-sparse-access_ok.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,52 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Upstream status: backport
+## DP: Description: fix argument-order in access_ok() call
+## DP: Patch author: David Mosberger <davidm at hpl.hp.com>
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/05 04:34:05+00:00 davidm at hpl.hp.com 
+#   [IA64] fix argument-order in access_ok() call from csum_partial_copy_from_user
+#   
+#   Another sparse-detected bug.
+#   
+#   Signed-off-by: davidm at hpl.hp.com
+#   Signed-off-by: Tony Luck <tony.luck at intel.com>
+# 
+# arch/ia64/lib/csum_partial_copy.c
+#   2004/10/05 04:32:34+00:00 aegl at agluck-lia64.sc.intel.com +4 -4
+#   fix argument-order in access_ok() call from csum_partial_copy_from_user()
+# 
+diff -Nru a/arch/ia64/lib/csum_partial_copy.c b/arch/ia64/lib/csum_partial_copy.c
+--- a/arch/ia64/lib/csum_partial_copy.c	2004-10-16 16:49:46 -07:00
++++ b/arch/ia64/lib/csum_partial_copy.c	2004-10-16 16:49:46 -07:00
+@@ -1,7 +1,7 @@
+ /*
+  * Network Checksum & Copy routine
+  *
+- * Copyright (C) 1999, 2003 Hewlett-Packard Co
++ * Copyright (C) 1999, 2003-2004 Hewlett-Packard Co
+  *	Stephane Eranian <eranian at hpl.hp.com>
+  *
+  * Most of the code has been imported from Linux/Alpha
+@@ -129,10 +129,10 @@
+ }
+ 
+ unsigned int
+-csum_partial_copy_from_user(const char *src, char *dst, int len,
+-			    unsigned int sum, int *errp)
++csum_partial_copy_from_user (const char __user *src, char *dst, int len,
++			     unsigned int sum, int *errp)
+ {
+-	if (!access_ok(src, len, VERIFY_READ)) {
++	if (!access_ok(VERIFY_READ, src, len)) {
+ 		*errp = -EFAULT;
+ 		memset(dst, 0, len);
+ 		return sum;

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-sparse-copy_to_user.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-sparse-copy_to_user.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64-sparse-copy_to_user.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,36 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Upstream status: backport
+## DP: Description: fix argument-order in __copy_to_user() call
+## DP: Patch author: David Mosberger <davidm at hpl.hp.com>
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/05 04:10:02+00:00 davidm at hpl.hp.com 
+#   [IA64] signal.c: fix wrong argument order in __copy_to_user() call
+#   
+#   Signed-off-by: davidm at hpl.hp.com
+#   Signed-off-by: Tony Luck <tony.luck at intel.com>
+# 
+# arch/ia64/kernel/signal.c
+#   2004/10/05 04:07:38+00:00 aegl at agluck-lia64.sc.intel.com +1 -1
+#   fix wrong argument order in __copy_to_user() call
+# 
+diff -Nru a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c
+--- a/arch/ia64/kernel/signal.c	2004-10-16 16:52:07 -07:00
++++ b/arch/ia64/kernel/signal.c	2004-10-16 16:52:07 -07:00
+@@ -335,7 +335,7 @@
+ 		err |= __put_user(scr->pt.ar_ccv, &sc->sc_ar_ccv);		/* ar.ccv */
+ 		err |= __put_user(scr->pt.b7, &sc->sc_br[7]);			/* b7 */
+ 		err |= __put_user(scr->pt.r14, &sc->sc_gr[14]);			/* r14 */
+-		err |= __copy_to_user(&scr->pt.ar_csd, &sc->sc_ar25, 2*8); /* ar.csd & ar.ssd */
++		err |= __copy_to_user(&sc->sc_ar25, &scr->pt.ar_csd, 2*8); /* ar.csd & ar.ssd */
+ 		err |= __copy_to_user(&sc->sc_gr[2], &scr->pt.r2, 2*8);		/* r2-r3 */
+ 		err |= __copy_to_user(&sc->sc_gr[16], &scr->pt.r16, 16*8);	/* r16-r31 */
+ 	}

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64_cyclone_nosmp.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64_cyclone_nosmp.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ia64_cyclone_nosmp.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,34 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: fix cyclone build on IA64 for UP
+## DP: Patch author: Jesse Barnes <jbarnes at sgi.com>
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+
+fix ia64 cyclone build errors
+
+Signed-off-by: Randy Dunlap <rddunlap at osdl.org>
+
+diffstat:=
+ arch/ia64/kernel/cyclone.c |    3 +++
+ 1 files changed, 3 insertions(+)
+
+diff -Naurp ./arch/ia64/kernel/cyclone.c~ia64_no_smp ./arch/ia64/kernel/cyclone.c
+--- ./arch/ia64/kernel/cyclone.c~ia64_no_smp	Mon Aug 16 14:13:52 2004
++++ ./arch/ia64/kernel/cyclone.c	Mon Aug 16 14:06:26 2004
+@@ -1,7 +1,10 @@
++#include <linux/init.h>
+ #include <linux/smp.h>
+ #include <linux/time.h>
+ #include <linux/errno.h>
+ 
++#include <asm/io.h>
++
+ /* IBM Summit (EXA) Cyclone counter code*/
+ #define CYCLONE_CBAR_ADDR 0xFEB00CD0
+ #define CYCLONE_PMCC_OFFSET 0x51A0

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/igmp-src-list-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/igmp-src-list-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/igmp-src-list-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,122 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [SECURITY] IGMP source filter fixes
+## DP: Patch author: Chris Wright <chrisw at osdl.org>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/12/14 11:06:25-08:00 chrisw at osdl.org 
+#   [IPV4/IPV6]: IGMP source filter fixes
+#   
+#   When adding or deleting from the source list make sure to find matches
+#   by comparing against the new source address, not the group address.
+#   Also, check each addr in the list rather than just the first one.
+#   And, finally, only delete from list when there's a match rather than
+#   vice-versa.  Drop the effort to keep list sorted, since it's not done
+#   on full-state api and can create an sl_addr entry that the delta api
+#   won't be able to delete. Without these fixes sl_count can be corrupted
+#   which can allow for kernel memory corruption.
+#   
+#   Signed-off-by: Chris Wright <chrisw at osdl.org>
+#   Signed-off-by: David S. Miller <davem at davemloft.net>
+# 
+# net/ipv4/igmp.c
+#   2004/12/14 11:06:01-08:00 chrisw at osdl.org +5 -5
+#   [IPV4/IPV6]: IGMP source filter fixes
+#   
+#   When adding or deleting from the source list make sure to find matches
+#   by comparing against the new source address, not the group address.
+#   Also, check each addr in the list rather than just the first one.
+#   And, finally, only delete from list when there's a match rather than
+#   vice-versa.  Drop the effort to keep list sorted, since it's not done
+#   on full-state api and can create an sl_addr entry that the delta api
+#   won't be able to delete. Without these fixes sl_count can be corrupted
+#   which can allow for kernel memory corruption.
+#   
+#   Signed-off-by: Chris Wright <chrisw at osdl.org>
+#   Signed-off-by: David S. Miller <davem at davemloft.net>
+# 
+# net/ipv6/mcast.c
+#   2004/12/14 11:06:01-08:00 chrisw at osdl.org +5 -5
+#   [IPV4/IPV6]: IGMP source filter fixes
+#   
+#   When adding or deleting from the source list make sure to find matches
+#   by comparing against the new source address, not the group address.
+#   Also, check each addr in the list rather than just the first one.
+#   And, finally, only delete from list when there's a match rather than
+#   vice-versa.  Drop the effort to keep list sorted, since it's not done
+#   on full-state api and can create an sl_addr entry that the delta api
+#   won't be able to delete. Without these fixes sl_count can be corrupted
+#   which can allow for kernel memory corruption.
+#   
+#   Signed-off-by: Chris Wright <chrisw at osdl.org>
+#   Signed-off-by: David S. Miller <davem at davemloft.net>
+# 
+diff -Nru a/net/ipv4/igmp.c b/net/ipv4/igmp.c
+--- a/net/ipv4/igmp.c	2004-12-15 13:52:41 -08:00
++++ b/net/ipv4/igmp.c	2004-12-15 13:52:41 -08:00
+@@ -1778,12 +1778,12 @@
+ 			goto done;
+ 		rv = !0;
+ 		for (i=0; i<psl->sl_count; i++) {
+-			rv = memcmp(&psl->sl_addr, &mreqs->imr_multiaddr,
++			rv = memcmp(&psl->sl_addr[i], &mreqs->imr_sourceaddr,
+ 				sizeof(__u32));
+-			if (rv >= 0)
++			if (rv == 0)
+ 				break;
+ 		}
+-		if (!rv)	/* source not found */
++		if (rv)		/* source not found */
+ 			goto done;
+ 
+ 		/* update the interface filter */
+@@ -1825,9 +1825,9 @@
+ 	}
+ 	rv = 1;	/* > 0 for insert logic below if sl_count is 0 */
+ 	for (i=0; i<psl->sl_count; i++) {
+-		rv = memcmp(&psl->sl_addr, &mreqs->imr_multiaddr,
++		rv = memcmp(&psl->sl_addr[i], &mreqs->imr_sourceaddr,
+ 			sizeof(__u32));
+-		if (rv >= 0)
++		if (rv == 0)
+ 			break;
+ 	}
+ 	if (rv == 0)		/* address already there is an error */
+diff -Nru a/net/ipv6/mcast.c b/net/ipv6/mcast.c
+--- a/net/ipv6/mcast.c	2004-12-15 13:52:41 -08:00
++++ b/net/ipv6/mcast.c	2004-12-15 13:52:41 -08:00
+@@ -391,12 +391,12 @@
+ 			goto done;
+ 		rv = !0;
+ 		for (i=0; i<psl->sl_count; i++) {
+-			rv = memcmp(&psl->sl_addr, group,
++			rv = memcmp(&psl->sl_addr[i], source,
+ 				sizeof(struct in6_addr));
+-			if (rv >= 0)
++			if (rv == 0)
+ 				break;
+ 		}
+-		if (!rv)	/* source not found */
++		if (rv)		/* source not found */
+ 			goto done;
+ 
+ 		/* update the interface filter */
+@@ -437,8 +437,8 @@
+ 	}
+ 	rv = 1;	/* > 0 for insert logic below if sl_count is 0 */
+ 	for (i=0; i<psl->sl_count; i++) {
+-		rv = memcmp(&psl->sl_addr, group, sizeof(struct in6_addr));
+-		if (rv >= 0)
++		rv = memcmp(&psl->sl_addr[i], source, sizeof(struct in6_addr));
++		if (rv == 0)
+ 			break;
+ 	}
+ 	if (rv == 0)		/* address already there is an error */

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/include-missing-includes.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/include-missing-includes.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/include-missing-includes.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,82 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Include linux/spinlock.h for rwlock_t in include/net/ip6_fib.h
+## DP: Description: Include linux/ipv6.h for inet6_sk in include/net/ip6_route.h
+## DP: Description: Include linux/netdevice.h for MAX_ADDR_LEN in include/net/neighbour.h
+## DP: Description: Added forward declaration for struct net_device in include/linux/skbuff.h
+## DP: Patch author: unknown
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+
+diff -urN kernel-source-2.6.6/include/net/ip6_fib.h kernel-source-2.6.6-1/include/net/ip6_fib.h
+--- kernel-source-2.6.6/include/net/ip6_fib.h	2004-03-11 13:55:37.000000000 +1100
++++ kernel-source-2.6.6-1/include/net/ip6_fib.h	2003-06-20 21:49:07.000000000 +1000
+@@ -20,6 +20,7 @@
+ #include <net/dst.h>
+ #include <net/flow.h>
+ #include <linux/rtnetlink.h>
++#include <linux/spinlock.h>
+ 
+ struct rt6_info;
+ 
+diff -urN kernel-source-2.6.6/include/net/ip6_route.h kernel-source-2.6.6-1/include/net/ip6_route.h
+--- kernel-source-2.6.6/include/net/ip6_route.h	2004-03-11 13:55:23.000000000 +1100
++++ kernel-source-2.6.6-1/include/net/ip6_route.h	2004-03-12 22:03:08.000000000 +1100
+@@ -11,8 +11,10 @@
+ 
+ #include <net/flow.h>
+ #include <net/ip6_fib.h>
++#include <net/sock.h>
+ #include <linux/tcp.h>
+ #include <linux/ip.h>
++#include <linux/ipv6.h>
+ 
+ struct pol_chain {
+ 	int			type;
+--- kernel-source-2.6.6/include/net/neighbour.h	2004-05-10 19:48:08.000000000 +1000
++++ kernel-source-2.6.6-1/include/net/neighbour.h	2004-05-10 22:21:52.000000000 +1000
+@@ -45,6 +45,7 @@
+ 
+ #include <asm/atomic.h>
+ #include <linux/skbuff.h>
++#include <linux/netdevice.h>
+ 
+ #include <linux/err.h>
+ #include <linux/sysctl.h>
+@@ -53,6 +54,8 @@
+ #define NUD_VALID	(NUD_PERMANENT|NUD_NOARP|NUD_REACHABLE|NUD_PROBE|NUD_STALE|NUD_DELAY)
+ #define NUD_CONNECTED	(NUD_PERMANENT|NUD_NOARP|NUD_REACHABLE)
+ 
++struct neighbour;
++
+ struct neigh_parms
+ {
+ 	struct neigh_parms *next;
+diff -urN kernel-source-2.6.6/include/linux/skbuff.h kernel-source-2.6.6-1/include/linux/skbuff.h
+--- kernel-source-2.6.6/include/linux/skbuff.h	2004-05-10 19:48:08.000000000 +1000
++++ kernel-source-2.6.6-1/include/linux/skbuff.h	2004-05-10 22:21:52.000000000 +1000
+@@ -88,6 +88,8 @@
+ #define NET_CALLER(arg) __builtin_return_address(0)
+ #endif
+ 
++struct net_device;
++
+ #ifdef CONFIG_NETFILTER
+ struct nf_conntrack {
+ 	atomic_t use;
+diff -urN kernel-source-2.6.6/include/linux/netlink.h kernel-source-2.6.6-1/include/linux/netlink.h
+--- kernel-source-2.6.6/include/linux/netlink.h	2004-05-10 19:48:07.000000000 +1000
++++ kernel-source-2.6.6-1/include/linux/netlink.h	2004-05-10 22:21:52.000000000 +1000
+@@ -93,6 +94,7 @@
+ #ifdef __KERNEL__
+ 
+ #include <linux/capability.h>
++#include <linux/skbuff.h>
+ 
+ struct netlink_skb_parms
+ {

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/intel-cache-descriptors.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/intel-cache-descriptors.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/intel-cache-descriptors.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,28 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI> 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Add missing intel CPU descriptors
+## DP: Patch author: Dave Jones, alan at lxorguk.ukuu.org.uk
+## DP: Upstream status: included in 2.6.9-rc1
+ 
+ . $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -Nru a/arch/i386/kernel/cpu/intel.c b/arch/i386/kernel/cpu/intel.c
+--- a/arch/i386/kernel/cpu/intel.c	2004-08-29 01:52:16 -07:00
++++ b/arch/i386/kernel/cpu/intel.c	2004-08-29 01:52:16 -07:00
+@@ -97,10 +97,13 @@
+ 	{ 0x70, LVL_TRACE,  12 },
+ 	{ 0x71, LVL_TRACE,  16 },
+ 	{ 0x72, LVL_TRACE,  32 },
++	{ 0x78, LVL_2,	    1024 },
+ 	{ 0x79, LVL_2,      128 },
+ 	{ 0x7a, LVL_2,      256 },
+ 	{ 0x7b, LVL_2,      512 },
+ 	{ 0x7c, LVL_2,      1024 },
++	{ 0x7d, LVL_2,	    2048 },
++	{ 0x7f, LVL_2,	    512 },
+ 	{ 0x82, LVL_2,      256 },
+ 	{ 0x83, LVL_2,      512 },
+ 	{ 0x84, LVL_2,      1024 },

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ip-conntrack-ftp-leak.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ip-conntrack-ftp-leak.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ip-conntrack-ftp-leak.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,38 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix memory leak in ip_conntrack_ftp
+## DP: Patch author: Patrick McHardy <kaber at trash.net>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/12/08 13:37:53-08:00 kaber at trash.net 
+#   [NETFILTER]: Fix memory leak in ip_conntrack_ftp
+#   
+#   Signed-off-by: Patrick McHardy <kaber at trash.net>
+#   Signed-off-by: David S. Miller <davem at davemloft.net>
+# 
+# net/ipv4/netfilter/ip_conntrack_ftp.c
+#   2004/12/08 13:37:32-08:00 kaber at trash.net +1 -0
+#   [NETFILTER]: Fix memory leak in ip_conntrack_ftp
+#   
+#   Signed-off-by: Patrick McHardy <kaber at trash.net>
+#   Signed-off-by: David S. Miller <davem at davemloft.net>
+# 
+diff -Nru a/net/ipv4/netfilter/ip_conntrack_ftp.c b/net/ipv4/netfilter/ip_conntrack_ftp.c
+--- a/net/ipv4/netfilter/ip_conntrack_ftp.c	2004-12-22 22:18:44 -08:00
++++ b/net/ipv4/netfilter/ip_conntrack_ftp.c	2004-12-22 22:18:44 -08:00
+@@ -381,6 +381,7 @@
+ 		   problem (DMZ machines opening holes to internal
+ 		   networks, or the packet filter itself). */
+ 		if (!loose) {
++			ip_conntrack_expect_put(exp);
+ 			ret = NF_ACCEPT;
+ 			goto out;
+ 		}

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ipsec-missing_wakeup.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ipsec-missing_wakeup.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ipsec-missing_wakeup.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,67 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Wake up km_waitq after policy changes in net/xfrm/xfrm_policy.c
+## DP: Patch author: Herbert Xu
+## DP: Upstream status: rejected
+##
+## /---
+## |   Without this patch, the packet that caused this
+## |   ends up being dropped.
+## |
+## | Alexey is working on a better solution to this problem.
+## |
+## | Right now the semantics are horrible for packets that must
+## | be resolved by the key manager. The solution is to make a packet
+## | queue (much like that used for ARP resolution) that gets pushed out
+## | when the key manager finishes resolving or the operation times out.
+## |
+## | I have no idea what is the current state of that work... 
+## \---
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- kernel-source-2.6.6/net/xfrm/xfrm_policy.c	2004-04-05 19:49:45.000000000 +1000
++++ kernel-source-2.6.6-1/net/xfrm/xfrm_policy.c	2004-04-05 20:54:55.000000000 +1000
+@@ -361,6 +361,7 @@
+ 	if (delpol) {
+ 		xfrm_policy_kill(delpol);
+ 	}
++	wake_up(&km_waitq);
+ 	return 0;
+ }
+ 
+@@ -383,6 +384,7 @@
+ 	if (pol && delete) {
+ 		atomic_inc(&flow_cache_genid);
+ 		xfrm_policy_kill(pol);
++		wake_up(&km_waitq);
+ 	}
+ 	return pol;
+ }
+@@ -405,6 +407,7 @@
+ 	if (pol && delete) {
+ 		atomic_inc(&flow_cache_genid);
+ 		xfrm_policy_kill(pol);
++		wake_up(&km_waitq);
+ 	}
+ 	return pol;
+ }
+@@ -427,6 +430,7 @@
+ 	}
+ 	atomic_inc(&flow_cache_genid);
+ 	write_unlock_bh(&xfrm_policy_lock);
++	wake_up(&km_waitq);
+ }
+ 
+ int xfrm_policy_walk(int (*func)(struct xfrm_policy *, int, int, void*),
+@@ -555,6 +559,7 @@
+ 	if (old_pol) {
+ 		xfrm_policy_kill(old_pol);
+ 	}
++	wake_up(&km_waitq);
+ 	return 0;
+ }
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/jfs-memory-leak.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/jfs-memory-leak.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/jfs-memory-leak.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,22 @@
+#! /bin/sh -e  
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: fix memory leak in jfs
+## DP: Patch author: Dave Kleikamp <shaggy at austin.ibm.com>
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -Nru a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c
+--- a/fs/jfs/jfs_metapage.c	2004-08-29 02:47:38 -07:00
++++ b/fs/jfs/jfs_metapage.c	2004-08-29 02:47:38 -07:00
+@@ -557,6 +557,7 @@
+ 			if (page) {
+ 				block_invalidatepage(page, 0);
+ 				unlock_page(page);
++				page_cache_release(page);
+ 			}
+ 		}
+ 	}

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mark-vmio.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mark-vmio.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mark-vmio.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,44 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Mark region special in remap_pfn_range.
+## DP: Patch author: Linus Torvalds
+## DP: Upstream status: unknown
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/21 15:23:16-07:00 torvalds at ppc970.osdl.org 
+#   remap_pfn_range: make the region special.
+#   
+#   VM_IO tells the rest fo the world that the pages may
+#   have side effects on reads/writes etc, and VM_RESERVED
+#   historically told swap-out not to bother with it.
+# 
+# mm/memory.c
+#   2004/10/21 15:23:09-07:00 torvalds at ppc970.osdl.org +9 -0
+#   remap_pfn_range: make the region special.
+# 
+diff -Nru a/mm/memory.c b/mm/memory.c
+--- a/mm/memory.c	2004-11-17 19:12:55 +11:00
++++ b/mm/memory.c	2004-11-17 19:12:55 +11:00
+@@ -974,6 +974,15 @@
+ 	if (from >= end)
+ 		BUG();
+ 
++	/*
++	 * Physically remapped pages are special. Tell the
++	 * rest of the world about it:
++	 *   VM_IO tells people not to look at these pages
++	 *	(accesses can have side effects).
++	 *   VM_RESERVED tells swapout not to try to touch
++	 *	this region.
++	 */
++	vma->vm_flags |= VM_IO | VM_RESERVED;
+ 	spin_lock(&mm->page_table_lock);
+ 	do {
+ 		pmd_t *pmd = pmd_alloc(mm, dir, from);

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/marvell-mm.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/marvell-mm.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/marvell-mm.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,3372 @@
+#! /bin/sh -e 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Add Marvell MV-643XX Ethernet support
+## DP: Patch author: Ralf Baechle
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- a/drivers/scsi/Kconfig	2004-06-27 17:18:45.305154040 +0200
+diff -Nru a/drivers/net/Kconfig b/drivers/net/Kconfig
+--- a/drivers/net/Kconfig	2004-07-04 22:52:58 -07:00
++++ b/drivers/net/Kconfig	2004-07-04 22:52:58 -07:00
+@@ -2130,6 +2136,34 @@
+ 
+ 	  To compile this driver as a module, choose M here: the module
+ 	  will be called tg3.  This is recommended.
++
++config MV64340_ETH
++	bool "MV-64340 Ethernet support"
++	depends on MOMENCO_OCELOT_C || MOMENCO_JAGUAR_ATX
++	help
++	  This driver supports the gigabit Ethernet on the Marvell MV64340
++	  chipset which is used in the Momenco Ocelot C and Jaguar ATX.
++
++config MV64340_ETH_0
++	bool "MV-64340 Port 0"
++	depends on MV64340_ETH
++	help
++	  This enables support for Port 0 of the Marvell MV64340 Gigabit
++	  Ethernet.
++
++config MV64340_ETH_1
++	bool "MV-64340 Port 1"
++	depends on MV64340_ETH
++	help
++	  This enables support for Port 1 of the Marvell MV64340 Gigabit
++	  Ethernet.
++
++config MV64340_ETH_2
++	bool "MV-64340 Port 2"
++	depends on MV64340_ETH
++	help
++	  This enables support for Port 2 of the Marvell MV64340 Gigabit
++	  Ethernet.
+ 
+ endmenu
+ 
+diff -Nru a/drivers/net/Makefile b/drivers/net/Makefile
+--- a/drivers/net/Makefile	2004-07-04 22:52:58 -07:00
++++ b/drivers/net/Makefile	2004-07-04 22:52:58 -07:00
+@@ -95,6 +95,8 @@
+ obj-$(CONFIG_FORCEDETH) += forcedeth.o
+ obj-$(CONFIG_NE_H8300) += ne-h8300.o 8390.o
+ 
++obj-$(CONFIG_MV64340_ETH) += mv64340_eth.o
++
+ obj-$(CONFIG_PPP) += ppp_generic.o slhc.o
+ obj-$(CONFIG_PPP_ASYNC) += ppp_async.o
+ obj-$(CONFIG_PPP_SYNC_TTY) += ppp_synctty.o
+diff -Nru a/drivers/net/mv64340_eth.c b/drivers/net/mv64340_eth.c
+--- /dev/null	Wed Dec 31 16:00:00 196900
++++ b/drivers/net/mv64340_eth.c	2004-07-04 22:52:59 -07:00
+@@ -0,0 +1,2702 @@
++/*
++ * drivers/net/mv64340_eth.c - Driver for MV64340X ethernet ports
++ * Copyright (C) 2002 Matthew Dharm <mdharm at momenco.com>
++ *
++ * Based on the 64360 driver from:
++ * Copyright (C) 2002 rabeeh at galileo.co.il
++ *
++ * Copyright (C) 2003 PMC-Sierra, Inc.,
++ *	written by Manish Lachwani (lachwani at pmc-sierra.com)
++ *
++ * Copyright (C) 2003 Ralf Baechle <ralf at linux-mips.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 program 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, write to the Free Software
++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
++ */
++#include <linux/config.h>
++#include <linux/version.h>
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/config.h>
++#include <linux/sched.h>
++#include <linux/ptrace.h>
++#include <linux/fcntl.h>
++#include <linux/ioport.h>
++#include <linux/interrupt.h>
++#include <linux/slab.h>
++#include <linux/string.h>
++#include <linux/errno.h>
++#include <linux/ip.h>
++#include <linux/init.h>
++#include <linux/in.h>
++#include <linux/pci.h>
++#include <linux/workqueue.h>
++#include <asm/smp.h>
++#include <linux/skbuff.h>
++#include <linux/tcp.h>
++#include <linux/netdevice.h>
++#include <linux/etherdevice.h>
++#include <net/ip.h>
++
++#include <asm/bitops.h>
++#include <asm/io.h>
++#include <asm/types.h>
++#include <asm/pgtable.h>
++#include <asm/system.h>
++#include "mv64340_eth.h"
++
++/*
++ * The first part is the high level driver of the gigE ethernet ports. 
++ */
++
++/* Definition for configuring driver */
++#undef MV64340_RX_QUEUE_FILL_ON_TASK
++
++/* Constants */
++#define EXTRA_BYTES 32
++#define WRAP       ETH_HLEN + 2 + 4 + 16
++#define BUFFER_MTU dev->mtu + WRAP
++#define INT_CAUSE_UNMASK_ALL		0x0007ffff
++#define INT_CAUSE_UNMASK_ALL_EXT	0x0011ffff
++#ifdef MV64340_RX_FILL_ON_TASK
++#define INT_CAUSE_MASK_ALL		0x00000000
++#define INT_CAUSE_CHECK_BITS		INT_CAUSE_UNMASK_ALL
++#define INT_CAUSE_CHECK_BITS_EXT	INT_CAUSE_UNMASK_ALL_EXT
++#endif
++
++/* Static function declarations */
++static int mv64340_eth_real_open(struct net_device *);
++static int mv64340_eth_real_stop(struct net_device *);
++static int mv64340_eth_change_mtu(struct net_device *, int);
++static struct net_device_stats *mv64340_eth_get_stats(struct net_device *);
++static void eth_port_init_mac_tables(unsigned int eth_port_num);
++#ifdef MV64340_NAPI
++static int mv64340_poll(struct net_device *dev, int *budget);
++#endif
++
++unsigned char prom_mac_addr_base[6];
++unsigned long mv64340_sram_base;
++
++/*
++ * Changes MTU (maximum transfer unit) of the gigabit ethenret port
++ *
++ * Input : pointer to ethernet interface network device structure
++ *         new mtu size 
++ * Output : 0 upon success, -EINVAL upon failure
++ */
++static int mv64340_eth_change_mtu(struct net_device *dev, int new_mtu)
++{
++	struct mv64340_private *mp = netdev_priv(dev);
++	unsigned long flags;
++
++	spin_lock_irqsave(&mp->lock, flags);
++
++	if ((new_mtu > 9500) || (new_mtu < 64)) {
++		spin_unlock_irqrestore(&mp->lock, flags);
++		return -EINVAL;
++	}
++
++	dev->mtu = new_mtu;
++	/* 
++	 * Stop then re-open the interface. This will allocate RX skb's with
++	 * the new MTU.
++	 * There is a possible danger that the open will not successed, due
++	 * to memory is full, which might fail the open function.
++	 */
++	if (netif_running(dev)) {
++		if (mv64340_eth_real_stop(dev))
++			printk(KERN_ERR
++			       "%s: Fatal error on stopping device\n",
++			       dev->name);
++		if (mv64340_eth_real_open(dev))
++			printk(KERN_ERR
++			       "%s: Fatal error on opening device\n",
++			       dev->name);
++	}
++
++	spin_unlock_irqrestore(&mp->lock, flags);
++	return 0;
++}
++
++/*
++ * mv64340_eth_rx_task
++ *								       
++ * Fills / refills RX queue on a certain gigabit ethernet port
++ *
++ * Input : pointer to ethernet interface network device structure
++ * Output : N/A
++ */
++static void mv64340_eth_rx_task(void *data)
++{
++	struct net_device *dev = (struct net_device *) data;
++	struct mv64340_private *mp = netdev_priv(dev);
++	struct pkt_info pkt_info;
++	struct sk_buff *skb;
++
++	if (test_and_set_bit(0, &mp->rx_task_busy))
++		panic("%s: Error in test_set_bit / clear_bit", dev->name);
++
++	while (mp->rx_ring_skbs < (mp->rx_ring_size - 5)) {
++		/* The +8 for buffer allignment and another 32 byte extra */
++
++		skb = dev_alloc_skb(BUFFER_MTU + 8 + EXTRA_BYTES);
++		if (!skb)
++			/* Better luck next time */
++			break;
++		mp->rx_ring_skbs++;
++		pkt_info.cmd_sts = ETH_RX_ENABLE_INTERRUPT;
++		pkt_info.byte_cnt = dev->mtu + ETH_HLEN + 4 + 2 + EXTRA_BYTES;
++		/* Allign buffer to 8 bytes */
++		if (pkt_info.byte_cnt & ~0x7) {
++			pkt_info.byte_cnt &= ~0x7;
++			pkt_info.byte_cnt += 8;
++		}
++		pkt_info.buf_ptr =
++		    pci_map_single(0, skb->data,
++				   dev->mtu + ETH_HLEN + 4 + 2 + EXTRA_BYTES,
++				   PCI_DMA_FROMDEVICE);
++		pkt_info.return_info = skb;
++		if (eth_rx_return_buff(mp, &pkt_info) != ETH_OK) {
++			printk(KERN_ERR
++			       "%s: Error allocating RX Ring\n", dev->name);
++			break;
++		}
++		skb_reserve(skb, 2);
++	}
++	clear_bit(0, &mp->rx_task_busy);
++	/*
++	 * If RX ring is empty of SKB, set a timer to try allocating
++	 * again in a later time .
++	 */
++	if ((mp->rx_ring_skbs == 0) && (mp->rx_timer_flag == 0)) {
++		printk(KERN_INFO "%s: Rx ring is empty\n", dev->name);
++		/* After 100mSec */
++		mp->timeout.expires = jiffies + (HZ / 10);
++		add_timer(&mp->timeout);
++		mp->rx_timer_flag = 1;
++	}
++#if MV64340_RX_QUEUE_FILL_ON_TASK
++	else {
++		/* Return interrupts */
++		MV_WRITE(MV64340_ETH_INTERRUPT_MASK_REG(mp->port_num),
++			 INT_CAUSE_UNMASK_ALL);
++	}
++#endif
++}
++
++/*
++ * mv64340_eth_rx_task_timer_wrapper
++ *								       
++ * Timer routine to wake up RX queue filling task. This function is
++ * used only in case the RX queue is empty, and all alloc_skb has
++ * failed (due to out of memory event).
++ *
++ * Input : pointer to ethernet interface network device structure
++ * Output : N/A
++ */
++static void mv64340_eth_rx_task_timer_wrapper(unsigned long data)
++{
++	struct net_device *dev = (struct net_device *) data;
++	struct mv64340_private *mp = netdev_priv(dev);
++
++	mp->rx_timer_flag = 0;
++	mv64340_eth_rx_task((void *) data);
++}
++
++
++/*
++ * mv64340_eth_update_mac_address
++ *								       
++ * Update the MAC address of the port in the address table
++ *
++ * Input : pointer to ethernet interface network device structure
++ * Output : N/A
++ */
++static void mv64340_eth_update_mac_address(struct net_device *dev)
++{
++	struct mv64340_private *mp = netdev_priv(dev);
++	unsigned int port_num = mp->port_num;
++
++	eth_port_init_mac_tables(port_num);
++	memcpy(mp->port_mac_addr, dev->dev_addr, 6);
++	eth_port_uc_addr_set(port_num, mp->port_mac_addr);
++}
++
++/*
++ * mv64340_eth_set_rx_mode
++ *								       
++ * Change from promiscuos to regular rx mode
++ *
++ * Input : pointer to ethernet interface network device structure
++ * Output : N/A
++ */
++static void mv64340_eth_set_rx_mode(struct net_device *dev)
++{
++	struct mv64340_private *mp = netdev_priv(dev);
++
++	if (dev->flags & IFF_PROMISC) {
++		ethernet_set_config_reg
++		    (mp->port_num,
++		     ethernet_get_config_reg(mp->port_num) |
++		     ETH_UNICAST_PROMISCUOUS_MODE);
++	} else {
++		ethernet_set_config_reg
++		    (mp->port_num,
++		     ethernet_get_config_reg(mp->port_num) &
++		     ~(unsigned int) ETH_UNICAST_PROMISCUOUS_MODE);
++	}
++}
++
++
++/*
++ * mv64340_eth_set_mac_address
++ *								       
++ * Change the interface's mac address.
++ * No special hardware thing should be done because interface is always
++ * put in promiscuous mode.
++ *
++ * Input : pointer to ethernet interface network device structure and
++ *         a pointer to the designated entry to be added to the cache.
++ * Output : zero upon success, negative upon failure
++ */
++static int mv64340_eth_set_mac_address(struct net_device *dev, void *addr)
++{
++	int i;
++
++	for (i = 0; i < 6; i++)
++		/* +2 is for the offset of the HW addr type */
++		dev->dev_addr[i] = ((unsigned char *) addr)[i + 2];
++	mv64340_eth_update_mac_address(dev);
++	return 0;
++}
++
++/*
++ * mv64340_eth_tx_timeout
++ *								       
++ * Called upon a timeout on transmitting a packet
++ *
++ * Input : pointer to ethernet interface network device structure.
++ * Output : N/A
++ */
++static void mv64340_eth_tx_timeout(struct net_device *dev)
++{
++	struct mv64340_private *mp = netdev_priv(dev);
++
++	printk(KERN_INFO "%s: TX timeout  ", dev->name);
++
++	/* Do the reset outside of interrupt context */
++	schedule_work(&mp->tx_timeout_task);
++}
++
++/*
++ * mv64340_eth_tx_timeout_task
++ *
++ * Actual routine to reset the adapter when a timeout on Tx has occurred
++ */
++static void mv64340_eth_tx_timeout_task(struct net_device *dev)
++{
++        struct mv64340_private *mp = netdev_priv(dev);
++
++        netif_device_detach(dev);
++        eth_port_reset(mp->port_num);
++        eth_port_start(mp);
++        netif_device_attach(dev);
++}
++
++/*
++ * mv64340_eth_free_tx_queue
++ *
++ * Input : dev - a pointer to the required interface
++ *
++ * Output : 0 if was able to release skb , nonzero otherwise
++ */
++static int mv64340_eth_free_tx_queue(struct net_device *dev,
++			      unsigned int eth_int_cause_ext)
++{
++	struct mv64340_private *mp = netdev_priv(dev);
++	struct net_device_stats *stats = &mp->stats;
++	struct pkt_info pkt_info;
++	int released = 1;
++
++	if (!(eth_int_cause_ext & (BIT0 | BIT8)))
++		return released;
++
++	spin_lock(&mp->lock);
++
++	/* Check only queue 0 */
++	while (eth_tx_return_desc(mp, &pkt_info) == ETH_OK) {
++		if (pkt_info.cmd_sts & BIT0) {
++			printk("%s: Error in TX\n", dev->name);
++			stats->tx_errors++;
++		}
++
++		/* 
++		 * If return_info is different than 0, release the skb.
++		 * The case where return_info is not 0 is only in case
++		 * when transmitted a scatter/gather packet, where only
++		 * last skb releases the whole chain.
++		 */
++		if (pkt_info.return_info) {
++			dev_kfree_skb_irq((struct sk_buff *)
++					  pkt_info.return_info);
++			released = 0;
++			if (skb_shinfo(pkt_info.return_info)->nr_frags)
++				pci_unmap_page(NULL, pkt_info.buf_ptr,
++					pkt_info.byte_cnt, PCI_DMA_TODEVICE);
++
++			if (mp->tx_ring_skbs != 1)
++				mp->tx_ring_skbs--;
++		} else 
++			pci_unmap_page(NULL, pkt_info.buf_ptr,
++					pkt_info.byte_cnt, PCI_DMA_TODEVICE);
++
++		/* 
++		 * Decrement the number of outstanding skbs counter on
++		 * the TX queue.
++		 */
++		if (mp->tx_ring_skbs == 0)
++			panic("ERROR - TX outstanding SKBs counter is corrupted");
++
++	}
++
++	spin_unlock(&mp->lock);
++
++	return released;
++}
++
++/*
++ * mv64340_eth_receive
++ *
++ * This function is forward packets that are received from the port's
++ * queues toward kernel core or FastRoute them to another interface.
++ *
++ * Input : dev - a pointer to the required interface
++ *         max - maximum number to receive (0 means unlimted)
++ *
++ * Output : number of served packets
++ */
++#ifdef MV64340_NAPI
++static int mv64340_eth_receive_queue(struct net_device *dev, unsigned int max,
++								int budget)
++#else
++static int mv64340_eth_receive_queue(struct net_device *dev, unsigned int max)
++#endif
++{
++	struct mv64340_private *mp = netdev_priv(dev);
++	struct net_device_stats *stats = &mp->stats;
++	unsigned int received_packets = 0;
++	struct sk_buff *skb;
++	struct pkt_info pkt_info;
++
++#ifdef MV64340_NAPI
++	while (eth_port_receive(mp, &pkt_info) == ETH_OK && budget > 0) {
++#else
++	while ((--max) && eth_port_receive(mp, &pkt_info) == ETH_OK) {
++#endif
++		mp->rx_ring_skbs--;
++		received_packets++;
++#ifdef MV64340_NAPI
++		budget--;
++#endif
++		/* Update statistics. Note byte count includes 4 byte CRC count */
++		stats->rx_packets++;
++		stats->rx_bytes += pkt_info.byte_cnt;
++		skb = (struct sk_buff *) pkt_info.return_info;
++		/*
++		 * In case received a packet without first / last bits on OR
++		 * the error summary bit is on, the packets needs to be dropeed.
++		 */
++		if (((pkt_info.cmd_sts
++		      & (ETH_RX_FIRST_DESC | ETH_RX_LAST_DESC)) !=
++		     (ETH_RX_FIRST_DESC | ETH_RX_LAST_DESC))
++		    || (pkt_info.cmd_sts & ETH_ERROR_SUMMARY)) {
++			stats->rx_dropped++;
++			if ((pkt_info.cmd_sts & (ETH_RX_FIRST_DESC |
++						 ETH_RX_LAST_DESC)) !=
++			    (ETH_RX_FIRST_DESC | ETH_RX_LAST_DESC)) {
++				if (net_ratelimit())
++					printk(KERN_ERR
++					       "%s: Received packet spread on multiple"
++					       " descriptors\n",
++					       dev->name);
++			}
++			if (pkt_info.cmd_sts & ETH_ERROR_SUMMARY)
++				stats->rx_errors++;
++
++			dev_kfree_skb_irq(skb);
++		} else {
++			/*
++			 * The -4 is for the CRC in the trailer of the
++			 * received packet
++			 */
++			skb_put(skb, pkt_info.byte_cnt - 4);
++			skb->dev = dev;
++
++			if (pkt_info.cmd_sts & ETH_LAYER_4_CHECKSUM_OK) {
++				skb->ip_summed = CHECKSUM_UNNECESSARY;
++				skb->csum = htons((pkt_info.cmd_sts
++							& 0x0007fff8) >> 3);
++			}
++			skb->protocol = eth_type_trans(skb, dev);
++#ifdef MV64340_NAPI
++			netif_receive_skb(skb);
++#else
++			netif_rx(skb);
++#endif
++		}
++	}
++
++	return received_packets;
++}
++
++/*
++ * mv64340_eth_int_handler
++ *
++ * Main interrupt handler for the gigbit ethernet ports
++ *
++ * Input : irq - irq number (not used)
++ *         dev_id - a pointer to the required interface's data structure
++ *         regs   - not used
++ * Output : N/A
++ */
++
++static irqreturn_t mv64340_eth_int_handler(int irq, void *dev_id,
++	struct pt_regs *regs)
++{
++	struct net_device *dev = (struct net_device *) dev_id;
++	struct mv64340_private *mp = netdev_priv(dev);
++	u32 eth_int_cause, eth_int_cause_ext = 0;
++	unsigned int port_num = mp->port_num;
++
++	/* Read interrupt cause registers */
++	eth_int_cause = MV_READ(MV64340_ETH_INTERRUPT_CAUSE_REG(port_num)) &
++			INT_CAUSE_UNMASK_ALL;
++
++	if (eth_int_cause & BIT1)
++		eth_int_cause_ext =
++		MV_READ(MV64340_ETH_INTERRUPT_CAUSE_EXTEND_REG(port_num)) &
++		INT_CAUSE_UNMASK_ALL_EXT;
++
++#ifdef MV64340_NAPI
++	if (!(eth_int_cause & 0x0007fffd)) {
++	/* Dont ack the Rx interrupt */
++#endif
++		/*
++	 	 * Clear specific ethernet port intrerrupt registers by
++		 * acknowleding relevant bits.
++		 */
++		MV_WRITE(MV64340_ETH_INTERRUPT_CAUSE_REG(port_num),
++			 ~eth_int_cause);
++		if (eth_int_cause_ext != 0x0)
++			MV_WRITE(MV64340_ETH_INTERRUPT_CAUSE_EXTEND_REG(port_num),
++				 ~eth_int_cause_ext);
++
++		/* UDP change : We may need this */
++		if ((eth_int_cause_ext & 0x0000ffff) &&
++		    (mv64340_eth_free_tx_queue(dev, eth_int_cause_ext) == 0) &&
++		    (MV64340_TX_QUEUE_SIZE > mp->tx_ring_skbs + 1))
++                                         netif_wake_queue(dev);
++#ifdef MV64340_NAPI
++	} else {
++		if (netif_rx_schedule_prep(dev)) {
++			/* Mask all the interrupts */
++			MV_WRITE(MV64340_ETH_INTERRUPT_MASK_REG(port_num),0);
++			MV_WRITE(MV64340_ETH_INTERRUPT_EXTEND_MASK_REG(port_num), 0);
++			__netif_rx_schedule(dev);
++		}
++#else
++		{
++		if (eth_int_cause & (BIT2 | BIT11))
++			mv64340_eth_receive_queue(dev, 0);
++
++		/*
++		 * After forwarded received packets to upper layer,  add a task
++		 * in an interrupts enabled context that refills the RX ring
++		 * with skb's.
++		 */
++#if MV64340_RX_QUEUE_FILL_ON_TASK
++		/* Unmask all interrupts on ethernet port */
++		MV_WRITE(MV64340_ETH_INTERRUPT_MASK_REG(port_num),
++		         INT_CAUSE_MASK_ALL);
++		queue_task(&mp->rx_task, &tq_immediate);
++		mark_bh(IMMEDIATE_BH);
++#else
++		mp->rx_task.func(dev);
++#endif
++#endif
++	}
++	/* PHY status changed */
++	if (eth_int_cause_ext & (BIT16 | BIT20)) {
++		unsigned int phy_reg_data;
++
++		/* Check Link status on ethernet port */
++		eth_port_read_smi_reg(port_num, 1, &phy_reg_data);
++		if (!(phy_reg_data & 0x20)) {
++			netif_stop_queue(dev);
++		} else {
++			netif_wake_queue(dev);
++
++			/*
++			 * Start all TX queues on ethernet port. This is good in
++			 * case of previous packets where not transmitted, due
++			 * to link down and this command re-enables all TX
++			 * queues.
++			 * Note that it is possible to get a TX resource error
++			 * interrupt after issuing this, since not all TX queues
++			 * are enabled, or has anything to send.
++			 */
++			MV_WRITE(MV64340_ETH_TRANSMIT_QUEUE_COMMAND_REG(port_num), 1);
++		}
++	}
++
++	/*
++	 * If no real interrupt occured, exit.
++	 * This can happen when using gigE interrupt coalescing mechanism.
++	 */
++	if ((eth_int_cause == 0x0) && (eth_int_cause_ext == 0x0))
++		return IRQ_NONE;
++
++	return IRQ_HANDLED;
++}
++
++#ifdef MV64340_COAL
++
++/*
++ * eth_port_set_rx_coal - Sets coalescing interrupt mechanism on RX path
++ *
++ * DESCRIPTION:
++ *	This routine sets the RX coalescing interrupt mechanism parameter.
++ *	This parameter is a timeout counter, that counts in 64 t_clk
++ *	chunks ; that when timeout event occurs a maskable interrupt
++ *	occurs.
++ *	The parameter is calculated using the tClk of the MV-643xx chip
++ *	, and the required delay of the interrupt in usec.
++ *
++ * INPUT:
++ *	unsigned int eth_port_num      Ethernet port number
++ *	unsigned int t_clk        t_clk of the MV-643xx chip in HZ units
++ *	unsigned int delay       Delay in usec
++ *
++ * OUTPUT:
++ *	Interrupt coalescing mechanism value is set in MV-643xx chip.
++ *
++ * RETURN:
++ *	The interrupt coalescing value set in the gigE port.
++ *
++ */
++static unsigned int eth_port_set_rx_coal(unsigned int eth_port_num,
++	unsigned int t_clk, unsigned int delay)
++{
++	unsigned int coal = ((t_clk / 1000000) * delay) / 64;
++
++	/* Set RX Coalescing mechanism */
++	MV_WRITE(MV64340_ETH_SDMA_CONFIG_REG(eth_port_num),
++		 ((coal & 0x3fff) << 8) |
++		 (MV_READ(MV64340_ETH_SDMA_CONFIG_REG(eth_port_num))
++		  & 0xffc000ff));
++
++	return coal;
++}
++#endif
++
++/*
++ * eth_port_set_tx_coal - Sets coalescing interrupt mechanism on TX path
++ *
++ * DESCRIPTION:
++ *	This routine sets the TX coalescing interrupt mechanism parameter.
++ *	This parameter is a timeout counter, that counts in 64 t_clk
++ *	chunks ; that when timeout event occurs a maskable interrupt
++ *	occurs.
++ *	The parameter is calculated using the t_cLK frequency of the 
++ *	MV-643xx chip and the required delay in the interrupt in uSec
++ *
++ * INPUT:
++ *	unsigned int eth_port_num      Ethernet port number
++ *	unsigned int t_clk        t_clk of the MV-643xx chip in HZ units
++ *	unsigned int delay       Delay in uSeconds
++ *
++ * OUTPUT:
++ *	Interrupt coalescing mechanism value is set in MV-643xx chip.
++ *
++ * RETURN:
++ *	The interrupt coalescing value set in the gigE port.
++ *
++ */
++static unsigned int eth_port_set_tx_coal(unsigned int eth_port_num,
++	unsigned int t_clk, unsigned int delay)
++{
++	unsigned int coal;
++	coal = ((t_clk / 1000000) * delay) / 64;
++	/* Set TX Coalescing mechanism */
++	MV_WRITE(MV64340_ETH_TX_FIFO_URGENT_THRESHOLD_REG(eth_port_num),
++		 coal << 4);
++	return coal;
++}
++
++/*
++ * mv64340_eth_open
++ *
++ * This function is called when openning the network device. The function
++ * should initialize all the hardware, initialize cyclic Rx/Tx
++ * descriptors chain and buffers and allocate an IRQ to the network
++ * device.
++ *
++ * Input : a pointer to the network device structure
++ *
++ * Output : zero of success , nonzero if fails.
++ */
++
++static int mv64340_eth_open(struct net_device *dev)
++{
++	struct mv64340_private *mp = netdev_priv(dev);
++	unsigned int port_num = mp->port_num;
++	int err = err;
++
++	spin_lock_irq(&mp->lock);
++
++	err = request_irq(dev->irq, mv64340_eth_int_handler,
++	                  SA_INTERRUPT | SA_SAMPLE_RANDOM, dev->name, dev);
++
++	if (err) {
++		printk(KERN_ERR "Can not assign IRQ number to MV64340_eth%d\n",
++		       port_num);
++		err = -EAGAIN;
++		goto out;
++	}
++
++	if (mv64340_eth_real_open(dev)) {
++		printk("%s: Error opening interface\n", dev->name);
++		err = -EBUSY;
++		goto out_free;
++	}
++
++	spin_unlock_irq(&mp->lock);
++
++	return 0;
++
++out_free:
++	free_irq(dev->irq, dev);
++
++out:
++	spin_unlock_irq(&mp->lock);
++
++	return err;
++}
++
++/*
++ * ether_init_rx_desc_ring - Curve a Rx chain desc list and buffer in memory.
++ *
++ * DESCRIPTION:
++ *       This function prepares a Rx chained list of descriptors and packet 
++ *       buffers in a form of a ring. The routine must be called after port 
++ *       initialization routine and before port start routine. 
++ *       The Ethernet SDMA engine uses CPU bus addresses to access the various 
++ *       devices in the system (i.e. DRAM). This function uses the ethernet 
++ *       struct 'virtual to physical' routine (set by the user) to set the ring 
++ *       with physical addresses.
++ *
++ * INPUT:
++ *	struct mv64340_private   *mp   Ethernet Port Control srtuct. 
++ *      int 			rx_desc_num       Number of Rx descriptors
++ *      int 			rx_buff_size      Size of Rx buffer
++ *      unsigned int    rx_desc_base_addr  Rx descriptors memory area base addr.
++ *      unsigned int    rx_buff_base_addr  Rx buffer memory area base addr.
++ *
++ * OUTPUT:
++ *      The routine updates the Ethernet port control struct with information 
++ *      regarding the Rx descriptors and buffers.
++ *
++ * RETURN:
++ *      false if the given descriptors memory area is not aligned according to
++ *      Ethernet SDMA specifications.
++ *      true otherwise.
++ */
++static int ether_init_rx_desc_ring(struct mv64340_private * mp,
++	unsigned long rx_buff_base_addr)
++{
++	unsigned long buffer_addr = rx_buff_base_addr;
++	volatile struct eth_rx_desc *p_rx_desc;
++	int rx_desc_num = mp->rx_ring_size;
++	unsigned long rx_desc_base_addr = (unsigned long) mp->p_rx_desc_area;
++	int rx_buff_size = 1536;	/* Dummy, will be replaced later */
++	int i;
++
++	p_rx_desc = (struct eth_rx_desc *) rx_desc_base_addr;
++
++	/* Rx desc Must be 4LW aligned (i.e. Descriptor_Address[3:0]=0000). */
++	if (rx_buff_base_addr & 0xf)
++		return 0;
++
++	/* Rx buffers are limited to 64K bytes and Minimum size is 8 bytes  */
++	if ((rx_buff_size < 8) || (rx_buff_size > RX_BUFFER_MAX_SIZE))
++		return 0;
++
++	/* Rx buffers must be 64-bit aligned.       */
++	if ((rx_buff_base_addr + rx_buff_size) & 0x7)
++		return 0;
++
++	/* initialize the Rx descriptors ring */
++	for (i = 0; i < rx_desc_num; i++) {
++		p_rx_desc[i].buf_size = rx_buff_size;
++		p_rx_desc[i].byte_cnt = 0x0000;
++		p_rx_desc[i].cmd_sts =
++			ETH_BUFFER_OWNED_BY_DMA | ETH_RX_ENABLE_INTERRUPT;
++		p_rx_desc[i].next_desc_ptr =
++			(struct eth_rx_desc *) mp->rx_desc_dma +
++				(i + 1) % rx_desc_num;
++		p_rx_desc[i].buf_ptr = buffer_addr;
++
++		mp->rx_skb[i] = NULL;
++		buffer_addr += rx_buff_size;
++	}
++
++	/* Save Rx desc pointer to driver struct. */
++	mp->rx_curr_desc_q = 0;
++	mp->rx_used_desc_q = 0;
++
++	mp->rx_desc_area_size = rx_desc_num * sizeof(struct eth_rx_desc);
++
++	mp->port_rx_queue_command |= 1;
++
++	return 1;
++}
++
++/*
++ * ether_init_tx_desc_ring - Curve a Tx chain desc list and buffer in memory.
++ *
++ * DESCRIPTION:
++ *       This function prepares a Tx chained list of descriptors and packet 
++ *       buffers in a form of a ring. The routine must be called after port 
++ *       initialization routine and before port start routine. 
++ *       The Ethernet SDMA engine uses CPU bus addresses to access the various 
++ *       devices in the system (i.e. DRAM). This function uses the ethernet 
++ *       struct 'virtual to physical' routine (set by the user) to set the ring 
++ *       with physical addresses.
++ *
++ * INPUT:
++ *	struct mv64340_private   *mp   Ethernet Port Control srtuct. 
++ *      int 		tx_desc_num        Number of Tx descriptors
++ *      int 		tx_buff_size	   Size of Tx buffer
++ *      unsigned int    tx_desc_base_addr  Tx descriptors memory area base addr.
++ *
++ * OUTPUT:
++ *      The routine updates the Ethernet port control struct with information 
++ *      regarding the Tx descriptors and buffers.
++ *
++ * RETURN:
++ *      false if the given descriptors memory area is not aligned according to
++ *      Ethernet SDMA specifications.
++ *      true otherwise.
++ */
++static int ether_init_tx_desc_ring(struct mv64340_private *mp)
++{
++	unsigned long tx_desc_base_addr = (unsigned long) mp->p_tx_desc_area;
++	int tx_desc_num = mp->tx_ring_size;
++	struct eth_tx_desc *p_tx_desc;
++	int i;
++
++	/* Tx desc Must be 4LW aligned (i.e. Descriptor_Address[3:0]=0000). */
++	if (tx_desc_base_addr & 0xf)
++		return 0;
++
++	/* save the first desc pointer to link with the last descriptor */
++	p_tx_desc = (struct eth_tx_desc *) tx_desc_base_addr;
++
++	/* Initialize the Tx descriptors ring */
++	for (i = 0; i < tx_desc_num; i++) {
++		p_tx_desc[i].byte_cnt	= 0x0000;
++		p_tx_desc[i].l4i_chk	= 0x0000;
++		p_tx_desc[i].cmd_sts	= 0x00000000;
++		p_tx_desc[i].next_desc_ptr =
++			(struct eth_tx_desc *) mp->tx_desc_dma +
++			(i + 1) % tx_desc_num;
++		p_tx_desc[i].buf_ptr	= 0x00000000;
++		mp->tx_skb[i]		= NULL;
++	}
++
++	/* Set Tx desc pointer in driver struct. */
++	mp->tx_curr_desc_q = 0;
++	mp->tx_used_desc_q = 0;
++#ifdef MV64340_CHECKSUM_OFFLOAD_TX
++        mp->tx_first_desc_q = 0;
++#endif
++	/* Init Tx ring base and size parameters */
++	mp->tx_desc_area_size	= tx_desc_num * sizeof(struct eth_tx_desc);
++
++	/* Add the queue to the list of Tx queues of this port */
++	mp->port_tx_queue_command |= 1;
++
++	return 1;
++}
++
++/* Helper function for mv64340_eth_open */
++static int mv64340_eth_real_open(struct net_device *dev)
++{
++	struct mv64340_private *mp = netdev_priv(dev);
++	unsigned int port_num = mp->port_num;
++	u32 phy_reg_data;
++	unsigned int size;
++
++	/* Stop RX Queues */
++	MV_WRITE(MV64340_ETH_RECEIVE_QUEUE_COMMAND_REG(port_num),
++		 0x0000ff00);
++
++	/* Clear the ethernet port interrupts */
++	MV_WRITE(MV64340_ETH_INTERRUPT_CAUSE_REG(port_num), 0);
++	MV_WRITE(MV64340_ETH_INTERRUPT_CAUSE_EXTEND_REG(port_num), 0);
++
++	/* Unmask RX buffer and TX end interrupt */
++	MV_WRITE(MV64340_ETH_INTERRUPT_MASK_REG(port_num),
++		 INT_CAUSE_UNMASK_ALL);
++
++	/* Unmask phy and link status changes interrupts */
++	MV_WRITE(MV64340_ETH_INTERRUPT_EXTEND_MASK_REG(port_num),
++		 INT_CAUSE_UNMASK_ALL_EXT);
++
++	/* Set the MAC Address */
++	memcpy(mp->port_mac_addr, dev->dev_addr, 6);
++
++	eth_port_init(mp);
++
++	INIT_WORK(&mp->rx_task, (void (*)(void *)) mv64340_eth_rx_task, dev);
++
++	memset(&mp->timeout, 0, sizeof(struct timer_list));
++	mp->timeout.function = mv64340_eth_rx_task_timer_wrapper;
++	mp->timeout.data = (unsigned long) dev;
++
++	mp->rx_task_busy = 0;
++	mp->rx_timer_flag = 0;
++
++	/* Allocate TX ring */
++	mp->tx_ring_skbs = 0;
++	mp->tx_ring_size = MV64340_TX_QUEUE_SIZE;
++	size = mp->tx_ring_size * sizeof(struct eth_tx_desc);
++	mp->tx_desc_area_size = size;
++
++	/* Assumes allocated ring is 16 bytes alligned */
++	mp->p_tx_desc_area = pci_alloc_consistent(NULL, size, &mp->tx_desc_dma);
++	if (!mp->p_tx_desc_area) {
++		printk(KERN_ERR "%s: Cannot allocate Tx Ring (size %d bytes)\n",
++		       dev->name, size);
++		return -ENOMEM;
++	}
++	memset((void *) mp->p_tx_desc_area, 0, mp->tx_desc_area_size);
++
++	/* Dummy will be replaced upon real tx */
++	ether_init_tx_desc_ring(mp);
++
++	/* Allocate RX ring */
++	/* Meantime RX Ring are fixed - but must be configurable by user */
++	mp->rx_ring_size = MV64340_RX_QUEUE_SIZE;
++	mp->rx_ring_skbs = 0;
++	size = mp->rx_ring_size * sizeof(struct eth_rx_desc);
++	mp->rx_desc_area_size = size;
++
++	/* Assumes allocated ring is 16 bytes aligned */
++
++	mp->p_rx_desc_area = pci_alloc_consistent(NULL, size, &mp->rx_desc_dma);
++
++	if (!mp->p_rx_desc_area) {
++		printk(KERN_ERR "%s: Cannot allocate Rx ring (size %d bytes)\n",
++		       dev->name, size);
++		printk(KERN_ERR "%s: Freeing previously allocated TX queues...",
++		       dev->name);
++		pci_free_consistent(0, mp->tx_desc_area_size,
++				    (void *) mp->p_tx_desc_area,
++				    mp->tx_desc_dma);
++		return -ENOMEM;
++	}
++	memset(mp->p_rx_desc_area, 0, size);
++
++	if (!(ether_init_rx_desc_ring(mp, 0)))
++		panic("%s: Error initializing RX Ring", dev->name);
++
++	mv64340_eth_rx_task(dev);	/* Fill RX ring with skb's */
++
++	eth_port_start(mp);
++
++	/* Interrupt Coalescing */
++
++#ifdef MV64340_COAL
++	mp->rx_int_coal =
++		eth_port_set_rx_coal(port_num, 133000000, MV64340_RX_COAL);
++#endif
++
++	mp->tx_int_coal =
++		eth_port_set_tx_coal (port_num, 133000000, MV64340_TX_COAL);  
++
++	/* Increase the Rx side buffer size */
++
++	MV_WRITE (MV64340_ETH_PORT_SERIAL_CONTROL_REG(port_num), (0x5 << 17) |
++			(MV_READ(MV64340_ETH_PORT_SERIAL_CONTROL_REG(port_num))
++					& 0xfff1ffff));
++
++	/* Check Link status on phy */
++	eth_port_read_smi_reg(port_num, 1, &phy_reg_data);
++	if (!(phy_reg_data & 0x20))
++		netif_stop_queue(dev);
++	else
++		netif_start_queue(dev);
++
++	return 0;
++}
++
++static void mv64340_eth_free_tx_rings(struct net_device *dev)
++{
++	struct mv64340_private *mp = netdev_priv(dev);
++	unsigned int port_num = mp->port_num;
++	unsigned int curr;
++
++	/* Stop Tx Queues */
++	MV_WRITE(MV64340_ETH_TRANSMIT_QUEUE_COMMAND_REG(port_num),
++		 0x0000ff00);
++
++	/* Free TX rings */
++	/* Free outstanding skb's on TX rings */
++	for (curr = 0;
++	     (mp->tx_ring_skbs) && (curr < MV64340_TX_QUEUE_SIZE);
++	     curr++) {
++		if (mp->tx_skb[curr]) {
++			dev_kfree_skb(mp->tx_skb[curr]);
++			mp->tx_ring_skbs--;
++		}
++	}
++	if (mp->tx_ring_skbs != 0)
++		printk("%s: Error on Tx descriptor free - could not free %d"
++		     " descriptors\n", dev->name,
++		     mp->tx_ring_skbs);
++	pci_free_consistent(0, mp->tx_desc_area_size,
++			    (void *) mp->p_tx_desc_area, mp->tx_desc_dma);
++}
++
++static void mv64340_eth_free_rx_rings(struct net_device *dev)
++{
++	struct mv64340_private *mp = netdev_priv(dev);
++	unsigned int port_num = mp->port_num;
++	int curr;
++
++	/* Stop RX Queues */
++	MV_WRITE(MV64340_ETH_RECEIVE_QUEUE_COMMAND_REG(port_num),
++		 0x0000ff00);
++
++	/* Free RX rings */
++	/* Free preallocated skb's on RX rings */
++	for (curr = 0;
++		mp->rx_ring_skbs && (curr < MV64340_RX_QUEUE_SIZE);
++		curr++) {
++		if (mp->rx_skb[curr]) {
++			dev_kfree_skb(mp->rx_skb[curr]);
++			mp->rx_ring_skbs--;
++		}
++	}
++
++	if (mp->rx_ring_skbs != 0)
++		printk(KERN_ERR
++		       "%s: Error in freeing Rx Ring. %d skb's still"
++		       " stuck in RX Ring - ignoring them\n", dev->name,
++		       mp->rx_ring_skbs);
++	pci_free_consistent(0, mp->rx_desc_area_size,
++			    (void *) mp->p_rx_desc_area,
++			    mp->rx_desc_dma);
++}
++
++/*
++ * mv64340_eth_stop
++ *
++ * This function is used when closing the network device. 
++ * It updates the hardware, 
++ * release all memory that holds buffers and descriptors and release the IRQ.
++ * Input : a pointer to the device structure
++ * Output : zero if success , nonzero if fails
++ */
++
++/* Helper function for mv64340_eth_stop */
++
++static int mv64340_eth_real_stop(struct net_device *dev)
++{
++	struct mv64340_private *mp = netdev_priv(dev);
++	unsigned int port_num = mp->port_num;
++
++	netif_stop_queue(dev);
++
++	mv64340_eth_free_tx_rings(dev);
++	mv64340_eth_free_rx_rings(dev);
++
++	eth_port_reset(mp->port_num);
++
++	/* Disable ethernet port interrupts */
++	MV_WRITE(MV64340_ETH_INTERRUPT_CAUSE_REG(port_num), 0);
++	MV_WRITE(MV64340_ETH_INTERRUPT_CAUSE_EXTEND_REG(port_num), 0);
++
++	/* Mask RX buffer and TX end interrupt */
++	MV_WRITE(MV64340_ETH_INTERRUPT_MASK_REG(port_num), 0);
++
++	/* Mask phy and link status changes interrupts */
++	MV_WRITE(MV64340_ETH_INTERRUPT_EXTEND_MASK_REG(port_num), 0);
++
++	return 0;
++}
++
++static int mv64340_eth_stop(struct net_device *dev)
++{
++	struct mv64340_private *mp = netdev_priv(dev);
++
++	spin_lock_irq(&mp->lock);
++
++	mv64340_eth_real_stop(dev);
++
++	free_irq(dev->irq, dev);
++	spin_unlock_irq(&mp->lock);
++
++	return 0;
++}
++
++#ifdef MV64340_NAPI
++static void mv64340_tx(struct net_device *dev)
++{
++	struct mv64340_private *mp = netdev_priv(dev);
++        struct pkt_info pkt_info;
++
++	while (eth_tx_return_desc(mp, &pkt_info) == ETH_OK) {
++		if (pkt_info.return_info) {
++			dev_kfree_skb_irq((struct sk_buff *)
++                                                  pkt_info.return_info);
++			if (skb_shinfo(pkt_info.return_info)->nr_frags) 
++                                 pci_unmap_page(NULL, pkt_info.buf_ptr,
++                                             pkt_info.byte_cnt,
++                                             PCI_DMA_TODEVICE);
++
++                         if (mp->tx_ring_skbs != 1)
++                                  mp->tx_ring_skbs--;
++                } else 
++                       pci_unmap_page(NULL, pkt_info.buf_ptr, pkt_info.byte_cnt,
++                                      PCI_DMA_TODEVICE);
++	}
++
++	if (netif_queue_stopped(dev) &&
++            MV64340_TX_QUEUE_SIZE > mp->tx_ring_skbs + 1)
++                       netif_wake_queue(dev);
++}
++
++/*
++ * mv64340_poll
++ *
++ * This function is used in case of NAPI
++ */
++static int mv64340_poll(struct net_device *dev, int *budget)
++{
++	struct mv64340_private *mp = netdev_priv(dev);
++	int	done = 1, orig_budget, work_done;
++	unsigned int port_num = mp->port_num;
++	unsigned long flags;
++
++#ifdef MV64340_TX_FAST_REFILL
++	if (++mp->tx_clean_threshold > 5) {
++		spin_lock_irqsave(&mp->lock, flags);
++		mv64340_tx(dev);
++		mp->tx_clean_threshold = 0;
++		spin_unlock_irqrestore(&mp->lock, flags);
++	}
++#endif
++
++	if ((u32)(MV_READ(MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_0(port_num)))                                      != (u32)mp->rx_used_desc_q) {
++		orig_budget = *budget;
++		if (orig_budget > dev->quota)
++			orig_budget = dev->quota;
++		work_done = mv64340_eth_receive_queue(dev, 0, orig_budget);
++		mp->rx_task.func(dev);
++		*budget -= work_done;
++		dev->quota -= work_done;
++		if (work_done >= orig_budget)
++			done = 0;
++	}
++
++	if (done) {
++		spin_lock_irqsave(&mp->lock, flags);
++		__netif_rx_complete(dev);
++		MV_WRITE(MV64340_ETH_INTERRUPT_CAUSE_REG(port_num),0);
++                MV_WRITE(MV64340_ETH_INTERRUPT_CAUSE_EXTEND_REG(port_num),0);
++		MV_WRITE(MV64340_ETH_INTERRUPT_MASK_REG(port_num), 
++						INT_CAUSE_UNMASK_ALL);
++		MV_WRITE(MV64340_ETH_INTERRUPT_EXTEND_MASK_REG(port_num),
++				                 INT_CAUSE_UNMASK_ALL_EXT);
++		spin_unlock_irqrestore(&mp->lock, flags);
++	}
++
++	return done ? 0 : 1;
++}
++#endif
++
++/*
++ * mv64340_eth_start_xmit
++ *
++ * This function is queues a packet in the Tx descriptor for 
++ * required port.
++ *
++ * Input : skb - a pointer to socket buffer
++ *         dev - a pointer to the required port
++ *
++ * Output : zero upon success
++ */
++static int mv64340_eth_start_xmit(struct sk_buff *skb, struct net_device *dev)
++{
++	struct mv64340_private *mp = netdev_priv(dev);
++	struct net_device_stats *stats = &mp->stats;
++	ETH_FUNC_RET_STATUS status;
++	unsigned long flags;
++	struct pkt_info pkt_info;
++
++	if (netif_queue_stopped(dev)) {
++		printk(KERN_ERR
++		       "%s: Tried sending packet when interface is stopped\n",
++		       dev->name);
++		return 1;
++	}
++
++	/* This is a hard error, log it. */
++	if ((MV64340_TX_QUEUE_SIZE - mp->tx_ring_skbs) <=
++	    (skb_shinfo(skb)->nr_frags + 1)) {
++		netif_stop_queue(dev);
++		printk(KERN_ERR
++		       "%s: Bug in mv64340_eth - Trying to transmit when"
++		       " queue full !\n", dev->name);
++		return 1;
++	}
++
++	/* Paranoid check - this shouldn't happen */
++	if (skb == NULL) {
++		stats->tx_dropped++;
++		return 1;
++	}
++
++	spin_lock_irqsave(&mp->lock, flags);
++
++	/* Update packet info data structure -- DMA owned, first last */
++#ifdef MV64340_CHECKSUM_OFFLOAD_TX
++	if (!skb_shinfo(skb)->nr_frags || (skb_shinfo(skb)->nr_frags > 3)) {
++#endif
++		pkt_info.cmd_sts = ETH_TX_ENABLE_INTERRUPT |
++	    	                   ETH_TX_FIRST_DESC | ETH_TX_LAST_DESC;
++
++		pkt_info.byte_cnt = skb->len;
++		pkt_info.buf_ptr = pci_map_single(0, skb->data, skb->len,
++		                                  PCI_DMA_TODEVICE);
++
++
++		pkt_info.return_info = skb;
++		status = eth_port_send(mp, &pkt_info);
++		if ((status == ETH_ERROR) || (status == ETH_QUEUE_FULL))
++			printk(KERN_ERR "%s: Error on transmitting packet\n",
++				       dev->name);
++		mp->tx_ring_skbs++;
++#ifdef MV64340_CHECKSUM_OFFLOAD_TX
++	} else {
++		unsigned int    frag;
++		u32		ipheader;
++
++                /* first frag which is skb header */
++                pkt_info.byte_cnt = skb_headlen(skb);
++                pkt_info.buf_ptr = pci_map_single(0, skb->data,
++                                        skb_headlen(skb), PCI_DMA_TODEVICE);
++                pkt_info.return_info = 0;
++                ipheader = skb->nh.iph->ihl << 11;
++                pkt_info.cmd_sts = ETH_TX_FIRST_DESC | 
++					ETH_GEN_TCP_UDP_CHECKSUM |
++					ETH_GEN_IP_V_4_CHECKSUM |
++                                        ipheader;
++		/* CPU already calculated pseudo header checksum. So, use it */
++                pkt_info.l4i_chk = skb->h.th->check;
++                status = eth_port_send(mp, &pkt_info);
++		if (status != ETH_OK) {
++	                if ((status == ETH_ERROR))
++        	                printk(KERN_ERR "%s: Error on transmitting packet\n", dev->name);
++	                if (status == ETH_QUEUE_FULL)
++        	                printk("Error on Queue Full \n");
++                	if (status == ETH_QUEUE_LAST_RESOURCE)
++                        	printk("Tx resource error \n");
++		}
++
++                /* Check for the remaining frags */
++                for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) {
++                        skb_frag_t *this_frag = &skb_shinfo(skb)->frags[frag];
++                        pkt_info.l4i_chk = 0x0000;
++                        pkt_info.cmd_sts = 0x00000000;
++
++                        /* Last Frag enables interrupt and frees the skb */
++                        if (frag == (skb_shinfo(skb)->nr_frags - 1)) {
++                                pkt_info.cmd_sts |= ETH_TX_ENABLE_INTERRUPT |
++                                                        ETH_TX_LAST_DESC;
++                                pkt_info.return_info = skb;
++                                mp->tx_ring_skbs++;
++                        }
++                        else {
++                                pkt_info.return_info = 0;
++                        }
++                        pkt_info.byte_cnt = this_frag->size;
++                        if (this_frag->size < 8)
++                                printk("%d : \n", skb_shinfo(skb)->nr_frags);
++
++                        pkt_info.buf_ptr = pci_map_page(NULL, this_frag->page,
++                                        this_frag->page_offset,
++                                        this_frag->size, PCI_DMA_TODEVICE);
++
++                        status = eth_port_send(mp, &pkt_info);
++
++			if (status != ETH_OK) {
++	                        if ((status == ETH_ERROR))
++        	                        printk(KERN_ERR "%s: Error on transmitting packet\n", dev->name);
++
++       		                 if (status == ETH_QUEUE_LAST_RESOURCE)
++                	                printk("Tx resource error \n");
++
++                        	if (status == ETH_QUEUE_FULL)
++                                	printk("Queue is full \n");
++			}
++                }
++        }
++#endif
++
++	/* Check if TX queue can handle another skb. If not, then
++	 * signal higher layers to stop requesting TX
++	 */
++	if (MV64340_TX_QUEUE_SIZE <= (mp->tx_ring_skbs + 1))
++		/* 
++		 * Stop getting skb's from upper layers.
++		 * Getting skb's from upper layers will be enabled again after
++		 * packets are released.
++		 */
++		netif_stop_queue(dev);
++
++	/* Update statistics and start of transmittion time */
++	stats->tx_bytes += skb->len;
++	stats->tx_packets++;
++	dev->trans_start = jiffies;
++
++	spin_unlock_irqrestore(&mp->lock, flags);
++
++	return 0;		/* success */
++}
++
++/*
++ * mv64340_eth_get_stats
++ *
++ * Returns a pointer to the interface statistics.
++ *
++ * Input : dev - a pointer to the required interface
++ *
++ * Output : a pointer to the interface's statistics
++ */
++
++static struct net_device_stats *mv64340_eth_get_stats(struct net_device *dev)
++{
++	struct mv64340_private *mp = netdev_priv(dev);
++
++	return &mp->stats;
++}
++
++/*/
++ * mv64340_eth_init
++ *								       
++ * First function called after registering the network device. 
++ * It's purpose is to initialize the device as an ethernet device, 
++ * fill the structure that was given in registration with pointers
++ * to functions, and setting the MAC address of the interface
++ *
++ * Input : number of port to initialize
++ * Output : -ENONMEM if failed , 0 if success
++ */
++static int mv64340_eth_init(int port_num)
++{
++	struct mv64340_private *mp;
++	struct net_device *dev;
++	int err;
++
++	dev = alloc_etherdev(sizeof(struct mv64340_private));
++	if (!dev)
++		return -ENOMEM;
++
++	mp = netdev_priv(dev);
++
++	dev->irq = ETH_PORT0_IRQ_NUM + port_num;
++
++	dev->open = mv64340_eth_open;
++	dev->stop = mv64340_eth_stop;
++	dev->hard_start_xmit = mv64340_eth_start_xmit;
++	dev->get_stats = mv64340_eth_get_stats;
++	dev->set_mac_address = mv64340_eth_set_mac_address;
++	dev->set_multicast_list = mv64340_eth_set_rx_mode;
++
++	/* No need to Tx Timeout */
++	dev->tx_timeout = mv64340_eth_tx_timeout;
++#ifdef MV64340_NAPI
++        dev->poll = mv64340_poll;
++        dev->weight = 64;
++#endif
++
++	dev->watchdog_timeo = 2 * HZ;
++	dev->tx_queue_len = MV64340_TX_QUEUE_SIZE;
++	dev->base_addr = 0;
++	dev->change_mtu = mv64340_eth_change_mtu;
++
++#ifdef MV64340_CHECKSUM_OFFLOAD_TX
++#ifdef MAX_SKB_FRAGS
++#ifndef CONFIG_JAGUAR_DMALOW
++        /*
++         * Zero copy can only work if we use Discovery II memory. Else, we will
++         * have to map the buffers to ISA memory which is only 16 MB
++         */
++        dev->features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_HW_CSUM;
++#endif
++#endif
++#endif
++
++	mp->port_num = port_num;
++
++	/* Configure the timeout task */
++        INIT_WORK(&mp->tx_timeout_task,
++                  (void (*)(void *))mv64340_eth_tx_timeout_task, dev);
++
++	spin_lock_init(&mp->lock);
++
++	/* set MAC addresses */
++	memcpy(dev->dev_addr, prom_mac_addr_base, 6);
++	dev->dev_addr[5] += port_num;
++
++	err = register_netdev(dev);
++	if (err)
++		goto out_free_dev;
++
++	printk(KERN_NOTICE "%s: port %d with MAC address %02x:%02x:%02x:%02x:%02x:%02x\n",
++		dev->name, port_num,
++		dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
++		dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
++
++	if (dev->features & NETIF_F_SG)
++		printk("Scatter Gather Enabled  ");
++
++	if (dev->features & NETIF_F_IP_CSUM)
++		printk("TX TCP/IP Checksumming Supported  \n");
++
++	printk("RX TCP/UDP Checksum Offload ON, \n");
++	printk("TX and RX Interrupt Coalescing ON \n");
++
++#ifdef MV64340_NAPI
++	printk("RX NAPI Enabled \n");
++#endif
++
++	return 0;
++
++out_free_dev:
++	free_netdev(dev);
++
++	return err;
++}
++
++/*
++ * mv64340_init_module
++ *
++ * Registers the network drivers into the Linux kernel
++ *
++ * Input : N/A
++ *
++ * Output : N/A
++ */
++static int __init mv64340_init_module(void)
++{
++	printk(KERN_NOTICE "MV-64340 10/100/1000 Ethernet Driver\n");
++#ifdef CONFIG_MV64340_ETH_0
++	if (mv64340_eth_init(0)) {
++		printk(KERN_ERR
++		       "Error registering MV-64360 ethernet port 0\n");
++	}
++#endif
++#ifdef CONFIG_MV64340_ETH_1
++	if (mv64340_eth_init(1)) {
++		printk(KERN_ERR
++		       "Error registering MV-64360 ethernet port 1\n");
++	}
++#endif
++#ifdef CONFIG_MV64340_ETH_2
++	if (mv64340_eth_init(2)) {
++		printk(KERN_ERR
++		       "Error registering MV-64360 ethernet port 2\n");
++	}
++#endif
++	return 0;
++}
++
++/*
++ * mv64340_cleanup_module
++ *
++ * Registers the network drivers into the Linux kernel
++ *
++ * Input : N/A
++ *
++ * Output : N/A
++ */
++static void __init mv64340_cleanup_module(void)
++{
++	/* Nothing to do here ! it's not a removable module */
++}
++
++module_init(mv64340_init_module);
++module_exit(mv64340_cleanup_module);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Rabeeh Khoury, Assaf Hoffman, Matthew Dharm and Manish Lachwani");
++MODULE_DESCRIPTION("Ethernet driver for Marvell MV64340");
++
++/*
++ *  The second part is the low level driver of the gigE ethernet ports.
++ */
++
++/*
++ * Marvell's Gigabit Ethernet controller low level driver
++ *
++ * DESCRIPTION:
++ *       This file introduce low level API to Marvell's Gigabit Ethernet
++ *		controller. This Gigabit Ethernet Controller driver API controls
++ *		1) Operations (i.e. port init, start, reset etc').
++ *		2) Data flow (i.e. port send, receive etc').
++ *		Each Gigabit Ethernet port is controlled via
++ *              struct mv64340_private.
++ *		This struct includes user configuration information as well as
++ *		driver internal data needed for its operations.
++ *
++ *		Supported Features:  
++ *		- This low level driver is OS independent. Allocating memory for
++ *		  the descriptor rings and buffers are not within the scope of
++ *		  this driver.
++ *		- The user is free from Rx/Tx queue managing.
++ *		- This low level driver introduce functionality API that enable
++ *		  the to operate Marvell's Gigabit Ethernet Controller in a
++ *		  convenient way.
++ *		- Simple Gigabit Ethernet port operation API.
++ *		- Simple Gigabit Ethernet port data flow API.
++ *		- Data flow and operation API support per queue functionality.
++ *		- Support cached descriptors for better performance.
++ *		- Enable access to all four DRAM banks and internal SRAM memory
++ *		  spaces.
++ *		- PHY access and control API.
++ *		- Port control register configuration API.
++ *		- Full control over Unicast and Multicast MAC configurations.
++ *								   
++ *		Operation flow:
++ *
++ *		Initialization phase
++ *		This phase complete the initialization of the the mv64340_private
++ *		struct. 
++ *		User information regarding port configuration has to be set
++ *		prior to calling the port initialization routine.
++ *
++ *		In this phase any port Tx/Rx activity is halted, MIB counters
++ *		are cleared, PHY address is set according to user parameter and
++ *		access to DRAM and internal SRAM memory spaces.
++ *
++ *		Driver ring initialization
++ *		Allocating memory for the descriptor rings and buffers is not 
++ *		within the scope of this driver. Thus, the user is required to
++ *		allocate memory for the descriptors ring and buffers. Those
++ *		memory parameters are used by the Rx and Tx ring initialization
++ *		routines in order to curve the descriptor linked list in a form
++ *		of a ring.
++ *		Note: Pay special attention to alignment issues when using
++ *		cached descriptors/buffers. In this phase the driver store
++ *		information in the mv64340_private struct regarding each queue
++ *		ring.
++ *
++ *		Driver start 
++ *		This phase prepares the Ethernet port for Rx and Tx activity.
++ *		It uses the information stored in the mv64340_private struct to 
++ *		initialize the various port registers.
++ *
++ *		Data flow:
++ *		All packet references to/from the driver are done using
++ *              struct pkt_info.
++ *		This struct is a unified struct used with Rx and Tx operations. 
++ *		This way the user is not required to be familiar with neither
++ *		Tx nor Rx descriptors structures.
++ *		The driver's descriptors rings are management by indexes.
++ *		Those indexes controls the ring resources and used to indicate
++ *		a SW resource error:
++ *		'current' 
++ *		This index points to the current available resource for use. For 
++ *		example in Rx process this index will point to the descriptor  
++ *		that will be passed to the user upon calling the receive routine.
++ *		In Tx process, this index will point to the descriptor
++ *		that will be assigned with the user packet info and transmitted.
++ *		'used'    
++ *		This index points to the descriptor that need to restore its 
++ *		resources. For example in Rx process, using the Rx buffer return
++ *		API will attach the buffer returned in packet info to the
++ *		descriptor pointed by 'used'. In Tx process, using the Tx
++ *		descriptor return will merely return the user packet info with
++ *		the command status of  the transmitted buffer pointed by the
++ *		'used' index. Nevertheless, it is essential to use this routine
++ *		to update the 'used' index.
++ *		'first'
++ *		This index supports Tx Scatter-Gather. It points to the first 
++ *		descriptor of a packet assembled of multiple buffers. For example
++ *		when in middle of Such packet we have a Tx resource error the 
++ *		'curr' index get the value of 'first' to indicate that the ring 
++ *		returned to its state before trying to transmit this packet.
++ *
++ *		Receive operation:
++ *		The eth_port_receive API set the packet information struct,
++ *		passed by the caller, with received information from the 
++ *		'current' SDMA descriptor. 
++ *		It is the user responsibility to return this resource back
++ *		to the Rx descriptor ring to enable the reuse of this source.
++ *		Return Rx resource is done using the eth_rx_return_buff API.
++ *
++ *		Transmit operation:
++ *		The eth_port_send API supports Scatter-Gather which enables to
++ *		send a packet spanned over multiple buffers. This means that
++ *		for each packet info structure given by the user and put into
++ *		the Tx descriptors ring, will be transmitted only if the 'LAST'
++ *		bit will be set in the packet info command status field. This
++ *		API also consider restriction regarding buffer alignments and
++ *		sizes.
++ *		The user must return a Tx resource after ensuring the buffer
++ *		has been transmitted to enable the Tx ring indexes to update.
++ *
++ *		BOARD LAYOUT
++ *		This device is on-board.  No jumper diagram is necessary.
++ *
++ *		EXTERNAL INTERFACE
++ *
++ *       Prior to calling the initialization routine eth_port_init() the user
++ *	 must set the following fields under mv64340_private struct:
++ *       port_num             User Ethernet port number.
++ *       port_mac_addr[6]	    User defined port MAC address.
++ *       port_config          User port configuration value.
++ *       port_config_extend    User port config extend value.
++ *       port_sdma_config      User port SDMA config value.
++ *       port_serial_control   User port serial control value.
++ *
++ *       This driver introduce a set of default values:
++ *       PORT_CONFIG_VALUE           Default port configuration value
++ *       PORT_CONFIG_EXTEND_VALUE    Default port extend configuration value
++ *       PORT_SDMA_CONFIG_VALUE      Default sdma control value
++ *       PORT_SERIAL_CONTROL_VALUE   Default port serial control value
++ *
++ *		This driver data flow is done using the struct pkt_info which
++ *              is a unified struct for Rx and Tx operations:
++ *
++ *		byte_cnt	Tx/Rx descriptor buffer byte count.
++ *		l4i_chk		CPU provided TCP Checksum. For Tx operation
++ *                              only.
++ *		cmd_sts		Tx/Rx descriptor command status.
++ *		buf_ptr		Tx/Rx descriptor buffer pointer.
++ *		return_info	Tx/Rx user resource return information.
++ */
++
++/* defines */
++/* SDMA command macros */
++#define ETH_ENABLE_TX_QUEUE(eth_port) \
++	MV_WRITE(MV64340_ETH_TRANSMIT_QUEUE_COMMAND_REG(eth_port), 1)
++
++#define ETH_DISABLE_TX_QUEUE(eth_port) \
++	MV_WRITE(MV64340_ETH_TRANSMIT_QUEUE_COMMAND_REG(eth_port),	\
++	         (1 << 8))
++
++#define ETH_ENABLE_RX_QUEUE(rx_queue, eth_port) \
++	MV_WRITE(MV64340_ETH_RECEIVE_QUEUE_COMMAND_REG(eth_port),	\
++	         (1 << rx_queue))
++
++#define ETH_DISABLE_RX_QUEUE(rx_queue, eth_port) \
++	MV_WRITE(MV64340_ETH_RECEIVE_QUEUE_COMMAND_REG(eth_port),	\
++	         (1 << (8 + rx_queue)))
++
++#define LINK_UP_TIMEOUT		100000
++#define PHY_BUSY_TIMEOUT	10000000
++
++/* locals */
++
++/* PHY routines */
++#ifdef MDD_CUT
++static void ethernet_phy_set(unsigned int eth_port_num, int phy_addr);
++#endif
++static int ethernet_phy_get(unsigned int eth_port_num);
++
++/* Ethernet Port routines */
++static int eth_port_uc_addr(unsigned int eth_port_num, unsigned char uc_nibble,
++	int option);
++
++#ifdef MDD_CUT
++static void eth_b_copy(unsigned int src_addr, unsigned int dst_addr,
++	int byte_count);
++#endif
++
++/*
++ * eth_port_init - Initialize the Ethernet port driver
++ *
++ * DESCRIPTION:
++ *       This function prepares the ethernet port to start its activity:
++ *       1) Completes the ethernet port driver struct initialization toward port
++ *           start routine.
++ *       2) Resets the device to a quiescent state in case of warm reboot.
++ *       3) Enable SDMA access to all four DRAM banks as well as internal SRAM.
++ *       4) Clean MAC tables. The reset status of those tables is unknown.
++ *       5) Set PHY address. 
++ *       Note: Call this routine prior to eth_port_start routine and after
++ *       setting user values in the user fields of Ethernet port control
++ *       struct.
++ *
++ * INPUT:
++ *       struct mv64340_private *mp   Ethernet port control struct
++ *
++ * OUTPUT:
++ *       See description.
++ *
++ * RETURN:
++ *       None.
++ */
++static void eth_port_init(struct mv64340_private * mp)
++{
++	mp->port_config = PORT_CONFIG_VALUE;
++	mp->port_config_extend = PORT_CONFIG_EXTEND_VALUE;
++#if defined(__BIG_ENDIAN)
++	mp->port_sdma_config = PORT_SDMA_CONFIG_VALUE;
++#elif defined(__LITTLE_ENDIAN)
++	mp->port_sdma_config = PORT_SDMA_CONFIG_VALUE |
++		ETH_BLM_RX_NO_SWAP | ETH_BLM_TX_NO_SWAP;
++#else
++#error One of __LITTLE_ENDIAN or __BIG_ENDIAN must be defined!
++#endif
++	mp->port_serial_control = PORT_SERIAL_CONTROL_VALUE;
++
++	mp->port_rx_queue_command = 0;
++	mp->port_tx_queue_command = 0;
++
++	mp->rx_resource_err = 0;
++	mp->tx_resource_err = 0;
++
++	eth_port_reset(mp->port_num);
++
++	eth_port_init_mac_tables(mp->port_num);
++
++	ethernet_phy_reset(mp->port_num);
++}
++
++/*
++ * eth_port_start - Start the Ethernet port activity.
++ *
++ * DESCRIPTION:
++ *       This routine prepares the Ethernet port for Rx and Tx activity:
++ *       1. Initialize Tx and Rx Current Descriptor Pointer for each queue that
++ *          has been initialized a descriptor's ring (using
++ *          ether_init_tx_desc_ring for Tx and ether_init_rx_desc_ring for Rx)
++ *       2. Initialize and enable the Ethernet configuration port by writing to
++ *          the port's configuration and command registers.
++ *       3. Initialize and enable the SDMA by writing to the SDMA's 
++ *          configuration and command registers.  After completing these steps,
++ *          the ethernet port SDMA can starts to perform Rx and Tx activities.
++ *
++ *       Note: Each Rx and Tx queue descriptor's list must be initialized prior
++ *       to calling this function (use ether_init_tx_desc_ring for Tx queues
++ *       and ether_init_rx_desc_ring for Rx queues).
++ *
++ * INPUT:
++ *       struct mv64340_private 	*mp   Ethernet port control struct
++ *
++ * OUTPUT:
++ *       Ethernet port is ready to receive and transmit.
++ *
++ * RETURN:
++ *       false if the port PHY is not up.
++ *       true otherwise.
++ */
++static int eth_port_start(struct mv64340_private *mp)
++{
++	unsigned int eth_port_num = mp->port_num;
++	int tx_curr_desc, rx_curr_desc;
++	unsigned int phy_reg_data;
++
++	/* Assignment of Tx CTRP of given queue */
++	tx_curr_desc = mp->tx_curr_desc_q;
++	MV_WRITE(MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_0(eth_port_num),
++	         (struct eth_tx_desc *) mp->tx_desc_dma + tx_curr_desc);
++
++	/* Assignment of Rx CRDP of given queue */
++	rx_curr_desc = mp->rx_curr_desc_q;
++	MV_WRITE(MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_0(eth_port_num),
++		 (struct eth_rx_desc *) mp->rx_desc_dma + rx_curr_desc);
++
++	/* Add the assigned Ethernet address to the port's address table */
++	eth_port_uc_addr_set(mp->port_num, mp->port_mac_addr);
++
++	/* Assign port configuration and command. */
++	MV_WRITE(MV64340_ETH_PORT_CONFIG_REG(eth_port_num),
++		 mp->port_config);
++
++	MV_WRITE(MV64340_ETH_PORT_CONFIG_EXTEND_REG(eth_port_num),
++		 mp->port_config_extend);
++
++	MV_WRITE(MV64340_ETH_PORT_SERIAL_CONTROL_REG(eth_port_num),
++		 mp->port_serial_control);
++
++	MV_SET_REG_BITS(MV64340_ETH_PORT_SERIAL_CONTROL_REG(eth_port_num),
++			ETH_SERIAL_PORT_ENABLE);
++
++	/* Assign port SDMA configuration */
++	MV_WRITE(MV64340_ETH_SDMA_CONFIG_REG(eth_port_num),
++		 mp->port_sdma_config);
++
++	/* Enable port Rx. */
++	MV_WRITE(MV64340_ETH_RECEIVE_QUEUE_COMMAND_REG(eth_port_num),
++		 mp->port_rx_queue_command);
++
++	/* Check if link is up */
++	eth_port_read_smi_reg(eth_port_num, 1, &phy_reg_data);
++
++	if (!(phy_reg_data & 0x20))
++		return 0;
++
++	return 1;
++}
++
++/*
++ * eth_port_uc_addr_set - This function Set the port Unicast address.
++ *
++ * DESCRIPTION:
++ *		This function Set the port Ethernet MAC address.
++ *
++ * INPUT:
++ *	unsigned int eth_port_num     Port number.
++ *	char *        p_addr		Address to be set 
++ *
++ * OUTPUT:
++ *	Set MAC address low and high registers. also calls eth_port_uc_addr() 
++ *       To set the unicast table with the proper information.
++ *
++ * RETURN:
++ *	N/A.
++ *
++ */
++static void eth_port_uc_addr_set(unsigned int eth_port_num,
++				 unsigned char *p_addr)
++{
++	unsigned int mac_h;
++	unsigned int mac_l;
++
++	mac_l = (p_addr[4] << 8) | (p_addr[5]);
++	mac_h = (p_addr[0] << 24) | (p_addr[1] << 16) |
++	    (p_addr[2] << 8) | (p_addr[3] << 0);
++
++	MV_WRITE(MV64340_ETH_MAC_ADDR_LOW(eth_port_num), mac_l);
++	MV_WRITE(MV64340_ETH_MAC_ADDR_HIGH(eth_port_num), mac_h);
++
++	/* Accept frames of this address */
++	eth_port_uc_addr(eth_port_num, p_addr[5], ACCEPT_MAC_ADDR);
++
++	return;
++}
++
++/*
++ * eth_port_uc_addr - This function Set the port unicast address table
++ *
++ * DESCRIPTION:
++ *	This function locates the proper entry in the Unicast table for the 
++ *	specified MAC nibble and sets its properties according to function 
++ *	parameters.
++ *
++ * INPUT:
++ *	unsigned int 	eth_port_num      Port number.
++ *	unsigned char uc_nibble		Unicast MAC Address last nibble. 
++ *	int 			option      0 = Add, 1 = remove address.
++ *
++ * OUTPUT:
++ *	This function add/removes MAC addresses from the port unicast address
++ *	table. 
++ *
++ * RETURN:
++ *	true is output succeeded.
++ *	false if option parameter is invalid.
++ *
++ */
++static int eth_port_uc_addr(unsigned int eth_port_num,
++	unsigned char uc_nibble, int option)
++{
++	unsigned int unicast_reg;
++	unsigned int tbl_offset;
++	unsigned int reg_offset;
++
++	/* Locate the Unicast table entry */
++	uc_nibble = (0xf & uc_nibble);
++	tbl_offset = (uc_nibble / 4) * 4;	/* Register offset from unicast table base */
++	reg_offset = uc_nibble % 4;	/* Entry offset within the above register */
++
++	switch (option) {
++	case REJECT_MAC_ADDR:
++		/* Clear accepts frame bit at specified unicast DA table entry */
++		unicast_reg = MV_READ((MV64340_ETH_DA_FILTER_UNICAST_TABLE_BASE
++				  (eth_port_num) + tbl_offset));
++
++		unicast_reg &= (0x0E << (8 * reg_offset));
++
++		MV_WRITE(
++			 (MV64340_ETH_DA_FILTER_UNICAST_TABLE_BASE
++			  (eth_port_num) + tbl_offset), unicast_reg);
++		break;
++
++	case ACCEPT_MAC_ADDR:
++		/* Set accepts frame bit at unicast DA filter table entry */
++		unicast_reg =
++		    MV_READ(
++				 (MV64340_ETH_DA_FILTER_UNICAST_TABLE_BASE
++				  (eth_port_num) + tbl_offset));
++
++		unicast_reg |= (0x01 << (8 * reg_offset));
++
++		MV_WRITE(
++			 (MV64340_ETH_DA_FILTER_UNICAST_TABLE_BASE
++			  (eth_port_num) + tbl_offset), unicast_reg);
++
++		break;
++
++	default:
++		return 0;
++	}
++
++	return 1;
++}
++
++/*
++ * eth_port_init_mac_tables - Clear all entrance in the UC, SMC and OMC tables
++ *
++ * DESCRIPTION:
++ *       Go through all the DA filter tables (Unicast, Special Multicast &
++ *       Other Multicast) and set each entry to 0.
++ *
++ * INPUT:
++ *	unsigned int    eth_port_num   Ethernet Port number.
++ *
++ * OUTPUT:
++ *       Multicast and Unicast packets are rejected.
++ *
++ * RETURN:
++ *       None.
++ */
++static void eth_port_init_mac_tables(unsigned int eth_port_num)
++{
++	int table_index;
++
++	/* Clear DA filter unicast table (Ex_dFUT) */
++	for (table_index = 0; table_index <= 0xC; table_index += 4)
++		MV_WRITE(
++			 (MV64340_ETH_DA_FILTER_UNICAST_TABLE_BASE
++			  (eth_port_num) + table_index), 0);
++
++	for (table_index = 0; table_index <= 0xFC; table_index += 4) {
++		/* Clear DA filter special multicast table (Ex_dFSMT) */
++		MV_WRITE(
++			 (MV64340_ETH_DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE
++			  (eth_port_num) + table_index), 0);
++		/* Clear DA filter other multicast table (Ex_dFOMT) */
++		MV_WRITE((MV64340_ETH_DA_FILTER_OTHER_MULTICAST_TABLE_BASE
++			  (eth_port_num) + table_index), 0);
++	}
++}
++
++/*
++ * eth_clear_mib_counters - Clear all MIB counters
++ *
++ * DESCRIPTION:
++ *       This function clears all MIB counters of a specific ethernet port.
++ *       A read from the MIB counter will reset the counter.
++ *
++ * INPUT:
++ *	unsigned int    eth_port_num   Ethernet Port number.
++ *
++ * OUTPUT:
++ *       After reading all MIB counters, the counters resets.
++ *
++ * RETURN:
++ *       MIB counter value.
++ *
++ */
++static void eth_clear_mib_counters(unsigned int eth_port_num)
++{
++	int i;
++
++	/* Perform dummy reads from MIB counters */
++	for (i = ETH_MIB_GOOD_OCTETS_RECEIVED_LOW; i < ETH_MIB_LATE_COLLISION; i += 4)
++		MV_READ(MV64340_ETH_MIB_COUNTERS_BASE(eth_port_num) + i);
++}
++
++
++#ifdef MDD_CUT
++/*
++ * ethernet_phy_set - Set the ethernet port PHY address.
++ *
++ * DESCRIPTION:
++ *       This routine set the ethernet port PHY address according to given 
++ *       parameter.
++ *
++ * INPUT:
++ *		unsigned int   eth_port_num   Ethernet Port number.
++ *
++ * OUTPUT:
++ *       Set PHY Address Register with given PHY address parameter.
++ *
++ * RETURN:
++ *       None.
++ */
++static void ethernet_phy_set(unsigned int eth_port_num, int phy_addr)
++{
++	unsigned int reg_data;
++
++	reg_data = MV_READ(MV64340_ETH_PHY_ADDR_REG);
++
++	reg_data &= ~(0x1F << (5 * eth_port_num));
++	reg_data |= (phy_addr << (5 * eth_port_num));
++
++	MV_WRITE(MV64340_ETH_PHY_ADDR_REG, reg_data);
++
++	return;
++}
++#endif
++
++/*
++ * ethernet_phy_get - Get the ethernet port PHY address.
++ *
++ * DESCRIPTION:
++ *       This routine returns the given ethernet port PHY address.
++ *
++ * INPUT:
++ *		unsigned int   eth_port_num   Ethernet Port number.
++ *
++ * OUTPUT:
++ *       None.
++ *
++ * RETURN:
++ *       PHY address.
++ *
++ */
++static int ethernet_phy_get(unsigned int eth_port_num)
++{
++	unsigned int reg_data;
++
++	reg_data = MV_READ(MV64340_ETH_PHY_ADDR_REG);
++
++	return ((reg_data >> (5 * eth_port_num)) & 0x1f);
++}
++
++/*
++ * ethernet_phy_reset - Reset Ethernet port PHY.
++ *
++ * DESCRIPTION:
++ *       This routine utilize the SMI interface to reset the ethernet port PHY.
++ *       The routine waits until the link is up again or link up is timeout.
++ *
++ * INPUT:
++ *	unsigned int   eth_port_num   Ethernet Port number.
++ *
++ * OUTPUT:
++ *       The ethernet port PHY renew its link.
++ *
++ * RETURN:
++ *       None.
++ *
++ */
++static int ethernet_phy_reset(unsigned int eth_port_num)
++{
++	unsigned int time_out = 50;
++	unsigned int phy_reg_data;
++
++	/* Reset the PHY */
++	eth_port_read_smi_reg(eth_port_num, 0, &phy_reg_data);
++	phy_reg_data |= 0x8000;	/* Set bit 15 to reset the PHY */
++	eth_port_write_smi_reg(eth_port_num, 0, phy_reg_data);
++
++	/* Poll on the PHY LINK */
++	do {
++		eth_port_read_smi_reg(eth_port_num, 1, &phy_reg_data);
++
++		if (time_out-- == 0)
++			return 0;
++	} while (!(phy_reg_data & 0x20));
++
++	return 1;
++}
++
++/*
++ * eth_port_reset - Reset Ethernet port
++ *
++ * DESCRIPTION:
++ * 	This routine resets the chip by aborting any SDMA engine activity and
++ *      clearing the MIB counters. The Receiver and the Transmit unit are in 
++ *      idle state after this command is performed and the port is disabled.
++ *
++ * INPUT:
++ *	unsigned int   eth_port_num   Ethernet Port number.
++ *
++ * OUTPUT:
++ *       Channel activity is halted.
++ *
++ * RETURN:
++ *       None.
++ *
++ */
++static void eth_port_reset(unsigned int eth_port_num)
++{
++	unsigned int reg_data;
++
++	/* Stop Tx port activity. Check port Tx activity. */
++	reg_data =
++	    MV_READ(MV64340_ETH_TRANSMIT_QUEUE_COMMAND_REG(eth_port_num));
++
++	if (reg_data & 0xFF) {
++		/* Issue stop command for active channels only */
++		MV_WRITE(MV64340_ETH_TRANSMIT_QUEUE_COMMAND_REG
++			 (eth_port_num), (reg_data << 8));
++
++		/* Wait for all Tx activity to terminate. */
++		do {
++			/* Check port cause register that all Tx queues are stopped */
++			reg_data =
++			    MV_READ
++			    (MV64340_ETH_TRANSMIT_QUEUE_COMMAND_REG
++			     (eth_port_num));
++		}
++		while (reg_data & 0xFF);
++	}
++
++	/* Stop Rx port activity. Check port Rx activity. */
++	reg_data =
++	    MV_READ(MV64340_ETH_RECEIVE_QUEUE_COMMAND_REG
++			 (eth_port_num));
++
++	if (reg_data & 0xFF) {
++		/* Issue stop command for active channels only */
++		MV_WRITE(MV64340_ETH_RECEIVE_QUEUE_COMMAND_REG
++			 (eth_port_num), (reg_data << 8));
++
++		/* Wait for all Rx activity to terminate. */
++		do {
++			/* Check port cause register that all Rx queues are stopped */
++			reg_data =
++			    MV_READ
++			    (MV64340_ETH_RECEIVE_QUEUE_COMMAND_REG
++			     (eth_port_num));
++		}
++		while (reg_data & 0xFF);
++	}
++
++
++	/* Clear all MIB counters */
++	eth_clear_mib_counters(eth_port_num);
++
++	/* Reset the Enable bit in the Configuration Register */
++	reg_data =
++	    MV_READ(MV64340_ETH_PORT_SERIAL_CONTROL_REG (eth_port_num));
++	reg_data &= ~ETH_SERIAL_PORT_ENABLE;
++	MV_WRITE(MV64340_ETH_PORT_SERIAL_CONTROL_REG(eth_port_num), reg_data);
++
++	return;
++}
++
++/*
++ * ethernet_set_config_reg - Set specified bits in configuration register.
++ *
++ * DESCRIPTION:
++ *       This function sets specified bits in the given ethernet 
++ *       configuration register. 
++ *
++ * INPUT:
++ *	unsigned int   eth_port_num   Ethernet Port number.
++ *      unsigned int    value   32 bit value.
++ *
++ * OUTPUT:
++ *      The set bits in the value parameter are set in the configuration 
++ *      register.
++ *
++ * RETURN:
++ *      None.
++ *
++ */
++static void ethernet_set_config_reg(unsigned int eth_port_num,
++				    unsigned int value)
++{
++	unsigned int eth_config_reg;
++
++	eth_config_reg =
++	    MV_READ(MV64340_ETH_PORT_CONFIG_REG(eth_port_num));
++	eth_config_reg |= value;
++	MV_WRITE(MV64340_ETH_PORT_CONFIG_REG(eth_port_num),
++		 eth_config_reg);
++}
++
++/*
++ * ethernet_get_config_reg - Get the port configuration register
++ *
++ * DESCRIPTION:
++ *       This function returns the configuration register value of the given 
++ *       ethernet port.
++ *
++ * INPUT:
++ *	unsigned int   eth_port_num   Ethernet Port number.
++ *
++ * OUTPUT:
++ *       None.
++ *
++ * RETURN:
++ *       Port configuration register value.
++ */
++static unsigned int ethernet_get_config_reg(unsigned int eth_port_num)
++{
++	unsigned int eth_config_reg;
++
++	eth_config_reg = MV_READ(MV64340_ETH_PORT_CONFIG_EXTEND_REG
++				      (eth_port_num));
++	return eth_config_reg;
++}
++
++
++/*
++ * eth_port_read_smi_reg - Read PHY registers
++ *
++ * DESCRIPTION:
++ *       This routine utilize the SMI interface to interact with the PHY in 
++ *       order to perform PHY register read.
++ *
++ * INPUT:
++ *	unsigned int   eth_port_num   Ethernet Port number.
++ *       unsigned int   phy_reg   PHY register address offset.
++ *       unsigned int   *value   Register value buffer.
++ *
++ * OUTPUT:
++ *       Write the value of a specified PHY register into given buffer.
++ *
++ * RETURN:
++ *       false if the PHY is busy or read data is not in valid state.
++ *       true otherwise.
++ *
++ */
++static int eth_port_read_smi_reg(unsigned int eth_port_num,
++	unsigned int phy_reg, unsigned int *value)
++{
++	int phy_addr = ethernet_phy_get(eth_port_num);
++	unsigned int time_out = PHY_BUSY_TIMEOUT;
++	unsigned int reg_value;
++
++	/* first check that it is not busy */
++	do {
++		reg_value = MV_READ(MV64340_ETH_SMI_REG);
++		if (time_out-- == 0)
++			return 0;
++	} while (reg_value & ETH_SMI_BUSY);
++
++	/* not busy */
++
++	MV_WRITE(MV64340_ETH_SMI_REG,
++		 (phy_addr << 16) | (phy_reg << 21) | ETH_SMI_OPCODE_READ);
++
++	time_out = PHY_BUSY_TIMEOUT;	/* initialize the time out var again */
++
++	do {
++		reg_value = MV_READ(MV64340_ETH_SMI_REG);
++		if (time_out-- == 0)
++			return 0;
++	} while (reg_value & ETH_SMI_READ_VALID);
++
++	/* Wait for the data to update in the SMI register */
++	for (time_out = 0; time_out < PHY_BUSY_TIMEOUT; time_out++);
++
++	reg_value = MV_READ(MV64340_ETH_SMI_REG);
++
++	*value = reg_value & 0xffff;
++
++	return 1;
++}
++
++/*
++ * eth_port_write_smi_reg - Write to PHY registers
++ *
++ * DESCRIPTION:
++ *       This routine utilize the SMI interface to interact with the PHY in 
++ *       order to perform writes to PHY registers.
++ *
++ * INPUT:
++ *	unsigned int   eth_port_num   Ethernet Port number.
++ *      unsigned int   phy_reg   PHY register address offset.
++ *      unsigned int    value   Register value.
++ *
++ * OUTPUT:
++ *      Write the given value to the specified PHY register.
++ *
++ * RETURN:
++ *      false if the PHY is busy.
++ *      true otherwise.
++ *
++ */
++static int eth_port_write_smi_reg(unsigned int eth_port_num,
++	unsigned int phy_reg, unsigned int value)
++{
++	unsigned int time_out = PHY_BUSY_TIMEOUT;
++	unsigned int reg_value;
++	int phy_addr;
++
++	phy_addr = ethernet_phy_get(eth_port_num);
++
++	/* first check that it is not busy */
++	do {
++		reg_value = MV_READ(MV64340_ETH_SMI_REG);
++		if (time_out-- == 0)
++			return 0;
++	} while (reg_value & ETH_SMI_BUSY);
++
++	/* not busy */
++	MV_WRITE(MV64340_ETH_SMI_REG, (phy_addr << 16) | (phy_reg << 21) |
++		 ETH_SMI_OPCODE_WRITE | (value & 0xffff));
++
++	return 1;
++}
++
++/*
++ * eth_port_send - Send an Ethernet packet
++ *
++ * DESCRIPTION:
++ *	This routine send a given packet described by p_pktinfo parameter. It 
++ *      supports transmitting of a packet spaned over multiple buffers. The 
++ *      routine updates 'curr' and 'first' indexes according to the packet 
++ *      segment passed to the routine. In case the packet segment is first, 
++ *      the 'first' index is update. In any case, the 'curr' index is updated. 
++ *      If the routine get into Tx resource error it assigns 'curr' index as 
++ *      'first'. This way the function can abort Tx process of multiple 
++ *      descriptors per packet.
++ *
++ * INPUT:
++ *	struct mv64340_private   *mp   Ethernet Port Control srtuct. 
++ *	struct pkt_info        *p_pkt_info       User packet buffer.
++ *
++ * OUTPUT:
++ *	Tx ring 'curr' and 'first' indexes are updated. 
++ *
++ * RETURN:
++ *      ETH_QUEUE_FULL in case of Tx resource error.
++ *	ETH_ERROR in case the routine can not access Tx desc ring.
++ *	ETH_QUEUE_LAST_RESOURCE if the routine uses the last Tx resource.
++ *      ETH_OK otherwise.
++ *
++ */
++#ifdef  MV64340_CHECKSUM_OFFLOAD_TX
++/*
++ * Modified to include the first descriptor pointer in case of SG
++ */
++static ETH_FUNC_RET_STATUS eth_port_send(struct mv64340_private * mp,
++                                         struct pkt_info * p_pkt_info)
++{
++	int tx_desc_curr, tx_desc_used, tx_first_desc, tx_next_desc;
++	volatile struct eth_tx_desc *current_descriptor;
++	volatile struct eth_tx_desc *first_descriptor;
++	u32 command_status, first_chip_ptr;
++
++	/* Do not process Tx ring in case of Tx ring resource error */
++	if (mp->tx_resource_err)
++		return ETH_QUEUE_FULL;
++
++	/* Get the Tx Desc ring indexes */
++	tx_desc_curr = mp->tx_curr_desc_q;
++	tx_desc_used = mp->tx_used_desc_q;
++
++	current_descriptor = &mp->p_tx_desc_area[tx_desc_curr];
++	if (current_descriptor == NULL)
++		return ETH_ERROR;
++
++	tx_next_desc = (tx_desc_curr + 1) % MV64340_TX_QUEUE_SIZE;
++	command_status = p_pkt_info->cmd_sts | ETH_ZERO_PADDING | ETH_GEN_CRC;
++
++	if (command_status & ETH_TX_FIRST_DESC) {
++		tx_first_desc = tx_desc_curr;
++		mp->tx_first_desc_q = tx_first_desc;
++
++                /* fill first descriptor */
++                first_descriptor = &mp->p_tx_desc_area[tx_desc_curr];
++                first_descriptor->l4i_chk = p_pkt_info->l4i_chk;
++                first_descriptor->cmd_sts = command_status;
++                first_descriptor->byte_cnt = p_pkt_info->byte_cnt;
++                first_descriptor->buf_ptr = p_pkt_info->buf_ptr;
++                first_descriptor->next_desc_ptr =
++			(struct eth_tx_desc *) mp->tx_desc_dma + tx_next_desc;
++		wmb();
++        } else {
++                tx_first_desc = mp->tx_first_desc_q;
++                first_descriptor = &mp->p_tx_desc_area[tx_first_desc];
++                if (first_descriptor == NULL) {
++                        printk("First desc is NULL !!\n");
++                        return ETH_ERROR;
++                }
++                if (command_status & ETH_TX_LAST_DESC)
++                        current_descriptor->next_desc_ptr = 0x00000000;
++                else {
++                        command_status |= ETH_BUFFER_OWNED_BY_DMA;
++                        current_descriptor->next_desc_ptr =
++			  (struct eth_tx_desc *) mp->tx_desc_dma + tx_next_desc;
++                }
++        }
++
++        if (p_pkt_info->byte_cnt < 8) {
++                printk(" < 8 problem \n");
++                return ETH_ERROR;
++        }
++
++        current_descriptor->buf_ptr = p_pkt_info->buf_ptr;
++        current_descriptor->byte_cnt = p_pkt_info->byte_cnt;
++        current_descriptor->l4i_chk = p_pkt_info->l4i_chk;
++        current_descriptor->cmd_sts = command_status;
++
++        mp->tx_skb[tx_desc_curr] = (struct sk_buff*) p_pkt_info->return_info;
++
++        wmb();
++
++        /* Set last desc with DMA ownership and interrupt enable. */
++        if (command_status & ETH_TX_LAST_DESC) {
++                current_descriptor->cmd_sts = command_status |
++                                        ETH_TX_ENABLE_INTERRUPT |
++                                        ETH_BUFFER_OWNED_BY_DMA;
++
++		if (!(command_status & ETH_TX_FIRST_DESC))
++			first_descriptor->cmd_sts |= ETH_BUFFER_OWNED_BY_DMA;
++		wmb();
++
++		first_chip_ptr = MV_READ(MV64340_ETH_CURRENT_SERVED_TX_DESC_PTR(mp->port_num));
++
++		/* Apply send command */
++		if (first_chip_ptr == 0x00000000)
++			MV_WRITE(MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_0(mp->port_num), (struct eth_tx_desc *) mp->tx_desc_dma + tx_first_desc);
++
++                ETH_ENABLE_TX_QUEUE(mp->port_num);
++
++		/*
++		 * Finish Tx packet. Update first desc in case of Tx resource
++		 * error */
++                tx_first_desc = tx_next_desc;
++                mp->tx_first_desc_q = tx_first_desc;
++	} else {
++		if (! (command_status & ETH_TX_FIRST_DESC) ) {
++			current_descriptor->cmd_sts = command_status;
++			wmb();
++		}
++	}
++
++        /* Check for ring index overlap in the Tx desc ring */
++        if (tx_next_desc == tx_desc_used) {
++                mp->tx_resource_err = 1;
++                mp->tx_curr_desc_q = tx_first_desc;
++
++                return ETH_QUEUE_LAST_RESOURCE;
++	}
++
++        mp->tx_curr_desc_q = tx_next_desc;
++        wmb();
++
++        return ETH_OK;
++}
++#else
++static ETH_FUNC_RET_STATUS eth_port_send(struct mv64340_private * mp,
++					 struct pkt_info * p_pkt_info)
++{
++	int tx_desc_curr;
++	int tx_desc_used;
++	volatile struct eth_tx_desc* current_descriptor;
++	unsigned int command_status;
++
++	/* Do not process Tx ring in case of Tx ring resource error */
++	if (mp->tx_resource_err)
++		return ETH_QUEUE_FULL;
++
++	/* Get the Tx Desc ring indexes */
++	tx_desc_curr = mp->tx_curr_desc_q;
++	tx_desc_used = mp->tx_used_desc_q;
++	current_descriptor = &mp->p_tx_desc_area[tx_desc_curr];
++
++	if (current_descriptor == NULL)
++		return ETH_ERROR;
++
++	command_status = p_pkt_info->cmd_sts | ETH_ZERO_PADDING | ETH_GEN_CRC;
++
++/* XXX Is this for real ?!?!? */
++	/* Buffers with a payload smaller than 8 bytes must be aligned to a
++	 * 64-bit boundary. We use the memory allocated for Tx descriptor.
++	 * This memory is located in TX_BUF_OFFSET_IN_DESC offset within the
++	 * Tx descriptor. */
++	if (p_pkt_info->byte_cnt <= 8) {
++		printk(KERN_ERR
++		       "You have failed in the < 8 bytes errata - fixme\n");
++		return ETH_ERROR;
++	}
++	current_descriptor->buf_ptr = p_pkt_info->buf_ptr;
++	current_descriptor->byte_cnt = p_pkt_info->byte_cnt;
++	mp->tx_skb[tx_desc_curr] = (struct sk_buff *) p_pkt_info->return_info;
++
++	mb();
++
++	/* Set last desc with DMA ownership and interrupt enable. */
++	current_descriptor->cmd_sts = command_status |
++			ETH_BUFFER_OWNED_BY_DMA | ETH_TX_ENABLE_INTERRUPT;
++
++	/* Apply send command */
++	ETH_ENABLE_TX_QUEUE(mp->port_num);
++
++	/* Finish Tx packet. Update first desc in case of Tx resource error */
++	tx_desc_curr = (tx_desc_curr + 1) % MV64340_TX_QUEUE_SIZE;
++
++	/* Update the current descriptor */
++ 	mp->tx_curr_desc_q = tx_desc_curr;
++
++	/* Check for ring index overlap in the Tx desc ring */
++	if (tx_desc_curr == tx_desc_used) {
++		mp->tx_resource_err = 1;
++		return ETH_QUEUE_LAST_RESOURCE;
++	}
++
++	return ETH_OK;
++}
++#endif
++
++/*
++ * eth_tx_return_desc - Free all used Tx descriptors
++ *
++ * DESCRIPTION:
++ *	This routine returns the transmitted packet information to the caller.
++ *      It uses the 'first' index to support Tx desc return in case a transmit 
++ *      of a packet spanned over multiple buffer still in process.
++ *      In case the Tx queue was in "resource error" condition, where there are 
++ *      no available Tx resources, the function resets the resource error flag.
++ *
++ * INPUT:
++ *	struct mv64340_private   *mp   Ethernet Port Control srtuct. 
++ *	struct pkt_info        *p_pkt_info       User packet buffer.
++ *
++ * OUTPUT:
++ *	Tx ring 'first' and 'used' indexes are updated. 
++ *
++ * RETURN:
++ *	ETH_ERROR in case the routine can not access Tx desc ring.
++ *      ETH_RETRY in case there is transmission in process.
++ *	ETH_END_OF_JOB if the routine has nothing to release.
++ *      ETH_OK otherwise.
++ *
++ */
++static ETH_FUNC_RET_STATUS eth_tx_return_desc(struct mv64340_private * mp,
++					      struct pkt_info * p_pkt_info)
++{
++	int tx_desc_used, tx_desc_curr;
++#ifdef MV64340_CHECKSUM_OFFLOAD_TX
++        int tx_first_desc;
++#endif
++	volatile struct eth_tx_desc *p_tx_desc_used;
++	unsigned int command_status;
++
++	/* Get the Tx Desc ring indexes */
++	tx_desc_curr = mp->tx_curr_desc_q;
++	tx_desc_used = mp->tx_used_desc_q;
++#ifdef MV64340_CHECKSUM_OFFLOAD_TX
++        tx_first_desc = mp->tx_first_desc_q;
++#endif
++	p_tx_desc_used = &mp->p_tx_desc_area[tx_desc_used];
++
++	/* XXX Sanity check */
++	if (p_tx_desc_used == NULL)
++		return ETH_ERROR;
++
++	command_status = p_tx_desc_used->cmd_sts;
++
++	/* Still transmitting... */
++#ifndef MV64340_CHECKSUM_OFFLOAD_TX
++	if (command_status & (ETH_BUFFER_OWNED_BY_DMA))
++		return ETH_RETRY;
++#endif
++	/* Stop release. About to overlap the current available Tx descriptor */
++#ifdef MV64340_CHECKSUM_OFFLOAD_TX
++	if (tx_desc_used == tx_first_desc && !mp->tx_resource_err)
++		return ETH_END_OF_JOB;
++#else
++	if (tx_desc_used == tx_desc_curr && !mp->tx_resource_err)
++		return ETH_END_OF_JOB;
++#endif
++
++	/* Pass the packet information to the caller */
++	p_pkt_info->cmd_sts = command_status;
++	p_pkt_info->return_info = mp->tx_skb[tx_desc_used];
++	mp->tx_skb[tx_desc_used] = NULL;
++
++	/* Update the next descriptor to release. */
++	mp->tx_used_desc_q = (tx_desc_used + 1) % MV64340_TX_QUEUE_SIZE;
++
++	/* Any Tx return cancels the Tx resource error status */
++	mp->tx_resource_err = 0;
++
++	return ETH_OK;
++}
++
++/*
++ * eth_port_receive - Get received information from Rx ring.
++ *
++ * DESCRIPTION:
++ * 	This routine returns the received data to the caller. There is no 
++ *	data copying during routine operation. All information is returned 
++ *	using pointer to packet information struct passed from the caller. 
++ *      If the routine exhausts	Rx ring resources then the resource error flag 
++ *      is set.  
++ *
++ * INPUT:
++ *	struct mv64340_private   *mp   Ethernet Port Control srtuct. 
++ *	struct pkt_info        *p_pkt_info       User packet buffer.
++ *
++ * OUTPUT:
++ *	Rx ring current and used indexes are updated. 
++ *
++ * RETURN:
++ *	ETH_ERROR in case the routine can not access Rx desc ring.
++ *	ETH_QUEUE_FULL if Rx ring resources are exhausted.
++ *	ETH_END_OF_JOB if there is no received data.
++ *      ETH_OK otherwise.
++ */
++static ETH_FUNC_RET_STATUS eth_port_receive(struct mv64340_private * mp,
++					    struct pkt_info * p_pkt_info)
++{
++	int rx_next_curr_desc, rx_curr_desc, rx_used_desc;
++	volatile struct eth_rx_desc * p_rx_desc;
++	unsigned int command_status;
++
++	/* Do not process Rx ring in case of Rx ring resource error */
++	if (mp->rx_resource_err)
++		return ETH_QUEUE_FULL;
++
++	/* Get the Rx Desc ring 'curr and 'used' indexes */
++	rx_curr_desc = mp->rx_curr_desc_q;
++	rx_used_desc = mp->rx_used_desc_q;
++
++	p_rx_desc = &mp->p_rx_desc_area[rx_curr_desc];
++
++	/* The following parameters are used to save readings from memory */
++	command_status = p_rx_desc->cmd_sts;
++
++	/* Nothing to receive... */
++	if (command_status & (ETH_BUFFER_OWNED_BY_DMA))
++		return ETH_END_OF_JOB;
++
++	p_pkt_info->byte_cnt = (p_rx_desc->byte_cnt) - RX_BUF_OFFSET;
++	p_pkt_info->cmd_sts = command_status;
++	p_pkt_info->buf_ptr = (p_rx_desc->buf_ptr) + RX_BUF_OFFSET;
++	p_pkt_info->return_info = mp->rx_skb[rx_curr_desc];
++	p_pkt_info->l4i_chk = p_rx_desc->buf_size;
++
++	/* Clean the return info field to indicate that the packet has been */
++	/* moved to the upper layers                                        */
++	mp->rx_skb[rx_curr_desc] = NULL;
++
++	/* Update current index in data structure */
++	rx_next_curr_desc = (rx_curr_desc + 1) % MV64340_RX_QUEUE_SIZE;
++	mp->rx_curr_desc_q = rx_next_curr_desc;
++
++	/* Rx descriptors exhausted. Set the Rx ring resource error flag */
++	if (rx_next_curr_desc == rx_used_desc)
++		mp->rx_resource_err = 1;
++
++	mb();
++	return ETH_OK;
++}
++
++/*
++ * eth_rx_return_buff - Returns a Rx buffer back to the Rx ring.
++ *
++ * DESCRIPTION:
++ *	This routine returns a Rx buffer back to the Rx ring. It retrieves the 
++ *      next 'used' descriptor and attached the returned buffer to it.
++ *      In case the Rx ring was in "resource error" condition, where there are 
++ *      no available Rx resources, the function resets the resource error flag.
++ *
++ * INPUT:
++ *	struct mv64340_private *mp   Ethernet Port Control srtuct. 
++ *      struct pkt_info        *p_pkt_info   Information on the returned buffer.
++ *
++ * OUTPUT:
++ *	New available Rx resource in Rx descriptor ring.
++ *
++ * RETURN:
++ *	ETH_ERROR in case the routine can not access Rx desc ring.
++ *      ETH_OK otherwise.
++ */
++static ETH_FUNC_RET_STATUS eth_rx_return_buff(struct mv64340_private * mp,
++	struct pkt_info * p_pkt_info)
++{
++	int used_rx_desc;	/* Where to return Rx resource */
++	volatile struct eth_rx_desc* p_used_rx_desc;
++
++	/* Get 'used' Rx descriptor */
++	used_rx_desc = mp->rx_used_desc_q;
++	p_used_rx_desc = &mp->p_rx_desc_area[used_rx_desc];
++
++	p_used_rx_desc->buf_ptr = p_pkt_info->buf_ptr;
++	p_used_rx_desc->buf_size = p_pkt_info->byte_cnt;
++	mp->rx_skb[used_rx_desc] = p_pkt_info->return_info;
++
++	/* Flush the write pipe */
++	mb();
++
++	/* Return the descriptor to DMA ownership */
++	p_used_rx_desc->cmd_sts =
++		ETH_BUFFER_OWNED_BY_DMA | ETH_RX_ENABLE_INTERRUPT;
++
++	/* Flush descriptor and CPU pipe */
++	mb();
++
++	/* Move the used descriptor pointer to the next descriptor */
++	mp->rx_used_desc_q = (used_rx_desc + 1) % MV64340_RX_QUEUE_SIZE;
++
++	/* Any Rx return cancels the Rx resource error status */
++	mp->rx_resource_err = 0;
++
++	return ETH_OK;
++}
++
++#ifdef MDD_CUT
++/*
++ * eth_b_copy - Copy bytes from source to destination
++ *
++ * DESCRIPTION:
++ *       This function supports the eight bytes limitation on Tx buffer size. 
++ *       The routine will zero eight bytes starting from the destination address
++ *       followed by copying bytes from the source address to the destination.
++ *
++ * INPUT:
++ *       unsigned int src_addr    32 bit source address.
++ *       unsigned int dst_addr    32 bit destination address.
++ *       int        byte_count    Number of bytes to copy.
++ *
++ * OUTPUT:
++ *       See description.
++ *
++ * RETURN:
++ *       None.
++ *
++ */
++static void eth_b_copy(unsigned int src_addr, unsigned int dst_addr,
++		       int byte_count)
++{
++	/* Zero the dst_addr area */
++	*(unsigned int *) dst_addr = 0x0;
++
++	while (byte_count != 0) {
++		*(char *) dst_addr = *(char *) src_addr;
++		dst_addr++;
++		src_addr++;
++		byte_count--;
++	}
++}
++#endif
+diff -Nru a/drivers/net/mv64340_eth.h b/drivers/net/mv64340_eth.h
+--- /dev/null	Wed Dec 31 16:00:00 196900
++++ b/drivers/net/mv64340_eth.h	2004-07-04 22:52:59 -07:00
+@@ -0,0 +1,601 @@
++#ifndef __MV64340_ETH_H__
++#define __MV64340_ETH_H__
++
++#include <linux/version.h>
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/spinlock.h>
++#include <linux/workqueue.h>
++
++#include <asm/mv64340.h>
++
++#define	BIT0	0x00000001
++#define	BIT1	0x00000002
++#define	BIT2	0x00000004
++#define	BIT3	0x00000008
++#define	BIT4	0x00000010
++#define	BIT5	0x00000020
++#define	BIT6	0x00000040
++#define	BIT7	0x00000080
++#define	BIT8	0x00000100
++#define	BIT9	0x00000200
++#define	BIT10	0x00000400
++#define	BIT11	0x00000800
++#define	BIT12	0x00001000
++#define	BIT13	0x00002000
++#define	BIT14	0x00004000
++#define	BIT15	0x00008000
++#define	BIT16	0x00010000
++#define	BIT17	0x00020000
++#define	BIT18	0x00040000
++#define	BIT19	0x00080000
++#define	BIT20	0x00100000
++#define	BIT21	0x00200000
++#define	BIT22	0x00400000
++#define	BIT23	0x00800000
++#define	BIT24	0x01000000
++#define	BIT25	0x02000000
++#define	BIT26	0x04000000
++#define	BIT27	0x08000000
++#define	BIT28	0x10000000
++#define	BIT29	0x20000000
++#define	BIT30	0x40000000
++#define	BIT31	0x80000000
++
++/*
++ *  The first part is the high level driver of the gigE ethernet ports.
++ */
++
++#define ETH_PORT0_IRQ_NUM 48			/* main high register, bit0 */
++#define ETH_PORT1_IRQ_NUM ETH_PORT0_IRQ_NUM+1	/* main high register, bit1 */
++#define ETH_PORT2_IRQ_NUM ETH_PORT0_IRQ_NUM+2	/* main high register, bit1 */
++
++/* Checksum offload for Tx works */
++#define  MV64340_CHECKSUM_OFFLOAD_TX
++#define	 MV64340_NAPI
++#define	 MV64340_TX_FAST_REFILL
++#undef	 MV64340_COAL
++
++/* 
++ * Number of RX / TX descriptors on RX / TX rings.
++ * Note that allocating RX descriptors is done by allocating the RX
++ * ring AND a preallocated RX buffers (skb's) for each descriptor.
++ * The TX descriptors only allocates the TX descriptors ring,
++ * with no pre allocated TX buffers (skb's are allocated by higher layers.
++ */
++
++/* Default TX ring size is 1000 descriptors */
++#define MV64340_TX_QUEUE_SIZE 1000
++
++/* Default RX ring size is 400 descriptors */
++#define MV64340_RX_QUEUE_SIZE 400
++
++#define MV64340_TX_COAL 100
++#ifdef MV64340_COAL
++#define MV64340_RX_COAL 100
++#endif
++
++
++/*
++ * The second part is the low level driver of the gigE ethernet ports.   *
++ */
++
++
++/*
++ * Header File for : MV-643xx network interface header 
++ *
++ * DESCRIPTION:
++ *       This header file contains macros typedefs and function declaration for
++ *       the Marvell Gig Bit Ethernet Controller. 
++ *
++ * DEPENDENCIES:
++ *       None.
++ *
++ */
++
++/* Default port configuration value */
++#define PORT_CONFIG_VALUE                       \
++             ETH_UNICAST_NORMAL_MODE		|   \
++             ETH_DEFAULT_RX_QUEUE_0		|   \
++             ETH_DEFAULT_RX_ARP_QUEUE_0		|   \
++             ETH_RECEIVE_BC_IF_NOT_IP_OR_ARP	|   \
++             ETH_RECEIVE_BC_IF_IP		|   \
++             ETH_RECEIVE_BC_IF_ARP 		|   \
++             ETH_CAPTURE_TCP_FRAMES_DIS		|   \
++             ETH_CAPTURE_UDP_FRAMES_DIS		|   \
++             ETH_DEFAULT_RX_TCP_QUEUE_0		|   \
++             ETH_DEFAULT_RX_UDP_QUEUE_0		|   \
++             ETH_DEFAULT_RX_BPDU_QUEUE_0
++
++/* Default port extend configuration value */
++#define PORT_CONFIG_EXTEND_VALUE		\
++             ETH_SPAN_BPDU_PACKETS_AS_NORMAL	|   \
++             ETH_PARTITION_DISABLE
++
++
++/* Default sdma control value */
++#define PORT_SDMA_CONFIG_VALUE			\
++			 ETH_RX_BURST_SIZE_16_64BIT 	|	\
++			 GT_ETH_IPG_INT_RX(0) 		|	\
++			 ETH_TX_BURST_SIZE_16_64BIT;
++
++#define GT_ETH_IPG_INT_RX(value)                \
++            ((value & 0x3fff) << 8)
++
++/* Default port serial control value */
++#define PORT_SERIAL_CONTROL_VALUE		\
++			ETH_FORCE_LINK_PASS 			|	\
++			ETH_ENABLE_AUTO_NEG_FOR_DUPLX		|	\
++			ETH_DISABLE_AUTO_NEG_FOR_FLOW_CTRL 	|	\
++			ETH_ADV_SYMMETRIC_FLOW_CTRL 		|	\
++			ETH_FORCE_FC_MODE_NO_PAUSE_DIS_TX 	|	\
++			ETH_FORCE_BP_MODE_NO_JAM 		|	\
++			BIT9 					|	\
++			ETH_DO_NOT_FORCE_LINK_FAIL 		|	\
++			ETH_RETRANSMIT_16_ATTEMPTS 		|	\
++			ETH_ENABLE_AUTO_NEG_SPEED_GMII	 	|	\
++			ETH_DTE_ADV_0 				|	\
++			ETH_DISABLE_AUTO_NEG_BYPASS		|	\
++			ETH_AUTO_NEG_NO_CHANGE 			|	\
++			ETH_MAX_RX_PACKET_9700BYTE 		|	\
++			ETH_CLR_EXT_LOOPBACK 			|	\
++			ETH_SET_FULL_DUPLEX_MODE 		|	\
++			ETH_ENABLE_FLOW_CTRL_TX_RX_IN_FULL_DUPLEX
++
++#define RX_BUFFER_MAX_SIZE  0x4000000
++#define TX_BUFFER_MAX_SIZE  0x4000000
++
++/* MAC accepet/reject macros */
++#define ACCEPT_MAC_ADDR	    0
++#define REJECT_MAC_ADDR	    1
++
++/* Buffer offset from buffer pointer */
++#define RX_BUF_OFFSET				0x2
++
++/* Gigabit Ethernet Unit Global Registers */
++
++/* MIB Counters register definitions */
++#define ETH_MIB_GOOD_OCTETS_RECEIVED_LOW   0x0
++#define ETH_MIB_GOOD_OCTETS_RECEIVED_HIGH  0x4
++#define ETH_MIB_BAD_OCTETS_RECEIVED        0x8
++#define ETH_MIB_INTERNAL_MAC_TRANSMIT_ERR  0xc
++#define ETH_MIB_GOOD_FRAMES_RECEIVED       0x10
++#define ETH_MIB_BAD_FRAMES_RECEIVED        0x14
++#define ETH_MIB_BROADCAST_FRAMES_RECEIVED  0x18
++#define ETH_MIB_MULTICAST_FRAMES_RECEIVED  0x1c
++#define ETH_MIB_FRAMES_64_OCTETS           0x20
++#define ETH_MIB_FRAMES_65_TO_127_OCTETS    0x24
++#define ETH_MIB_FRAMES_128_TO_255_OCTETS   0x28
++#define ETH_MIB_FRAMES_256_TO_511_OCTETS   0x2c
++#define ETH_MIB_FRAMES_512_TO_1023_OCTETS  0x30
++#define ETH_MIB_FRAMES_1024_TO_MAX_OCTETS  0x34
++#define ETH_MIB_GOOD_OCTETS_SENT_LOW       0x38
++#define ETH_MIB_GOOD_OCTETS_SENT_HIGH      0x3c
++#define ETH_MIB_GOOD_FRAMES_SENT           0x40
++#define ETH_MIB_EXCESSIVE_COLLISION        0x44
++#define ETH_MIB_MULTICAST_FRAMES_SENT      0x48
++#define ETH_MIB_BROADCAST_FRAMES_SENT      0x4c
++#define ETH_MIB_UNREC_MAC_CONTROL_RECEIVED 0x50
++#define ETH_MIB_FC_SENT                    0x54
++#define ETH_MIB_GOOD_FC_RECEIVED           0x58
++#define ETH_MIB_BAD_FC_RECEIVED            0x5c
++#define ETH_MIB_UNDERSIZE_RECEIVED         0x60
++#define ETH_MIB_FRAGMENTS_RECEIVED         0x64
++#define ETH_MIB_OVERSIZE_RECEIVED          0x68
++#define ETH_MIB_JABBER_RECEIVED            0x6c
++#define ETH_MIB_MAC_RECEIVE_ERROR          0x70
++#define ETH_MIB_BAD_CRC_EVENT              0x74
++#define ETH_MIB_COLLISION                  0x78
++#define ETH_MIB_LATE_COLLISION             0x7c
++
++/* Port serial status reg (PSR) */
++#define ETH_INTERFACE_GMII_MII                          0
++#define ETH_INTERFACE_PCM                               BIT0
++#define ETH_LINK_IS_DOWN                                0
++#define ETH_LINK_IS_UP                                  BIT1
++#define ETH_PORT_AT_HALF_DUPLEX                         0
++#define ETH_PORT_AT_FULL_DUPLEX                         BIT2
++#define ETH_RX_FLOW_CTRL_DISABLED                       0
++#define ETH_RX_FLOW_CTRL_ENBALED                        BIT3
++#define ETH_GMII_SPEED_100_10                           0
++#define ETH_GMII_SPEED_1000                             BIT4
++#define ETH_MII_SPEED_10                                0
++#define ETH_MII_SPEED_100                               BIT5
++#define ETH_NO_TX                                       0
++#define ETH_TX_IN_PROGRESS                              BIT7
++#define ETH_BYPASS_NO_ACTIVE                            0
++#define ETH_BYPASS_ACTIVE                               BIT8
++#define ETH_PORT_NOT_AT_PARTITION_STATE                 0
++#define ETH_PORT_AT_PARTITION_STATE                     BIT9
++#define ETH_PORT_TX_FIFO_NOT_EMPTY                      0
++#define ETH_PORT_TX_FIFO_EMPTY                          BIT10
++
++
++/* These macros describes the Port configuration reg (Px_cR) bits */
++#define ETH_UNICAST_NORMAL_MODE                         0
++#define ETH_UNICAST_PROMISCUOUS_MODE                    BIT0
++#define ETH_DEFAULT_RX_QUEUE_0                          0
++#define ETH_DEFAULT_RX_QUEUE_1                          BIT1
++#define ETH_DEFAULT_RX_QUEUE_2                          BIT2
++#define ETH_DEFAULT_RX_QUEUE_3                          (BIT2 | BIT1)
++#define ETH_DEFAULT_RX_QUEUE_4                          BIT3
++#define ETH_DEFAULT_RX_QUEUE_5                          (BIT3 | BIT1)
++#define ETH_DEFAULT_RX_QUEUE_6                          (BIT3 | BIT2)
++#define ETH_DEFAULT_RX_QUEUE_7                          (BIT3 | BIT2 | BIT1)
++#define ETH_DEFAULT_RX_ARP_QUEUE_0                      0
++#define ETH_DEFAULT_RX_ARP_QUEUE_1                      BIT4
++#define ETH_DEFAULT_RX_ARP_QUEUE_2                      BIT5
++#define ETH_DEFAULT_RX_ARP_QUEUE_3                      (BIT5 | BIT4)
++#define ETH_DEFAULT_RX_ARP_QUEUE_4                      BIT6
++#define ETH_DEFAULT_RX_ARP_QUEUE_5                      (BIT6 | BIT4)
++#define ETH_DEFAULT_RX_ARP_QUEUE_6                      (BIT6 | BIT5)
++#define ETH_DEFAULT_RX_ARP_QUEUE_7                      (BIT6 | BIT5 | BIT4)
++#define ETH_RECEIVE_BC_IF_NOT_IP_OR_ARP                 0
++#define ETH_REJECT_BC_IF_NOT_IP_OR_ARP                  BIT7
++#define ETH_RECEIVE_BC_IF_IP                            0
++#define ETH_REJECT_BC_IF_IP                             BIT8
++#define ETH_RECEIVE_BC_IF_ARP                           0
++#define ETH_REJECT_BC_IF_ARP                            BIT9
++#define ETH_TX_AM_NO_UPDATE_ERROR_SUMMARY               BIT12
++#define ETH_CAPTURE_TCP_FRAMES_DIS                      0
++#define ETH_CAPTURE_TCP_FRAMES_EN                       BIT14
++#define ETH_CAPTURE_UDP_FRAMES_DIS                      0
++#define ETH_CAPTURE_UDP_FRAMES_EN                       BIT15
++#define ETH_DEFAULT_RX_TCP_QUEUE_0                      0
++#define ETH_DEFAULT_RX_TCP_QUEUE_1                      BIT16
++#define ETH_DEFAULT_RX_TCP_QUEUE_2                      BIT17
++#define ETH_DEFAULT_RX_TCP_QUEUE_3                      (BIT17 | BIT16)
++#define ETH_DEFAULT_RX_TCP_QUEUE_4                      BIT18
++#define ETH_DEFAULT_RX_TCP_QUEUE_5                      (BIT18 | BIT16)
++#define ETH_DEFAULT_RX_TCP_QUEUE_6                      (BIT18 | BIT17)
++#define ETH_DEFAULT_RX_TCP_QUEUE_7                      (BIT18 | BIT17 | BIT16)
++#define ETH_DEFAULT_RX_UDP_QUEUE_0                      0
++#define ETH_DEFAULT_RX_UDP_QUEUE_1                      BIT19
++#define ETH_DEFAULT_RX_UDP_QUEUE_2                      BIT20
++#define ETH_DEFAULT_RX_UDP_QUEUE_3                      (BIT20 | BIT19)
++#define ETH_DEFAULT_RX_UDP_QUEUE_4                      (BIT21
++#define ETH_DEFAULT_RX_UDP_QUEUE_5                      (BIT21 | BIT19)
++#define ETH_DEFAULT_RX_UDP_QUEUE_6                      (BIT21 | BIT20)
++#define ETH_DEFAULT_RX_UDP_QUEUE_7                      (BIT21 | BIT20 | BIT19)
++#define ETH_DEFAULT_RX_BPDU_QUEUE_0                      0
++#define ETH_DEFAULT_RX_BPDU_QUEUE_1                     BIT22
++#define ETH_DEFAULT_RX_BPDU_QUEUE_2                     BIT23
++#define ETH_DEFAULT_RX_BPDU_QUEUE_3                     (BIT23 | BIT22)
++#define ETH_DEFAULT_RX_BPDU_QUEUE_4                     BIT24
++#define ETH_DEFAULT_RX_BPDU_QUEUE_5                     (BIT24 | BIT22)
++#define ETH_DEFAULT_RX_BPDU_QUEUE_6                     (BIT24 | BIT23)
++#define ETH_DEFAULT_RX_BPDU_QUEUE_7                     (BIT24 | BIT23 | BIT22)
++
++
++/* These macros describes the Port configuration extend reg (Px_cXR) bits*/
++#define ETH_CLASSIFY_EN                                 BIT0
++#define ETH_SPAN_BPDU_PACKETS_AS_NORMAL                 0
++#define ETH_SPAN_BPDU_PACKETS_TO_RX_QUEUE_7             BIT1
++#define ETH_PARTITION_DISABLE                           0
++#define ETH_PARTITION_ENABLE                            BIT2
++
++
++/* Tx/Rx queue command reg (RQCR/TQCR)*/
++#define ETH_QUEUE_0_ENABLE                              BIT0
++#define ETH_QUEUE_1_ENABLE                              BIT1
++#define ETH_QUEUE_2_ENABLE                              BIT2
++#define ETH_QUEUE_3_ENABLE                              BIT3
++#define ETH_QUEUE_4_ENABLE                              BIT4
++#define ETH_QUEUE_5_ENABLE                              BIT5
++#define ETH_QUEUE_6_ENABLE                              BIT6
++#define ETH_QUEUE_7_ENABLE                              BIT7
++#define ETH_QUEUE_0_DISABLE                             BIT8
++#define ETH_QUEUE_1_DISABLE                             BIT9
++#define ETH_QUEUE_2_DISABLE                             BIT10
++#define ETH_QUEUE_3_DISABLE                             BIT11
++#define ETH_QUEUE_4_DISABLE                             BIT12
++#define ETH_QUEUE_5_DISABLE                             BIT13
++#define ETH_QUEUE_6_DISABLE                             BIT14
++#define ETH_QUEUE_7_DISABLE                             BIT15
++
++
++/* These macros describes the Port Sdma configuration reg (SDCR) bits */
++#define ETH_RIFB                                        BIT0
++#define ETH_RX_BURST_SIZE_1_64BIT                       0
++#define ETH_RX_BURST_SIZE_2_64BIT                       BIT1
++#define ETH_RX_BURST_SIZE_4_64BIT                       BIT2
++#define ETH_RX_BURST_SIZE_8_64BIT                       (BIT2 | BIT1)
++#define ETH_RX_BURST_SIZE_16_64BIT                      BIT3
++#define ETH_BLM_RX_NO_SWAP                              BIT4
++#define ETH_BLM_RX_BYTE_SWAP                            0
++#define ETH_BLM_TX_NO_SWAP                              BIT5
++#define ETH_BLM_TX_BYTE_SWAP                            0
++#define ETH_DESCRIPTORS_BYTE_SWAP                       BIT6
++#define ETH_DESCRIPTORS_NO_SWAP                         0
++#define ETH_TX_BURST_SIZE_1_64BIT                       0
++#define ETH_TX_BURST_SIZE_2_64BIT                       BIT22
++#define ETH_TX_BURST_SIZE_4_64BIT                       BIT23
++#define ETH_TX_BURST_SIZE_8_64BIT                       (BIT23 | BIT22)
++#define ETH_TX_BURST_SIZE_16_64BIT                      BIT24
++
++
++
++/* These macros describes the Port serial control reg (PSCR) bits */
++#define ETH_SERIAL_PORT_DISABLE                         0
++#define ETH_SERIAL_PORT_ENABLE                          BIT0
++#define ETH_FORCE_LINK_PASS                             BIT1
++#define ETH_DO_NOT_FORCE_LINK_PASS                      0
++#define ETH_ENABLE_AUTO_NEG_FOR_DUPLX                   0
++#define ETH_DISABLE_AUTO_NEG_FOR_DUPLX                  BIT2
++#define ETH_ENABLE_AUTO_NEG_FOR_FLOW_CTRL               0
++#define ETH_DISABLE_AUTO_NEG_FOR_FLOW_CTRL              BIT3
++#define ETH_ADV_NO_FLOW_CTRL                            0
++#define ETH_ADV_SYMMETRIC_FLOW_CTRL                     BIT4
++#define ETH_FORCE_FC_MODE_NO_PAUSE_DIS_TX               0
++#define ETH_FORCE_FC_MODE_TX_PAUSE_DIS                  BIT5
++#define ETH_FORCE_BP_MODE_NO_JAM                        0
++#define ETH_FORCE_BP_MODE_JAM_TX                        BIT7
++#define ETH_FORCE_BP_MODE_JAM_TX_ON_RX_ERR              BIT8
++#define ETH_FORCE_LINK_FAIL                             0
++#define ETH_DO_NOT_FORCE_LINK_FAIL                      BIT10
++#define ETH_RETRANSMIT_16_ATTEMPTS                      0
++#define ETH_RETRANSMIT_FOREVER                          BIT11
++#define ETH_DISABLE_AUTO_NEG_SPEED_GMII                 BIT13
++#define ETH_ENABLE_AUTO_NEG_SPEED_GMII                  0
++#define ETH_DTE_ADV_0                                   0
++#define ETH_DTE_ADV_1                                   BIT14
++#define ETH_DISABLE_AUTO_NEG_BYPASS                     0
++#define ETH_ENABLE_AUTO_NEG_BYPASS                      BIT15
++#define ETH_AUTO_NEG_NO_CHANGE                          0
++#define ETH_RESTART_AUTO_NEG                            BIT16
++#define ETH_MAX_RX_PACKET_1518BYTE                      0
++#define ETH_MAX_RX_PACKET_1522BYTE                      BIT17
++#define ETH_MAX_RX_PACKET_1552BYTE                      BIT18
++#define ETH_MAX_RX_PACKET_9022BYTE                      (BIT18 | BIT17)
++#define ETH_MAX_RX_PACKET_9192BYTE                      BIT19
++#define ETH_MAX_RX_PACKET_9700BYTE                      (BIT19 | BIT17)
++#define ETH_SET_EXT_LOOPBACK                            BIT20
++#define ETH_CLR_EXT_LOOPBACK                            0
++#define ETH_SET_FULL_DUPLEX_MODE                        BIT21
++#define ETH_SET_HALF_DUPLEX_MODE                        0
++#define ETH_ENABLE_FLOW_CTRL_TX_RX_IN_FULL_DUPLEX       BIT22
++#define ETH_DISABLE_FLOW_CTRL_TX_RX_IN_FULL_DUPLEX      0
++#define ETH_SET_GMII_SPEED_TO_10_100                    0
++#define ETH_SET_GMII_SPEED_TO_1000                      BIT23
++#define ETH_SET_MII_SPEED_TO_10                         0
++#define ETH_SET_MII_SPEED_TO_100                        BIT24
++
++
++/* SMI reg */
++#define ETH_SMI_BUSY        	BIT28	/* 0 - Write, 1 - Read          */
++#define ETH_SMI_READ_VALID  	BIT27	/* 0 - Write, 1 - Read          */
++#define ETH_SMI_OPCODE_WRITE	0	/* Completion of Read operation */
++#define ETH_SMI_OPCODE_READ 	BIT26	/* Operation is in progress             */
++
++/* SDMA command status fields macros */
++
++/* Tx & Rx descriptors status */
++#define ETH_ERROR_SUMMARY                   (BIT0)
++
++/* Tx & Rx descriptors command */
++#define ETH_BUFFER_OWNED_BY_DMA             (BIT31)
++
++/* Tx descriptors status */
++#define ETH_LC_ERROR                        (0	  )
++#define ETH_UR_ERROR                        (BIT1 )
++#define ETH_RL_ERROR                        (BIT2 )
++#define ETH_LLC_SNAP_FORMAT                 (BIT9 )
++
++/* Rx descriptors status */
++#define ETH_CRC_ERROR                       (0	  )
++#define ETH_OVERRUN_ERROR                   (BIT1 )
++#define ETH_MAX_FRAME_LENGTH_ERROR          (BIT2 )
++#define ETH_RESOURCE_ERROR                  ((BIT2 | BIT1))
++#define ETH_VLAN_TAGGED                     (BIT19)
++#define ETH_BPDU_FRAME                      (BIT20)
++#define ETH_TCP_FRAME_OVER_IP_V_4           (0    )
++#define ETH_UDP_FRAME_OVER_IP_V_4           (BIT21)
++#define ETH_OTHER_FRAME_TYPE                (BIT22)
++#define ETH_LAYER_2_IS_ETH_V_2              (BIT23)
++#define ETH_FRAME_TYPE_IP_V_4               (BIT24)
++#define ETH_FRAME_HEADER_OK                 (BIT25)
++#define ETH_RX_LAST_DESC                    (BIT26)
++#define ETH_RX_FIRST_DESC                   (BIT27)
++#define ETH_UNKNOWN_DESTINATION_ADDR        (BIT28)
++#define ETH_RX_ENABLE_INTERRUPT             (BIT29)
++#define ETH_LAYER_4_CHECKSUM_OK             (BIT30)
++
++/* Rx descriptors byte count */
++#define ETH_FRAME_FRAGMENTED                (BIT2)
++
++/* Tx descriptors command */
++#define ETH_LAYER_4_CHECKSUM_FIRST_DESC		(BIT10)
++#define ETH_FRAME_SET_TO_VLAN               (BIT15)
++#define ETH_TCP_FRAME                       (0	  )
++#define ETH_UDP_FRAME                       (BIT16)
++#define ETH_GEN_TCP_UDP_CHECKSUM            (BIT17)
++#define ETH_GEN_IP_V_4_CHECKSUM             (BIT18)
++#define ETH_ZERO_PADDING                    (BIT19)
++#define ETH_TX_LAST_DESC                    (BIT20)
++#define ETH_TX_FIRST_DESC                   (BIT21)
++#define ETH_GEN_CRC                         (BIT22)
++#define ETH_TX_ENABLE_INTERRUPT             (BIT23)
++#define ETH_AUTO_MODE                       (BIT30)
++
++/* typedefs */
++
++typedef enum _eth_func_ret_status {
++	ETH_OK,			/* Returned as expected.                    */
++	ETH_ERROR,		/* Fundamental error.                       */
++	ETH_RETRY,		/* Could not process request. Try later.    */
++	ETH_END_OF_JOB,		/* Ring has nothing to process.             */
++	ETH_QUEUE_FULL,		/* Ring resource error.                     */
++	ETH_QUEUE_LAST_RESOURCE	/* Ring resources about to exhaust.         */
++} ETH_FUNC_RET_STATUS;
++
++typedef enum _eth_target {
++	ETH_TARGET_DRAM,
++	ETH_TARGET_DEVICE,
++	ETH_TARGET_CBS,
++	ETH_TARGET_PCI0,
++	ETH_TARGET_PCI1
++} ETH_TARGET;
++
++/* These are for big-endian machines.  Little endian needs different
++ * definitions.
++ */
++#if defined(__BIG_ENDIAN)
++struct eth_rx_desc {
++	u16	byte_cnt;	/* Descriptor buffer byte count     */
++	u16	buf_size;	/* Buffer size                      */
++	u32	cmd_sts;	/* Descriptor command status        */
++	u32	next_desc_ptr;	/* Next descriptor pointer          */
++	u32	buf_ptr;	/* Descriptor buffer pointer        */
++};
++
++struct eth_tx_desc {
++	u16	byte_cnt;	/* buffer byte count */
++	u16	l4i_chk;	/* CPU provided TCP checksum */
++	u32	cmd_sts;	/* Command/status field */
++	u32	next_desc_ptr;	/* Pointer to next descriptor */
++	u32	buf_ptr;	/* pointer to buffer for this descriptor */
++};
++
++#elif defined(__LITTLE_ENDIAN)
++struct eth_rx_desc {
++	u32	cmd_sts;	/* Descriptor command status        */
++	u16	buf_size;	/* Buffer size                      */
++	u16	byte_cnt;	/* Descriptor buffer byte count     */
++	u32	buf_ptr;	/* Descriptor buffer pointer        */
++	u32	next_desc_ptr;	/* Next descriptor pointer          */
++};
++
++struct eth_tx_desc {
++	u32	cmd_sts;	/* Command/status field */
++	u16	l4i_chk;	/* CPU provided TCP checksum */
++	u16	byte_cnt;	/* buffer byte count */
++	u32	buf_ptr;	/* pointer to buffer for this descriptor */
++	u32	next_desc_ptr;	/* Pointer to next descriptor */
++};
++#else
++#error One of __BIG_ENDIAN or __LITTLE_ENDIAN must be defined
++#endif
++
++/* Unified struct for Rx and Tx operations. The user is not required to */
++/* be familier with neither Tx nor Rx descriptors.                       */
++struct pkt_info {
++	unsigned short	byte_cnt;	/* Descriptor buffer byte count     */
++	unsigned short	l4i_chk;	/* Tx CPU provided TCP Checksum     */
++	unsigned int	cmd_sts;	/* Descriptor command status        */
++	dma_addr_t	buf_ptr;	/* Descriptor buffer pointer        */
++	struct sk_buff	* return_info;	/* User resource return information */
++};
++
++
++/* Ethernet port specific infomation */
++
++struct mv64340_private {
++	int	port_num;		/* User Ethernet port number */
++	u8	port_mac_addr[6];	/* User defined port MAC address. */
++	u32	port_config;		/* User port configuration value */
++	u32	port_config_extend;	/* User port config extend value */
++	u32	port_sdma_config;	/* User port SDMA config value */
++	u32	port_serial_control;	/* User port serial control value */
++	u32	port_tx_queue_command;	/* Port active Tx queues summary */
++	u32	port_rx_queue_command;	/* Port active Rx queues summary */
++
++	int	rx_resource_err;	/* Rx ring resource error flag */
++	int	tx_resource_err;	/* Tx ring resource error flag */
++
++	/* Tx/Rx rings managment indexes fields. For driver use */
++
++	/* Next available and first returning Rx resource */
++	int rx_curr_desc_q, rx_used_desc_q;
++
++	/* Next available and first returning Tx resource */
++	int tx_curr_desc_q, tx_used_desc_q;
++#ifdef MV64340_CHECKSUM_OFFLOAD_TX
++        int tx_first_desc_q;
++#endif
++
++#ifdef MV64340_TX_FAST_REFILL
++	u32	tx_clean_threshold;
++#endif
++
++	volatile struct eth_rx_desc	* p_rx_desc_area;
++	dma_addr_t			rx_desc_dma;
++	unsigned int			rx_desc_area_size;
++	struct sk_buff			* rx_skb[MV64340_RX_QUEUE_SIZE];
++
++	volatile struct eth_tx_desc	* p_tx_desc_area;
++	dma_addr_t			tx_desc_dma;
++	unsigned int			tx_desc_area_size;
++	struct sk_buff			* tx_skb[MV64340_TX_QUEUE_SIZE];
++
++	struct work_struct		tx_timeout_task;
++
++	/*
++	 * Former struct mv64340_eth_priv members start here
++	 */
++	struct net_device_stats stats;
++	spinlock_t lock;
++	/* Size of Tx Ring per queue */
++	unsigned int tx_ring_size;
++	/* Ammont of SKBs outstanding on Tx queue */
++	unsigned int tx_ring_skbs;
++	/* Size of Rx Ring per queue */
++	unsigned int rx_ring_size;
++	/* Ammount of SKBs allocated to Rx Ring per queue */
++	unsigned int rx_ring_skbs;
++
++	/*
++	 * rx_task used to fill RX ring out of bottom half context 
++	 */
++	struct work_struct rx_task;
++
++	/* 
++	 * Used in case RX Ring is empty, which can be caused when 
++	 * system does not have resources (skb's) 
++	 */
++	struct timer_list timeout;
++	long rx_task_busy __attribute__ ((aligned(SMP_CACHE_BYTES)));
++	unsigned rx_timer_flag;
++
++	u32 rx_int_coal;
++	u32 tx_int_coal;
++};
++
++/* ethernet.h API list */
++
++/* Port operation control routines */
++static void eth_port_init(struct mv64340_private *mp);
++static void eth_port_reset(unsigned int eth_port_num);
++static int eth_port_start(struct mv64340_private *mp);
++
++static void ethernet_set_config_reg(unsigned int eth_port_num,
++				    unsigned int value);
++static unsigned int ethernet_get_config_reg(unsigned int eth_port_num);
++
++/* Port MAC address routines */
++static void eth_port_uc_addr_set(unsigned int eth_port_num,
++				 unsigned char *p_addr);
++
++/* PHY and MIB routines */
++static int ethernet_phy_reset(unsigned int eth_port_num);
++
++static int eth_port_write_smi_reg(unsigned int eth_port_num,
++				   unsigned int phy_reg,
++				   unsigned int value);
++
++static int eth_port_read_smi_reg(unsigned int eth_port_num,
++				  unsigned int phy_reg,
++				  unsigned int *value);
++
++static void eth_clear_mib_counters(unsigned int eth_port_num);
++
++/* Port data flow control routines */
++static ETH_FUNC_RET_STATUS eth_port_send(struct mv64340_private *mp,
++					 struct pkt_info * p_pkt_info);
++static ETH_FUNC_RET_STATUS eth_tx_return_desc(struct mv64340_private *mp,
++					      struct pkt_info * p_pkt_info);
++static ETH_FUNC_RET_STATUS eth_port_receive(struct mv64340_private *mp,
++					    struct pkt_info * p_pkt_info);
++static ETH_FUNC_RET_STATUS eth_rx_return_buff(struct mv64340_private *mp,
++					      struct pkt_info * p_pkt_info);
++
++#endif  /* __MV64340_ETH_H__ */

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/marvell-pegasos-2.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/marvell-pegasos-2.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/marvell-pegasos-2.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,1629 @@
+#! /bin/sh -e 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Add Pegasos2 support in mv64340_eth
+## DP: Patch author: Nicolas DET, Christoph Hewllwig
+## DP: Upstream status: not submitted, needs more work
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -urN kernel-source-2.6.8.orig/drivers/net/Kconfig kernel-source-2.6.8/drivers/net/Kconfig
+--- kernel-source-2.6.8.orig/drivers/net/Kconfig	2004-08-17 13:16:34.390779456 +0200
++++ kernel-source-2.6.8/drivers/net/Kconfig	2004-08-17 13:18:15.001484304 +0200
+@@ -2091,11 +2091,14 @@
+ 	  will be called tg3.  This is recommended.
+ 
+ config MV64340_ETH
+-	bool "MV-64340 Ethernet support"
+-	depends on MOMENCO_OCELOT_C || MOMENCO_JAGUAR_ATX
++	tristate "MV-64340 Ethernet support"
++	depends on MOMENCO_OCELOT_C || MOMENCO_JAGUAR_ATX || PPC_CHRP
+ 	help
+ 	  This driver supports the gigabit Ethernet on the Marvell MV64340
+-	  chipset which is used in the Momenco Ocelot C and Jaguar ATX.
++	  chipset which is used in the Momenco Ocelot C, Jaguar ATX and 
++	  Pegasos II.
++	  Note: The Pegasos II use the MV64361 but the GigaBit part is
++	  compatible with the MV6434x series.
+ 
+ config MV64340_ETH_0
+ 	bool "MV-64340 Port 0"
+diff -urN kernel-source-2.6.8.orig/drivers/net/mv64340_eth.c kernel-source-2.6.8/drivers/net/mv64340_eth.c
+--- kernel-source-2.6.8.orig/drivers/net/mv64340_eth.c	2004-08-17 13:16:34.557754072 +0200
++++ kernel-source-2.6.8/drivers/net/mv64340_eth.c	2004-08-17 13:21:41.171141752 +0200
+@@ -76,6 +76,8 @@
+ #endif
+ 
+ /* Static function declarations */
++static void eth_port_uc_addr_get(unsigned int PortNum,
++		                                 unsigned char *MacAddr);
+ static int mv64340_eth_real_open(struct net_device *);
+ static int mv64340_eth_real_stop(struct net_device *);
+ static int mv64340_eth_change_mtu(struct net_device *, int);
+@@ -85,6 +87,13 @@
+ static int mv64340_poll(struct net_device *dev, int *budget);
+ #endif
+ 
++#ifdef __PPC__
++// for PowerPC architecture (Pegasos II) we can for the moment put the cjip base addr here
++// this is the bus adress, it will be io_remap
++unsigned long mv64340_base = 0xf1000000;
++#endif
++
++
+ unsigned char prom_mac_addr_base[6];
+ unsigned long mv64340_sram_base;
+ 
+@@ -443,11 +452,51 @@
+ 			skb_put(skb, pkt_info.byte_cnt - 4);
+ 			skb->dev = dev;
+ 
+-			if (pkt_info.cmd_sts & ETH_LAYER_4_CHECKSUM_OK) {
+-				skb->ip_summed = CHECKSUM_UNNECESSARY;
+-				skb->csum = htons((pkt_info.cmd_sts
++			if (!(pkt_info.l4i_chk & BIT2)) // We only deal with non IP fragmented packet
++			{
++				u32 ALong = pkt_info.cmd_sts &
++					(ETH_FRAME_TYPE_IP_V_4      // -> has to be 1
++					 | ETH_FRAME_HEADER_OK      // -> has to be 1
++					 | ETH_LAYER_4_CHECKSUM_OK  // -> has to be 1
++					 | ETH_LAYER_2_IS_ETH_V_2   // -> has to be 1
++					 | ETH_OTHER_FRAME_TYPE);   // -> Has to be 0, 0-> TCP or UDP packet
++				
++				if (ALong == (ETH_LAYER_4_CHECKSUM_OK
++						 | ETH_FRAME_HEADER_OK
++						 | ETH_LAYER_2_IS_ETH_V_2
++						 | ETH_FRAME_TYPE_IP_V_4 )
++					)
++				{
++					/*
++					// The packet looks good, however we have to check something else
++					if ( pkt_info & ETH_UDP_FRAME_OVER_IP_V_4 )
++					{
++						// UDP Packet
++						struct udphdr *UDP_Header = 
++					}
++					else
++					{
++						// TCP Packet (because we checked previously for ETH_OTHER_FRAME_TYPE unset)
++					}
++					*/
++					{
++						skb->ip_summed = CHECKSUM_UNNECESSARY;
++
++						// Nico:
++						// The Linux stack should ignore csum if ip_summed == CHECKSUM_UNNECESSARY
++						// then we could remove this line
++						// Also, we should be able to use CHECKSUM_HW with the Marvell
++						// However, I've been unable to discover what csum the Linux stack expected exacly
++						skb->csum = htons((pkt_info.cmd_sts
+ 							& 0x0007fff8) >> 3);
++						goto good_frame;
++					}
++				}
+ 			}
++
++			skb->ip_summed = CHECKSUM_NONE;
++
++good_frame:
+ 			skb->protocol = eth_type_trans(skb, dev);
+ #ifdef MV64340_NAPI
+ 			netif_receive_skb(skb);
+@@ -488,6 +537,13 @@
+ 		MV_READ(MV64340_ETH_INTERRUPT_CAUSE_EXTEND_REG(port_num)) &
+ 		INT_CAUSE_UNMASK_ALL_EXT;
+ 
++	/*
++	 * If no real interrupt occured, exit.
++	 * This can happen when using gigE interrupt coalescing mechanism or shared interrupt
++	 */
++	if ((eth_int_cause == 0x0) && (eth_int_cause_ext == 0x0))
++		return IRQ_NONE;
++
+ #ifdef MV64340_NAPI
+ 	if (!(eth_int_cause & 0x0007fffd)) {
+ 	/* Dont ack the Rx interrupt */
+@@ -560,13 +616,6 @@
+ 		}
+ 	}
+ 
+-	/*
+-	 * If no real interrupt occured, exit.
+-	 * This can happen when using gigE interrupt coalescing mechanism.
+-	 */
+-	if ((eth_int_cause == 0x0) && (eth_int_cause_ext == 0x0))
+-		return IRQ_NONE;
+-
+ 	return IRQ_HANDLED;
+ }
+ 
+@@ -663,10 +712,13 @@
+ 	unsigned int port_num = mp->port_num;
+ 	int err = err;
+ 
+-	spin_lock_irq(&mp->lock);
+-
++#if 0
+ 	err = request_irq(dev->irq, mv64340_eth_int_handler,
+ 	                  SA_INTERRUPT | SA_SAMPLE_RANDOM, dev->name, dev);
++#else
++	err = request_irq(dev->irq, &mv64340_eth_int_handler, SA_SHIRQ | SA_SAMPLE_RANDOM,
++			dev->name, dev);
++#endif
+ 
+ 	if (err) {
+ 		printk(KERN_ERR "Can not assign IRQ number to MV64340_eth%d\n",
+@@ -675,6 +727,8 @@
+ 		goto out;
+ 	}
+ 
++	spin_lock_irq(&mp->lock);
++
+ 	if (mv64340_eth_real_open(dev)) {
+ 		printk("%s: Error opening interface\n", dev->name);
+ 		err = -EBUSY;
+@@ -686,11 +740,10 @@
+ 	return 0;
+ 
+ out_free:
++	spin_unlock_irq(&mp->lock);
+ 	free_irq(dev->irq, dev);
+ 
+ out:
+-	spin_unlock_irq(&mp->lock);
+-
+ 	return err;
+ }
+ 
+@@ -752,9 +805,7 @@
+ 		p_rx_desc[i].byte_cnt = 0x0000;
+ 		p_rx_desc[i].cmd_sts =
+ 			ETH_BUFFER_OWNED_BY_DMA | ETH_RX_ENABLE_INTERRUPT;
+-		p_rx_desc[i].next_desc_ptr =
+-			(struct eth_rx_desc *) mp->rx_desc_dma +
+-				(i + 1) % rx_desc_num;
++		p_rx_desc[i].next_desc_ptr = (u32) ( (struct eth_rx_desc *)  mp->rx_desc_dma + (i + 1) % rx_desc_num);
+ 		p_rx_desc[i].buf_ptr = buffer_addr;
+ 
+ 		mp->rx_skb[i] = NULL;
+@@ -818,9 +869,7 @@
+ 		p_tx_desc[i].byte_cnt	= 0x0000;
+ 		p_tx_desc[i].l4i_chk	= 0x0000;
+ 		p_tx_desc[i].cmd_sts	= 0x00000000;
+-		p_tx_desc[i].next_desc_ptr =
+-			(struct eth_tx_desc *) mp->tx_desc_dma +
+-			(i + 1) % tx_desc_num;
++		p_tx_desc[i].next_desc_ptr = (u32) ( ((struct eth_tx_desc *) mp->tx_desc_dma) + (i + 1) % tx_desc_num);
+ 		p_tx_desc[i].buf_ptr	= 0x00000000;
+ 		mp->tx_skb[i]		= NULL;
+ 	}
+@@ -917,7 +966,7 @@
+ 				    mp->tx_desc_dma);
+ 		return -ENOMEM;
+ 	}
+-	memset(mp->p_rx_desc_area, 0, size);
++	memset( (void *) mp->p_rx_desc_area, 0, size);
+ 
+ 	if (!(ether_init_rx_desc_ring(mp, 0)))
+ 		panic("%s: Error initializing RX Ring", dev->name);
+@@ -1211,11 +1260,20 @@
+                                         skb_headlen(skb), PCI_DMA_TODEVICE);
+                 pkt_info.return_info = 0;
+                 ipheader = skb->nh.iph->ihl << 11;
++
++		// Nico note:
++		// Liunx always generate the IP checksum (I guess because it's very fast to do)
++		// so we could remove ETH_GEN_IP_V_4_CHECKSUM here
+                 pkt_info.cmd_sts = ETH_TX_FIRST_DESC | 
+ 					ETH_GEN_TCP_UDP_CHECKSUM |
+ 					ETH_GEN_IP_V_4_CHECKSUM |
+                                         ipheader;
+ 		/* CPU already calculated pseudo header checksum. So, use it */
++		// Nico:
++		// A little warning here:
++		// for the first buffer of a packet, l4i_chk must be 0x0000
++		// the behaviour of the chip could be unexpected if the Linux stack
++		// gives us a non zero csum and we are in the first buffer
+                 pkt_info.l4i_chk = skb->h.th->check;
+                 status = eth_port_send(mp, &pkt_info);
+ 		if (status != ETH_OK) {
+@@ -1316,7 +1374,7 @@
+  * Input : number of port to initialize
+  * Output : -ENONMEM if failed , 0 if success
+  */
+-static int mv64340_eth_init(int port_num)
++static struct net_device *mv64340_eth_init(int port_num)
+ {
+ 	struct mv64340_private *mp;
+ 	struct net_device *dev;
+@@ -1324,11 +1382,15 @@
+ 
+ 	dev = alloc_etherdev(sizeof(struct mv64340_private));
+ 	if (!dev)
+-		return -ENOMEM;
++		return NULL;
+ 
+ 	mp = netdev_priv(dev);
+ 
++#ifdef __PPC__
++	dev->irq = 9;
++#else
+ 	dev->irq = ETH_PORT0_IRQ_NUM + port_num;
++#endif
+ 
+ 	dev->open = mv64340_eth_open;
+ 	dev->stop = mv64340_eth_stop;
+@@ -1369,9 +1431,13 @@
+ 
+ 	spin_lock_init(&mp->lock);
+ 
++#if defined(__powerpc__)
++	eth_port_uc_addr_get(port_num, dev->dev_addr); 
++#else
+ 	/* set MAC addresses */
+ 	memcpy(dev->dev_addr, prom_mac_addr_base, 6);
+ 	dev->dev_addr[5] += port_num;
++#endif
+ 
+ 	err = register_netdev(dev);
+ 	if (err)
+@@ -1395,14 +1461,27 @@
+ 	printk("RX NAPI Enabled \n");
+ #endif
+ 
+-	return 0;
++	return dev;
+ 
+ out_free_dev:
+ 	free_netdev(dev);
+ 
+-	return err;
++	return NULL;
+ }
+ 
++static void mv64340_eth_remove(struct net_device *dev)
++{
++	unregister_netdev(dev);
++	flush_scheduled_work();
++	free_netdev(dev);
++}
++
++// Nico
++// Better to set that to NULL
++static struct net_device *mv64340_dev0 = NULL;
++static struct net_device *mv64340_dev1 = NULL;
++static struct net_device *mv64340_dev2 = NULL;
++
+ /*
+  * mv64340_init_module
+  *
+@@ -1415,20 +1494,30 @@
+ static int __init mv64340_init_module(void)
+ {
+ 	printk(KERN_NOTICE "MV-64340 10/100/1000 Ethernet Driver\n");
++
++#ifdef __PPC__
++	// First ioremap the Marvell base addr
++	mv64340_base = (unsigned long) ioremap( mv64340_base, 64*1024);
++	printk(KERN_NOTICE "MV-64340: Chip base remaped at 0x%8.8x\n", (int) mv64340_base);
++#endif
++	
+ #ifdef CONFIG_MV64340_ETH_0
+-	if (mv64340_eth_init(0)) {
++	mv64340_dev0 = mv64340_eth_init(0);
++	if (!mv64340_dev0) {
+ 		printk(KERN_ERR
+ 		       "Error registering MV-64360 ethernet port 0\n");
+ 	}
+ #endif
+ #ifdef CONFIG_MV64340_ETH_1
+-	if (mv64340_eth_init(1)) {
++	mv64340_dev1 = mv64340_eth_init(1);
++	if (!mv64340_dev1) {
+ 		printk(KERN_ERR
+ 		       "Error registering MV-64360 ethernet port 1\n");
+ 	}
+ #endif
+ #ifdef CONFIG_MV64340_ETH_2
+-	if (mv64340_eth_init(2)) {
++	mv64340_dev2 = mv64340_eth_init(2);
++	if (!mv64340_dev2) {
+ 		printk(KERN_ERR
+ 		       "Error registering MV-64360 ethernet port 2\n");
+ 	}
+@@ -1445,9 +1534,15 @@
+  *
+  * Output : N/A
+  */
+-static void __init mv64340_cleanup_module(void)
++static void __exit mv64340_cleanup_module(void)
+ {
+-	/* Nothing to do here ! it's not a removable module */
++	printk(KERN_NOTICE "MV-64340: Bye bye cruel world!\n");
++	if (mv64340_dev2)
++		mv64340_eth_remove(mv64340_dev2);
++	if (mv64340_dev1)
++		mv64340_eth_remove(mv64340_dev1);
++	if (mv64340_dev0)
++		mv64340_eth_remove(mv64340_dev0);
+ }
+ 
+ module_init(mv64340_init_module);
+@@ -1758,6 +1853,10 @@
+ 	MV_WRITE(MV64340_ETH_RECEIVE_QUEUE_COMMAND_REG(eth_port_num),
+ 		 mp->port_rx_queue_command);
+ 
++	// Nico
++	// Set the minimun RX frame to 40 in order to accept, short frame :-)
++	MV_WRITE(MV64340_ETH_RX_MINIMAL_FRAME_SIZE_REG(eth_port_num), 40);
++
+ 	/* Check if link is up */
+ 	eth_port_read_smi_reg(eth_port_num, 1, &phy_reg_data);
+ 
+@@ -1804,6 +1903,23 @@
+ 	return;
+ }
+ 
++static void eth_port_uc_addr_get(unsigned int PortNum,
++				 unsigned char *MacAddr)
++{
++        u32 MacLow;
++        u32 MacHigh;
++
++        MacLow = MV_READ(MV64340_ETH_MAC_ADDR_LOW(PortNum));
++        MacHigh = MV_READ(MV64340_ETH_MAC_ADDR_HIGH(PortNum));
++
++        MacAddr[5] = (MacLow) & 0xff;
++        MacAddr[4] = (MacLow >> 8) & 0xff;
++        MacAddr[3] = (MacHigh) & 0xff;
++        MacAddr[2] = (MacHigh >> 8) & 0xff;
++        MacAddr[1] = (MacHigh >> 16) & 0xff;
++        MacAddr[0] = (MacHigh >> 24) & 0xff;
++}
++
+ /*
+  * eth_port_uc_addr - This function Set the port unicast address table
+  *
+@@ -2016,10 +2132,24 @@
+ 	unsigned int time_out = 50;
+ 	unsigned int phy_reg_data;
+ 
+-	/* Reset the PHY */
+-	eth_port_read_smi_reg(eth_port_num, 0, &phy_reg_data);
+-	phy_reg_data |= 0x8000;	/* Set bit 15 to reset the PHY */
+-	eth_port_write_smi_reg(eth_port_num, 0, phy_reg_data);
++   	/* change to combined led mode LINK=green 100/1000=dual led*/
++   	eth_port_read_smi_reg(eth_port_num, 24, &phy_reg_data);
++   	phy_reg_data&=~0x0018;
++   	phy_reg_data|= 0x0010;
++   	eth_port_write_smi_reg(eth_port_num,24, phy_reg_data);
++   
++   	/* enable autocrossover in all modes */
++   	eth_port_read_smi_reg(eth_port_num, 16, &phy_reg_data);
++   	phy_reg_data&=~0x0060;
++   	phy_reg_data|= 0x0060;
++   	eth_port_write_smi_reg(eth_port_num,16, phy_reg_data);
++
++   	/* Reset the PHY and update reg0*/
++   	eth_port_read_smi_reg(eth_port_num, 0, &phy_reg_data);
++   	phy_reg_data &=~0x7fff;   /* clear unwanted*/
++   	phy_reg_data |= 0x1000;   /* enable auto negotiation*/
++   	phy_reg_data |= 0x8000;   /* Set bit 15 to reset the PHY */
++   	eth_port_write_smi_reg(eth_port_num, 0, phy_reg_data);
+ 
+ 	/* Poll on the PHY LINK */
+ 	do {
+@@ -2317,6 +2447,9 @@
+ 		return ETH_ERROR;
+ 
+ 	tx_next_desc = (tx_desc_curr + 1) % MV64340_TX_QUEUE_SIZE;
++
++	// Nico: Warning ETH_ZERO_PADDING is only valid if the L flag is set
++	// the behaviour of the chip could be unexpected in that case
+ 	command_status = p_pkt_info->cmd_sts | ETH_ZERO_PADDING | ETH_GEN_CRC;
+ 
+ 	if (command_status & ETH_TX_FIRST_DESC) {
+@@ -2329,9 +2462,7 @@
+                 first_descriptor->cmd_sts = command_status;
+                 first_descriptor->byte_cnt = p_pkt_info->byte_cnt;
+                 first_descriptor->buf_ptr = p_pkt_info->buf_ptr;
+-                first_descriptor->next_desc_ptr =
+-			(struct eth_tx_desc *) mp->tx_desc_dma + tx_next_desc;
+-		wmb();
++                first_descriptor->next_desc_ptr = (u32) mp->tx_desc_dma + tx_next_desc;
+         } else {
+                 tx_first_desc = mp->tx_first_desc_q;
+                 first_descriptor = &mp->p_tx_desc_area[tx_first_desc];
+@@ -2343,11 +2474,12 @@
+                         current_descriptor->next_desc_ptr = 0x00000000;
+                 else {
+                         command_status |= ETH_BUFFER_OWNED_BY_DMA;
+-                        current_descriptor->next_desc_ptr =
+-			  (struct eth_tx_desc *) mp->tx_desc_dma + tx_next_desc;
++                        current_descriptor->next_desc_ptr = (u32) mp->tx_desc_dma + tx_next_desc;
+                 }
+         }
+ 
++	// Note Nico
++	// If it's 64 bit aligned then it can be < 8 bytes
+         if (p_pkt_info->byte_cnt < 8) {
+                 printk(" < 8 problem \n");
+                 return ETH_ERROR;
+@@ -2360,8 +2492,6 @@
+ 
+         mp->tx_skb[tx_desc_curr] = (struct sk_buff*) p_pkt_info->return_info;
+ 
+-        wmb();
+-
+         /* Set last desc with DMA ownership and interrupt enable. */
+         if (command_status & ETH_TX_LAST_DESC) {
+                 current_descriptor->cmd_sts = command_status |
+@@ -2370,14 +2500,14 @@
+ 
+ 		if (!(command_status & ETH_TX_FIRST_DESC))
+ 			first_descriptor->cmd_sts |= ETH_BUFFER_OWNED_BY_DMA;
+-		wmb();
+-
+ 		first_chip_ptr = MV_READ(MV64340_ETH_CURRENT_SERVED_TX_DESC_PTR(mp->port_num));
+ 
+ 		/* Apply send command */
+ 		if (first_chip_ptr == 0x00000000)
+ 			MV_WRITE(MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_0(mp->port_num), (struct eth_tx_desc *) mp->tx_desc_dma + tx_first_desc);
+ 
++		mb();
++
+                 ETH_ENABLE_TX_QUEUE(mp->port_num);
+ 
+ 		/*
+@@ -2433,6 +2563,10 @@
+ 	 * 64-bit boundary. We use the memory allocated for Tx descriptor.
+ 	 * This memory is located in TX_BUF_OFFSET_IN_DESC offset within the
+ 	 * Tx descriptor. */
++
++// Note Nico
++// Packet minimal size is 32 bytes, so we should check for <= 32 bytes here
++// the 8 bytes limitation is only when dealing with fragmented packet (on several buffer descriptors)
+ 	if (p_pkt_info->byte_cnt <= 8) {
+ 		printk(KERN_ERR
+ 		       "You have failed in the < 8 bytes errata - fixme\n");
+@@ -2442,12 +2576,12 @@
+ 	current_descriptor->byte_cnt = p_pkt_info->byte_cnt;
+ 	mp->tx_skb[tx_desc_curr] = (struct sk_buff *) p_pkt_info->return_info;
+ 
+-	mb();
+-
+ 	/* Set last desc with DMA ownership and interrupt enable. */
+ 	current_descriptor->cmd_sts = command_status |
+ 			ETH_BUFFER_OWNED_BY_DMA | ETH_TX_ENABLE_INTERRUPT;
+ 
++	mb();
++
+ 	/* Apply send command */
+ 	ETH_ENABLE_TX_QUEUE(mp->port_num);
+ 
+@@ -2586,6 +2720,8 @@
+ 	/* The following parameters are used to save readings from memory */
+ 	command_status = p_rx_desc->cmd_sts;
+ 
++	rmb();
++
+ 	/* Nothing to receive... */
+ 	if (command_status & (ETH_BUFFER_OWNED_BY_DMA))
+ 		return ETH_END_OF_JOB;
+diff -urN kernel-source-2.6.8.orig/drivers/net/mv64340_eth.h kernel-source-2.6.8/drivers/net/mv64340_eth.h
+--- kernel-source-2.6.8.orig/drivers/net/mv64340_eth.h	2004-08-17 13:16:34.628743280 +0200
++++ kernel-source-2.6.8/drivers/net/mv64340_eth.h	2004-08-17 13:18:15.135463936 +0200
+@@ -51,7 +51,7 @@
+ #define ETH_PORT2_IRQ_NUM ETH_PORT0_IRQ_NUM+2	/* main high register, bit1 */
+ 
+ /* Checksum offload for Tx works */
+-#define  MV64340_CHECKSUM_OFFLOAD_TX
++//#define  MV64340_CHECKSUM_OFFLOAD_TX
+ #define	 MV64340_NAPI
+ #define	 MV64340_TX_FAST_REFILL
+ #undef	 MV64340_COAL
+@@ -114,10 +114,18 @@
+ 
+ 
+ /* Default sdma control value */
++#ifdef __PPC__
++#define PORT_SDMA_CONFIG_VALUE			\
++			 ETH_RX_BURST_SIZE_4_64BIT 	|	\
++			 GT_ETH_IPG_INT_RX(0) 		|	\
++			 ETH_TX_BURST_SIZE_4_64BIT
++#else
+ #define PORT_SDMA_CONFIG_VALUE			\
+ 			 ETH_RX_BURST_SIZE_16_64BIT 	|	\
+ 			 GT_ETH_IPG_INT_RX(0) 		|	\
+ 			 ETH_TX_BURST_SIZE_16_64BIT;
++#endif
++
+ 
+ #define GT_ETH_IPG_INT_RX(value)                \
+             ((value & 0x3fff) << 8)
+@@ -417,6 +425,10 @@
+ #define ETH_TX_ENABLE_INTERRUPT             (BIT23)
+ #define ETH_AUTO_MODE                       (BIT30)
+ 
++
++// Useful def
++#define MV64340_ETH_RX_MINIMAL_FRAME_SIZE_REG(port)                (0x247c + (port<<10))
++
+ /* typedefs */
+ 
+ typedef enum _eth_func_ret_status {
+diff -urN kernel-source-2.6.8.orig/include/asm-ppc/mv64340.h kernel-source-2.6.8/include/asm-ppc/mv64340.h
+--- kernel-source-2.6.8.orig/include/asm-ppc/mv64340.h	1970-01-01 01:00:00.000000000 +0100
++++ kernel-source-2.6.8/include/asm-ppc/mv64340.h	2004-08-17 13:18:15.263444480 +0200
+@@ -0,0 +1,1070 @@
++/*
++ * mv64340.h - MV-64340 Internal registers definition file.
++ *
++ * Copyright 2002 Momentum Computer, Inc.
++ * 	Author: Matthew Dharm <mdharm at momenco.com>
++ * Copyright 2002 GALILEO TECHNOLOGY, LTD. 
++ *
++ * 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.
++ */
++#ifndef __ASM_MV64340_H
++#define __ASM_MV64340_H
++
++#include <asm/byteorder.h>
++
++/****************************************/
++/* Processor Address Space              */
++/****************************************/
++
++/* DDR SDRAM BAR and size registers */
++
++#define MV64340_CS_0_BASE_ADDR                                      0x008
++#define MV64340_CS_0_SIZE                                           0x010
++#define MV64340_CS_1_BASE_ADDR                                      0x208
++#define MV64340_CS_1_SIZE                                           0x210
++#define MV64340_CS_2_BASE_ADDR                                      0x018
++#define MV64340_CS_2_SIZE                                           0x020
++#define MV64340_CS_3_BASE_ADDR                                      0x218
++#define MV64340_CS_3_SIZE                                           0x220
++
++/* Devices BAR and size registers */
++
++#define MV64340_DEV_CS0_BASE_ADDR                                   0x028
++#define MV64340_DEV_CS0_SIZE                                        0x030
++#define MV64340_DEV_CS1_BASE_ADDR                                   0x228
++#define MV64340_DEV_CS1_SIZE                                        0x230
++#define MV64340_DEV_CS2_BASE_ADDR                                   0x248
++#define MV64340_DEV_CS2_SIZE                                        0x250
++#define MV64340_DEV_CS3_BASE_ADDR                                   0x038
++#define MV64340_DEV_CS3_SIZE                                        0x040
++#define MV64340_BOOTCS_BASE_ADDR                                    0x238
++#define MV64340_BOOTCS_SIZE                                         0x240
++
++/* PCI 0 BAR and size registers */
++
++#define MV64340_PCI_0_IO_BASE_ADDR                                  0x048
++#define MV64340_PCI_0_IO_SIZE                                       0x050
++#define MV64340_PCI_0_MEMORY0_BASE_ADDR                             0x058
++#define MV64340_PCI_0_MEMORY0_SIZE                                  0x060
++#define MV64340_PCI_0_MEMORY1_BASE_ADDR                             0x080
++#define MV64340_PCI_0_MEMORY1_SIZE                                  0x088
++#define MV64340_PCI_0_MEMORY2_BASE_ADDR                             0x258
++#define MV64340_PCI_0_MEMORY2_SIZE                                  0x260
++#define MV64340_PCI_0_MEMORY3_BASE_ADDR                             0x280
++#define MV64340_PCI_0_MEMORY3_SIZE                                  0x288
++
++/* PCI 1 BAR and size registers */
++#define MV64340_PCI_1_IO_BASE_ADDR                                  0x090
++#define MV64340_PCI_1_IO_SIZE                                       0x098
++#define MV64340_PCI_1_MEMORY0_BASE_ADDR                             0x0a0
++#define MV64340_PCI_1_MEMORY0_SIZE                                  0x0a8
++#define MV64340_PCI_1_MEMORY1_BASE_ADDR                             0x0b0
++#define MV64340_PCI_1_MEMORY1_SIZE                                  0x0b8
++#define MV64340_PCI_1_MEMORY2_BASE_ADDR                             0x2a0
++#define MV64340_PCI_1_MEMORY2_SIZE                                  0x2a8
++#define MV64340_PCI_1_MEMORY3_BASE_ADDR                             0x2b0
++#define MV64340_PCI_1_MEMORY3_SIZE                                  0x2b8
++
++/* SRAM base address */
++#define MV64340_INTEGRATED_SRAM_BASE_ADDR                           0x268
++
++/* internal registers space base address */
++#define MV64340_INTERNAL_SPACE_BASE_ADDR                            0x068
++
++/* Enables the CS , DEV_CS , PCI 0 and PCI 1 
++   windows above */
++#define MV64340_BASE_ADDR_ENABLE                                    0x278
++
++/****************************************/
++/* PCI remap registers                  */
++/****************************************/
++      /* PCI 0 */
++#define MV64340_PCI_0_IO_ADDR_REMAP                                 0x0f0
++#define MV64340_PCI_0_MEMORY0_LOW_ADDR_REMAP                        0x0f8
++#define MV64340_PCI_0_MEMORY0_HIGH_ADDR_REMAP                       0x320
++#define MV64340_PCI_0_MEMORY1_LOW_ADDR_REMAP                        0x100
++#define MV64340_PCI_0_MEMORY1_HIGH_ADDR_REMAP                       0x328
++#define MV64340_PCI_0_MEMORY2_LOW_ADDR_REMAP                        0x2f8
++#define MV64340_PCI_0_MEMORY2_HIGH_ADDR_REMAP                       0x330
++#define MV64340_PCI_0_MEMORY3_LOW_ADDR_REMAP                        0x300
++#define MV64340_PCI_0_MEMORY3_HIGH_ADDR_REMAP                       0x338
++      /* PCI 1 */
++#define MV64340_PCI_1_IO_ADDR_REMAP                                 0x108
++#define MV64340_PCI_1_MEMORY0_LOW_ADDR_REMAP                        0x110
++#define MV64340_PCI_1_MEMORY0_HIGH_ADDR_REMAP                       0x340
++#define MV64340_PCI_1_MEMORY1_LOW_ADDR_REMAP                        0x118
++#define MV64340_PCI_1_MEMORY1_HIGH_ADDR_REMAP                       0x348
++#define MV64340_PCI_1_MEMORY2_LOW_ADDR_REMAP                        0x310
++#define MV64340_PCI_1_MEMORY2_HIGH_ADDR_REMAP                       0x350
++#define MV64340_PCI_1_MEMORY3_LOW_ADDR_REMAP                        0x318
++#define MV64340_PCI_1_MEMORY3_HIGH_ADDR_REMAP                       0x358
++ 
++#define MV64340_CPU_PCI_0_HEADERS_RETARGET_CONTROL                  0x3b0
++#define MV64340_CPU_PCI_0_HEADERS_RETARGET_BASE                     0x3b8
++#define MV64340_CPU_PCI_1_HEADERS_RETARGET_CONTROL                  0x3c0
++#define MV64340_CPU_PCI_1_HEADERS_RETARGET_BASE                     0x3c8
++#define MV64340_CPU_GE_HEADERS_RETARGET_CONTROL                     0x3d0
++#define MV64340_CPU_GE_HEADERS_RETARGET_BASE                        0x3d8
++#define MV64340_CPU_IDMA_HEADERS_RETARGET_CONTROL                   0x3e0
++#define MV64340_CPU_IDMA_HEADERS_RETARGET_BASE                      0x3e8
++
++/****************************************/
++/*         CPU Control Registers        */
++/****************************************/
++
++#define MV64340_CPU_CONFIG                                          0x000
++#define MV64340_CPU_MODE                                            0x120
++#define MV64340_CPU_MASTER_CONTROL                                  0x160
++#define MV64340_CPU_CROSS_BAR_CONTROL_LOW                           0x150
++#define MV64340_CPU_CROSS_BAR_CONTROL_HIGH                          0x158
++#define MV64340_CPU_CROSS_BAR_TIMEOUT                               0x168
++
++/****************************************/
++/* SMP RegisterS                        */
++/****************************************/
++
++#define MV64340_SMP_WHO_AM_I                                        0x200
++#define MV64340_SMP_CPU0_DOORBELL                                   0x214
++#define MV64340_SMP_CPU0_DOORBELL_CLEAR                             0x21C
++#define MV64340_SMP_CPU1_DOORBELL                                   0x224
++#define MV64340_SMP_CPU1_DOORBELL_CLEAR                             0x22C
++#define MV64340_SMP_CPU0_DOORBELL_MASK                              0x234
++#define MV64340_SMP_CPU1_DOORBELL_MASK                              0x23C
++#define MV64340_SMP_SEMAPHOR0                                       0x244
++#define MV64340_SMP_SEMAPHOR1                                       0x24c
++#define MV64340_SMP_SEMAPHOR2                                       0x254
++#define MV64340_SMP_SEMAPHOR3                                       0x25c
++#define MV64340_SMP_SEMAPHOR4                                       0x264
++#define MV64340_SMP_SEMAPHOR5                                       0x26c
++#define MV64340_SMP_SEMAPHOR6                                       0x274
++#define MV64340_SMP_SEMAPHOR7                                       0x27c
++
++/****************************************/
++/*  CPU Sync Barrier Register           */
++/****************************************/
++
++#define MV64340_CPU_0_SYNC_BARRIER_TRIGGER                          0x0c0
++#define MV64340_CPU_0_SYNC_BARRIER_VIRTUAL                          0x0c8
++#define MV64340_CPU_1_SYNC_BARRIER_TRIGGER                          0x0d0
++#define MV64340_CPU_1_SYNC_BARRIER_VIRTUAL                          0x0d8
++
++/****************************************/
++/* CPU Access Protect                   */
++/****************************************/
++
++#define MV64340_CPU_PROTECT_WINDOW_0_BASE_ADDR                      0x180
++#define MV64340_CPU_PROTECT_WINDOW_0_SIZE                           0x188
++#define MV64340_CPU_PROTECT_WINDOW_1_BASE_ADDR                      0x190
++#define MV64340_CPU_PROTECT_WINDOW_1_SIZE                           0x198
++#define MV64340_CPU_PROTECT_WINDOW_2_BASE_ADDR                      0x1a0
++#define MV64340_CPU_PROTECT_WINDOW_2_SIZE                           0x1a8
++#define MV64340_CPU_PROTECT_WINDOW_3_BASE_ADDR                      0x1b0
++#define MV64340_CPU_PROTECT_WINDOW_3_SIZE                           0x1b8
++
++
++/****************************************/
++/*          CPU Error Report            */
++/****************************************/
++
++#define MV64340_CPU_ERROR_ADDR_LOW                                  0x070
++#define MV64340_CPU_ERROR_ADDR_HIGH                                 0x078
++#define MV64340_CPU_ERROR_DATA_LOW                                  0x128
++#define MV64340_CPU_ERROR_DATA_HIGH                                 0x130
++#define MV64340_CPU_ERROR_PARITY                                    0x138
++#define MV64340_CPU_ERROR_CAUSE                                     0x140
++#define MV64340_CPU_ERROR_MASK                                      0x148
++
++/****************************************/
++/*      CPU Interface Debug Registers 	*/
++/****************************************/
++
++#define MV64340_PUNIT_SLAVE_DEBUG_LOW                               0x360
++#define MV64340_PUNIT_SLAVE_DEBUG_HIGH                              0x368
++#define MV64340_PUNIT_MASTER_DEBUG_LOW                              0x370
++#define MV64340_PUNIT_MASTER_DEBUG_HIGH                             0x378
++#define MV64340_PUNIT_MMASK                                         0x3e4
++
++/****************************************/
++/*  Integrated SRAM Registers           */
++/****************************************/
++
++#define MV64340_SRAM_CONFIG                                         0x380
++#define MV64340_SRAM_TEST_MODE                                      0X3F4
++#define MV64340_SRAM_ERROR_CAUSE                                    0x388
++#define MV64340_SRAM_ERROR_ADDR                                     0x390
++#define MV64340_SRAM_ERROR_ADDR_HIGH                                0X3F8
++#define MV64340_SRAM_ERROR_DATA_LOW                                 0x398
++#define MV64340_SRAM_ERROR_DATA_HIGH                                0x3a0
++#define MV64340_SRAM_ERROR_DATA_PARITY                              0x3a8
++
++/****************************************/
++/* SDRAM Configuration                  */
++/****************************************/
++
++#define MV64340_SDRAM_CONFIG                                        0x1400
++#define MV64340_D_UNIT_CONTROL_LOW                                  0x1404
++#define MV64340_D_UNIT_CONTROL_HIGH                                 0x1424
++#define MV64340_SDRAM_TIMING_CONTROL_LOW                            0x1408
++#define MV64340_SDRAM_TIMING_CONTROL_HIGH                           0x140c
++#define MV64340_SDRAM_ADDR_CONTROL                                  0x1410
++#define MV64340_SDRAM_OPEN_PAGES_CONTROL                            0x1414
++#define MV64340_SDRAM_OPERATION                                     0x1418
++#define MV64340_SDRAM_MODE                                          0x141c
++#define MV64340_EXTENDED_DRAM_MODE                                  0x1420
++#define MV64340_SDRAM_CROSS_BAR_CONTROL_LOW                         0x1430
++#define MV64340_SDRAM_CROSS_BAR_CONTROL_HIGH                        0x1434
++#define MV64340_SDRAM_CROSS_BAR_TIMEOUT                             0x1438
++#define MV64340_SDRAM_ADDR_CTRL_PADS_CALIBRATION                    0x14c0
++#define MV64340_SDRAM_DATA_PADS_CALIBRATION                         0x14c4
++
++/****************************************/
++/* SDRAM Error Report                   */
++/****************************************/
++
++#define MV64340_SDRAM_ERROR_DATA_LOW                                0x1444
++#define MV64340_SDRAM_ERROR_DATA_HIGH                               0x1440
++#define MV64340_SDRAM_ERROR_ADDR                                    0x1450
++#define MV64340_SDRAM_RECEIVED_ECC                                  0x1448
++#define MV64340_SDRAM_CALCULATED_ECC                                0x144c
++#define MV64340_SDRAM_ECC_CONTROL                                   0x1454
++#define MV64340_SDRAM_ECC_ERROR_COUNTER                             0x1458
++
++/******************************************/
++/*  Controlled Delay Line (CDL) Registers */
++/******************************************/
++
++#define MV64340_DFCDL_CONFIG0                                       0x1480
++#define MV64340_DFCDL_CONFIG1                                       0x1484
++#define MV64340_DLL_WRITE                                           0x1488
++#define MV64340_DLL_READ                                            0x148c
++#define MV64340_SRAM_ADDR                                           0x1490
++#define MV64340_SRAM_DATA0                                          0x1494
++#define MV64340_SRAM_DATA1                                          0x1498
++#define MV64340_SRAM_DATA2                                          0x149c
++#define MV64340_DFCL_PROBE                                          0x14a0
++
++/******************************************/
++/*   Debug Registers                      */
++/******************************************/
++
++#define MV64340_DUNIT_DEBUG_LOW                                     0x1460
++#define MV64340_DUNIT_DEBUG_HIGH                                    0x1464
++#define MV64340_DUNIT_MMASK                                         0X1b40
++
++/****************************************/
++/* Device Parameters			*/
++/****************************************/
++
++#define MV64340_DEVICE_BANK0_PARAMETERS				    0x45c
++#define MV64340_DEVICE_BANK1_PARAMETERS				    0x460
++#define MV64340_DEVICE_BANK2_PARAMETERS				    0x464
++#define MV64340_DEVICE_BANK3_PARAMETERS				    0x468
++#define MV64340_DEVICE_BOOT_BANK_PARAMETERS			    0x46c
++#define MV64340_DEVICE_INTERFACE_CONTROL                            0x4c0
++#define MV64340_DEVICE_INTERFACE_CROSS_BAR_CONTROL_LOW              0x4c8
++#define MV64340_DEVICE_INTERFACE_CROSS_BAR_CONTROL_HIGH             0x4cc
++#define MV64340_DEVICE_INTERFACE_CROSS_BAR_TIMEOUT                  0x4c4
++
++/****************************************/
++/* Device interrupt registers		*/
++/****************************************/
++
++#define MV64340_DEVICE_INTERRUPT_CAUSE				    0x4d0
++#define MV64340_DEVICE_INTERRUPT_MASK				    0x4d4
++#define MV64340_DEVICE_ERROR_ADDR				    0x4d8
++#define MV64340_DEVICE_ERROR_DATA   				    0x4dc
++#define MV64340_DEVICE_ERROR_PARITY     			    0x4e0
++
++/****************************************/
++/* Device debug registers   		*/
++/****************************************/
++
++#define MV64340_DEVICE_DEBUG_LOW     				    0x4e4
++#define MV64340_DEVICE_DEBUG_HIGH     				    0x4e8
++#define MV64340_RUNIT_MMASK                                         0x4f0
++
++/****************************************/
++/* PCI Slave Address Decoding registers */
++/****************************************/
++
++#define MV64340_PCI_0_CS_0_BANK_SIZE                                0xc08
++#define MV64340_PCI_1_CS_0_BANK_SIZE                                0xc88
++#define MV64340_PCI_0_CS_1_BANK_SIZE                                0xd08
++#define MV64340_PCI_1_CS_1_BANK_SIZE                                0xd88
++#define MV64340_PCI_0_CS_2_BANK_SIZE                                0xc0c
++#define MV64340_PCI_1_CS_2_BANK_SIZE                                0xc8c
++#define MV64340_PCI_0_CS_3_BANK_SIZE                                0xd0c
++#define MV64340_PCI_1_CS_3_BANK_SIZE                                0xd8c
++#define MV64340_PCI_0_DEVCS_0_BANK_SIZE                             0xc10
++#define MV64340_PCI_1_DEVCS_0_BANK_SIZE                             0xc90
++#define MV64340_PCI_0_DEVCS_1_BANK_SIZE                             0xd10
++#define MV64340_PCI_1_DEVCS_1_BANK_SIZE                             0xd90
++#define MV64340_PCI_0_DEVCS_2_BANK_SIZE                             0xd18
++#define MV64340_PCI_1_DEVCS_2_BANK_SIZE                             0xd98
++#define MV64340_PCI_0_DEVCS_3_BANK_SIZE                             0xc14
++#define MV64340_PCI_1_DEVCS_3_BANK_SIZE                             0xc94
++#define MV64340_PCI_0_DEVCS_BOOT_BANK_SIZE                          0xd14
++#define MV64340_PCI_1_DEVCS_BOOT_BANK_SIZE                          0xd94
++#define MV64340_PCI_0_P2P_MEM0_BAR_SIZE                             0xd1c
++#define MV64340_PCI_1_P2P_MEM0_BAR_SIZE                             0xd9c
++#define MV64340_PCI_0_P2P_MEM1_BAR_SIZE                             0xd20
++#define MV64340_PCI_1_P2P_MEM1_BAR_SIZE                             0xda0
++#define MV64340_PCI_0_P2P_I_O_BAR_SIZE                              0xd24
++#define MV64340_PCI_1_P2P_I_O_BAR_SIZE                              0xda4
++#define MV64340_PCI_0_CPU_BAR_SIZE                                  0xd28
++#define MV64340_PCI_1_CPU_BAR_SIZE                                  0xda8
++#define MV64340_PCI_0_INTERNAL_SRAM_BAR_SIZE                        0xe00
++#define MV64340_PCI_1_INTERNAL_SRAM_BAR_SIZE                        0xe80
++#define MV64340_PCI_0_EXPANSION_ROM_BAR_SIZE                        0xd2c
++#define MV64340_PCI_1_EXPANSION_ROM_BAR_SIZE                        0xd9c
++#define MV64340_PCI_0_BASE_ADDR_REG_ENABLE                          0xc3c
++#define MV64340_PCI_1_BASE_ADDR_REG_ENABLE                          0xcbc
++#define MV64340_PCI_0_CS_0_BASE_ADDR_REMAP			    0xc48
++#define MV64340_PCI_1_CS_0_BASE_ADDR_REMAP			    0xcc8
++#define MV64340_PCI_0_CS_1_BASE_ADDR_REMAP			    0xd48
++#define MV64340_PCI_1_CS_1_BASE_ADDR_REMAP			    0xdc8
++#define MV64340_PCI_0_CS_2_BASE_ADDR_REMAP			    0xc4c
++#define MV64340_PCI_1_CS_2_BASE_ADDR_REMAP			    0xccc
++#define MV64340_PCI_0_CS_3_BASE_ADDR_REMAP			    0xd4c
++#define MV64340_PCI_1_CS_3_BASE_ADDR_REMAP			    0xdcc
++#define MV64340_PCI_0_CS_0_BASE_HIGH_ADDR_REMAP			    0xF04
++#define MV64340_PCI_1_CS_0_BASE_HIGH_ADDR_REMAP			    0xF84
++#define MV64340_PCI_0_CS_1_BASE_HIGH_ADDR_REMAP			    0xF08
++#define MV64340_PCI_1_CS_1_BASE_HIGH_ADDR_REMAP			    0xF88
++#define MV64340_PCI_0_CS_2_BASE_HIGH_ADDR_REMAP			    0xF0C
++#define MV64340_PCI_1_CS_2_BASE_HIGH_ADDR_REMAP			    0xF8C
++#define MV64340_PCI_0_CS_3_BASE_HIGH_ADDR_REMAP			    0xF10
++#define MV64340_PCI_1_CS_3_BASE_HIGH_ADDR_REMAP			    0xF90
++#define MV64340_PCI_0_DEVCS_0_BASE_ADDR_REMAP			    0xc50
++#define MV64340_PCI_1_DEVCS_0_BASE_ADDR_REMAP			    0xcd0
++#define MV64340_PCI_0_DEVCS_1_BASE_ADDR_REMAP			    0xd50
++#define MV64340_PCI_1_DEVCS_1_BASE_ADDR_REMAP			    0xdd0
++#define MV64340_PCI_0_DEVCS_2_BASE_ADDR_REMAP			    0xd58
++#define MV64340_PCI_1_DEVCS_2_BASE_ADDR_REMAP			    0xdd8
++#define MV64340_PCI_0_DEVCS_3_BASE_ADDR_REMAP           	    0xc54
++#define MV64340_PCI_1_DEVCS_3_BASE_ADDR_REMAP           	    0xcd4
++#define MV64340_PCI_0_DEVCS_BOOTCS_BASE_ADDR_REMAP      	    0xd54
++#define MV64340_PCI_1_DEVCS_BOOTCS_BASE_ADDR_REMAP      	    0xdd4
++#define MV64340_PCI_0_P2P_MEM0_BASE_ADDR_REMAP_LOW                  0xd5c
++#define MV64340_PCI_1_P2P_MEM0_BASE_ADDR_REMAP_LOW                  0xddc
++#define MV64340_PCI_0_P2P_MEM0_BASE_ADDR_REMAP_HIGH                 0xd60
++#define MV64340_PCI_1_P2P_MEM0_BASE_ADDR_REMAP_HIGH                 0xde0
++#define MV64340_PCI_0_P2P_MEM1_BASE_ADDR_REMAP_LOW                  0xd64
++#define MV64340_PCI_1_P2P_MEM1_BASE_ADDR_REMAP_LOW                  0xde4
++#define MV64340_PCI_0_P2P_MEM1_BASE_ADDR_REMAP_HIGH                 0xd68
++#define MV64340_PCI_1_P2P_MEM1_BASE_ADDR_REMAP_HIGH                 0xde8
++#define MV64340_PCI_0_P2P_I_O_BASE_ADDR_REMAP                       0xd6c
++#define MV64340_PCI_1_P2P_I_O_BASE_ADDR_REMAP                       0xdec 
++#define MV64340_PCI_0_CPU_BASE_ADDR_REMAP_LOW                       0xd70
++#define MV64340_PCI_1_CPU_BASE_ADDR_REMAP_LOW                       0xdf0
++#define MV64340_PCI_0_CPU_BASE_ADDR_REMAP_HIGH                      0xd74
++#define MV64340_PCI_1_CPU_BASE_ADDR_REMAP_HIGH                      0xdf4
++#define MV64340_PCI_0_INTEGRATED_SRAM_BASE_ADDR_REMAP               0xf00
++#define MV64340_PCI_1_INTEGRATED_SRAM_BASE_ADDR_REMAP               0xf80
++#define MV64340_PCI_0_EXPANSION_ROM_BASE_ADDR_REMAP                 0xf38
++#define MV64340_PCI_1_EXPANSION_ROM_BASE_ADDR_REMAP                 0xfb8
++#define MV64340_PCI_0_ADDR_DECODE_CONTROL                           0xd3c
++#define MV64340_PCI_1_ADDR_DECODE_CONTROL                           0xdbc
++#define MV64340_PCI_0_HEADERS_RETARGET_CONTROL                      0xF40
++#define MV64340_PCI_1_HEADERS_RETARGET_CONTROL                      0xFc0
++#define MV64340_PCI_0_HEADERS_RETARGET_BASE                         0xF44
++#define MV64340_PCI_1_HEADERS_RETARGET_BASE                         0xFc4
++#define MV64340_PCI_0_HEADERS_RETARGET_HIGH                         0xF48
++#define MV64340_PCI_1_HEADERS_RETARGET_HIGH                         0xFc8
++
++/***********************************/
++/*   PCI Control Register Map      */
++/***********************************/
++
++#define MV64340_PCI_0_DLL_STATUS_AND_COMMAND                        0x1d20
++#define MV64340_PCI_1_DLL_STATUS_AND_COMMAND                        0x1da0
++#define MV64340_PCI_0_MPP_PADS_DRIVE_CONTROL                        0x1d1C
++#define MV64340_PCI_1_MPP_PADS_DRIVE_CONTROL                        0x1d9C
++#define MV64340_PCI_0_COMMAND			         	    0xc00
++#define MV64340_PCI_1_COMMAND					    0xc80
++#define MV64340_PCI_0_MODE                                          0xd00
++#define MV64340_PCI_1_MODE                                          0xd80
++#define MV64340_PCI_0_RETRY	        	 		    0xc04
++#define MV64340_PCI_1_RETRY				            0xc84
++#define MV64340_PCI_0_READ_BUFFER_DISCARD_TIMER                     0xd04
++#define MV64340_PCI_1_READ_BUFFER_DISCARD_TIMER                     0xd84
++#define MV64340_PCI_0_MSI_TRIGGER_TIMER                             0xc38
++#define MV64340_PCI_1_MSI_TRIGGER_TIMER                             0xcb8
++#define MV64340_PCI_0_ARBITER_CONTROL                               0x1d00
++#define MV64340_PCI_1_ARBITER_CONTROL                               0x1d80
++#define MV64340_PCI_0_CROSS_BAR_CONTROL_LOW                         0x1d08
++#define MV64340_PCI_1_CROSS_BAR_CONTROL_LOW                         0x1d88
++#define MV64340_PCI_0_CROSS_BAR_CONTROL_HIGH                        0x1d0c
++#define MV64340_PCI_1_CROSS_BAR_CONTROL_HIGH                        0x1d8c
++#define MV64340_PCI_0_CROSS_BAR_TIMEOUT                             0x1d04
++#define MV64340_PCI_1_CROSS_BAR_TIMEOUT                             0x1d84
++#define MV64340_PCI_0_SYNC_BARRIER_TRIGGER_REG                      0x1D18
++#define MV64340_PCI_1_SYNC_BARRIER_TRIGGER_REG                      0x1D98
++#define MV64340_PCI_0_SYNC_BARRIER_VIRTUAL_REG                      0x1d10
++#define MV64340_PCI_1_SYNC_BARRIER_VIRTUAL_REG                      0x1d90
++#define MV64340_PCI_0_P2P_CONFIG                                    0x1d14
++#define MV64340_PCI_1_P2P_CONFIG                                    0x1d94
++
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_0_LOW                     0x1e00
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_0_HIGH                    0x1e04
++#define MV64340_PCI_0_ACCESS_CONTROL_SIZE_0                         0x1e08
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_1_LOW                     0x1e10
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_1_HIGH                    0x1e14
++#define MV64340_PCI_0_ACCESS_CONTROL_SIZE_1                         0x1e18
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_2_LOW                     0x1e20
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_2_HIGH                    0x1e24
++#define MV64340_PCI_0_ACCESS_CONTROL_SIZE_2                         0x1e28
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_3_LOW                     0x1e30
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_3_HIGH                    0x1e34
++#define MV64340_PCI_0_ACCESS_CONTROL_SIZE_3                         0x1e38
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_4_LOW                     0x1e40
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_4_HIGH                    0x1e44
++#define MV64340_PCI_0_ACCESS_CONTROL_SIZE_4                         0x1e48
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_5_LOW                     0x1e50
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_5_HIGH                    0x1e54
++#define MV64340_PCI_0_ACCESS_CONTROL_SIZE_5                         0x1e58
++
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_0_LOW                     0x1e80
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_0_HIGH                    0x1e84
++#define MV64340_PCI_1_ACCESS_CONTROL_SIZE_0                         0x1e88
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_1_LOW                     0x1e90
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_1_HIGH                    0x1e94
++#define MV64340_PCI_1_ACCESS_CONTROL_SIZE_1                         0x1e98
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_2_LOW                     0x1ea0
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_2_HIGH                    0x1ea4
++#define MV64340_PCI_1_ACCESS_CONTROL_SIZE_2                         0x1ea8
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_3_LOW                     0x1eb0
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_3_HIGH                    0x1eb4
++#define MV64340_PCI_1_ACCESS_CONTROL_SIZE_3                         0x1eb8
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_4_LOW                     0x1ec0
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_4_HIGH                    0x1ec4
++#define MV64340_PCI_1_ACCESS_CONTROL_SIZE_4                         0x1ec8
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_5_LOW                     0x1ed0
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_5_HIGH                    0x1ed4
++#define MV64340_PCI_1_ACCESS_CONTROL_SIZE_5                         0x1ed8
++
++/****************************************/
++/*   PCI Configuration Access Registers */
++/****************************************/
++
++#define MV64340_PCI_0_CONFIG_ADDR 				    0xcf8
++#define MV64340_PCI_0_CONFIG_DATA_VIRTUAL_REG                       0xcfc
++#define MV64340_PCI_1_CONFIG_ADDR 				    0xc78
++#define MV64340_PCI_1_CONFIG_DATA_VIRTUAL_REG                       0xc7c
++#define MV64340_PCI_0_INTERRUPT_ACKNOWLEDGE_VIRTUAL_REG	            0xc34
++#define MV64340_PCI_1_INTERRUPT_ACKNOWLEDGE_VIRTUAL_REG	            0xcb4
++
++/****************************************/
++/*   PCI Error Report Registers         */
++/****************************************/
++
++#define MV64340_PCI_0_SERR_MASK					    0xc28
++#define MV64340_PCI_1_SERR_MASK					    0xca8
++#define MV64340_PCI_0_ERROR_ADDR_LOW                                0x1d40
++#define MV64340_PCI_1_ERROR_ADDR_LOW                                0x1dc0
++#define MV64340_PCI_0_ERROR_ADDR_HIGH                               0x1d44
++#define MV64340_PCI_1_ERROR_ADDR_HIGH                               0x1dc4
++#define MV64340_PCI_0_ERROR_ATTRIBUTE                               0x1d48
++#define MV64340_PCI_1_ERROR_ATTRIBUTE                               0x1dc8
++#define MV64340_PCI_0_ERROR_COMMAND                                 0x1d50
++#define MV64340_PCI_1_ERROR_COMMAND                                 0x1dd0
++#define MV64340_PCI_0_ERROR_CAUSE                                   0x1d58
++#define MV64340_PCI_1_ERROR_CAUSE                                   0x1dd8
++#define MV64340_PCI_0_ERROR_MASK                                    0x1d5c
++#define MV64340_PCI_1_ERROR_MASK                                    0x1ddc
++
++/****************************************/
++/*   PCI Debug Registers                */
++/****************************************/
++
++#define MV64340_PCI_0_MMASK                                         0X1D24
++#define MV64340_PCI_1_MMASK                                         0X1DA4
++
++/*********************************************/
++/* PCI Configuration, Function 0, Registers  */
++/*********************************************/
++
++#define MV64340_PCI_DEVICE_AND_VENDOR_ID 			    0x000
++#define MV64340_PCI_STATUS_AND_COMMAND				    0x004
++#define MV64340_PCI_CLASS_CODE_AND_REVISION_ID			    0x008
++#define MV64340_PCI_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE 	    0x00C
++
++#define MV64340_PCI_SCS_0_BASE_ADDR_LOW   	      		    0x010
++#define MV64340_PCI_SCS_0_BASE_ADDR_HIGH   		            0x014
++#define MV64340_PCI_SCS_1_BASE_ADDR_LOW  	     	            0x018
++#define MV64340_PCI_SCS_1_BASE_ADDR_HIGH 		            0x01C
++#define MV64340_PCI_INTERNAL_REG_MEM_MAPPED_BASE_ADDR_LOW      	    0x020
++#define MV64340_PCI_INTERNAL_REG_MEM_MAPPED_BASE_ADDR_HIGH     	    0x024
++#define MV64340_PCI_SUBSYSTEM_ID_AND_SUBSYSTEM_VENDOR_ID	    0x02c
++#define MV64340_PCI_EXPANSION_ROM_BASE_ADDR_REG	                    0x030
++#define MV64340_PCI_CAPABILTY_LIST_POINTER                          0x034
++#define MV64340_PCI_INTERRUPT_PIN_AND_LINE 			    0x03C
++       /* capability list */
++#define MV64340_PCI_POWER_MANAGEMENT_CAPABILITY                     0x040
++#define MV64340_PCI_POWER_MANAGEMENT_STATUS_AND_CONTROL             0x044
++#define MV64340_PCI_VPD_ADDR                                        0x048
++#define MV64340_PCI_VPD_DATA                                        0x04c
++#define MV64340_PCI_MSI_MESSAGE_CONTROL                             0x050
++#define MV64340_PCI_MSI_MESSAGE_ADDR                                0x054
++#define MV64340_PCI_MSI_MESSAGE_UPPER_ADDR                          0x058
++#define MV64340_PCI_MSI_MESSAGE_DATA                                0x05c
++#define MV64340_PCI_X_COMMAND                                       0x060
++#define MV64340_PCI_X_STATUS                                        0x064
++#define MV64340_PCI_COMPACT_PCI_HOT_SWAP                            0x068
++
++/***********************************************/
++/*   PCI Configuration, Function 1, Registers  */
++/***********************************************/
++
++#define MV64340_PCI_SCS_2_BASE_ADDR_LOW   			    0x110
++#define MV64340_PCI_SCS_2_BASE_ADDR_HIGH			    0x114
++#define MV64340_PCI_SCS_3_BASE_ADDR_LOW 			    0x118
++#define MV64340_PCI_SCS_3_BASE_ADDR_HIGH			    0x11c
++#define MV64340_PCI_INTERNAL_SRAM_BASE_ADDR_LOW          	    0x120
++#define MV64340_PCI_INTERNAL_SRAM_BASE_ADDR_HIGH         	    0x124
++
++/***********************************************/
++/*  PCI Configuration, Function 2, Registers   */
++/***********************************************/
++
++#define MV64340_PCI_DEVCS_0_BASE_ADDR_LOW	    		    0x210
++#define MV64340_PCI_DEVCS_0_BASE_ADDR_HIGH 			    0x214
++#define MV64340_PCI_DEVCS_1_BASE_ADDR_LOW 			    0x218
++#define MV64340_PCI_DEVCS_1_BASE_ADDR_HIGH      		    0x21c
++#define MV64340_PCI_DEVCS_2_BASE_ADDR_LOW 			    0x220
++#define MV64340_PCI_DEVCS_2_BASE_ADDR_HIGH      		    0x224
++
++/***********************************************/
++/*  PCI Configuration, Function 3, Registers   */
++/***********************************************/
++
++#define MV64340_PCI_DEVCS_3_BASE_ADDR_LOW	    		    0x310
++#define MV64340_PCI_DEVCS_3_BASE_ADDR_HIGH 			    0x314
++#define MV64340_PCI_BOOT_CS_BASE_ADDR_LOW			    0x318
++#define MV64340_PCI_BOOT_CS_BASE_ADDR_HIGH      		    0x31c
++#define MV64340_PCI_CPU_BASE_ADDR_LOW 				    0x220
++#define MV64340_PCI_CPU_BASE_ADDR_HIGH      			    0x224
++
++/***********************************************/
++/*  PCI Configuration, Function 4, Registers   */
++/***********************************************/
++
++#define MV64340_PCI_P2P_MEM0_BASE_ADDR_LOW  			    0x410
++#define MV64340_PCI_P2P_MEM0_BASE_ADDR_HIGH 			    0x414
++#define MV64340_PCI_P2P_MEM1_BASE_ADDR_LOW   			    0x418
++#define MV64340_PCI_P2P_MEM1_BASE_ADDR_HIGH 			    0x41c
++#define MV64340_PCI_P2P_I_O_BASE_ADDR                 	            0x420
++#define MV64340_PCI_INTERNAL_REGS_I_O_MAPPED_BASE_ADDR              0x424
++
++/****************************************/
++/* Messaging Unit Registers (I20)   	*/
++/****************************************/
++
++#define MV64340_I2O_INBOUND_MESSAGE_REG0_PCI_0_SIDE		    0x010
++#define MV64340_I2O_INBOUND_MESSAGE_REG1_PCI_0_SIDE  		    0x014
++#define MV64340_I2O_OUTBOUND_MESSAGE_REG0_PCI_0_SIDE 		    0x018
++#define MV64340_I2O_OUTBOUND_MESSAGE_REG1_PCI_0_SIDE  		    0x01C
++#define MV64340_I2O_INBOUND_DOORBELL_REG_PCI_0_SIDE  		    0x020
++#define MV64340_I2O_INBOUND_INTERRUPT_CAUSE_REG_PCI_0_SIDE          0x024
++#define MV64340_I2O_INBOUND_INTERRUPT_MASK_REG_PCI_0_SIDE	    0x028
++#define MV64340_I2O_OUTBOUND_DOORBELL_REG_PCI_0_SIDE 		    0x02C
++#define MV64340_I2O_OUTBOUND_INTERRUPT_CAUSE_REG_PCI_0_SIDE         0x030
++#define MV64340_I2O_OUTBOUND_INTERRUPT_MASK_REG_PCI_0_SIDE          0x034
++#define MV64340_I2O_INBOUND_QUEUE_PORT_VIRTUAL_REG_PCI_0_SIDE       0x040
++#define MV64340_I2O_OUTBOUND_QUEUE_PORT_VIRTUAL_REG_PCI_0_SIDE      0x044
++#define MV64340_I2O_QUEUE_CONTROL_REG_PCI_0_SIDE 		    0x050
++#define MV64340_I2O_QUEUE_BASE_ADDR_REG_PCI_0_SIDE 		    0x054
++#define MV64340_I2O_INBOUND_FREE_HEAD_POINTER_REG_PCI_0_SIDE        0x060
++#define MV64340_I2O_INBOUND_FREE_TAIL_POINTER_REG_PCI_0_SIDE        0x064
++#define MV64340_I2O_INBOUND_POST_HEAD_POINTER_REG_PCI_0_SIDE        0x068
++#define MV64340_I2O_INBOUND_POST_TAIL_POINTER_REG_PCI_0_SIDE        0x06C
++#define MV64340_I2O_OUTBOUND_FREE_HEAD_POINTER_REG_PCI_0_SIDE       0x070
++#define MV64340_I2O_OUTBOUND_FREE_TAIL_POINTER_REG_PCI_0_SIDE       0x074
++#define MV64340_I2O_OUTBOUND_POST_HEAD_POINTER_REG_PCI_0_SIDE       0x0F8
++#define MV64340_I2O_OUTBOUND_POST_TAIL_POINTER_REG_PCI_0_SIDE       0x0FC
++
++#define MV64340_I2O_INBOUND_MESSAGE_REG0_PCI_1_SIDE		    0x090
++#define MV64340_I2O_INBOUND_MESSAGE_REG1_PCI_1_SIDE  		    0x094
++#define MV64340_I2O_OUTBOUND_MESSAGE_REG0_PCI_1_SIDE 		    0x098
++#define MV64340_I2O_OUTBOUND_MESSAGE_REG1_PCI_1_SIDE  		    0x09C
++#define MV64340_I2O_INBOUND_DOORBELL_REG_PCI_1_SIDE  		    0x0A0
++#define MV64340_I2O_INBOUND_INTERRUPT_CAUSE_REG_PCI_1_SIDE          0x0A4
++#define MV64340_I2O_INBOUND_INTERRUPT_MASK_REG_PCI_1_SIDE	    0x0A8
++#define MV64340_I2O_OUTBOUND_DOORBELL_REG_PCI_1_SIDE 		    0x0AC
++#define MV64340_I2O_OUTBOUND_INTERRUPT_CAUSE_REG_PCI_1_SIDE         0x0B0
++#define MV64340_I2O_OUTBOUND_INTERRUPT_MASK_REG_PCI_1_SIDE          0x0B4
++#define MV64340_I2O_INBOUND_QUEUE_PORT_VIRTUAL_REG_PCI_1_SIDE       0x0C0
++#define MV64340_I2O_OUTBOUND_QUEUE_PORT_VIRTUAL_REG_PCI_1_SIDE      0x0C4
++#define MV64340_I2O_QUEUE_CONTROL_REG_PCI_1_SIDE 		    0x0D0
++#define MV64340_I2O_QUEUE_BASE_ADDR_REG_PCI_1_SIDE 		    0x0D4
++#define MV64340_I2O_INBOUND_FREE_HEAD_POINTER_REG_PCI_1_SIDE        0x0E0
++#define MV64340_I2O_INBOUND_FREE_TAIL_POINTER_REG_PCI_1_SIDE        0x0E4
++#define MV64340_I2O_INBOUND_POST_HEAD_POINTER_REG_PCI_1_SIDE        0x0E8
++#define MV64340_I2O_INBOUND_POST_TAIL_POINTER_REG_PCI_1_SIDE        0x0EC
++#define MV64340_I2O_OUTBOUND_FREE_HEAD_POINTER_REG_PCI_1_SIDE       0x0F0
++#define MV64340_I2O_OUTBOUND_FREE_TAIL_POINTER_REG_PCI_1_SIDE       0x0F4
++#define MV64340_I2O_OUTBOUND_POST_HEAD_POINTER_REG_PCI_1_SIDE       0x078
++#define MV64340_I2O_OUTBOUND_POST_TAIL_POINTER_REG_PCI_1_SIDE       0x07C
++
++#define MV64340_I2O_INBOUND_MESSAGE_REG0_CPU0_SIDE		    0x1C10
++#define MV64340_I2O_INBOUND_MESSAGE_REG1_CPU0_SIDE  		    0x1C14
++#define MV64340_I2O_OUTBOUND_MESSAGE_REG0_CPU0_SIDE 		    0x1C18
++#define MV64340_I2O_OUTBOUND_MESSAGE_REG1_CPU0_SIDE  		    0x1C1C
++#define MV64340_I2O_INBOUND_DOORBELL_REG_CPU0_SIDE  		    0x1C20
++#define MV64340_I2O_INBOUND_INTERRUPT_CAUSE_REG_CPU0_SIDE  	    0x1C24
++#define MV64340_I2O_INBOUND_INTERRUPT_MASK_REG_CPU0_SIDE	    0x1C28
++#define MV64340_I2O_OUTBOUND_DOORBELL_REG_CPU0_SIDE 		    0x1C2C
++#define MV64340_I2O_OUTBOUND_INTERRUPT_CAUSE_REG_CPU0_SIDE          0x1C30
++#define MV64340_I2O_OUTBOUND_INTERRUPT_MASK_REG_CPU0_SIDE           0x1C34
++#define MV64340_I2O_INBOUND_QUEUE_PORT_VIRTUAL_REG_CPU0_SIDE        0x1C40
++#define MV64340_I2O_OUTBOUND_QUEUE_PORT_VIRTUAL_REG_CPU0_SIDE       0x1C44
++#define MV64340_I2O_QUEUE_CONTROL_REG_CPU0_SIDE 		    0x1C50
++#define MV64340_I2O_QUEUE_BASE_ADDR_REG_CPU0_SIDE 		    0x1C54
++#define MV64340_I2O_INBOUND_FREE_HEAD_POINTER_REG_CPU0_SIDE         0x1C60
++#define MV64340_I2O_INBOUND_FREE_TAIL_POINTER_REG_CPU0_SIDE         0x1C64
++#define MV64340_I2O_INBOUND_POST_HEAD_POINTER_REG_CPU0_SIDE         0x1C68
++#define MV64340_I2O_INBOUND_POST_TAIL_POINTER_REG_CPU0_SIDE         0x1C6C
++#define MV64340_I2O_OUTBOUND_FREE_HEAD_POINTER_REG_CPU0_SIDE        0x1C70
++#define MV64340_I2O_OUTBOUND_FREE_TAIL_POINTER_REG_CPU0_SIDE        0x1C74
++#define MV64340_I2O_OUTBOUND_POST_HEAD_POINTER_REG_CPU0_SIDE        0x1CF8
++#define MV64340_I2O_OUTBOUND_POST_TAIL_POINTER_REG_CPU0_SIDE        0x1CFC
++#define MV64340_I2O_INBOUND_MESSAGE_REG0_CPU1_SIDE		    0x1C90
++#define MV64340_I2O_INBOUND_MESSAGE_REG1_CPU1_SIDE  		    0x1C94
++#define MV64340_I2O_OUTBOUND_MESSAGE_REG0_CPU1_SIDE 		    0x1C98
++#define MV64340_I2O_OUTBOUND_MESSAGE_REG1_CPU1_SIDE  		    0x1C9C
++#define MV64340_I2O_INBOUND_DOORBELL_REG_CPU1_SIDE  		    0x1CA0
++#define MV64340_I2O_INBOUND_INTERRUPT_CAUSE_REG_CPU1_SIDE  	    0x1CA4
++#define MV64340_I2O_INBOUND_INTERRUPT_MASK_REG_CPU1_SIDE	    0x1CA8
++#define MV64340_I2O_OUTBOUND_DOORBELL_REG_CPU1_SIDE 		    0x1CAC
++#define MV64340_I2O_OUTBOUND_INTERRUPT_CAUSE_REG_CPU1_SIDE          0x1CB0
++#define MV64340_I2O_OUTBOUND_INTERRUPT_MASK_REG_CPU1_SIDE           0x1CB4
++#define MV64340_I2O_INBOUND_QUEUE_PORT_VIRTUAL_REG_CPU1_SIDE        0x1CC0
++#define MV64340_I2O_OUTBOUND_QUEUE_PORT_VIRTUAL_REG_CPU1_SIDE       0x1CC4
++#define MV64340_I2O_QUEUE_CONTROL_REG_CPU1_SIDE 		    0x1CD0
++#define MV64340_I2O_QUEUE_BASE_ADDR_REG_CPU1_SIDE 		    0x1CD4
++#define MV64340_I2O_INBOUND_FREE_HEAD_POINTER_REG_CPU1_SIDE         0x1CE0
++#define MV64340_I2O_INBOUND_FREE_TAIL_POINTER_REG_CPU1_SIDE         0x1CE4
++#define MV64340_I2O_INBOUND_POST_HEAD_POINTER_REG_CPU1_SIDE         0x1CE8
++#define MV64340_I2O_INBOUND_POST_TAIL_POINTER_REG_CPU1_SIDE         0x1CEC
++#define MV64340_I2O_OUTBOUND_FREE_HEAD_POINTER_REG_CPU1_SIDE        0x1CF0
++#define MV64340_I2O_OUTBOUND_FREE_TAIL_POINTER_REG_CPU1_SIDE        0x1CF4
++#define MV64340_I2O_OUTBOUND_POST_HEAD_POINTER_REG_CPU1_SIDE        0x1C78
++#define MV64340_I2O_OUTBOUND_POST_TAIL_POINTER_REG_CPU1_SIDE        0x1C7C
++
++/****************************************/
++/*        Ethernet Unit Registers  		*/
++/****************************************/
++
++#define MV64340_ETH_PHY_ADDR_REG                                    0x2000
++#define MV64340_ETH_SMI_REG                                         0x2004
++#define MV64340_ETH_UNIT_DEFAULT_ADDR_REG                           0x2008
++#define MV64340_ETH_UNIT_DEFAULTID_REG                              0x200c
++#define MV64340_ETH_UNIT_INTERRUPT_CAUSE_REG                        0x2080
++#define MV64340_ETH_UNIT_INTERRUPT_MASK_REG                         0x2084
++#define MV64340_ETH_UNIT_INTERNAL_USE_REG                           0x24fc
++#define MV64340_ETH_UNIT_ERROR_ADDR_REG                             0x2094
++#define MV64340_ETH_BAR_0                                           0x2200
++#define MV64340_ETH_BAR_1                                           0x2208
++#define MV64340_ETH_BAR_2                                           0x2210
++#define MV64340_ETH_BAR_3                                           0x2218
++#define MV64340_ETH_BAR_4                                           0x2220
++#define MV64340_ETH_BAR_5                                           0x2228
++#define MV64340_ETH_SIZE_REG_0                                      0x2204
++#define MV64340_ETH_SIZE_REG_1                                      0x220c
++#define MV64340_ETH_SIZE_REG_2                                      0x2214
++#define MV64340_ETH_SIZE_REG_3                                      0x221c
++#define MV64340_ETH_SIZE_REG_4                                      0x2224
++#define MV64340_ETH_SIZE_REG_5                                      0x222c
++#define MV64340_ETH_HEADERS_RETARGET_BASE_REG                       0x2230
++#define MV64340_ETH_HEADERS_RETARGET_CONTROL_REG                    0x2234
++#define MV64340_ETH_HIGH_ADDR_REMAP_REG_0                           0x2280
++#define MV64340_ETH_HIGH_ADDR_REMAP_REG_1                           0x2284
++#define MV64340_ETH_HIGH_ADDR_REMAP_REG_2                           0x2288
++#define MV64340_ETH_HIGH_ADDR_REMAP_REG_3                           0x228c
++#define MV64340_ETH_BASE_ADDR_ENABLE_REG                            0x2290
++#define MV64340_ETH_ACCESS_PROTECTION_REG(port)                    (0x2294 + (port<<2))
++#define MV64340_ETH_MIB_COUNTERS_BASE(port)                        (0x3000 + (port<<7))
++#define MV64340_ETH_PORT_CONFIG_REG(port)                          (0x2400 + (port<<10))
++#define MV64340_ETH_PORT_CONFIG_EXTEND_REG(port)                   (0x2404 + (port<<10))
++#define MV64340_ETH_MII_SERIAL_PARAMETRS_REG(port)                 (0x2408 + (port<<10))
++#define MV64340_ETH_GMII_SERIAL_PARAMETRS_REG(port)                (0x240c + (port<<10))
++#define MV64340_ETH_VLAN_ETHERTYPE_REG(port)                       (0x2410 + (port<<10))
++#define MV64340_ETH_MAC_ADDR_LOW(port)                             (0x2414 + (port<<10))
++#define MV64340_ETH_MAC_ADDR_HIGH(port)                            (0x2418 + (port<<10))
++#define MV64340_ETH_SDMA_CONFIG_REG(port)                          (0x241c + (port<<10))
++#define MV64340_ETH_DSCP_0(port)                                   (0x2420 + (port<<10))
++#define MV64340_ETH_DSCP_1(port)                                   (0x2424 + (port<<10))
++#define MV64340_ETH_DSCP_2(port)                                   (0x2428 + (port<<10))
++#define MV64340_ETH_DSCP_3(port)                                   (0x242c + (port<<10))
++#define MV64340_ETH_DSCP_4(port)                                   (0x2430 + (port<<10))
++#define MV64340_ETH_DSCP_5(port)                                   (0x2434 + (port<<10))
++#define MV64340_ETH_DSCP_6(port)                                   (0x2438 + (port<<10))
++#define MV64340_ETH_PORT_SERIAL_CONTROL_REG(port)                  (0x243c + (port<<10))
++#define MV64340_ETH_VLAN_PRIORITY_TAG_TO_PRIORITY(port)            (0x2440 + (port<<10))
++#define MV64340_ETH_PORT_STATUS_REG(port)                          (0x2444 + (port<<10))
++#define MV64340_ETH_TRANSMIT_QUEUE_COMMAND_REG(port)               (0x2448 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_FIXED_PRIORITY(port)                  (0x244c + (port<<10))
++#define MV64340_ETH_PORT_TX_TOKEN_BUCKET_RATE_CONFIG(port)         (0x2450 + (port<<10))
++#define MV64340_ETH_MAXIMUM_TRANSMIT_UNIT(port)                    (0x2458 + (port<<10))
++#define MV64340_ETH_PORT_MAXIMUM_TOKEN_BUCKET_SIZE(port)           (0x245c + (port<<10))
++#define MV64340_ETH_INTERRUPT_CAUSE_REG(port)                      (0x2460 + (port<<10))
++#define MV64340_ETH_INTERRUPT_CAUSE_EXTEND_REG(port)               (0x2464 + (port<<10))
++#define MV64340_ETH_INTERRUPT_MASK_REG(port)                       (0x2468 + (port<<10))
++#define MV64340_ETH_INTERRUPT_EXTEND_MASK_REG(port)                (0x246c + (port<<10))
++#define MV64340_ETH_RX_FIFO_URGENT_THRESHOLD_REG(port)             (0x2470 + (port<<10))
++#define MV64340_ETH_TX_FIFO_URGENT_THRESHOLD_REG(port)             (0x2474 + (port<<10))
++#define MV64340_ETH_RX_MINIMAL_FRAME_SIZE_REG(port)                (0x247c + (port<<10))
++#define MV64340_ETH_RX_DISCARDED_FRAMES_COUNTER(port)              (0x2484 + (port<<10)
++#define MV64340_ETH_PORT_DEBUG_0_REG(port)                         (0x248c + (port<<10))
++#define MV64340_ETH_PORT_DEBUG_1_REG(port)                         (0x2490 + (port<<10))
++#define MV64340_ETH_PORT_INTERNAL_ADDR_ERROR_REG(port)             (0x2494 + (port<<10))
++#define MV64340_ETH_INTERNAL_USE_REG(port)                         (0x24fc + (port<<10))
++#define MV64340_ETH_RECEIVE_QUEUE_COMMAND_REG(port)                (0x2680 + (port<<10))
++#define MV64340_ETH_CURRENT_SERVED_TX_DESC_PTR(port)               (0x2684 + (port<<10))      
++#define MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_0(port)              (0x260c + (port<<10))     
++#define MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_1(port)              (0x261c + (port<<10))     
++#define MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_2(port)              (0x262c + (port<<10))     
++#define MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_3(port)              (0x263c + (port<<10))     
++#define MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_4(port)              (0x264c + (port<<10))     
++#define MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_5(port)              (0x265c + (port<<10))     
++#define MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_6(port)              (0x266c + (port<<10))     
++#define MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_7(port)              (0x267c + (port<<10))     
++#define MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_0(port)              (0x26c0 + (port<<10))     
++#define MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_1(port)              (0x26c4 + (port<<10))     
++#define MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_2(port)              (0x26c8 + (port<<10))     
++#define MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_3(port)              (0x26cc + (port<<10))     
++#define MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_4(port)              (0x26d0 + (port<<10))     
++#define MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_5(port)              (0x26d4 + (port<<10))     
++#define MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_6(port)              (0x26d8 + (port<<10))     
++#define MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_7(port)              (0x26dc + (port<<10))     
++#define MV64340_ETH_TX_QUEUE_0_TOKEN_BUCKET_COUNT(port)            (0x2700 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_1_TOKEN_BUCKET_COUNT(port)            (0x2710 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_2_TOKEN_BUCKET_COUNT(port)            (0x2720 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_3_TOKEN_BUCKET_COUNT(port)            (0x2730 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_4_TOKEN_BUCKET_COUNT(port)            (0x2740 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_5_TOKEN_BUCKET_COUNT(port)            (0x2750 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_6_TOKEN_BUCKET_COUNT(port)            (0x2760 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_7_TOKEN_BUCKET_COUNT(port)            (0x2770 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_0_TOKEN_BUCKET_CONFIG(port)           (0x2704 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_1_TOKEN_BUCKET_CONFIG(port)           (0x2714 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_2_TOKEN_BUCKET_CONFIG(port)           (0x2724 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_3_TOKEN_BUCKET_CONFIG(port)           (0x2734 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_4_TOKEN_BUCKET_CONFIG(port)           (0x2744 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_5_TOKEN_BUCKET_CONFIG(port)           (0x2754 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_6_TOKEN_BUCKET_CONFIG(port)           (0x2764 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_7_TOKEN_BUCKET_CONFIG(port)           (0x2774 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_0_ARBITER_CONFIG(port)                (0x2708 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_1_ARBITER_CONFIG(port)                (0x2718 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_2_ARBITER_CONFIG(port)                (0x2728 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_3_ARBITER_CONFIG(port)                (0x2738 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_4_ARBITER_CONFIG(port)                (0x2748 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_5_ARBITER_CONFIG(port)                (0x2758 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_6_ARBITER_CONFIG(port)                (0x2768 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_7_ARBITER_CONFIG(port)                (0x2778 + (port<<10))
++#define MV64340_ETH_PORT_TX_TOKEN_BUCKET_COUNT(port)               (0x2780 + (port<<10))
++#define MV64340_ETH_DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE(port)   (0x3400 + (port<<10))
++#define MV64340_ETH_DA_FILTER_OTHER_MULTICAST_TABLE_BASE(port)     (0x3500 + (port<<10))
++#define MV64340_ETH_DA_FILTER_UNICAST_TABLE_BASE(port)             (0x3600 + (port<<10))
++
++/*******************************************/
++/*          CUNIT  Registers               */
++/*******************************************/
++
++         /* Address Decoding Register Map */
++           
++#define MV64340_CUNIT_BASE_ADDR_REG0                                0xf200
++#define MV64340_CUNIT_BASE_ADDR_REG1                                0xf208
++#define MV64340_CUNIT_BASE_ADDR_REG2                                0xf210
++#define MV64340_CUNIT_BASE_ADDR_REG3                                0xf218
++#define MV64340_CUNIT_SIZE0                                         0xf204
++#define MV64340_CUNIT_SIZE1                                         0xf20c
++#define MV64340_CUNIT_SIZE2                                         0xf214
++#define MV64340_CUNIT_SIZE3                                         0xf21c
++#define MV64340_CUNIT_HIGH_ADDR_REMAP_REG0                          0xf240
++#define MV64340_CUNIT_HIGH_ADDR_REMAP_REG1                          0xf244
++#define MV64340_CUNIT_BASE_ADDR_ENABLE_REG                          0xf250
++#define MV64340_MPSC0_ACCESS_PROTECTION_REG                         0xf254
++#define MV64340_MPSC1_ACCESS_PROTECTION_REG                         0xf258
++#define MV64340_CUNIT_INTERNAL_SPACE_BASE_ADDR_REG                  0xf25C
++
++        /*  Error Report Registers  */
++
++#define MV64340_CUNIT_INTERRUPT_CAUSE_REG                           0xf310
++#define MV64340_CUNIT_INTERRUPT_MASK_REG                            0xf314
++#define MV64340_CUNIT_ERROR_ADDR                                    0xf318
++
++        /*  Cunit Control Registers */
++
++#define MV64340_CUNIT_ARBITER_CONTROL_REG                           0xf300
++#define MV64340_CUNIT_CONFIG_REG                                    0xb40c
++#define MV64340_CUNIT_CRROSBAR_TIMEOUT_REG                          0xf304
++
++        /*  Cunit Debug Registers   */
++
++#define MV64340_CUNIT_DEBUG_LOW                                     0xf340
++#define MV64340_CUNIT_DEBUG_HIGH                                    0xf344
++#define MV64340_CUNIT_MMASK                                         0xf380
++
++        /*  MPSCs Clocks Routing Registers  */
++
++#define MV64340_MPSC_ROUTING_REG                                    0xb400
++#define MV64340_MPSC_RX_CLOCK_ROUTING_REG                           0xb404
++#define MV64340_MPSC_TX_CLOCK_ROUTING_REG                           0xb408
++
++        /*  MPSCs Interrupts Registers    */
++
++#define MV64340_MPSC_CAUSE_REG(port)                               (0xb804 + (port<<3))
++#define MV64340_MPSC_MASK_REG(port)                                (0xb884 + (port<<3))
++ 
++#define MV64340_MPSC_MAIN_CONFIG_LOW(port)                         (0x8000 + (port<<12))
++#define MV64340_MPSC_MAIN_CONFIG_HIGH(port)                        (0x8004 + (port<<12))    
++#define MV64340_MPSC_PROTOCOL_CONFIG(port)                         (0x8008 + (port<<12))    
++#define MV64340_MPSC_CHANNEL_REG1(port)                            (0x800c + (port<<12))    
++#define MV64340_MPSC_CHANNEL_REG2(port)                            (0x8010 + (port<<12))    
++#define MV64340_MPSC_CHANNEL_REG3(port)                            (0x8014 + (port<<12))    
++#define MV64340_MPSC_CHANNEL_REG4(port)                            (0x8018 + (port<<12))    
++#define MV64340_MPSC_CHANNEL_REG5(port)                            (0x801c + (port<<12))    
++#define MV64340_MPSC_CHANNEL_REG6(port)                            (0x8020 + (port<<12))    
++#define MV64340_MPSC_CHANNEL_REG7(port)                            (0x8024 + (port<<12))    
++#define MV64340_MPSC_CHANNEL_REG8(port)                            (0x8028 + (port<<12))    
++#define MV64340_MPSC_CHANNEL_REG9(port)                            (0x802c + (port<<12))    
++#define MV64340_MPSC_CHANNEL_REG10(port)                           (0x8030 + (port<<12))    
++        
++        /*  MPSC0 Registers      */
++
++
++/***************************************/
++/*          SDMA Registers             */
++/***************************************/
++
++#define MV64340_SDMA_CONFIG_REG(channel)                        (0x4000 + (channel<<13))        
++#define MV64340_SDMA_COMMAND_REG(channel)                       (0x4008 + (channel<<13))        
++#define MV64340_SDMA_CURRENT_RX_DESCRIPTOR_POINTER(channel)     (0x4810 + (channel<<13))        
++#define MV64340_SDMA_CURRENT_TX_DESCRIPTOR_POINTER(channel)     (0x4c10 + (channel<<13))        
++#define MV64340_SDMA_FIRST_TX_DESCRIPTOR_POINTER(channel)       (0x4c14 + (channel<<13)) 
++
++#define MV64340_SDMA_CAUSE_REG                                      0xb800
++#define MV64340_SDMA_MASK_REG                                       0xb880
++         
++/* BRG Interrupts */
++
++#define MV64340_BRG_CONFIG_REG(brg)                              (0xb200 + (brg<<3))
++#define MV64340_BRG_BAUDE_TUNING_REG(brg)                        (0xb208 + (brg<<3))
++#define MV64340_BRG_CAUSE_REG                                       0xb834
++#define MV64340_BRG_MASK_REG                                        0xb8b4
++
++/****************************************/
++/* DMA Channel Control			*/
++/****************************************/
++
++#define MV64340_DMA_CHANNEL0_CONTROL 				    0x840
++#define MV64340_DMA_CHANNEL0_CONTROL_HIGH			    0x880
++#define MV64340_DMA_CHANNEL1_CONTROL 				    0x844
++#define MV64340_DMA_CHANNEL1_CONTROL_HIGH			    0x884
++#define MV64340_DMA_CHANNEL2_CONTROL 				    0x848
++#define MV64340_DMA_CHANNEL2_CONTROL_HIGH			    0x888
++#define MV64340_DMA_CHANNEL3_CONTROL 				    0x84C
++#define MV64340_DMA_CHANNEL3_CONTROL_HIGH			    0x88C
++
++
++/****************************************/
++/*           IDMA Registers             */
++/****************************************/
++
++#define MV64340_DMA_CHANNEL0_BYTE_COUNT                             0x800
++#define MV64340_DMA_CHANNEL1_BYTE_COUNT                             0x804
++#define MV64340_DMA_CHANNEL2_BYTE_COUNT                             0x808
++#define MV64340_DMA_CHANNEL3_BYTE_COUNT                             0x80C
++#define MV64340_DMA_CHANNEL0_SOURCE_ADDR                            0x810
++#define MV64340_DMA_CHANNEL1_SOURCE_ADDR                            0x814
++#define MV64340_DMA_CHANNEL2_SOURCE_ADDR                            0x818
++#define MV64340_DMA_CHANNEL3_SOURCE_ADDR                            0x81c
++#define MV64340_DMA_CHANNEL0_DESTINATION_ADDR                       0x820
++#define MV64340_DMA_CHANNEL1_DESTINATION_ADDR                       0x824
++#define MV64340_DMA_CHANNEL2_DESTINATION_ADDR                       0x828
++#define MV64340_DMA_CHANNEL3_DESTINATION_ADDR                       0x82C
++#define MV64340_DMA_CHANNEL0_NEXT_DESCRIPTOR_POINTER                0x830
++#define MV64340_DMA_CHANNEL1_NEXT_DESCRIPTOR_POINTER                0x834
++#define MV64340_DMA_CHANNEL2_NEXT_DESCRIPTOR_POINTER                0x838
++#define MV64340_DMA_CHANNEL3_NEXT_DESCRIPTOR_POINTER                0x83C
++#define MV64340_DMA_CHANNEL0_CURRENT_DESCRIPTOR_POINTER             0x870
++#define MV64340_DMA_CHANNEL1_CURRENT_DESCRIPTOR_POINTER             0x874
++#define MV64340_DMA_CHANNEL2_CURRENT_DESCRIPTOR_POINTER             0x878
++#define MV64340_DMA_CHANNEL3_CURRENT_DESCRIPTOR_POINTER             0x87C
++
++ /*  IDMA Address Decoding Base Address Registers  */
++ 
++#define MV64340_DMA_BASE_ADDR_REG0                                  0xa00
++#define MV64340_DMA_BASE_ADDR_REG1                                  0xa08
++#define MV64340_DMA_BASE_ADDR_REG2                                  0xa10
++#define MV64340_DMA_BASE_ADDR_REG3                                  0xa18
++#define MV64340_DMA_BASE_ADDR_REG4                                  0xa20
++#define MV64340_DMA_BASE_ADDR_REG5                                  0xa28
++#define MV64340_DMA_BASE_ADDR_REG6                                  0xa30
++#define MV64340_DMA_BASE_ADDR_REG7                                  0xa38
++ 
++ /*  IDMA Address Decoding Size Address Register   */
++ 
++#define MV64340_DMA_SIZE_REG0                                       0xa04
++#define MV64340_DMA_SIZE_REG1                                       0xa0c
++#define MV64340_DMA_SIZE_REG2                                       0xa14
++#define MV64340_DMA_SIZE_REG3                                       0xa1c
++#define MV64340_DMA_SIZE_REG4                                       0xa24
++#define MV64340_DMA_SIZE_REG5                                       0xa2c
++#define MV64340_DMA_SIZE_REG6                                       0xa34
++#define MV64340_DMA_SIZE_REG7                                       0xa3C
++
++ /* IDMA Address Decoding High Address Remap and Access 
++                  Protection Registers                    */
++                  
++#define MV64340_DMA_HIGH_ADDR_REMAP_REG0                            0xa60
++#define MV64340_DMA_HIGH_ADDR_REMAP_REG1                            0xa64
++#define MV64340_DMA_HIGH_ADDR_REMAP_REG2                            0xa68
++#define MV64340_DMA_HIGH_ADDR_REMAP_REG3                            0xa6C
++#define MV64340_DMA_BASE_ADDR_ENABLE_REG                            0xa80
++#define MV64340_DMA_CHANNEL0_ACCESS_PROTECTION_REG                  0xa70
++#define MV64340_DMA_CHANNEL1_ACCESS_PROTECTION_REG                  0xa74
++#define MV64340_DMA_CHANNEL2_ACCESS_PROTECTION_REG                  0xa78
++#define MV64340_DMA_CHANNEL3_ACCESS_PROTECTION_REG                  0xa7c
++#define MV64340_DMA_ARBITER_CONTROL                                 0x860
++#define MV64340_DMA_CROSS_BAR_TIMEOUT                               0x8d0
++
++ /*  IDMA Headers Retarget Registers   */
++
++#define MV64340_DMA_HEADERS_RETARGET_CONTROL                        0xa84
++#define MV64340_DMA_HEADERS_RETARGET_BASE                           0xa88
++
++ /*  IDMA Interrupt Register  */
++
++#define MV64340_DMA_INTERRUPT_CAUSE_REG                             0x8c0
++#define MV64340_DMA_INTERRUPT_CAUSE_MASK                            0x8c4
++#define MV64340_DMA_ERROR_ADDR                                      0x8c8
++#define MV64340_DMA_ERROR_SELECT                                    0x8cc
++
++ /*  IDMA Debug Register ( for internal use )    */
++
++#define MV64340_DMA_DEBUG_LOW                                       0x8e0
++#define MV64340_DMA_DEBUG_HIGH                                      0x8e4
++#define MV64340_DMA_SPARE                                           0xA8C
++
++/****************************************/
++/* Timer_Counter 			*/
++/****************************************/
++
++#define MV64340_TIMER_COUNTER0					    0x850
++#define MV64340_TIMER_COUNTER1					    0x854
++#define MV64340_TIMER_COUNTER2					    0x858
++#define MV64340_TIMER_COUNTER3					    0x85C
++#define MV64340_TIMER_COUNTER_0_3_CONTROL			    0x864
++#define MV64340_TIMER_COUNTER_0_3_INTERRUPT_CAUSE		    0x868
++#define MV64340_TIMER_COUNTER_0_3_INTERRUPT_MASK      		    0x86c
++
++/****************************************/
++/*         Watchdog registers  	        */
++/****************************************/
++
++#define MV64340_WATCHDOG_CONFIG_REG                                 0xb410
++#define MV64340_WATCHDOG_VALUE_REG                                  0xb414
++
++/****************************************/
++/* I2C Registers                        */
++/****************************************/
++
++#define MV64340_I2C_SLAVE_ADDR                                      0xc000
++#define MV64340_I2C_EXTENDED_SLAVE_ADDR                             0xc010
++#define MV64340_I2C_DATA                                            0xc004
++#define MV64340_I2C_CONTROL                                         0xc008
++#define MV64340_I2C_STATUS_BAUDE_RATE                               0xc00C
++#define MV64340_I2C_SOFT_RESET                                      0xc01c
++
++/****************************************/
++/* GPP Interface Registers              */
++/****************************************/
++
++#define MV64340_GPP_IO_CONTROL                                      0xf100
++#define MV64340_GPP_LEVEL_CONTROL                                   0xf110
++#define MV64340_GPP_VALUE                                           0xf104
++#define MV64340_GPP_INTERRUPT_CAUSE                                 0xf108
++#define MV64340_GPP_INTERRUPT_MASK0                                 0xf10c
++#define MV64340_GPP_INTERRUPT_MASK1                                 0xf114
++#define MV64340_GPP_VALUE_SET                                       0xf118
++#define MV64340_GPP_VALUE_CLEAR                                     0xf11c
++
++/****************************************/
++/* Interrupt Controller Registers       */
++/****************************************/
++
++/****************************************/
++/* Interrupts	  			*/
++/****************************************/
++
++#define MV64340_MAIN_INTERRUPT_CAUSE_LOW                            0x004
++#define MV64340_MAIN_INTERRUPT_CAUSE_HIGH                           0x00c
++#define MV64340_CPU_INTERRUPT0_MASK_LOW                             0x014
++#define MV64340_CPU_INTERRUPT0_MASK_HIGH                            0x01c
++#define MV64340_CPU_INTERRUPT0_SELECT_CAUSE                         0x024
++#define MV64340_CPU_INTERRUPT1_MASK_LOW                             0x034
++#define MV64340_CPU_INTERRUPT1_MASK_HIGH                            0x03c
++#define MV64340_CPU_INTERRUPT1_SELECT_CAUSE                         0x044
++#define MV64340_INTERRUPT0_MASK_0_LOW                               0x054
++#define MV64340_INTERRUPT0_MASK_0_HIGH                              0x05c
++#define MV64340_INTERRUPT0_SELECT_CAUSE                             0x064
++#define MV64340_INTERRUPT1_MASK_0_LOW                               0x074
++#define MV64340_INTERRUPT1_MASK_0_HIGH                              0x07c
++#define MV64340_INTERRUPT1_SELECT_CAUSE                             0x084
++
++/****************************************/
++/*      MPP Interface Registers         */
++/****************************************/
++
++#define MV64340_MPP_CONTROL0                                        0xf000
++#define MV64340_MPP_CONTROL1                                        0xf004
++#define MV64340_MPP_CONTROL2                                        0xf008
++#define MV64340_MPP_CONTROL3                                        0xf00c
++
++/****************************************/
++/*    Serial Initialization registers   */
++/****************************************/
++
++#define MV64340_SERIAL_INIT_LAST_DATA                               0xf324
++#define MV64340_SERIAL_INIT_CONTROL                                 0xf328
++#define MV64340_SERIAL_INIT_STATUS                                  0xf32c
++
++extern unsigned long mv64340_base;
++
++#define MV64340_BASE       (mv64340_base)
++
++/*
++ * Because of an error/peculiarity in the Galileo chip, we need to swap the
++ * bytes when running bigendian.
++ */
++
++#define MV_WRITE(ofs, data)		\
++        *(volatile u32 *)(MV64340_BASE + (ofs)) = cpu_to_le32((u32)data)
++#define MV_READ(ofs)			\
++        (le32_to_cpu(*(volatile u32 *)(MV64340_BASE + (ofs))))
++
++#define MV_WRITE_16(ofs, data)		\
++        *(volatile u16 *)(MV64340_BASE + (ofs)) = cpu_to_le16((u16)data)
++#define MV_READ_16(ofs)			\
++        le16_to_cpu(*(volatile u16 *)(MV64340_BASE + (ofs)))
++
++#define MV_WRITE_8(ofs, data)		\
++        *(volatile u8 *)(MV64340_BASE + (ofs)) = ((u16)data)
++#define MV_READ_8(ofs)			\
++        (*(volatile u8 *)(MV64340_BASE + (ofs)))
++
++#define MV_SET_REG_BITS(ofs, bits)	\
++	(*((volatile u32 *)(MV64340_BASE + (ofs)))) |= ((u32)cpu_to_le32(bits))
++#define MV_RESET_REG_BITS(ofs, bits)	\
++	(*((volatile u32 *)(MV64340_BASE + (ofs)))) &= ~((u32)cpu_to_le32(bits))
++
++extern void mv64340_irq_init(unsigned int base);
++
++extern struct pci_ops mv64340_bus0_pci_ops;
++extern struct pci_ops mv64340_bus1_pci_ops;
++
++#endif /* __ASM_MV64340_H */

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/marvell-pegasos.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/marvell-pegasos.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/marvell-pegasos.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,1568 @@
+#! /bin/sh -e 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Add Pegasos2 support in mv64340_eth
+## DP: Patch author: Nicolas DET, Christoph Hewllwig
+## DP: Upstream status: not submitted, needs more work
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -urN kernel-source-2.6.7.orig/drivers/net/Kconfig kernel-source-2.6.7/drivers/net/Kconfig
+--- kernel-source-2.6.7.orig/drivers/net/Kconfig	2004-08-05 13:06:32.664497528 +0200
++++ kernel-source-2.6.7/drivers/net/Kconfig	2004-07-08 08:08:14.000000000 +0200
+@@ -2068,11 +2068,14 @@
+ 	  will be called tg3.  This is recommended.
+ 
+ config MV64340_ETH
+-	bool "MV-64340 Ethernet support"
+-	depends on MOMENCO_OCELOT_C || MOMENCO_JAGUAR_ATX
++	tristate "MV-64340 Ethernet support"
++	depends on MOMENCO_OCELOT_C || MOMENCO_JAGUAR_ATX || PPC_CHRP
+ 	help
+ 	  This driver supports the gigabit Ethernet on the Marvell MV64340
+-	  chipset which is used in the Momenco Ocelot C and Jaguar ATX.
++	  chipset which is used in the Momenco Ocelot C, Jaguar ATX and 
++	  Pegasos II.
++	  Note: The Pegasos II use the MV64361 but the GigaBit part is
++	  compatible with the MV6434x series.
+ 
+ config MV64340_ETH_0
+ 	bool "MV-64340 Port 0"
+diff -urN kernel-source-2.6.7.orig/drivers/net/mv64340_eth.c kernel-source-2.6.7/drivers/net/mv64340_eth.c
+--- kernel-source-2.6.7.orig/drivers/net/mv64340_eth.c	2004-08-05 13:06:32.672496312 +0200
++++ kernel-source-2.6.7/drivers/net/mv64340_eth.c	2004-08-05 12:42:24.000000000 +0200
+@@ -76,6 +76,8 @@
+ #endif
+ 
+ /* Static function declarations */
++static void eth_port_uc_addr_get(unsigned int PortNum,
++		                                 unsigned char *MacAddr);
+ static int mv64340_eth_real_open(struct net_device *);
+ static int mv64340_eth_real_stop(struct net_device *);
+ static int mv64340_eth_change_mtu(struct net_device *, int);
+@@ -85,6 +87,13 @@
+ static int mv64340_poll(struct net_device *dev, int *budget);
+ #endif
+ 
++#ifdef __PPC__
++// for PowerPC architecture (Pegasos II) we can for the moment put the cjip base addr here
++// this is the bus adress, it will be io_remap
++unsigned long mv64340_base = 0xf1000000;
++#endif
++
++
+ unsigned char prom_mac_addr_base[6];
+ unsigned long mv64340_sram_base;
+ 
+@@ -443,8 +452,17 @@
+ 			skb_put(skb, pkt_info.byte_cnt - 4);
+ 			skb->dev = dev;
+ 
++			// Nico:
++			// Warning: ETH_LAYER_4_CHECKSUM_OK, is only valid if many other flags are set
++			// (IPv4, Ethernet V2, ...). It may lead to checksum error in some cases
+ 			if (pkt_info.cmd_sts & ETH_LAYER_4_CHECKSUM_OK) {
+ 				skb->ip_summed = CHECKSUM_UNNECESSARY;
++
++				// Nico:
++				// The Linux stack should ignore csum if ip_summed == CHECKSUM_UNNECESSARY
++				// then we could remove this line
++				// Also, we should be able to use CHECKSUM_HW with the Marvell
++				// However, I've been unable to discover what csum the Linux stack expected exacly
+ 				skb->csum = htons((pkt_info.cmd_sts
+ 							& 0x0007fff8) >> 3);
+ 			}
+@@ -488,6 +506,13 @@
+ 		MV_READ(MV64340_ETH_INTERRUPT_CAUSE_EXTEND_REG(port_num)) &
+ 		INT_CAUSE_UNMASK_ALL_EXT;
+ 
++	/*
++	 * If no real interrupt occured, exit.
++	 * This can happen when using gigE interrupt coalescing mechanism or shared interrupt
++	 */
++	if ((eth_int_cause == 0x0) && (eth_int_cause_ext == 0x0))
++		return IRQ_NONE;
++
+ #ifdef MV64340_NAPI
+ 	if (!(eth_int_cause & 0x0007fffd)) {
+ 	/* Dont ack the Rx interrupt */
+@@ -560,13 +585,6 @@
+ 		}
+ 	}
+ 
+-	/*
+-	 * If no real interrupt occured, exit.
+-	 * This can happen when using gigE interrupt coalescing mechanism.
+-	 */
+-	if ((eth_int_cause == 0x0) && (eth_int_cause_ext == 0x0))
+-		return IRQ_NONE;
+-
+ 	return IRQ_HANDLED;
+ }
+ 
+@@ -665,8 +683,13 @@
+ 
+ 	spin_lock_irq(&mp->lock);
+ 
++#if 0
+ 	err = request_irq(dev->irq, mv64340_eth_int_handler,
+ 	                  SA_INTERRUPT | SA_SAMPLE_RANDOM, dev->name, dev);
++#else
++	err = request_irq(dev->irq, &mv64340_eth_int_handler, SA_SHIRQ | SA_SAMPLE_RANDOM,
++			dev->name, dev);
++#endif
+ 
+ 	if (err) {
+ 		printk(KERN_ERR "Can not assign IRQ number to MV64340_eth%d\n",
+@@ -752,9 +775,7 @@
+ 		p_rx_desc[i].byte_cnt = 0x0000;
+ 		p_rx_desc[i].cmd_sts =
+ 			ETH_BUFFER_OWNED_BY_DMA | ETH_RX_ENABLE_INTERRUPT;
+-		p_rx_desc[i].next_desc_ptr =
+-			(struct eth_rx_desc *) mp->rx_desc_dma +
+-				(i + 1) % rx_desc_num;
++		p_rx_desc[i].next_desc_ptr = (u32) ( (struct eth_rx_desc *)  mp->rx_desc_dma + (i + 1) % rx_desc_num);
+ 		p_rx_desc[i].buf_ptr = buffer_addr;
+ 
+ 		mp->rx_skb[i] = NULL;
+@@ -818,9 +839,7 @@
+ 		p_tx_desc[i].byte_cnt	= 0x0000;
+ 		p_tx_desc[i].l4i_chk	= 0x0000;
+ 		p_tx_desc[i].cmd_sts	= 0x00000000;
+-		p_tx_desc[i].next_desc_ptr =
+-			(struct eth_tx_desc *) mp->tx_desc_dma +
+-			(i + 1) % tx_desc_num;
++		p_tx_desc[i].next_desc_ptr = (u32) ( ((struct eth_tx_desc *) mp->tx_desc_dma) + (i + 1) % tx_desc_num);
+ 		p_tx_desc[i].buf_ptr	= 0x00000000;
+ 		mp->tx_skb[i]		= NULL;
+ 	}
+@@ -917,7 +936,7 @@
+ 				    mp->tx_desc_dma);
+ 		return -ENOMEM;
+ 	}
+-	memset(mp->p_rx_desc_area, 0, size);
++	memset( (void *) mp->p_rx_desc_area, 0, size);
+ 
+ 	if (!(ether_init_rx_desc_ring(mp, 0)))
+ 		panic("%s: Error initializing RX Ring", dev->name);
+@@ -1211,11 +1230,20 @@
+                                         skb_headlen(skb), PCI_DMA_TODEVICE);
+                 pkt_info.return_info = 0;
+                 ipheader = skb->nh.iph->ihl << 11;
++
++		// Nico note:
++		// Liunx always generate the IP checksum (I guess because it's very fast to do)
++		// so we could remove ETH_GEN_IP_V_4_CHECKSUM here
+                 pkt_info.cmd_sts = ETH_TX_FIRST_DESC | 
+ 					ETH_GEN_TCP_UDP_CHECKSUM |
+ 					ETH_GEN_IP_V_4_CHECKSUM |
+                                         ipheader;
+ 		/* CPU already calculated pseudo header checksum. So, use it */
++		// Nico:
++		// A little warning here:
++		// for the first buffer of a packet, l4i_chk must be 0x0000
++		// the behaviour of the chip could be unexpected if the Linux stack
++		// gives us a non zero csum and we are in the first buffer
+                 pkt_info.l4i_chk = skb->h.th->check;
+                 status = eth_port_send(mp, &pkt_info);
+ 		if (status != ETH_OK) {
+@@ -1316,7 +1344,7 @@
+  * Input : number of port to initialize
+  * Output : -ENONMEM if failed , 0 if success
+  */
+-static int mv64340_eth_init(int port_num)
++static struct net_device *mv64340_eth_init(int port_num)
+ {
+ 	struct mv64340_private *mp;
+ 	struct net_device *dev;
+@@ -1324,11 +1352,15 @@
+ 
+ 	dev = alloc_etherdev(sizeof(struct mv64340_private));
+ 	if (!dev)
+-		return -ENOMEM;
++		return NULL;
+ 
+ 	mp = netdev_priv(dev);
+ 
++#ifdef __PPC__
++	dev->irq = 9;
++#else
+ 	dev->irq = ETH_PORT0_IRQ_NUM + port_num;
++#endif
+ 
+ 	dev->open = mv64340_eth_open;
+ 	dev->stop = mv64340_eth_stop;
+@@ -1369,9 +1401,13 @@
+ 
+ 	spin_lock_init(&mp->lock);
+ 
++#if defined(__powerpc__)
++	eth_port_uc_addr_get(port_num, dev->dev_addr); 
++#else
+ 	/* set MAC addresses */
+ 	memcpy(dev->dev_addr, prom_mac_addr_base, 6);
+ 	dev->dev_addr[5] += port_num;
++#endif
+ 
+ 	err = register_netdev(dev);
+ 	if (err)
+@@ -1395,14 +1431,27 @@
+ 	printk("RX NAPI Enabled \n");
+ #endif
+ 
+-	return 0;
++	return dev;
+ 
+ out_free_dev:
+ 	free_netdev(dev);
+ 
+-	return err;
++	return NULL;
+ }
+ 
++static void mv64340_eth_remove(struct net_device *dev)
++{
++	unregister_netdev(dev);
++	flush_scheduled_work();
++	free_netdev(dev);
++}
++
++// Nico
++// Better to set that to NULL
++static struct net_device *mv64340_dev0 = NULL;
++static struct net_device *mv64340_dev1 = NULL;
++static struct net_device *mv64340_dev2 = NULL;
++
+ /*
+  * mv64340_init_module
+  *
+@@ -1415,20 +1464,30 @@
+ static int __init mv64340_init_module(void)
+ {
+ 	printk(KERN_NOTICE "MV-64340 10/100/1000 Ethernet Driver\n");
++
++#ifdef __PPC__
++	// First ioremap the Marvell base addr
++	mv64340_base = (unsigned long) ioremap( mv64340_base, 64*1024);
++	printk(KERN_NOTICE "MV-64340: Chip base remaped at 0x%8.8x\n", (int) mv64340_base);
++#endif
++	
+ #ifdef CONFIG_MV64340_ETH_0
+-	if (mv64340_eth_init(0)) {
++	mv64340_dev0 = mv64340_eth_init(0);
++	if (!mv64340_dev0) {
+ 		printk(KERN_ERR
+ 		       "Error registering MV-64360 ethernet port 0\n");
+ 	}
+ #endif
+ #ifdef CONFIG_MV64340_ETH_1
+-	if (mv64340_eth_init(1)) {
++	mv64340_dev1 = mv64340_eth_init(1);
++	if (!mv64340_dev1) {
+ 		printk(KERN_ERR
+ 		       "Error registering MV-64360 ethernet port 1\n");
+ 	}
+ #endif
+ #ifdef CONFIG_MV64340_ETH_2
+-	if (mv64340_eth_init(2)) {
++	mv64340_dev2 = mv64340_eth_init(2);
++	if (!mv64340_dev2) {
+ 		printk(KERN_ERR
+ 		       "Error registering MV-64360 ethernet port 2\n");
+ 	}
+@@ -1445,9 +1504,15 @@
+  *
+  * Output : N/A
+  */
+-static void __init mv64340_cleanup_module(void)
++static void __exit mv64340_cleanup_module(void)
+ {
+-	/* Nothing to do here ! it's not a removable module */
++	printk(KERN_NOTICE "MV-64340: Bye bye cruel world!\n");
++	if (mv64340_dev2)
++		mv64340_eth_remove(mv64340_dev2);
++	if (mv64340_dev1)
++		mv64340_eth_remove(mv64340_dev1);
++	if (mv64340_dev0)
++		mv64340_eth_remove(mv64340_dev0);
+ }
+ 
+ module_init(mv64340_init_module);
+@@ -1758,6 +1823,10 @@
+ 	MV_WRITE(MV64340_ETH_RECEIVE_QUEUE_COMMAND_REG(eth_port_num),
+ 		 mp->port_rx_queue_command);
+ 
++	// Nico
++	// Set the minimun RX frame to 40 in order to accept, short frame :-)
++	MV_WRITE(MV64340_ETH_RX_MINIMAL_FRAME_SIZE_REG(eth_port_num), 40);
++
+ 	/* Check if link is up */
+ 	eth_port_read_smi_reg(eth_port_num, 1, &phy_reg_data);
+ 
+@@ -1804,6 +1873,23 @@
+ 	return;
+ }
+ 
++static void eth_port_uc_addr_get(unsigned int PortNum,
++				 unsigned char *MacAddr)
++{
++        u32 MacLow;
++        u32 MacHigh;
++
++        MacLow = MV_READ(MV64340_ETH_MAC_ADDR_LOW(PortNum));
++        MacHigh = MV_READ(MV64340_ETH_MAC_ADDR_HIGH(PortNum));
++
++        MacAddr[5] = (MacLow) & 0xff;
++        MacAddr[4] = (MacLow >> 8) & 0xff;
++        MacAddr[3] = (MacHigh) & 0xff;
++        MacAddr[2] = (MacHigh >> 8) & 0xff;
++        MacAddr[1] = (MacHigh >> 16) & 0xff;
++        MacAddr[0] = (MacHigh >> 24) & 0xff;
++}
++
+ /*
+  * eth_port_uc_addr - This function Set the port unicast address table
+  *
+@@ -2016,10 +2102,24 @@
+ 	unsigned int time_out = 50;
+ 	unsigned int phy_reg_data;
+ 
+-	/* Reset the PHY */
+-	eth_port_read_smi_reg(eth_port_num, 0, &phy_reg_data);
+-	phy_reg_data |= 0x8000;	/* Set bit 15 to reset the PHY */
+-	eth_port_write_smi_reg(eth_port_num, 0, phy_reg_data);
++   	/* change to combined led mode LINK=green 100/1000=dual led*/
++   	eth_port_read_smi_reg(eth_port_num, 24, &phy_reg_data);
++   	phy_reg_data&=~0x0018;
++   	phy_reg_data|= 0x0010;
++   	eth_port_write_smi_reg(eth_port_num,24, phy_reg_data);
++   
++   	/* enable autocrossover in all modes */
++   	eth_port_read_smi_reg(eth_port_num, 16, &phy_reg_data);
++   	phy_reg_data&=~0x0060;
++   	phy_reg_data|= 0x0060;
++   	eth_port_write_smi_reg(eth_port_num,16, phy_reg_data);
++
++   	/* Reset the PHY and update reg0*/
++   	eth_port_read_smi_reg(eth_port_num, 0, &phy_reg_data);
++   	phy_reg_data &=~0x7fff;   /* clear unwanted*/
++   	phy_reg_data |= 0x1000;   /* enable auto negotiation*/
++   	phy_reg_data |= 0x8000;   /* Set bit 15 to reset the PHY */
++   	eth_port_write_smi_reg(eth_port_num, 0, phy_reg_data);
+ 
+ 	/* Poll on the PHY LINK */
+ 	do {
+@@ -2317,6 +2417,9 @@
+ 		return ETH_ERROR;
+ 
+ 	tx_next_desc = (tx_desc_curr + 1) % MV64340_TX_QUEUE_SIZE;
++
++	// Nico: Warning ETH_ZERO_PADDING is only valid if the L flag is set
++	// the behaviour of the chip could be unexpected in that case
+ 	command_status = p_pkt_info->cmd_sts | ETH_ZERO_PADDING | ETH_GEN_CRC;
+ 
+ 	if (command_status & ETH_TX_FIRST_DESC) {
+@@ -2329,9 +2432,7 @@
+                 first_descriptor->cmd_sts = command_status;
+                 first_descriptor->byte_cnt = p_pkt_info->byte_cnt;
+                 first_descriptor->buf_ptr = p_pkt_info->buf_ptr;
+-                first_descriptor->next_desc_ptr =
+-			(struct eth_tx_desc *) mp->tx_desc_dma + tx_next_desc;
+-		wmb();
++                first_descriptor->next_desc_ptr = (u32) mp->tx_desc_dma + tx_next_desc;
+         } else {
+                 tx_first_desc = mp->tx_first_desc_q;
+                 first_descriptor = &mp->p_tx_desc_area[tx_first_desc];
+@@ -2343,11 +2444,12 @@
+                         current_descriptor->next_desc_ptr = 0x00000000;
+                 else {
+                         command_status |= ETH_BUFFER_OWNED_BY_DMA;
+-                        current_descriptor->next_desc_ptr =
+-			  (struct eth_tx_desc *) mp->tx_desc_dma + tx_next_desc;
++                        current_descriptor->next_desc_ptr = (u32) mp->tx_desc_dma + tx_next_desc;
+                 }
+         }
+ 
++	// Note Nico
++	// If it's 64 bit aligned then it can be < 8 bytes
+         if (p_pkt_info->byte_cnt < 8) {
+                 printk(" < 8 problem \n");
+                 return ETH_ERROR;
+@@ -2360,8 +2462,6 @@
+ 
+         mp->tx_skb[tx_desc_curr] = (struct sk_buff*) p_pkt_info->return_info;
+ 
+-        wmb();
+-
+         /* Set last desc with DMA ownership and interrupt enable. */
+         if (command_status & ETH_TX_LAST_DESC) {
+                 current_descriptor->cmd_sts = command_status |
+@@ -2370,14 +2470,14 @@
+ 
+ 		if (!(command_status & ETH_TX_FIRST_DESC))
+ 			first_descriptor->cmd_sts |= ETH_BUFFER_OWNED_BY_DMA;
+-		wmb();
+-
+ 		first_chip_ptr = MV_READ(MV64340_ETH_CURRENT_SERVED_TX_DESC_PTR(mp->port_num));
+ 
+ 		/* Apply send command */
+ 		if (first_chip_ptr == 0x00000000)
+ 			MV_WRITE(MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_0(mp->port_num), (struct eth_tx_desc *) mp->tx_desc_dma + tx_first_desc);
+ 
++		mb();
++
+                 ETH_ENABLE_TX_QUEUE(mp->port_num);
+ 
+ 		/*
+@@ -2433,6 +2533,10 @@
+ 	 * 64-bit boundary. We use the memory allocated for Tx descriptor.
+ 	 * This memory is located in TX_BUF_OFFSET_IN_DESC offset within the
+ 	 * Tx descriptor. */
++
++// Note Nico
++// Packet minimal size is 32 bytes, so we should check for <= 32 bytes here
++// the 8 bytes limitation is only when dealing with fragmented packet (on several buffer descriptors)
+ 	if (p_pkt_info->byte_cnt <= 8) {
+ 		printk(KERN_ERR
+ 		       "You have failed in the < 8 bytes errata - fixme\n");
+@@ -2442,12 +2546,12 @@
+ 	current_descriptor->byte_cnt = p_pkt_info->byte_cnt;
+ 	mp->tx_skb[tx_desc_curr] = (struct sk_buff *) p_pkt_info->return_info;
+ 
+-	mb();
+-
+ 	/* Set last desc with DMA ownership and interrupt enable. */
+ 	current_descriptor->cmd_sts = command_status |
+ 			ETH_BUFFER_OWNED_BY_DMA | ETH_TX_ENABLE_INTERRUPT;
+ 
++	mb();
++
+ 	/* Apply send command */
+ 	ETH_ENABLE_TX_QUEUE(mp->port_num);
+ 
+@@ -2586,6 +2690,8 @@
+ 	/* The following parameters are used to save readings from memory */
+ 	command_status = p_rx_desc->cmd_sts;
+ 
++	rmb();
++
+ 	/* Nothing to receive... */
+ 	if (command_status & (ETH_BUFFER_OWNED_BY_DMA))
+ 		return ETH_END_OF_JOB;
+diff -urN kernel-source-2.6.7.orig/drivers/net/mv64340_eth.h kernel-source-2.6.7/drivers/net/mv64340_eth.h
+--- kernel-source-2.6.7.orig/drivers/net/mv64340_eth.h	2004-08-05 13:06:32.674496008 +0200
++++ kernel-source-2.6.7/drivers/net/mv64340_eth.h	2004-07-08 08:08:14.000000000 +0200
+@@ -51,7 +51,7 @@
+ #define ETH_PORT2_IRQ_NUM ETH_PORT0_IRQ_NUM+2	/* main high register, bit1 */
+ 
+ /* Checksum offload for Tx works */
+-#define  MV64340_CHECKSUM_OFFLOAD_TX
++//#define  MV64340_CHECKSUM_OFFLOAD_TX
+ #define	 MV64340_NAPI
+ #define	 MV64340_TX_FAST_REFILL
+ #undef	 MV64340_COAL
+@@ -114,10 +114,18 @@
+ 
+ 
+ /* Default sdma control value */
++#ifdef __PPC__
++#define PORT_SDMA_CONFIG_VALUE			\
++			 ETH_RX_BURST_SIZE_4_64BIT 	|	\
++			 GT_ETH_IPG_INT_RX(0) 		|	\
++			 ETH_TX_BURST_SIZE_4_64BIT
++#else
+ #define PORT_SDMA_CONFIG_VALUE			\
+ 			 ETH_RX_BURST_SIZE_16_64BIT 	|	\
+ 			 GT_ETH_IPG_INT_RX(0) 		|	\
+ 			 ETH_TX_BURST_SIZE_16_64BIT;
++#endif
++
+ 
+ #define GT_ETH_IPG_INT_RX(value)                \
+             ((value & 0x3fff) << 8)
+@@ -417,6 +425,10 @@
+ #define ETH_TX_ENABLE_INTERRUPT             (BIT23)
+ #define ETH_AUTO_MODE                       (BIT30)
+ 
++
++// Useful def
++#define MV64340_ETH_RX_MINIMAL_FRAME_SIZE_REG(port)                (0x247c + (port<<10))
++
+ /* typedefs */
+ 
+ typedef enum _eth_func_ret_status {
+diff -urN kernel-source-2.6.7.orig/include/asm-ppc/mv64340.h kernel-source-2.6.7/include/asm-ppc/mv64340.h
+--- kernel-source-2.6.7.orig/include/asm-ppc/mv64340.h	1970-01-01 01:00:00.000000000 +0100
++++ kernel-source-2.6.7/include/asm-ppc/mv64340.h	2004-07-08 08:08:14.000000000 +0200
+@@ -0,0 +1,1070 @@
++/*
++ * mv64340.h - MV-64340 Internal registers definition file.
++ *
++ * Copyright 2002 Momentum Computer, Inc.
++ * 	Author: Matthew Dharm <mdharm at momenco.com>
++ * Copyright 2002 GALILEO TECHNOLOGY, LTD. 
++ *
++ * 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.
++ */
++#ifndef __ASM_MV64340_H
++#define __ASM_MV64340_H
++
++#include <asm/byteorder.h>
++
++/****************************************/
++/* Processor Address Space              */
++/****************************************/
++
++/* DDR SDRAM BAR and size registers */
++
++#define MV64340_CS_0_BASE_ADDR                                      0x008
++#define MV64340_CS_0_SIZE                                           0x010
++#define MV64340_CS_1_BASE_ADDR                                      0x208
++#define MV64340_CS_1_SIZE                                           0x210
++#define MV64340_CS_2_BASE_ADDR                                      0x018
++#define MV64340_CS_2_SIZE                                           0x020
++#define MV64340_CS_3_BASE_ADDR                                      0x218
++#define MV64340_CS_3_SIZE                                           0x220
++
++/* Devices BAR and size registers */
++
++#define MV64340_DEV_CS0_BASE_ADDR                                   0x028
++#define MV64340_DEV_CS0_SIZE                                        0x030
++#define MV64340_DEV_CS1_BASE_ADDR                                   0x228
++#define MV64340_DEV_CS1_SIZE                                        0x230
++#define MV64340_DEV_CS2_BASE_ADDR                                   0x248
++#define MV64340_DEV_CS2_SIZE                                        0x250
++#define MV64340_DEV_CS3_BASE_ADDR                                   0x038
++#define MV64340_DEV_CS3_SIZE                                        0x040
++#define MV64340_BOOTCS_BASE_ADDR                                    0x238
++#define MV64340_BOOTCS_SIZE                                         0x240
++
++/* PCI 0 BAR and size registers */
++
++#define MV64340_PCI_0_IO_BASE_ADDR                                  0x048
++#define MV64340_PCI_0_IO_SIZE                                       0x050
++#define MV64340_PCI_0_MEMORY0_BASE_ADDR                             0x058
++#define MV64340_PCI_0_MEMORY0_SIZE                                  0x060
++#define MV64340_PCI_0_MEMORY1_BASE_ADDR                             0x080
++#define MV64340_PCI_0_MEMORY1_SIZE                                  0x088
++#define MV64340_PCI_0_MEMORY2_BASE_ADDR                             0x258
++#define MV64340_PCI_0_MEMORY2_SIZE                                  0x260
++#define MV64340_PCI_0_MEMORY3_BASE_ADDR                             0x280
++#define MV64340_PCI_0_MEMORY3_SIZE                                  0x288
++
++/* PCI 1 BAR and size registers */
++#define MV64340_PCI_1_IO_BASE_ADDR                                  0x090
++#define MV64340_PCI_1_IO_SIZE                                       0x098
++#define MV64340_PCI_1_MEMORY0_BASE_ADDR                             0x0a0
++#define MV64340_PCI_1_MEMORY0_SIZE                                  0x0a8
++#define MV64340_PCI_1_MEMORY1_BASE_ADDR                             0x0b0
++#define MV64340_PCI_1_MEMORY1_SIZE                                  0x0b8
++#define MV64340_PCI_1_MEMORY2_BASE_ADDR                             0x2a0
++#define MV64340_PCI_1_MEMORY2_SIZE                                  0x2a8
++#define MV64340_PCI_1_MEMORY3_BASE_ADDR                             0x2b0
++#define MV64340_PCI_1_MEMORY3_SIZE                                  0x2b8
++
++/* SRAM base address */
++#define MV64340_INTEGRATED_SRAM_BASE_ADDR                           0x268
++
++/* internal registers space base address */
++#define MV64340_INTERNAL_SPACE_BASE_ADDR                            0x068
++
++/* Enables the CS , DEV_CS , PCI 0 and PCI 1 
++   windows above */
++#define MV64340_BASE_ADDR_ENABLE                                    0x278
++
++/****************************************/
++/* PCI remap registers                  */
++/****************************************/
++      /* PCI 0 */
++#define MV64340_PCI_0_IO_ADDR_REMAP                                 0x0f0
++#define MV64340_PCI_0_MEMORY0_LOW_ADDR_REMAP                        0x0f8
++#define MV64340_PCI_0_MEMORY0_HIGH_ADDR_REMAP                       0x320
++#define MV64340_PCI_0_MEMORY1_LOW_ADDR_REMAP                        0x100
++#define MV64340_PCI_0_MEMORY1_HIGH_ADDR_REMAP                       0x328
++#define MV64340_PCI_0_MEMORY2_LOW_ADDR_REMAP                        0x2f8
++#define MV64340_PCI_0_MEMORY2_HIGH_ADDR_REMAP                       0x330
++#define MV64340_PCI_0_MEMORY3_LOW_ADDR_REMAP                        0x300
++#define MV64340_PCI_0_MEMORY3_HIGH_ADDR_REMAP                       0x338
++      /* PCI 1 */
++#define MV64340_PCI_1_IO_ADDR_REMAP                                 0x108
++#define MV64340_PCI_1_MEMORY0_LOW_ADDR_REMAP                        0x110
++#define MV64340_PCI_1_MEMORY0_HIGH_ADDR_REMAP                       0x340
++#define MV64340_PCI_1_MEMORY1_LOW_ADDR_REMAP                        0x118
++#define MV64340_PCI_1_MEMORY1_HIGH_ADDR_REMAP                       0x348
++#define MV64340_PCI_1_MEMORY2_LOW_ADDR_REMAP                        0x310
++#define MV64340_PCI_1_MEMORY2_HIGH_ADDR_REMAP                       0x350
++#define MV64340_PCI_1_MEMORY3_LOW_ADDR_REMAP                        0x318
++#define MV64340_PCI_1_MEMORY3_HIGH_ADDR_REMAP                       0x358
++ 
++#define MV64340_CPU_PCI_0_HEADERS_RETARGET_CONTROL                  0x3b0
++#define MV64340_CPU_PCI_0_HEADERS_RETARGET_BASE                     0x3b8
++#define MV64340_CPU_PCI_1_HEADERS_RETARGET_CONTROL                  0x3c0
++#define MV64340_CPU_PCI_1_HEADERS_RETARGET_BASE                     0x3c8
++#define MV64340_CPU_GE_HEADERS_RETARGET_CONTROL                     0x3d0
++#define MV64340_CPU_GE_HEADERS_RETARGET_BASE                        0x3d8
++#define MV64340_CPU_IDMA_HEADERS_RETARGET_CONTROL                   0x3e0
++#define MV64340_CPU_IDMA_HEADERS_RETARGET_BASE                      0x3e8
++
++/****************************************/
++/*         CPU Control Registers        */
++/****************************************/
++
++#define MV64340_CPU_CONFIG                                          0x000
++#define MV64340_CPU_MODE                                            0x120
++#define MV64340_CPU_MASTER_CONTROL                                  0x160
++#define MV64340_CPU_CROSS_BAR_CONTROL_LOW                           0x150
++#define MV64340_CPU_CROSS_BAR_CONTROL_HIGH                          0x158
++#define MV64340_CPU_CROSS_BAR_TIMEOUT                               0x168
++
++/****************************************/
++/* SMP RegisterS                        */
++/****************************************/
++
++#define MV64340_SMP_WHO_AM_I                                        0x200
++#define MV64340_SMP_CPU0_DOORBELL                                   0x214
++#define MV64340_SMP_CPU0_DOORBELL_CLEAR                             0x21C
++#define MV64340_SMP_CPU1_DOORBELL                                   0x224
++#define MV64340_SMP_CPU1_DOORBELL_CLEAR                             0x22C
++#define MV64340_SMP_CPU0_DOORBELL_MASK                              0x234
++#define MV64340_SMP_CPU1_DOORBELL_MASK                              0x23C
++#define MV64340_SMP_SEMAPHOR0                                       0x244
++#define MV64340_SMP_SEMAPHOR1                                       0x24c
++#define MV64340_SMP_SEMAPHOR2                                       0x254
++#define MV64340_SMP_SEMAPHOR3                                       0x25c
++#define MV64340_SMP_SEMAPHOR4                                       0x264
++#define MV64340_SMP_SEMAPHOR5                                       0x26c
++#define MV64340_SMP_SEMAPHOR6                                       0x274
++#define MV64340_SMP_SEMAPHOR7                                       0x27c
++
++/****************************************/
++/*  CPU Sync Barrier Register           */
++/****************************************/
++
++#define MV64340_CPU_0_SYNC_BARRIER_TRIGGER                          0x0c0
++#define MV64340_CPU_0_SYNC_BARRIER_VIRTUAL                          0x0c8
++#define MV64340_CPU_1_SYNC_BARRIER_TRIGGER                          0x0d0
++#define MV64340_CPU_1_SYNC_BARRIER_VIRTUAL                          0x0d8
++
++/****************************************/
++/* CPU Access Protect                   */
++/****************************************/
++
++#define MV64340_CPU_PROTECT_WINDOW_0_BASE_ADDR                      0x180
++#define MV64340_CPU_PROTECT_WINDOW_0_SIZE                           0x188
++#define MV64340_CPU_PROTECT_WINDOW_1_BASE_ADDR                      0x190
++#define MV64340_CPU_PROTECT_WINDOW_1_SIZE                           0x198
++#define MV64340_CPU_PROTECT_WINDOW_2_BASE_ADDR                      0x1a0
++#define MV64340_CPU_PROTECT_WINDOW_2_SIZE                           0x1a8
++#define MV64340_CPU_PROTECT_WINDOW_3_BASE_ADDR                      0x1b0
++#define MV64340_CPU_PROTECT_WINDOW_3_SIZE                           0x1b8
++
++
++/****************************************/
++/*          CPU Error Report            */
++/****************************************/
++
++#define MV64340_CPU_ERROR_ADDR_LOW                                  0x070
++#define MV64340_CPU_ERROR_ADDR_HIGH                                 0x078
++#define MV64340_CPU_ERROR_DATA_LOW                                  0x128
++#define MV64340_CPU_ERROR_DATA_HIGH                                 0x130
++#define MV64340_CPU_ERROR_PARITY                                    0x138
++#define MV64340_CPU_ERROR_CAUSE                                     0x140
++#define MV64340_CPU_ERROR_MASK                                      0x148
++
++/****************************************/
++/*      CPU Interface Debug Registers 	*/
++/****************************************/
++
++#define MV64340_PUNIT_SLAVE_DEBUG_LOW                               0x360
++#define MV64340_PUNIT_SLAVE_DEBUG_HIGH                              0x368
++#define MV64340_PUNIT_MASTER_DEBUG_LOW                              0x370
++#define MV64340_PUNIT_MASTER_DEBUG_HIGH                             0x378
++#define MV64340_PUNIT_MMASK                                         0x3e4
++
++/****************************************/
++/*  Integrated SRAM Registers           */
++/****************************************/
++
++#define MV64340_SRAM_CONFIG                                         0x380
++#define MV64340_SRAM_TEST_MODE                                      0X3F4
++#define MV64340_SRAM_ERROR_CAUSE                                    0x388
++#define MV64340_SRAM_ERROR_ADDR                                     0x390
++#define MV64340_SRAM_ERROR_ADDR_HIGH                                0X3F8
++#define MV64340_SRAM_ERROR_DATA_LOW                                 0x398
++#define MV64340_SRAM_ERROR_DATA_HIGH                                0x3a0
++#define MV64340_SRAM_ERROR_DATA_PARITY                              0x3a8
++
++/****************************************/
++/* SDRAM Configuration                  */
++/****************************************/
++
++#define MV64340_SDRAM_CONFIG                                        0x1400
++#define MV64340_D_UNIT_CONTROL_LOW                                  0x1404
++#define MV64340_D_UNIT_CONTROL_HIGH                                 0x1424
++#define MV64340_SDRAM_TIMING_CONTROL_LOW                            0x1408
++#define MV64340_SDRAM_TIMING_CONTROL_HIGH                           0x140c
++#define MV64340_SDRAM_ADDR_CONTROL                                  0x1410
++#define MV64340_SDRAM_OPEN_PAGES_CONTROL                            0x1414
++#define MV64340_SDRAM_OPERATION                                     0x1418
++#define MV64340_SDRAM_MODE                                          0x141c
++#define MV64340_EXTENDED_DRAM_MODE                                  0x1420
++#define MV64340_SDRAM_CROSS_BAR_CONTROL_LOW                         0x1430
++#define MV64340_SDRAM_CROSS_BAR_CONTROL_HIGH                        0x1434
++#define MV64340_SDRAM_CROSS_BAR_TIMEOUT                             0x1438
++#define MV64340_SDRAM_ADDR_CTRL_PADS_CALIBRATION                    0x14c0
++#define MV64340_SDRAM_DATA_PADS_CALIBRATION                         0x14c4
++
++/****************************************/
++/* SDRAM Error Report                   */
++/****************************************/
++
++#define MV64340_SDRAM_ERROR_DATA_LOW                                0x1444
++#define MV64340_SDRAM_ERROR_DATA_HIGH                               0x1440
++#define MV64340_SDRAM_ERROR_ADDR                                    0x1450
++#define MV64340_SDRAM_RECEIVED_ECC                                  0x1448
++#define MV64340_SDRAM_CALCULATED_ECC                                0x144c
++#define MV64340_SDRAM_ECC_CONTROL                                   0x1454
++#define MV64340_SDRAM_ECC_ERROR_COUNTER                             0x1458
++
++/******************************************/
++/*  Controlled Delay Line (CDL) Registers */
++/******************************************/
++
++#define MV64340_DFCDL_CONFIG0                                       0x1480
++#define MV64340_DFCDL_CONFIG1                                       0x1484
++#define MV64340_DLL_WRITE                                           0x1488
++#define MV64340_DLL_READ                                            0x148c
++#define MV64340_SRAM_ADDR                                           0x1490
++#define MV64340_SRAM_DATA0                                          0x1494
++#define MV64340_SRAM_DATA1                                          0x1498
++#define MV64340_SRAM_DATA2                                          0x149c
++#define MV64340_DFCL_PROBE                                          0x14a0
++
++/******************************************/
++/*   Debug Registers                      */
++/******************************************/
++
++#define MV64340_DUNIT_DEBUG_LOW                                     0x1460
++#define MV64340_DUNIT_DEBUG_HIGH                                    0x1464
++#define MV64340_DUNIT_MMASK                                         0X1b40
++
++/****************************************/
++/* Device Parameters			*/
++/****************************************/
++
++#define MV64340_DEVICE_BANK0_PARAMETERS				    0x45c
++#define MV64340_DEVICE_BANK1_PARAMETERS				    0x460
++#define MV64340_DEVICE_BANK2_PARAMETERS				    0x464
++#define MV64340_DEVICE_BANK3_PARAMETERS				    0x468
++#define MV64340_DEVICE_BOOT_BANK_PARAMETERS			    0x46c
++#define MV64340_DEVICE_INTERFACE_CONTROL                            0x4c0
++#define MV64340_DEVICE_INTERFACE_CROSS_BAR_CONTROL_LOW              0x4c8
++#define MV64340_DEVICE_INTERFACE_CROSS_BAR_CONTROL_HIGH             0x4cc
++#define MV64340_DEVICE_INTERFACE_CROSS_BAR_TIMEOUT                  0x4c4
++
++/****************************************/
++/* Device interrupt registers		*/
++/****************************************/
++
++#define MV64340_DEVICE_INTERRUPT_CAUSE				    0x4d0
++#define MV64340_DEVICE_INTERRUPT_MASK				    0x4d4
++#define MV64340_DEVICE_ERROR_ADDR				    0x4d8
++#define MV64340_DEVICE_ERROR_DATA   				    0x4dc
++#define MV64340_DEVICE_ERROR_PARITY     			    0x4e0
++
++/****************************************/
++/* Device debug registers   		*/
++/****************************************/
++
++#define MV64340_DEVICE_DEBUG_LOW     				    0x4e4
++#define MV64340_DEVICE_DEBUG_HIGH     				    0x4e8
++#define MV64340_RUNIT_MMASK                                         0x4f0
++
++/****************************************/
++/* PCI Slave Address Decoding registers */
++/****************************************/
++
++#define MV64340_PCI_0_CS_0_BANK_SIZE                                0xc08
++#define MV64340_PCI_1_CS_0_BANK_SIZE                                0xc88
++#define MV64340_PCI_0_CS_1_BANK_SIZE                                0xd08
++#define MV64340_PCI_1_CS_1_BANK_SIZE                                0xd88
++#define MV64340_PCI_0_CS_2_BANK_SIZE                                0xc0c
++#define MV64340_PCI_1_CS_2_BANK_SIZE                                0xc8c
++#define MV64340_PCI_0_CS_3_BANK_SIZE                                0xd0c
++#define MV64340_PCI_1_CS_3_BANK_SIZE                                0xd8c
++#define MV64340_PCI_0_DEVCS_0_BANK_SIZE                             0xc10
++#define MV64340_PCI_1_DEVCS_0_BANK_SIZE                             0xc90
++#define MV64340_PCI_0_DEVCS_1_BANK_SIZE                             0xd10
++#define MV64340_PCI_1_DEVCS_1_BANK_SIZE                             0xd90
++#define MV64340_PCI_0_DEVCS_2_BANK_SIZE                             0xd18
++#define MV64340_PCI_1_DEVCS_2_BANK_SIZE                             0xd98
++#define MV64340_PCI_0_DEVCS_3_BANK_SIZE                             0xc14
++#define MV64340_PCI_1_DEVCS_3_BANK_SIZE                             0xc94
++#define MV64340_PCI_0_DEVCS_BOOT_BANK_SIZE                          0xd14
++#define MV64340_PCI_1_DEVCS_BOOT_BANK_SIZE                          0xd94
++#define MV64340_PCI_0_P2P_MEM0_BAR_SIZE                             0xd1c
++#define MV64340_PCI_1_P2P_MEM0_BAR_SIZE                             0xd9c
++#define MV64340_PCI_0_P2P_MEM1_BAR_SIZE                             0xd20
++#define MV64340_PCI_1_P2P_MEM1_BAR_SIZE                             0xda0
++#define MV64340_PCI_0_P2P_I_O_BAR_SIZE                              0xd24
++#define MV64340_PCI_1_P2P_I_O_BAR_SIZE                              0xda4
++#define MV64340_PCI_0_CPU_BAR_SIZE                                  0xd28
++#define MV64340_PCI_1_CPU_BAR_SIZE                                  0xda8
++#define MV64340_PCI_0_INTERNAL_SRAM_BAR_SIZE                        0xe00
++#define MV64340_PCI_1_INTERNAL_SRAM_BAR_SIZE                        0xe80
++#define MV64340_PCI_0_EXPANSION_ROM_BAR_SIZE                        0xd2c
++#define MV64340_PCI_1_EXPANSION_ROM_BAR_SIZE                        0xd9c
++#define MV64340_PCI_0_BASE_ADDR_REG_ENABLE                          0xc3c
++#define MV64340_PCI_1_BASE_ADDR_REG_ENABLE                          0xcbc
++#define MV64340_PCI_0_CS_0_BASE_ADDR_REMAP			    0xc48
++#define MV64340_PCI_1_CS_0_BASE_ADDR_REMAP			    0xcc8
++#define MV64340_PCI_0_CS_1_BASE_ADDR_REMAP			    0xd48
++#define MV64340_PCI_1_CS_1_BASE_ADDR_REMAP			    0xdc8
++#define MV64340_PCI_0_CS_2_BASE_ADDR_REMAP			    0xc4c
++#define MV64340_PCI_1_CS_2_BASE_ADDR_REMAP			    0xccc
++#define MV64340_PCI_0_CS_3_BASE_ADDR_REMAP			    0xd4c
++#define MV64340_PCI_1_CS_3_BASE_ADDR_REMAP			    0xdcc
++#define MV64340_PCI_0_CS_0_BASE_HIGH_ADDR_REMAP			    0xF04
++#define MV64340_PCI_1_CS_0_BASE_HIGH_ADDR_REMAP			    0xF84
++#define MV64340_PCI_0_CS_1_BASE_HIGH_ADDR_REMAP			    0xF08
++#define MV64340_PCI_1_CS_1_BASE_HIGH_ADDR_REMAP			    0xF88
++#define MV64340_PCI_0_CS_2_BASE_HIGH_ADDR_REMAP			    0xF0C
++#define MV64340_PCI_1_CS_2_BASE_HIGH_ADDR_REMAP			    0xF8C
++#define MV64340_PCI_0_CS_3_BASE_HIGH_ADDR_REMAP			    0xF10
++#define MV64340_PCI_1_CS_3_BASE_HIGH_ADDR_REMAP			    0xF90
++#define MV64340_PCI_0_DEVCS_0_BASE_ADDR_REMAP			    0xc50
++#define MV64340_PCI_1_DEVCS_0_BASE_ADDR_REMAP			    0xcd0
++#define MV64340_PCI_0_DEVCS_1_BASE_ADDR_REMAP			    0xd50
++#define MV64340_PCI_1_DEVCS_1_BASE_ADDR_REMAP			    0xdd0
++#define MV64340_PCI_0_DEVCS_2_BASE_ADDR_REMAP			    0xd58
++#define MV64340_PCI_1_DEVCS_2_BASE_ADDR_REMAP			    0xdd8
++#define MV64340_PCI_0_DEVCS_3_BASE_ADDR_REMAP           	    0xc54
++#define MV64340_PCI_1_DEVCS_3_BASE_ADDR_REMAP           	    0xcd4
++#define MV64340_PCI_0_DEVCS_BOOTCS_BASE_ADDR_REMAP      	    0xd54
++#define MV64340_PCI_1_DEVCS_BOOTCS_BASE_ADDR_REMAP      	    0xdd4
++#define MV64340_PCI_0_P2P_MEM0_BASE_ADDR_REMAP_LOW                  0xd5c
++#define MV64340_PCI_1_P2P_MEM0_BASE_ADDR_REMAP_LOW                  0xddc
++#define MV64340_PCI_0_P2P_MEM0_BASE_ADDR_REMAP_HIGH                 0xd60
++#define MV64340_PCI_1_P2P_MEM0_BASE_ADDR_REMAP_HIGH                 0xde0
++#define MV64340_PCI_0_P2P_MEM1_BASE_ADDR_REMAP_LOW                  0xd64
++#define MV64340_PCI_1_P2P_MEM1_BASE_ADDR_REMAP_LOW                  0xde4
++#define MV64340_PCI_0_P2P_MEM1_BASE_ADDR_REMAP_HIGH                 0xd68
++#define MV64340_PCI_1_P2P_MEM1_BASE_ADDR_REMAP_HIGH                 0xde8
++#define MV64340_PCI_0_P2P_I_O_BASE_ADDR_REMAP                       0xd6c
++#define MV64340_PCI_1_P2P_I_O_BASE_ADDR_REMAP                       0xdec 
++#define MV64340_PCI_0_CPU_BASE_ADDR_REMAP_LOW                       0xd70
++#define MV64340_PCI_1_CPU_BASE_ADDR_REMAP_LOW                       0xdf0
++#define MV64340_PCI_0_CPU_BASE_ADDR_REMAP_HIGH                      0xd74
++#define MV64340_PCI_1_CPU_BASE_ADDR_REMAP_HIGH                      0xdf4
++#define MV64340_PCI_0_INTEGRATED_SRAM_BASE_ADDR_REMAP               0xf00
++#define MV64340_PCI_1_INTEGRATED_SRAM_BASE_ADDR_REMAP               0xf80
++#define MV64340_PCI_0_EXPANSION_ROM_BASE_ADDR_REMAP                 0xf38
++#define MV64340_PCI_1_EXPANSION_ROM_BASE_ADDR_REMAP                 0xfb8
++#define MV64340_PCI_0_ADDR_DECODE_CONTROL                           0xd3c
++#define MV64340_PCI_1_ADDR_DECODE_CONTROL                           0xdbc
++#define MV64340_PCI_0_HEADERS_RETARGET_CONTROL                      0xF40
++#define MV64340_PCI_1_HEADERS_RETARGET_CONTROL                      0xFc0
++#define MV64340_PCI_0_HEADERS_RETARGET_BASE                         0xF44
++#define MV64340_PCI_1_HEADERS_RETARGET_BASE                         0xFc4
++#define MV64340_PCI_0_HEADERS_RETARGET_HIGH                         0xF48
++#define MV64340_PCI_1_HEADERS_RETARGET_HIGH                         0xFc8
++
++/***********************************/
++/*   PCI Control Register Map      */
++/***********************************/
++
++#define MV64340_PCI_0_DLL_STATUS_AND_COMMAND                        0x1d20
++#define MV64340_PCI_1_DLL_STATUS_AND_COMMAND                        0x1da0
++#define MV64340_PCI_0_MPP_PADS_DRIVE_CONTROL                        0x1d1C
++#define MV64340_PCI_1_MPP_PADS_DRIVE_CONTROL                        0x1d9C
++#define MV64340_PCI_0_COMMAND			         	    0xc00
++#define MV64340_PCI_1_COMMAND					    0xc80
++#define MV64340_PCI_0_MODE                                          0xd00
++#define MV64340_PCI_1_MODE                                          0xd80
++#define MV64340_PCI_0_RETRY	        	 		    0xc04
++#define MV64340_PCI_1_RETRY				            0xc84
++#define MV64340_PCI_0_READ_BUFFER_DISCARD_TIMER                     0xd04
++#define MV64340_PCI_1_READ_BUFFER_DISCARD_TIMER                     0xd84
++#define MV64340_PCI_0_MSI_TRIGGER_TIMER                             0xc38
++#define MV64340_PCI_1_MSI_TRIGGER_TIMER                             0xcb8
++#define MV64340_PCI_0_ARBITER_CONTROL                               0x1d00
++#define MV64340_PCI_1_ARBITER_CONTROL                               0x1d80
++#define MV64340_PCI_0_CROSS_BAR_CONTROL_LOW                         0x1d08
++#define MV64340_PCI_1_CROSS_BAR_CONTROL_LOW                         0x1d88
++#define MV64340_PCI_0_CROSS_BAR_CONTROL_HIGH                        0x1d0c
++#define MV64340_PCI_1_CROSS_BAR_CONTROL_HIGH                        0x1d8c
++#define MV64340_PCI_0_CROSS_BAR_TIMEOUT                             0x1d04
++#define MV64340_PCI_1_CROSS_BAR_TIMEOUT                             0x1d84
++#define MV64340_PCI_0_SYNC_BARRIER_TRIGGER_REG                      0x1D18
++#define MV64340_PCI_1_SYNC_BARRIER_TRIGGER_REG                      0x1D98
++#define MV64340_PCI_0_SYNC_BARRIER_VIRTUAL_REG                      0x1d10
++#define MV64340_PCI_1_SYNC_BARRIER_VIRTUAL_REG                      0x1d90
++#define MV64340_PCI_0_P2P_CONFIG                                    0x1d14
++#define MV64340_PCI_1_P2P_CONFIG                                    0x1d94
++
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_0_LOW                     0x1e00
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_0_HIGH                    0x1e04
++#define MV64340_PCI_0_ACCESS_CONTROL_SIZE_0                         0x1e08
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_1_LOW                     0x1e10
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_1_HIGH                    0x1e14
++#define MV64340_PCI_0_ACCESS_CONTROL_SIZE_1                         0x1e18
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_2_LOW                     0x1e20
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_2_HIGH                    0x1e24
++#define MV64340_PCI_0_ACCESS_CONTROL_SIZE_2                         0x1e28
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_3_LOW                     0x1e30
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_3_HIGH                    0x1e34
++#define MV64340_PCI_0_ACCESS_CONTROL_SIZE_3                         0x1e38
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_4_LOW                     0x1e40
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_4_HIGH                    0x1e44
++#define MV64340_PCI_0_ACCESS_CONTROL_SIZE_4                         0x1e48
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_5_LOW                     0x1e50
++#define MV64340_PCI_0_ACCESS_CONTROL_BASE_5_HIGH                    0x1e54
++#define MV64340_PCI_0_ACCESS_CONTROL_SIZE_5                         0x1e58
++
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_0_LOW                     0x1e80
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_0_HIGH                    0x1e84
++#define MV64340_PCI_1_ACCESS_CONTROL_SIZE_0                         0x1e88
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_1_LOW                     0x1e90
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_1_HIGH                    0x1e94
++#define MV64340_PCI_1_ACCESS_CONTROL_SIZE_1                         0x1e98
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_2_LOW                     0x1ea0
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_2_HIGH                    0x1ea4
++#define MV64340_PCI_1_ACCESS_CONTROL_SIZE_2                         0x1ea8
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_3_LOW                     0x1eb0
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_3_HIGH                    0x1eb4
++#define MV64340_PCI_1_ACCESS_CONTROL_SIZE_3                         0x1eb8
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_4_LOW                     0x1ec0
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_4_HIGH                    0x1ec4
++#define MV64340_PCI_1_ACCESS_CONTROL_SIZE_4                         0x1ec8
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_5_LOW                     0x1ed0
++#define MV64340_PCI_1_ACCESS_CONTROL_BASE_5_HIGH                    0x1ed4
++#define MV64340_PCI_1_ACCESS_CONTROL_SIZE_5                         0x1ed8
++
++/****************************************/
++/*   PCI Configuration Access Registers */
++/****************************************/
++
++#define MV64340_PCI_0_CONFIG_ADDR 				    0xcf8
++#define MV64340_PCI_0_CONFIG_DATA_VIRTUAL_REG                       0xcfc
++#define MV64340_PCI_1_CONFIG_ADDR 				    0xc78
++#define MV64340_PCI_1_CONFIG_DATA_VIRTUAL_REG                       0xc7c
++#define MV64340_PCI_0_INTERRUPT_ACKNOWLEDGE_VIRTUAL_REG	            0xc34
++#define MV64340_PCI_1_INTERRUPT_ACKNOWLEDGE_VIRTUAL_REG	            0xcb4
++
++/****************************************/
++/*   PCI Error Report Registers         */
++/****************************************/
++
++#define MV64340_PCI_0_SERR_MASK					    0xc28
++#define MV64340_PCI_1_SERR_MASK					    0xca8
++#define MV64340_PCI_0_ERROR_ADDR_LOW                                0x1d40
++#define MV64340_PCI_1_ERROR_ADDR_LOW                                0x1dc0
++#define MV64340_PCI_0_ERROR_ADDR_HIGH                               0x1d44
++#define MV64340_PCI_1_ERROR_ADDR_HIGH                               0x1dc4
++#define MV64340_PCI_0_ERROR_ATTRIBUTE                               0x1d48
++#define MV64340_PCI_1_ERROR_ATTRIBUTE                               0x1dc8
++#define MV64340_PCI_0_ERROR_COMMAND                                 0x1d50
++#define MV64340_PCI_1_ERROR_COMMAND                                 0x1dd0
++#define MV64340_PCI_0_ERROR_CAUSE                                   0x1d58
++#define MV64340_PCI_1_ERROR_CAUSE                                   0x1dd8
++#define MV64340_PCI_0_ERROR_MASK                                    0x1d5c
++#define MV64340_PCI_1_ERROR_MASK                                    0x1ddc
++
++/****************************************/
++/*   PCI Debug Registers                */
++/****************************************/
++
++#define MV64340_PCI_0_MMASK                                         0X1D24
++#define MV64340_PCI_1_MMASK                                         0X1DA4
++
++/*********************************************/
++/* PCI Configuration, Function 0, Registers  */
++/*********************************************/
++
++#define MV64340_PCI_DEVICE_AND_VENDOR_ID 			    0x000
++#define MV64340_PCI_STATUS_AND_COMMAND				    0x004
++#define MV64340_PCI_CLASS_CODE_AND_REVISION_ID			    0x008
++#define MV64340_PCI_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE 	    0x00C
++
++#define MV64340_PCI_SCS_0_BASE_ADDR_LOW   	      		    0x010
++#define MV64340_PCI_SCS_0_BASE_ADDR_HIGH   		            0x014
++#define MV64340_PCI_SCS_1_BASE_ADDR_LOW  	     	            0x018
++#define MV64340_PCI_SCS_1_BASE_ADDR_HIGH 		            0x01C
++#define MV64340_PCI_INTERNAL_REG_MEM_MAPPED_BASE_ADDR_LOW      	    0x020
++#define MV64340_PCI_INTERNAL_REG_MEM_MAPPED_BASE_ADDR_HIGH     	    0x024
++#define MV64340_PCI_SUBSYSTEM_ID_AND_SUBSYSTEM_VENDOR_ID	    0x02c
++#define MV64340_PCI_EXPANSION_ROM_BASE_ADDR_REG	                    0x030
++#define MV64340_PCI_CAPABILTY_LIST_POINTER                          0x034
++#define MV64340_PCI_INTERRUPT_PIN_AND_LINE 			    0x03C
++       /* capability list */
++#define MV64340_PCI_POWER_MANAGEMENT_CAPABILITY                     0x040
++#define MV64340_PCI_POWER_MANAGEMENT_STATUS_AND_CONTROL             0x044
++#define MV64340_PCI_VPD_ADDR                                        0x048
++#define MV64340_PCI_VPD_DATA                                        0x04c
++#define MV64340_PCI_MSI_MESSAGE_CONTROL                             0x050
++#define MV64340_PCI_MSI_MESSAGE_ADDR                                0x054
++#define MV64340_PCI_MSI_MESSAGE_UPPER_ADDR                          0x058
++#define MV64340_PCI_MSI_MESSAGE_DATA                                0x05c
++#define MV64340_PCI_X_COMMAND                                       0x060
++#define MV64340_PCI_X_STATUS                                        0x064
++#define MV64340_PCI_COMPACT_PCI_HOT_SWAP                            0x068
++
++/***********************************************/
++/*   PCI Configuration, Function 1, Registers  */
++/***********************************************/
++
++#define MV64340_PCI_SCS_2_BASE_ADDR_LOW   			    0x110
++#define MV64340_PCI_SCS_2_BASE_ADDR_HIGH			    0x114
++#define MV64340_PCI_SCS_3_BASE_ADDR_LOW 			    0x118
++#define MV64340_PCI_SCS_3_BASE_ADDR_HIGH			    0x11c
++#define MV64340_PCI_INTERNAL_SRAM_BASE_ADDR_LOW          	    0x120
++#define MV64340_PCI_INTERNAL_SRAM_BASE_ADDR_HIGH         	    0x124
++
++/***********************************************/
++/*  PCI Configuration, Function 2, Registers   */
++/***********************************************/
++
++#define MV64340_PCI_DEVCS_0_BASE_ADDR_LOW	    		    0x210
++#define MV64340_PCI_DEVCS_0_BASE_ADDR_HIGH 			    0x214
++#define MV64340_PCI_DEVCS_1_BASE_ADDR_LOW 			    0x218
++#define MV64340_PCI_DEVCS_1_BASE_ADDR_HIGH      		    0x21c
++#define MV64340_PCI_DEVCS_2_BASE_ADDR_LOW 			    0x220
++#define MV64340_PCI_DEVCS_2_BASE_ADDR_HIGH      		    0x224
++
++/***********************************************/
++/*  PCI Configuration, Function 3, Registers   */
++/***********************************************/
++
++#define MV64340_PCI_DEVCS_3_BASE_ADDR_LOW	    		    0x310
++#define MV64340_PCI_DEVCS_3_BASE_ADDR_HIGH 			    0x314
++#define MV64340_PCI_BOOT_CS_BASE_ADDR_LOW			    0x318
++#define MV64340_PCI_BOOT_CS_BASE_ADDR_HIGH      		    0x31c
++#define MV64340_PCI_CPU_BASE_ADDR_LOW 				    0x220
++#define MV64340_PCI_CPU_BASE_ADDR_HIGH      			    0x224
++
++/***********************************************/
++/*  PCI Configuration, Function 4, Registers   */
++/***********************************************/
++
++#define MV64340_PCI_P2P_MEM0_BASE_ADDR_LOW  			    0x410
++#define MV64340_PCI_P2P_MEM0_BASE_ADDR_HIGH 			    0x414
++#define MV64340_PCI_P2P_MEM1_BASE_ADDR_LOW   			    0x418
++#define MV64340_PCI_P2P_MEM1_BASE_ADDR_HIGH 			    0x41c
++#define MV64340_PCI_P2P_I_O_BASE_ADDR                 	            0x420
++#define MV64340_PCI_INTERNAL_REGS_I_O_MAPPED_BASE_ADDR              0x424
++
++/****************************************/
++/* Messaging Unit Registers (I20)   	*/
++/****************************************/
++
++#define MV64340_I2O_INBOUND_MESSAGE_REG0_PCI_0_SIDE		    0x010
++#define MV64340_I2O_INBOUND_MESSAGE_REG1_PCI_0_SIDE  		    0x014
++#define MV64340_I2O_OUTBOUND_MESSAGE_REG0_PCI_0_SIDE 		    0x018
++#define MV64340_I2O_OUTBOUND_MESSAGE_REG1_PCI_0_SIDE  		    0x01C
++#define MV64340_I2O_INBOUND_DOORBELL_REG_PCI_0_SIDE  		    0x020
++#define MV64340_I2O_INBOUND_INTERRUPT_CAUSE_REG_PCI_0_SIDE          0x024
++#define MV64340_I2O_INBOUND_INTERRUPT_MASK_REG_PCI_0_SIDE	    0x028
++#define MV64340_I2O_OUTBOUND_DOORBELL_REG_PCI_0_SIDE 		    0x02C
++#define MV64340_I2O_OUTBOUND_INTERRUPT_CAUSE_REG_PCI_0_SIDE         0x030
++#define MV64340_I2O_OUTBOUND_INTERRUPT_MASK_REG_PCI_0_SIDE          0x034
++#define MV64340_I2O_INBOUND_QUEUE_PORT_VIRTUAL_REG_PCI_0_SIDE       0x040
++#define MV64340_I2O_OUTBOUND_QUEUE_PORT_VIRTUAL_REG_PCI_0_SIDE      0x044
++#define MV64340_I2O_QUEUE_CONTROL_REG_PCI_0_SIDE 		    0x050
++#define MV64340_I2O_QUEUE_BASE_ADDR_REG_PCI_0_SIDE 		    0x054
++#define MV64340_I2O_INBOUND_FREE_HEAD_POINTER_REG_PCI_0_SIDE        0x060
++#define MV64340_I2O_INBOUND_FREE_TAIL_POINTER_REG_PCI_0_SIDE        0x064
++#define MV64340_I2O_INBOUND_POST_HEAD_POINTER_REG_PCI_0_SIDE        0x068
++#define MV64340_I2O_INBOUND_POST_TAIL_POINTER_REG_PCI_0_SIDE        0x06C
++#define MV64340_I2O_OUTBOUND_FREE_HEAD_POINTER_REG_PCI_0_SIDE       0x070
++#define MV64340_I2O_OUTBOUND_FREE_TAIL_POINTER_REG_PCI_0_SIDE       0x074
++#define MV64340_I2O_OUTBOUND_POST_HEAD_POINTER_REG_PCI_0_SIDE       0x0F8
++#define MV64340_I2O_OUTBOUND_POST_TAIL_POINTER_REG_PCI_0_SIDE       0x0FC
++
++#define MV64340_I2O_INBOUND_MESSAGE_REG0_PCI_1_SIDE		    0x090
++#define MV64340_I2O_INBOUND_MESSAGE_REG1_PCI_1_SIDE  		    0x094
++#define MV64340_I2O_OUTBOUND_MESSAGE_REG0_PCI_1_SIDE 		    0x098
++#define MV64340_I2O_OUTBOUND_MESSAGE_REG1_PCI_1_SIDE  		    0x09C
++#define MV64340_I2O_INBOUND_DOORBELL_REG_PCI_1_SIDE  		    0x0A0
++#define MV64340_I2O_INBOUND_INTERRUPT_CAUSE_REG_PCI_1_SIDE          0x0A4
++#define MV64340_I2O_INBOUND_INTERRUPT_MASK_REG_PCI_1_SIDE	    0x0A8
++#define MV64340_I2O_OUTBOUND_DOORBELL_REG_PCI_1_SIDE 		    0x0AC
++#define MV64340_I2O_OUTBOUND_INTERRUPT_CAUSE_REG_PCI_1_SIDE         0x0B0
++#define MV64340_I2O_OUTBOUND_INTERRUPT_MASK_REG_PCI_1_SIDE          0x0B4
++#define MV64340_I2O_INBOUND_QUEUE_PORT_VIRTUAL_REG_PCI_1_SIDE       0x0C0
++#define MV64340_I2O_OUTBOUND_QUEUE_PORT_VIRTUAL_REG_PCI_1_SIDE      0x0C4
++#define MV64340_I2O_QUEUE_CONTROL_REG_PCI_1_SIDE 		    0x0D0
++#define MV64340_I2O_QUEUE_BASE_ADDR_REG_PCI_1_SIDE 		    0x0D4
++#define MV64340_I2O_INBOUND_FREE_HEAD_POINTER_REG_PCI_1_SIDE        0x0E0
++#define MV64340_I2O_INBOUND_FREE_TAIL_POINTER_REG_PCI_1_SIDE        0x0E4
++#define MV64340_I2O_INBOUND_POST_HEAD_POINTER_REG_PCI_1_SIDE        0x0E8
++#define MV64340_I2O_INBOUND_POST_TAIL_POINTER_REG_PCI_1_SIDE        0x0EC
++#define MV64340_I2O_OUTBOUND_FREE_HEAD_POINTER_REG_PCI_1_SIDE       0x0F0
++#define MV64340_I2O_OUTBOUND_FREE_TAIL_POINTER_REG_PCI_1_SIDE       0x0F4
++#define MV64340_I2O_OUTBOUND_POST_HEAD_POINTER_REG_PCI_1_SIDE       0x078
++#define MV64340_I2O_OUTBOUND_POST_TAIL_POINTER_REG_PCI_1_SIDE       0x07C
++
++#define MV64340_I2O_INBOUND_MESSAGE_REG0_CPU0_SIDE		    0x1C10
++#define MV64340_I2O_INBOUND_MESSAGE_REG1_CPU0_SIDE  		    0x1C14
++#define MV64340_I2O_OUTBOUND_MESSAGE_REG0_CPU0_SIDE 		    0x1C18
++#define MV64340_I2O_OUTBOUND_MESSAGE_REG1_CPU0_SIDE  		    0x1C1C
++#define MV64340_I2O_INBOUND_DOORBELL_REG_CPU0_SIDE  		    0x1C20
++#define MV64340_I2O_INBOUND_INTERRUPT_CAUSE_REG_CPU0_SIDE  	    0x1C24
++#define MV64340_I2O_INBOUND_INTERRUPT_MASK_REG_CPU0_SIDE	    0x1C28
++#define MV64340_I2O_OUTBOUND_DOORBELL_REG_CPU0_SIDE 		    0x1C2C
++#define MV64340_I2O_OUTBOUND_INTERRUPT_CAUSE_REG_CPU0_SIDE          0x1C30
++#define MV64340_I2O_OUTBOUND_INTERRUPT_MASK_REG_CPU0_SIDE           0x1C34
++#define MV64340_I2O_INBOUND_QUEUE_PORT_VIRTUAL_REG_CPU0_SIDE        0x1C40
++#define MV64340_I2O_OUTBOUND_QUEUE_PORT_VIRTUAL_REG_CPU0_SIDE       0x1C44
++#define MV64340_I2O_QUEUE_CONTROL_REG_CPU0_SIDE 		    0x1C50
++#define MV64340_I2O_QUEUE_BASE_ADDR_REG_CPU0_SIDE 		    0x1C54
++#define MV64340_I2O_INBOUND_FREE_HEAD_POINTER_REG_CPU0_SIDE         0x1C60
++#define MV64340_I2O_INBOUND_FREE_TAIL_POINTER_REG_CPU0_SIDE         0x1C64
++#define MV64340_I2O_INBOUND_POST_HEAD_POINTER_REG_CPU0_SIDE         0x1C68
++#define MV64340_I2O_INBOUND_POST_TAIL_POINTER_REG_CPU0_SIDE         0x1C6C
++#define MV64340_I2O_OUTBOUND_FREE_HEAD_POINTER_REG_CPU0_SIDE        0x1C70
++#define MV64340_I2O_OUTBOUND_FREE_TAIL_POINTER_REG_CPU0_SIDE        0x1C74
++#define MV64340_I2O_OUTBOUND_POST_HEAD_POINTER_REG_CPU0_SIDE        0x1CF8
++#define MV64340_I2O_OUTBOUND_POST_TAIL_POINTER_REG_CPU0_SIDE        0x1CFC
++#define MV64340_I2O_INBOUND_MESSAGE_REG0_CPU1_SIDE		    0x1C90
++#define MV64340_I2O_INBOUND_MESSAGE_REG1_CPU1_SIDE  		    0x1C94
++#define MV64340_I2O_OUTBOUND_MESSAGE_REG0_CPU1_SIDE 		    0x1C98
++#define MV64340_I2O_OUTBOUND_MESSAGE_REG1_CPU1_SIDE  		    0x1C9C
++#define MV64340_I2O_INBOUND_DOORBELL_REG_CPU1_SIDE  		    0x1CA0
++#define MV64340_I2O_INBOUND_INTERRUPT_CAUSE_REG_CPU1_SIDE  	    0x1CA4
++#define MV64340_I2O_INBOUND_INTERRUPT_MASK_REG_CPU1_SIDE	    0x1CA8
++#define MV64340_I2O_OUTBOUND_DOORBELL_REG_CPU1_SIDE 		    0x1CAC
++#define MV64340_I2O_OUTBOUND_INTERRUPT_CAUSE_REG_CPU1_SIDE          0x1CB0
++#define MV64340_I2O_OUTBOUND_INTERRUPT_MASK_REG_CPU1_SIDE           0x1CB4
++#define MV64340_I2O_INBOUND_QUEUE_PORT_VIRTUAL_REG_CPU1_SIDE        0x1CC0
++#define MV64340_I2O_OUTBOUND_QUEUE_PORT_VIRTUAL_REG_CPU1_SIDE       0x1CC4
++#define MV64340_I2O_QUEUE_CONTROL_REG_CPU1_SIDE 		    0x1CD0
++#define MV64340_I2O_QUEUE_BASE_ADDR_REG_CPU1_SIDE 		    0x1CD4
++#define MV64340_I2O_INBOUND_FREE_HEAD_POINTER_REG_CPU1_SIDE         0x1CE0
++#define MV64340_I2O_INBOUND_FREE_TAIL_POINTER_REG_CPU1_SIDE         0x1CE4
++#define MV64340_I2O_INBOUND_POST_HEAD_POINTER_REG_CPU1_SIDE         0x1CE8
++#define MV64340_I2O_INBOUND_POST_TAIL_POINTER_REG_CPU1_SIDE         0x1CEC
++#define MV64340_I2O_OUTBOUND_FREE_HEAD_POINTER_REG_CPU1_SIDE        0x1CF0
++#define MV64340_I2O_OUTBOUND_FREE_TAIL_POINTER_REG_CPU1_SIDE        0x1CF4
++#define MV64340_I2O_OUTBOUND_POST_HEAD_POINTER_REG_CPU1_SIDE        0x1C78
++#define MV64340_I2O_OUTBOUND_POST_TAIL_POINTER_REG_CPU1_SIDE        0x1C7C
++
++/****************************************/
++/*        Ethernet Unit Registers  		*/
++/****************************************/
++
++#define MV64340_ETH_PHY_ADDR_REG                                    0x2000
++#define MV64340_ETH_SMI_REG                                         0x2004
++#define MV64340_ETH_UNIT_DEFAULT_ADDR_REG                           0x2008
++#define MV64340_ETH_UNIT_DEFAULTID_REG                              0x200c
++#define MV64340_ETH_UNIT_INTERRUPT_CAUSE_REG                        0x2080
++#define MV64340_ETH_UNIT_INTERRUPT_MASK_REG                         0x2084
++#define MV64340_ETH_UNIT_INTERNAL_USE_REG                           0x24fc
++#define MV64340_ETH_UNIT_ERROR_ADDR_REG                             0x2094
++#define MV64340_ETH_BAR_0                                           0x2200
++#define MV64340_ETH_BAR_1                                           0x2208
++#define MV64340_ETH_BAR_2                                           0x2210
++#define MV64340_ETH_BAR_3                                           0x2218
++#define MV64340_ETH_BAR_4                                           0x2220
++#define MV64340_ETH_BAR_5                                           0x2228
++#define MV64340_ETH_SIZE_REG_0                                      0x2204
++#define MV64340_ETH_SIZE_REG_1                                      0x220c
++#define MV64340_ETH_SIZE_REG_2                                      0x2214
++#define MV64340_ETH_SIZE_REG_3                                      0x221c
++#define MV64340_ETH_SIZE_REG_4                                      0x2224
++#define MV64340_ETH_SIZE_REG_5                                      0x222c
++#define MV64340_ETH_HEADERS_RETARGET_BASE_REG                       0x2230
++#define MV64340_ETH_HEADERS_RETARGET_CONTROL_REG                    0x2234
++#define MV64340_ETH_HIGH_ADDR_REMAP_REG_0                           0x2280
++#define MV64340_ETH_HIGH_ADDR_REMAP_REG_1                           0x2284
++#define MV64340_ETH_HIGH_ADDR_REMAP_REG_2                           0x2288
++#define MV64340_ETH_HIGH_ADDR_REMAP_REG_3                           0x228c
++#define MV64340_ETH_BASE_ADDR_ENABLE_REG                            0x2290
++#define MV64340_ETH_ACCESS_PROTECTION_REG(port)                    (0x2294 + (port<<2))
++#define MV64340_ETH_MIB_COUNTERS_BASE(port)                        (0x3000 + (port<<7))
++#define MV64340_ETH_PORT_CONFIG_REG(port)                          (0x2400 + (port<<10))
++#define MV64340_ETH_PORT_CONFIG_EXTEND_REG(port)                   (0x2404 + (port<<10))
++#define MV64340_ETH_MII_SERIAL_PARAMETRS_REG(port)                 (0x2408 + (port<<10))
++#define MV64340_ETH_GMII_SERIAL_PARAMETRS_REG(port)                (0x240c + (port<<10))
++#define MV64340_ETH_VLAN_ETHERTYPE_REG(port)                       (0x2410 + (port<<10))
++#define MV64340_ETH_MAC_ADDR_LOW(port)                             (0x2414 + (port<<10))
++#define MV64340_ETH_MAC_ADDR_HIGH(port)                            (0x2418 + (port<<10))
++#define MV64340_ETH_SDMA_CONFIG_REG(port)                          (0x241c + (port<<10))
++#define MV64340_ETH_DSCP_0(port)                                   (0x2420 + (port<<10))
++#define MV64340_ETH_DSCP_1(port)                                   (0x2424 + (port<<10))
++#define MV64340_ETH_DSCP_2(port)                                   (0x2428 + (port<<10))
++#define MV64340_ETH_DSCP_3(port)                                   (0x242c + (port<<10))
++#define MV64340_ETH_DSCP_4(port)                                   (0x2430 + (port<<10))
++#define MV64340_ETH_DSCP_5(port)                                   (0x2434 + (port<<10))
++#define MV64340_ETH_DSCP_6(port)                                   (0x2438 + (port<<10))
++#define MV64340_ETH_PORT_SERIAL_CONTROL_REG(port)                  (0x243c + (port<<10))
++#define MV64340_ETH_VLAN_PRIORITY_TAG_TO_PRIORITY(port)            (0x2440 + (port<<10))
++#define MV64340_ETH_PORT_STATUS_REG(port)                          (0x2444 + (port<<10))
++#define MV64340_ETH_TRANSMIT_QUEUE_COMMAND_REG(port)               (0x2448 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_FIXED_PRIORITY(port)                  (0x244c + (port<<10))
++#define MV64340_ETH_PORT_TX_TOKEN_BUCKET_RATE_CONFIG(port)         (0x2450 + (port<<10))
++#define MV64340_ETH_MAXIMUM_TRANSMIT_UNIT(port)                    (0x2458 + (port<<10))
++#define MV64340_ETH_PORT_MAXIMUM_TOKEN_BUCKET_SIZE(port)           (0x245c + (port<<10))
++#define MV64340_ETH_INTERRUPT_CAUSE_REG(port)                      (0x2460 + (port<<10))
++#define MV64340_ETH_INTERRUPT_CAUSE_EXTEND_REG(port)               (0x2464 + (port<<10))
++#define MV64340_ETH_INTERRUPT_MASK_REG(port)                       (0x2468 + (port<<10))
++#define MV64340_ETH_INTERRUPT_EXTEND_MASK_REG(port)                (0x246c + (port<<10))
++#define MV64340_ETH_RX_FIFO_URGENT_THRESHOLD_REG(port)             (0x2470 + (port<<10))
++#define MV64340_ETH_TX_FIFO_URGENT_THRESHOLD_REG(port)             (0x2474 + (port<<10))
++#define MV64340_ETH_RX_MINIMAL_FRAME_SIZE_REG(port)                (0x247c + (port<<10))
++#define MV64340_ETH_RX_DISCARDED_FRAMES_COUNTER(port)              (0x2484 + (port<<10)
++#define MV64340_ETH_PORT_DEBUG_0_REG(port)                         (0x248c + (port<<10))
++#define MV64340_ETH_PORT_DEBUG_1_REG(port)                         (0x2490 + (port<<10))
++#define MV64340_ETH_PORT_INTERNAL_ADDR_ERROR_REG(port)             (0x2494 + (port<<10))
++#define MV64340_ETH_INTERNAL_USE_REG(port)                         (0x24fc + (port<<10))
++#define MV64340_ETH_RECEIVE_QUEUE_COMMAND_REG(port)                (0x2680 + (port<<10))
++#define MV64340_ETH_CURRENT_SERVED_TX_DESC_PTR(port)               (0x2684 + (port<<10))      
++#define MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_0(port)              (0x260c + (port<<10))     
++#define MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_1(port)              (0x261c + (port<<10))     
++#define MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_2(port)              (0x262c + (port<<10))     
++#define MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_3(port)              (0x263c + (port<<10))     
++#define MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_4(port)              (0x264c + (port<<10))     
++#define MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_5(port)              (0x265c + (port<<10))     
++#define MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_6(port)              (0x266c + (port<<10))     
++#define MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_7(port)              (0x267c + (port<<10))     
++#define MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_0(port)              (0x26c0 + (port<<10))     
++#define MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_1(port)              (0x26c4 + (port<<10))     
++#define MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_2(port)              (0x26c8 + (port<<10))     
++#define MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_3(port)              (0x26cc + (port<<10))     
++#define MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_4(port)              (0x26d0 + (port<<10))     
++#define MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_5(port)              (0x26d4 + (port<<10))     
++#define MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_6(port)              (0x26d8 + (port<<10))     
++#define MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_7(port)              (0x26dc + (port<<10))     
++#define MV64340_ETH_TX_QUEUE_0_TOKEN_BUCKET_COUNT(port)            (0x2700 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_1_TOKEN_BUCKET_COUNT(port)            (0x2710 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_2_TOKEN_BUCKET_COUNT(port)            (0x2720 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_3_TOKEN_BUCKET_COUNT(port)            (0x2730 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_4_TOKEN_BUCKET_COUNT(port)            (0x2740 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_5_TOKEN_BUCKET_COUNT(port)            (0x2750 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_6_TOKEN_BUCKET_COUNT(port)            (0x2760 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_7_TOKEN_BUCKET_COUNT(port)            (0x2770 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_0_TOKEN_BUCKET_CONFIG(port)           (0x2704 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_1_TOKEN_BUCKET_CONFIG(port)           (0x2714 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_2_TOKEN_BUCKET_CONFIG(port)           (0x2724 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_3_TOKEN_BUCKET_CONFIG(port)           (0x2734 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_4_TOKEN_BUCKET_CONFIG(port)           (0x2744 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_5_TOKEN_BUCKET_CONFIG(port)           (0x2754 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_6_TOKEN_BUCKET_CONFIG(port)           (0x2764 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_7_TOKEN_BUCKET_CONFIG(port)           (0x2774 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_0_ARBITER_CONFIG(port)                (0x2708 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_1_ARBITER_CONFIG(port)                (0x2718 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_2_ARBITER_CONFIG(port)                (0x2728 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_3_ARBITER_CONFIG(port)                (0x2738 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_4_ARBITER_CONFIG(port)                (0x2748 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_5_ARBITER_CONFIG(port)                (0x2758 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_6_ARBITER_CONFIG(port)                (0x2768 + (port<<10))
++#define MV64340_ETH_TX_QUEUE_7_ARBITER_CONFIG(port)                (0x2778 + (port<<10))
++#define MV64340_ETH_PORT_TX_TOKEN_BUCKET_COUNT(port)               (0x2780 + (port<<10))
++#define MV64340_ETH_DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE(port)   (0x3400 + (port<<10))
++#define MV64340_ETH_DA_FILTER_OTHER_MULTICAST_TABLE_BASE(port)     (0x3500 + (port<<10))
++#define MV64340_ETH_DA_FILTER_UNICAST_TABLE_BASE(port)             (0x3600 + (port<<10))
++
++/*******************************************/
++/*          CUNIT  Registers               */
++/*******************************************/
++
++         /* Address Decoding Register Map */
++           
++#define MV64340_CUNIT_BASE_ADDR_REG0                                0xf200
++#define MV64340_CUNIT_BASE_ADDR_REG1                                0xf208
++#define MV64340_CUNIT_BASE_ADDR_REG2                                0xf210
++#define MV64340_CUNIT_BASE_ADDR_REG3                                0xf218
++#define MV64340_CUNIT_SIZE0                                         0xf204
++#define MV64340_CUNIT_SIZE1                                         0xf20c
++#define MV64340_CUNIT_SIZE2                                         0xf214
++#define MV64340_CUNIT_SIZE3                                         0xf21c
++#define MV64340_CUNIT_HIGH_ADDR_REMAP_REG0                          0xf240
++#define MV64340_CUNIT_HIGH_ADDR_REMAP_REG1                          0xf244
++#define MV64340_CUNIT_BASE_ADDR_ENABLE_REG                          0xf250
++#define MV64340_MPSC0_ACCESS_PROTECTION_REG                         0xf254
++#define MV64340_MPSC1_ACCESS_PROTECTION_REG                         0xf258
++#define MV64340_CUNIT_INTERNAL_SPACE_BASE_ADDR_REG                  0xf25C
++
++        /*  Error Report Registers  */
++
++#define MV64340_CUNIT_INTERRUPT_CAUSE_REG                           0xf310
++#define MV64340_CUNIT_INTERRUPT_MASK_REG                            0xf314
++#define MV64340_CUNIT_ERROR_ADDR                                    0xf318
++
++        /*  Cunit Control Registers */
++
++#define MV64340_CUNIT_ARBITER_CONTROL_REG                           0xf300
++#define MV64340_CUNIT_CONFIG_REG                                    0xb40c
++#define MV64340_CUNIT_CRROSBAR_TIMEOUT_REG                          0xf304
++
++        /*  Cunit Debug Registers   */
++
++#define MV64340_CUNIT_DEBUG_LOW                                     0xf340
++#define MV64340_CUNIT_DEBUG_HIGH                                    0xf344
++#define MV64340_CUNIT_MMASK                                         0xf380
++
++        /*  MPSCs Clocks Routing Registers  */
++
++#define MV64340_MPSC_ROUTING_REG                                    0xb400
++#define MV64340_MPSC_RX_CLOCK_ROUTING_REG                           0xb404
++#define MV64340_MPSC_TX_CLOCK_ROUTING_REG                           0xb408
++
++        /*  MPSCs Interrupts Registers    */
++
++#define MV64340_MPSC_CAUSE_REG(port)                               (0xb804 + (port<<3))
++#define MV64340_MPSC_MASK_REG(port)                                (0xb884 + (port<<3))
++ 
++#define MV64340_MPSC_MAIN_CONFIG_LOW(port)                         (0x8000 + (port<<12))
++#define MV64340_MPSC_MAIN_CONFIG_HIGH(port)                        (0x8004 + (port<<12))    
++#define MV64340_MPSC_PROTOCOL_CONFIG(port)                         (0x8008 + (port<<12))    
++#define MV64340_MPSC_CHANNEL_REG1(port)                            (0x800c + (port<<12))    
++#define MV64340_MPSC_CHANNEL_REG2(port)                            (0x8010 + (port<<12))    
++#define MV64340_MPSC_CHANNEL_REG3(port)                            (0x8014 + (port<<12))    
++#define MV64340_MPSC_CHANNEL_REG4(port)                            (0x8018 + (port<<12))    
++#define MV64340_MPSC_CHANNEL_REG5(port)                            (0x801c + (port<<12))    
++#define MV64340_MPSC_CHANNEL_REG6(port)                            (0x8020 + (port<<12))    
++#define MV64340_MPSC_CHANNEL_REG7(port)                            (0x8024 + (port<<12))    
++#define MV64340_MPSC_CHANNEL_REG8(port)                            (0x8028 + (port<<12))    
++#define MV64340_MPSC_CHANNEL_REG9(port)                            (0x802c + (port<<12))    
++#define MV64340_MPSC_CHANNEL_REG10(port)                           (0x8030 + (port<<12))    
++        
++        /*  MPSC0 Registers      */
++
++
++/***************************************/
++/*          SDMA Registers             */
++/***************************************/
++
++#define MV64340_SDMA_CONFIG_REG(channel)                        (0x4000 + (channel<<13))        
++#define MV64340_SDMA_COMMAND_REG(channel)                       (0x4008 + (channel<<13))        
++#define MV64340_SDMA_CURRENT_RX_DESCRIPTOR_POINTER(channel)     (0x4810 + (channel<<13))        
++#define MV64340_SDMA_CURRENT_TX_DESCRIPTOR_POINTER(channel)     (0x4c10 + (channel<<13))        
++#define MV64340_SDMA_FIRST_TX_DESCRIPTOR_POINTER(channel)       (0x4c14 + (channel<<13)) 
++
++#define MV64340_SDMA_CAUSE_REG                                      0xb800
++#define MV64340_SDMA_MASK_REG                                       0xb880
++         
++/* BRG Interrupts */
++
++#define MV64340_BRG_CONFIG_REG(brg)                              (0xb200 + (brg<<3))
++#define MV64340_BRG_BAUDE_TUNING_REG(brg)                        (0xb208 + (brg<<3))
++#define MV64340_BRG_CAUSE_REG                                       0xb834
++#define MV64340_BRG_MASK_REG                                        0xb8b4
++
++/****************************************/
++/* DMA Channel Control			*/
++/****************************************/
++
++#define MV64340_DMA_CHANNEL0_CONTROL 				    0x840
++#define MV64340_DMA_CHANNEL0_CONTROL_HIGH			    0x880
++#define MV64340_DMA_CHANNEL1_CONTROL 				    0x844
++#define MV64340_DMA_CHANNEL1_CONTROL_HIGH			    0x884
++#define MV64340_DMA_CHANNEL2_CONTROL 				    0x848
++#define MV64340_DMA_CHANNEL2_CONTROL_HIGH			    0x888
++#define MV64340_DMA_CHANNEL3_CONTROL 				    0x84C
++#define MV64340_DMA_CHANNEL3_CONTROL_HIGH			    0x88C
++
++
++/****************************************/
++/*           IDMA Registers             */
++/****************************************/
++
++#define MV64340_DMA_CHANNEL0_BYTE_COUNT                             0x800
++#define MV64340_DMA_CHANNEL1_BYTE_COUNT                             0x804
++#define MV64340_DMA_CHANNEL2_BYTE_COUNT                             0x808
++#define MV64340_DMA_CHANNEL3_BYTE_COUNT                             0x80C
++#define MV64340_DMA_CHANNEL0_SOURCE_ADDR                            0x810
++#define MV64340_DMA_CHANNEL1_SOURCE_ADDR                            0x814
++#define MV64340_DMA_CHANNEL2_SOURCE_ADDR                            0x818
++#define MV64340_DMA_CHANNEL3_SOURCE_ADDR                            0x81c
++#define MV64340_DMA_CHANNEL0_DESTINATION_ADDR                       0x820
++#define MV64340_DMA_CHANNEL1_DESTINATION_ADDR                       0x824
++#define MV64340_DMA_CHANNEL2_DESTINATION_ADDR                       0x828
++#define MV64340_DMA_CHANNEL3_DESTINATION_ADDR                       0x82C
++#define MV64340_DMA_CHANNEL0_NEXT_DESCRIPTOR_POINTER                0x830
++#define MV64340_DMA_CHANNEL1_NEXT_DESCRIPTOR_POINTER                0x834
++#define MV64340_DMA_CHANNEL2_NEXT_DESCRIPTOR_POINTER                0x838
++#define MV64340_DMA_CHANNEL3_NEXT_DESCRIPTOR_POINTER                0x83C
++#define MV64340_DMA_CHANNEL0_CURRENT_DESCRIPTOR_POINTER             0x870
++#define MV64340_DMA_CHANNEL1_CURRENT_DESCRIPTOR_POINTER             0x874
++#define MV64340_DMA_CHANNEL2_CURRENT_DESCRIPTOR_POINTER             0x878
++#define MV64340_DMA_CHANNEL3_CURRENT_DESCRIPTOR_POINTER             0x87C
++
++ /*  IDMA Address Decoding Base Address Registers  */
++ 
++#define MV64340_DMA_BASE_ADDR_REG0                                  0xa00
++#define MV64340_DMA_BASE_ADDR_REG1                                  0xa08
++#define MV64340_DMA_BASE_ADDR_REG2                                  0xa10
++#define MV64340_DMA_BASE_ADDR_REG3                                  0xa18
++#define MV64340_DMA_BASE_ADDR_REG4                                  0xa20
++#define MV64340_DMA_BASE_ADDR_REG5                                  0xa28
++#define MV64340_DMA_BASE_ADDR_REG6                                  0xa30
++#define MV64340_DMA_BASE_ADDR_REG7                                  0xa38
++ 
++ /*  IDMA Address Decoding Size Address Register   */
++ 
++#define MV64340_DMA_SIZE_REG0                                       0xa04
++#define MV64340_DMA_SIZE_REG1                                       0xa0c
++#define MV64340_DMA_SIZE_REG2                                       0xa14
++#define MV64340_DMA_SIZE_REG3                                       0xa1c
++#define MV64340_DMA_SIZE_REG4                                       0xa24
++#define MV64340_DMA_SIZE_REG5                                       0xa2c
++#define MV64340_DMA_SIZE_REG6                                       0xa34
++#define MV64340_DMA_SIZE_REG7                                       0xa3C
++
++ /* IDMA Address Decoding High Address Remap and Access 
++                  Protection Registers                    */
++                  
++#define MV64340_DMA_HIGH_ADDR_REMAP_REG0                            0xa60
++#define MV64340_DMA_HIGH_ADDR_REMAP_REG1                            0xa64
++#define MV64340_DMA_HIGH_ADDR_REMAP_REG2                            0xa68
++#define MV64340_DMA_HIGH_ADDR_REMAP_REG3                            0xa6C
++#define MV64340_DMA_BASE_ADDR_ENABLE_REG                            0xa80
++#define MV64340_DMA_CHANNEL0_ACCESS_PROTECTION_REG                  0xa70
++#define MV64340_DMA_CHANNEL1_ACCESS_PROTECTION_REG                  0xa74
++#define MV64340_DMA_CHANNEL2_ACCESS_PROTECTION_REG                  0xa78
++#define MV64340_DMA_CHANNEL3_ACCESS_PROTECTION_REG                  0xa7c
++#define MV64340_DMA_ARBITER_CONTROL                                 0x860
++#define MV64340_DMA_CROSS_BAR_TIMEOUT                               0x8d0
++
++ /*  IDMA Headers Retarget Registers   */
++
++#define MV64340_DMA_HEADERS_RETARGET_CONTROL                        0xa84
++#define MV64340_DMA_HEADERS_RETARGET_BASE                           0xa88
++
++ /*  IDMA Interrupt Register  */
++
++#define MV64340_DMA_INTERRUPT_CAUSE_REG                             0x8c0
++#define MV64340_DMA_INTERRUPT_CAUSE_MASK                            0x8c4
++#define MV64340_DMA_ERROR_ADDR                                      0x8c8
++#define MV64340_DMA_ERROR_SELECT                                    0x8cc
++
++ /*  IDMA Debug Register ( for internal use )    */
++
++#define MV64340_DMA_DEBUG_LOW                                       0x8e0
++#define MV64340_DMA_DEBUG_HIGH                                      0x8e4
++#define MV64340_DMA_SPARE                                           0xA8C
++
++/****************************************/
++/* Timer_Counter 			*/
++/****************************************/
++
++#define MV64340_TIMER_COUNTER0					    0x850
++#define MV64340_TIMER_COUNTER1					    0x854
++#define MV64340_TIMER_COUNTER2					    0x858
++#define MV64340_TIMER_COUNTER3					    0x85C
++#define MV64340_TIMER_COUNTER_0_3_CONTROL			    0x864
++#define MV64340_TIMER_COUNTER_0_3_INTERRUPT_CAUSE		    0x868
++#define MV64340_TIMER_COUNTER_0_3_INTERRUPT_MASK      		    0x86c
++
++/****************************************/
++/*         Watchdog registers  	        */
++/****************************************/
++
++#define MV64340_WATCHDOG_CONFIG_REG                                 0xb410
++#define MV64340_WATCHDOG_VALUE_REG                                  0xb414
++
++/****************************************/
++/* I2C Registers                        */
++/****************************************/
++
++#define MV64340_I2C_SLAVE_ADDR                                      0xc000
++#define MV64340_I2C_EXTENDED_SLAVE_ADDR                             0xc010
++#define MV64340_I2C_DATA                                            0xc004
++#define MV64340_I2C_CONTROL                                         0xc008
++#define MV64340_I2C_STATUS_BAUDE_RATE                               0xc00C
++#define MV64340_I2C_SOFT_RESET                                      0xc01c
++
++/****************************************/
++/* GPP Interface Registers              */
++/****************************************/
++
++#define MV64340_GPP_IO_CONTROL                                      0xf100
++#define MV64340_GPP_LEVEL_CONTROL                                   0xf110
++#define MV64340_GPP_VALUE                                           0xf104
++#define MV64340_GPP_INTERRUPT_CAUSE                                 0xf108
++#define MV64340_GPP_INTERRUPT_MASK0                                 0xf10c
++#define MV64340_GPP_INTERRUPT_MASK1                                 0xf114
++#define MV64340_GPP_VALUE_SET                                       0xf118
++#define MV64340_GPP_VALUE_CLEAR                                     0xf11c
++
++/****************************************/
++/* Interrupt Controller Registers       */
++/****************************************/
++
++/****************************************/
++/* Interrupts	  			*/
++/****************************************/
++
++#define MV64340_MAIN_INTERRUPT_CAUSE_LOW                            0x004
++#define MV64340_MAIN_INTERRUPT_CAUSE_HIGH                           0x00c
++#define MV64340_CPU_INTERRUPT0_MASK_LOW                             0x014
++#define MV64340_CPU_INTERRUPT0_MASK_HIGH                            0x01c
++#define MV64340_CPU_INTERRUPT0_SELECT_CAUSE                         0x024
++#define MV64340_CPU_INTERRUPT1_MASK_LOW                             0x034
++#define MV64340_CPU_INTERRUPT1_MASK_HIGH                            0x03c
++#define MV64340_CPU_INTERRUPT1_SELECT_CAUSE                         0x044
++#define MV64340_INTERRUPT0_MASK_0_LOW                               0x054
++#define MV64340_INTERRUPT0_MASK_0_HIGH                              0x05c
++#define MV64340_INTERRUPT0_SELECT_CAUSE                             0x064
++#define MV64340_INTERRUPT1_MASK_0_LOW                               0x074
++#define MV64340_INTERRUPT1_MASK_0_HIGH                              0x07c
++#define MV64340_INTERRUPT1_SELECT_CAUSE                             0x084
++
++/****************************************/
++/*      MPP Interface Registers         */
++/****************************************/
++
++#define MV64340_MPP_CONTROL0                                        0xf000
++#define MV64340_MPP_CONTROL1                                        0xf004
++#define MV64340_MPP_CONTROL2                                        0xf008
++#define MV64340_MPP_CONTROL3                                        0xf00c
++
++/****************************************/
++/*    Serial Initialization registers   */
++/****************************************/
++
++#define MV64340_SERIAL_INIT_LAST_DATA                               0xf324
++#define MV64340_SERIAL_INIT_CONTROL                                 0xf328
++#define MV64340_SERIAL_INIT_STATUS                                  0xf32c
++
++extern unsigned long mv64340_base;
++
++#define MV64340_BASE       (mv64340_base)
++
++/*
++ * Because of an error/peculiarity in the Galileo chip, we need to swap the
++ * bytes when running bigendian.
++ */
++
++#define MV_WRITE(ofs, data)		\
++        *(volatile u32 *)(MV64340_BASE + (ofs)) = cpu_to_le32((u32)data)
++#define MV_READ(ofs)			\
++        (le32_to_cpu(*(volatile u32 *)(MV64340_BASE + (ofs))))
++
++#define MV_WRITE_16(ofs, data)		\
++        *(volatile u16 *)(MV64340_BASE + (ofs)) = cpu_to_le16((u16)data)
++#define MV_READ_16(ofs)			\
++        le16_to_cpu(*(volatile u16 *)(MV64340_BASE + (ofs)))
++
++#define MV_WRITE_8(ofs, data)		\
++        *(volatile u8 *)(MV64340_BASE + (ofs)) = ((u16)data)
++#define MV_READ_8(ofs)			\
++        (*(volatile u8 *)(MV64340_BASE + (ofs)))
++
++#define MV_SET_REG_BITS(ofs, bits)	\
++	(*((volatile u32 *)(MV64340_BASE + (ofs)))) |= ((u32)cpu_to_le32(bits))
++#define MV_RESET_REG_BITS(ofs, bits)	\
++	(*((volatile u32 *)(MV64340_BASE + (ofs)))) &= ~((u32)cpu_to_le32(bits))
++
++extern void mv64340_irq_init(unsigned int base);
++
++extern struct pci_ops mv64340_bus0_pci_ops;
++extern struct pci_ops mv64340_bus1_pci_ops;
++
++#endif /* __ASM_MV64340_H */

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/microcode-devfs-name.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/microcode-devfs-name.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/microcode-devfs-name.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,21 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix i386 microcode driver devfs name
+## DP: Patch author: Christoph Hellwig
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- 1.28/arch/i386/kernel/microcode.c	2004-06-29 16:44:01 +02:00
++++ edited/arch/i386/kernel/microcode.c	2004-08-29 22:57:37 +02:00
+@@ -485,6 +485,7 @@
+ static struct miscdevice microcode_dev = {
+ 	.minor		= MICROCODE_MINOR,
+ 	.name		= "microcode",
++	.devfs_name	= "cpu/microcode",
+ 	.fops		= &microcode_fops,
+ };
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/minix-block-accounting-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/minix-block-accounting-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/minix-block-accounting-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,39 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [PATCH] minix block usage counting fix
+## DP: Patch author: Andries Brouwer <Andries.Brouwer at cwi.nl>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/08/22 14:07:46-07:00 Andries.Brouwer at cwi.nl 
+#   [PATCH] minix block usage counting fix
+#   
+#   In 2.5.18 some minix-specific stuff was moved to the minix subdirectory
+#   where it belonged.  However, a typo crept in, causing inode disk usage
+#   to be incorrectly reported.  A few people have complained, but so far
+#   not sufficiently loudly.
+#   
+#   Signed-off-by: Andries Brouwer <Andries.Brouwer at cwi.nl>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# fs/minix/itree_common.c
+#   2004/08/20 14:02:26-07:00 Andries.Brouwer at cwi.nl +1 -1
+#   minix block usage counting fix
+# 
+diff -Nru a/fs/minix/itree_common.c b/fs/minix/itree_common.c
+--- a/fs/minix/itree_common.c	2004-08-25 12:21:07 +02:00
++++ b/fs/minix/itree_common.c	2004-08-25 12:21:07 +02:00
+@@ -358,5 +358,5 @@
+ 		res += blocks;
+ 		direct = 1;
+ 	}
+-	return blocks;
++	return res;
+ }

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mm-vmscan-1.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mm-vmscan-1.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mm-vmscan-1.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,168 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: make shrinker_sem an rwsem
+## DP: Patch author: Nick Piggin
+## DP: Upstream status: included
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: nickpiggin (BitKeeper)
+# cset: 1.1803.144.115 (2.6) key=412a4a2eBE6X_vbU-jOsDt05xUCIMw
+# inclusion: upstream
+# descrition: [PATCH] make shrinker_sem an rwsem
+# revision date: Mon, 08 Nov 2004 11:51:48 +0900
+#
+# rset: ChangeSet|1.1803.144.114..1.1803.144.115
+# rset: mm/vmscan.c|1.226..1.227
+# rset: fs/inode.c|1.131..1.132
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/08/23 12:49:02-07:00 nickpiggin at yahoo.com.au 
+#   [PATCH] make shrinker_sem an rwsem
+#   
+#   Use an rwsem to protect the shrinker list instead of a regular
+#   semaphore.  Modifications to the list are now done under the write lock,
+#   shrink_slab takes the read lock, and access to shrinker->nr becomes racy
+#   (which is no different to how the page lru scanner is implemented).  The
+#   shrinker functions become concurrent.
+#   
+#   Previously, having the slab scanner get preempted or scheduling while
+#   holding the semaphore would cause other tasks to skip putting pressure on
+#   the slab.
+#   
+#   Also, make shrink_icache_memory return -1 if it can't do anything in order
+#   to hold pressure on this cache and prevent useless looping in shrink_slab.
+#   
+#   Signed-off-by: Nick Piggin <nickpiggin at yahoo.com.au>
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# mm/vmscan.c
+#   2004/08/23 01:15:00-07:00 nickpiggin at yahoo.com.au +23 -16
+#   make shrinker_sem an rwsem
+# 
+# fs/inode.c
+#   2004/08/23 01:15:00-07:00 nickpiggin at yahoo.com.au +3 -2
+#   make shrinker_sem an rwsem
+# 
+diff -Nru a/fs/inode.c b/fs/inode.c
+--- a/fs/inode.c	2004-11-08 11:51:48 +09:00
++++ b/fs/inode.c	2004-11-08 11:51:48 +09:00
+@@ -485,8 +485,9 @@
+ 		 * and we don't want to recurse into the FS that called us
+ 		 * in clear_inode() and friends..
+ 	 	 */
+-		if (gfp_mask & __GFP_FS)
+-			prune_icache(nr);
++		if (!(gfp_mask & __GFP_FS))
++			return -1;
++		prune_icache(nr);
+ 	}
+ 	return (inodes_stat.nr_unused / 100) * sysctl_vfs_cache_pressure;
+ }
+diff -Nru a/mm/vmscan.c b/mm/vmscan.c
+--- a/mm/vmscan.c	2004-11-08 11:51:48 +09:00
++++ b/mm/vmscan.c	2004-11-08 11:51:48 +09:00
+@@ -32,6 +32,7 @@
+ #include <linux/topology.h>
+ #include <linux/cpu.h>
+ #include <linux/notifier.h>
++#include <linux/rwsem.h>
+ 
+ #include <asm/tlbflush.h>
+ #include <asm/div64.h>
+@@ -122,7 +123,7 @@
+ static long total_memory;
+ 
+ static LIST_HEAD(shrinker_list);
+-static DECLARE_MUTEX(shrinker_sem);
++static DECLARE_RWSEM(shrinker_rwsem);
+ 
+ /*
+  * Add a shrinker callback to be called from the vm
+@@ -136,9 +137,9 @@
+ 	        shrinker->shrinker = theshrinker;
+ 	        shrinker->seeks = seeks;
+ 	        shrinker->nr = 0;
+-	        down(&shrinker_sem);
++	        down_write(&shrinker_rwsem);
+ 	        list_add(&shrinker->list, &shrinker_list);
+-	        up(&shrinker_sem);
++	        up_write(&shrinker_rwsem);
+ 	}
+ 	return shrinker;
+ }
+@@ -149,13 +150,13 @@
+  */
+ void remove_shrinker(struct shrinker *shrinker)
+ {
+-	down(&shrinker_sem);
++	down_write(&shrinker_rwsem);
+ 	list_del(&shrinker->list);
+-	up(&shrinker_sem);
++	up_write(&shrinker_rwsem);
+ 	kfree(shrinker);
+ }
+ EXPORT_SYMBOL(remove_shrinker);
+- 
++
+ #define SHRINK_BATCH 128
+ /*
+  * Call the shrink functions to age shrinkable caches
+@@ -179,11 +180,15 @@
+ {
+ 	struct shrinker *shrinker;
+ 
+-	if (down_trylock(&shrinker_sem))
++	if (scanned == 0)
++		return 0;
++
++	if (!down_read_trylock(&shrinker_rwsem))
+ 		return 0;
+ 
+ 	list_for_each_entry(shrinker, &shrinker_list, list) {
+ 		unsigned long long delta;
++		unsigned long total_scan;
+ 
+ 		delta = (4 * scanned) / shrinker->seeks;
+ 		delta *= (*shrinker->shrinker)(0, gfp_mask);
+@@ -192,23 +197,25 @@
+ 		if (shrinker->nr < 0)
+ 			shrinker->nr = LONG_MAX;	/* It wrapped! */
+ 
+-		if (shrinker->nr <= SHRINK_BATCH)
+-			continue;
+-		while (shrinker->nr) {
+-			long this_scan = shrinker->nr;
++		total_scan = shrinker->nr;
++		shrinker->nr = 0;
++
++		while (total_scan >= SHRINK_BATCH) {
++			long this_scan = SHRINK_BATCH;
+ 			int shrink_ret;
+ 
+-			if (this_scan > 128)
+-				this_scan = 128;
+ 			shrink_ret = (*shrinker->shrinker)(this_scan, gfp_mask);
+-			mod_page_state(slabs_scanned, this_scan);
+-			shrinker->nr -= this_scan;
+ 			if (shrink_ret == -1)
+ 				break;
++			mod_page_state(slabs_scanned, this_scan);
++			total_scan -= this_scan;
++
+ 			cond_resched();
+ 		}
++
++		shrinker->nr += total_scan;
+ 	}
+-	up(&shrinker_sem);
++	up_read(&shrinker_rwsem);
+ 	return 0;
+ }
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mm-vmscan-2.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mm-vmscan-2.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mm-vmscan-2.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,113 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: vm: prevent kswapd pageout priority windup
+## DP: Patch author: Nick Piggin
+## DP: Upstream status: included
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: nickpiggin (BitKeeper)
+# cset: 1.1988.46.15 (2.6) key=416025f0OI7Y9P1lrazW0bOukH_ctA
+# inclusion: upstream
+# descrition: [PATCH] vm: prevent kswapd pageout priority windup
+# revision date: Mon, 08 Nov 2004 11:52:08 +0900
+#
+# rset: ChangeSet|1.1988.46.14..1.1988.46.15
+# rset: mm/vmscan.c|1.228..1.229
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/03 09:16:48-07:00 nickpiggin at yahoo.com.au 
+#   [PATCH] vm: prevent kswapd pageout priority windup
+#   
+#   Now that we are correctly kicking off kswapd early (before the synch
+#   reclaim watermark), it is really doing asynchronous pageout.  This has
+#   exposed a latent problem where allocators running at the same time will
+#   make kswapd think it is getting into trouble, and cause too much swapping
+#   and suboptimal behaviour.
+#   
+#   This patch changes the kswapd scanning algorithm to use the same metrics
+#   for measuring pageout success as the synchronous reclaim path - namely, how
+#   much work is required to free SWAP_CLUSTER_MAX pages.
+#   
+#   This should make things less fragile all round, and has the added benefit
+#   that kswapd will continue running so long as memory is low and it is
+#   managing to free pages, rather than going through the full priority loop,
+#   then giving up.  Should result in much better behaviour all round,
+#   especially when there are concurrent allocators.
+#   
+#   akpm: the patch was confirmed to fix up the excessive swapout which Ray Bryant
+#   <raybry at sgi.com> has been reporting.
+#   
+#   Signed-off-by: Nick Piggin <nickpiggin at yahoo.com.au>
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# mm/vmscan.c
+#   2004/10/02 21:05:08-07:00 nickpiggin at yahoo.com.au +19 -2
+#   vm: prevent kswapd pageout priority windup
+# 
+diff -Nru a/mm/vmscan.c b/mm/vmscan.c
+--- a/mm/vmscan.c	2004-11-08 11:52:08 +09:00
++++ b/mm/vmscan.c	2004-11-08 11:52:08 +09:00
+@@ -968,12 +968,16 @@
+ static int balance_pgdat(pg_data_t *pgdat, int nr_pages)
+ {
+ 	int to_free = nr_pages;
++	int all_zones_ok;
+ 	int priority;
+ 	int i;
+-	int total_scanned = 0, total_reclaimed = 0;
++	int total_scanned, total_reclaimed;
+ 	struct reclaim_state *reclaim_state = current->reclaim_state;
+ 	struct scan_control sc;
+ 
++loop_again:
++	total_scanned = 0;
++	total_reclaimed = 0;
+ 	sc.gfp_mask = GFP_KERNEL;
+ 	sc.may_writepage = 0;
+ 	sc.nr_mapped = read_page_state(nr_mapped);
+@@ -987,10 +991,11 @@
+ 	}
+ 
+ 	for (priority = DEF_PRIORITY; priority >= 0; priority--) {
+-		int all_zones_ok = 1;
+ 		int end_zone = 0;	/* Inclusive.  0 = ZONE_DMA */
+ 		unsigned long lru_pages = 0;
+ 
++		all_zones_ok = 1;
++
+ 		if (nr_pages == 0) {
+ 			/*
+ 			 * Scan in the highmem->dma direction for the highest
+@@ -1072,6 +1077,15 @@
+ 		 */
+ 		if (total_scanned && priority < DEF_PRIORITY - 2)
+ 			blk_congestion_wait(WRITE, HZ/10);
++
++		/*
++		 * We do this so kswapd doesn't build up large priorities for
++		 * example when it is freeing in parallel with allocators. It
++		 * matches the direct reclaim path behaviour in terms of impact
++		 * on zone->*_priority.
++		 */
++		if (total_reclaimed >= SWAP_CLUSTER_MAX)
++			break;
+ 	}
+ out:
+ 	for (i = 0; i < pgdat->nr_zones; i++) {
+@@ -1079,6 +1093,9 @@
+ 
+ 		zone->prev_priority = zone->temp_priority;
+ 	}
++	if (!all_zones_ok)
++		goto loop_again;
++
+ 	return total_reclaimed;
+ }
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mm-vmscan-3.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mm-vmscan-3.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mm-vmscan-3.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,80 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: vmscan: handle empty zones
+## DP: Patch author: Andrew Moreton
+## DP: Upstream status: included
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: akpm (BitKeeper)
+# cset: 1.1988.80.2 (2.6) key=4166a5112qy1EIaxUWR1UG-bBZJwDg
+# inclusion: upstream
+# descrition: [PATCH] vmscan: handle empty zones
+# revision date: Mon, 08 Nov 2004 11:52:18 +0900
+#
+# rset: ChangeSet|1.1988.80.1..1.1988.80.2
+# rset: mm/vmscan.c|1.229..1.230
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/08 07:32:49-07:00 akpm at osdl.org 
+#   [PATCH] vmscan: handle empty zones
+#   
+#   There's a lockup condition where kswapd ensounters an empty zone which has all
+#   its metadata set to zero.
+#   
+#   Fix that by adding explicit checks for empty zones and just skip over them.
+#   
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# mm/vmscan.c
+#   2004/10/08 02:57:31-07:00 akpm at osdl.org +11 -0
+#   vmscan: handle empty zones
+# 
+diff -Nru a/mm/vmscan.c b/mm/vmscan.c
+--- a/mm/vmscan.c	2004-11-08 11:52:18 +09:00
++++ b/mm/vmscan.c	2004-11-08 11:52:18 +09:00
+@@ -851,6 +851,9 @@
+ 	for (i = 0; zones[i] != NULL; i++) {
+ 		struct zone *zone = zones[i];
+ 
++		if (zone->present_pages == 0)
++			continue;
++
+ 		zone->temp_priority = sc->priority;
+ 		if (zone->prev_priority > sc->priority)
+ 			zone->prev_priority = sc->priority;
+@@ -1004,6 +1007,9 @@
+ 			for (i = pgdat->nr_zones - 1; i >= 0; i--) {
+ 				struct zone *zone = pgdat->node_zones + i;
+ 
++				if (zone->present_pages == 0)
++					continue;
++
+ 				if (zone->all_unreclaimable &&
+ 						priority != DEF_PRIORITY)
+ 					continue;
+@@ -1036,6 +1042,9 @@
+ 		for (i = 0; i <= end_zone; i++) {
+ 			struct zone *zone = pgdat->node_zones + i;
+ 
++			if (zone->present_pages == 0)
++				continue;
++
+ 			if (zone->all_unreclaimable && priority != DEF_PRIORITY)
+ 				continue;
+ 
+@@ -1159,6 +1168,8 @@
+  */
+ void wakeup_kswapd(struct zone *zone)
+ {
++	if (zone->present_pages == 0)
++		return;
+ 	if (zone->free_pages > zone->pages_low)
+ 		return;
+ 	if (!waitqueue_active(&zone->zone_pgdat->kswapd_wait))

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mm-vmscan-4.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mm-vmscan-4.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mm-vmscan-4.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,108 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: kswapd lockup fix
+## DP: Patch author: Nick Piggin
+## DP: Upstream status: included
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: nickpiggin (BitKeeper)
+# cset: 1.1988.109.10 (2.6) key=41729be8_H-m-Fth5WBsu4slOVbWxQ
+# inclusion: upstream
+# descrition: [PATCH] kswapd lockup fix
+# revision date: Mon, 08 Nov 2004 11:52:29 +0900
+#
+# rset: ChangeSet|1.1988.109.9..1.1988.109.10
+# rset: mm/vmscan.c|1.230..1.231
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/17 09:20:56-07:00 nickpiggin at yahoo.com.au 
+#   [PATCH] kswapd lockup fix
+#   
+#   Fix some bugs in the kswapd logic which can cause kswapd lockups.
+#   
+#   The balance_pgdat() logic is supposed to cause kswapd to loop across all zones
+#   in the node until each zone either
+#   
+#   	a) has enough pages free or
+#   
+#   	b) is deemed to be in an "all pages unreclaimable" state.
+#   
+#   In the latter case, we just give the zone a light scan on each balance_pgdat()
+#   scan and wait for the zone to come back to life again.
+#   
+#   But the zone->all_unreclaimable logic is broken - if the zone has no pages on
+#   the LRU at all, we perform no scanning of that zone (of course).  So the
+#   zone->pages_scanned is not incremented and the expression
+#   
+#   		if (zone->pages_scanned > zone->present_pages * 2)
+#   			zone->all_unreclaimable = 1;
+#   
+#   never is satisfied.
+#   
+#   The patch changes that logic to
+#   
+#   		if (zone->pages_scanned >= (zone->nr_active +
+#   						zone->nr_inactive) * 4)
+#   			zone->all_unreclaimable = 1;
+#   
+#   so if the zone has no LRU pages it will still enter the all_unreclaimable
+#   state.
+#   
+#   
+#   Another problem is that if the zone has no LRU pages we will tell
+#   shrink_slab() that we scanned zero LRU pages.  This causes shrink_slab() to
+#   scan zero slab objects, which is obviously wrong.  So change shrink_slab() to
+#   perform a decent chunk of slab scanning in this situation.
+#   
+#   
+#   And put a cond_resched() into the balance_pgdat() outer loop.  Probably
+#   unnecessary, but that's what Jeff had in place when he confirmed that this
+#   patch fixed the lockup :(
+#   
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# mm/vmscan.c
+#   2004/10/16 22:07:24-07:00 nickpiggin at yahoo.com.au +6 -3
+#   kswapd lockup fix
+# 
+diff -Nru a/mm/vmscan.c b/mm/vmscan.c
+--- a/mm/vmscan.c	2004-11-08 11:52:29 +09:00
++++ b/mm/vmscan.c	2004-11-08 11:52:29 +09:00
+@@ -181,7 +181,7 @@
+ 	struct shrinker *shrinker;
+ 
+ 	if (scanned == 0)
+-		return 0;
++		scanned = SWAP_CLUSTER_MAX;
+ 
+ 	if (!down_read_trylock(&shrinker_rwsem))
+ 		return 0;
+@@ -1065,7 +1065,8 @@
+ 			total_reclaimed += sc.nr_reclaimed;
+ 			if (zone->all_unreclaimable)
+ 				continue;
+-			if (zone->pages_scanned > zone->present_pages * 2)
++			if (zone->pages_scanned >= (zone->nr_active +
++							zone->nr_inactive) * 4)
+ 				zone->all_unreclaimable = 1;
+ 			/*
+ 			 * If we've done a decent amount of scanning and
+@@ -1102,8 +1103,10 @@
+ 
+ 		zone->prev_priority = zone->temp_priority;
+ 	}
+-	if (!all_zones_ok)
++	if (!all_zones_ok) {
++		cond_resched();
+ 		goto loop_again;
++	}
+ 
+ 	return total_reclaimed;
+ }

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mm-vmscan-5.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mm-vmscan-5.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/mm-vmscan-5.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,68 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: vmscan: pages_scanned fix
+## DP: Patch author: Nick Piggin
+## DP: Upstream status: included
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: nickpiggin (BitKeeper)
+# cset: 1.2263 (2.6) key=41810eeex2e2qwU7OTgBPwce7-mkrg
+# inclusion: upstream
+# descrition: [PATCH] vmscan: pages_scanned fix
+# revision date: Mon, 08 Nov 2004 11:52:40 +0900
+#
+# rset: ChangeSet|1.2262..1.2263
+# rset: mm/vmscan.c|1.231..1.232
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/28 08:23:26-07:00 nickpiggin at yahoo.com.au 
+#   [PATCH] vmscan: pages_scanned fix
+#   
+#   kswapd is still sometimes going into loops.  The problem seemed to be
+#   happening on systems with zero inactive pages in ZONE_DMA, so pages_scanned
+#   could never be increased, all_unreclaimable would never be set, and kswapd
+#   would never break.
+#   
+#   So change pages_scanned to be a count of the number of _active_ list pages
+#   scanned rather than inactive.  This has been reported to solve the problems.
+#   
+#   This is not subject to the reverse problem where one might have zero active
+#   list pages, because inactive pages are either be reclaimed, or put onto the
+#   active list.
+#   
+#   I think it is reasonable to have all_unreclaimed trigger based on the amount
+#   of active list scanning rather than inactive.
+#   
+#   
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# mm/vmscan.c
+#   2004/10/28 00:39:52-07:00 nickpiggin at yahoo.com.au +1 -1
+#   vmscan: pages_scanned fix
+# 
+diff -Nru a/mm/vmscan.c b/mm/vmscan.c
+--- a/mm/vmscan.c	2004-11-08 11:52:40 +09:00
++++ b/mm/vmscan.c	2004-11-08 11:52:40 +09:00
+@@ -574,7 +574,6 @@
+ 			nr_taken++;
+ 		}
+ 		zone->nr_inactive -= nr_taken;
+-		zone->pages_scanned += nr_taken;
+ 		spin_unlock_irq(&zone->lru_lock);
+ 
+ 		if (nr_taken == 0)
+@@ -675,6 +674,7 @@
+ 		}
+ 		pgscanned++;
+ 	}
++	zone->pages_scanned += pgscanned;
+ 	zone->nr_active -= pgmoved;
+ 	spin_unlock_irq(&zone->lru_lock);
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/modular-ide-pnp.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/modular-ide-pnp.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/modular-ide-pnp.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,77 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Allow modular built of ide-pnp
+## DP: Patch author: Herbert Xu, Christoph Hellwig
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- 1.49/drivers/ide/Kconfig	2004-06-18 08:43:53 +02:00
++++ edited/drivers/ide/Kconfig	2004-06-19 12:25:46 +02:00
+@@ -305,7 +305,7 @@
+ 	  Otherwise say N.
+ 
+ config BLK_DEV_IDEPNP
+-	bool "PNP EIDE support"
++	tristate "PNP EIDE support"
+ 	depends on PNP
+ 	help
+ 	  If you have a PnP (Plug and Play) compatible EIDE card and
+--- 1.21/drivers/ide/Makefile	2004-06-18 08:43:53 +02:00
++++ edited/drivers/ide/Makefile	2004-06-19 12:42:49 +02:00
+@@ -23,7 +23,6 @@
+ ide-core-$(CONFIG_BLK_DEV_IDEDMA)	+= ide-dma.o
+ ide-core-$(CONFIG_BLK_DEV_IDE_TCQ)	+= ide-tcq.o
+ ide-core-$(CONFIG_PROC_FS)		+= ide-proc.o
+-ide-core-$(CONFIG_BLK_DEV_IDEPNP)	+= ide-pnp.o
+ 
+ # built-in only drivers from arm/
+ ide-core-$(CONFIG_IDE_ARM)		+= arm/ide_arm.o
+@@ -44,6 +43,7 @@
+ 
+ obj-$(CONFIG_BLK_DEV_IDE)		+= ide-core.o
+ obj-$(CONFIG_IDE_GENERIC)		+= ide-generic.o
++obj-$(CONFIG_BLK_DEV_IDEPNP)		+= ide-pnp.o
+ 
+ obj-$(CONFIG_BLK_DEV_IDEDISK)		+= ide-disk.o
+ obj-$(CONFIG_BLK_DEV_IDECD)		+= ide-cd.o
+--- 1.9/drivers/ide/ide-pnp.c	2004-06-15 18:31:45 +02:00
++++ edited/drivers/ide/ide-pnp.c	2004-06-19 12:34:27 +02:00
+@@ -69,7 +69,21 @@
+ 	.remove		= idepnp_remove,
+ };
+ 
+-void __init pnpide_init(void)
++int __init pnpide_init(void)
+ {
+-	pnp_register_driver(&idepnp_driver);
++	return pnp_register_driver(&idepnp_driver);
+ }
++
++#ifdef MODULE
++static void __exit pnpide_exit(void)
++{
++       pnp_unregister_driver(&idepnp_driver);
++}
++
++module_init(pnpide_init);
++module_exit(pnpide_exit);
++#endif
++
++MODULE_AUTHOR("Andrey Panin");
++MODULE_DESCRIPTION("Enabler for ISAPNP IDE devices");
++MODULE_LICENSE("GPL");
+--- 1.150/drivers/ide/ide.c	2004-06-15 18:31:12 +02:00
++++ edited/drivers/ide/ide.c	2004-06-19 12:29:44 +02:00
+@@ -2003,7 +2003,7 @@
+ 	return 1;
+ }
+ 
+-extern void pnpide_init(void);
++extern int pnpide_init(void);
+ extern void h8300_ide_init(void);
+ 
+ /*

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/modular-ide.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/modular-ide.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/modular-ide.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,1430 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: fix IDE modularisation
+## DP: Patch author: Herbert Xu
+## DP: Upstream status: partially rejected
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- 1.3/drivers/ide/ide-generic.c	2004-02-22 18:36:17 +01:00
++++ edited/drivers/ide/ide-generic.c	2004-06-16 15:44:16 +02:00
+@@ -11,9 +11,14 @@
+ #include <linux/init.h>
+ #include <linux/module.h>
+ #include <linux/ide.h>
++#include <linux/config.h>
+ 
+ static int __init ide_generic_init(void)
+ {
++#ifdef CONFIG_BLK_DEV_IDEPCI
++	ide_scan_pcibus();
++#endif
++
+ 	if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET])
+ 		ide_get_lock(NULL, NULL); /* for atari only */
+ 
+@@ -27,6 +32,11 @@
+ 	return 0;
+ }
+ 
++static void __exit ide_generic_exit(void)
++{
++}
++
+ module_init(ide_generic_init);
++module_exit(ide_generic_exit);
+ 
+ MODULE_LICENSE("GPL");
+--- 1.150/drivers/ide/ide.c	2004-06-15 18:31:12 +02:00
++++ edited/drivers/ide/ide.c	2004-06-16 15:44:16 +02:00
+@@ -175,10 +175,11 @@
+ static int initializing;	/* set while initializing built-in drivers */
+ 
+ DECLARE_MUTEX(ide_cfg_sem);
++EXPORT_SYMBOL(ide_cfg_sem);
+ spinlock_t ide_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
+ 
+ #ifdef CONFIG_BLK_DEV_IDEPCI
+-static int ide_scan_direction; /* THIS was formerly 2.2.x pci=reverse */
++int ide_scan_direction;		/* THIS was formerly 2.2.x pci=reverse */
+ #endif
+ 
+ #ifdef CONFIG_IDEDMA_AUTO
+@@ -1364,6 +1365,8 @@
+ 
+ EXPORT_SYMBOL(system_bus_clock);
+ 
++EXPORT_SYMBOL(ide_add_generic_settings);
++
+ /*
+  *	Locking is badly broken here - since way back.  That sucker is
+  * root-only, but that's not an excuse...  The real question is what
+@@ -2011,9 +2014,9 @@
+  */
+ static void __init probe_for_hwifs (void)
+ {
+-#ifdef CONFIG_BLK_DEV_IDEPCI
+-	ide_scan_pcibus(ide_scan_direction);
+-#endif /* CONFIG_BLK_DEV_IDEPCI */
++#if defined(CONFIG_BLK_DEV_IDEPCI) && !defined(MODULE)
++	ide_scan_pcibus();
++#endif /* CONFIG_BLK_DEV_IDEPCI && !MODULE */
+ 
+ #ifdef CONFIG_ETRAX_IDE
+ 	{
+--- 1.25/drivers/ide/setup-pci.c	2004-06-01 21:04:38 +02:00
++++ edited/drivers/ide/setup-pci.c	2004-06-16 15:44:18 +02:00
+@@ -821,7 +821,7 @@
+  *	boot up the pci layer takes over the job.
+  */
+  
+-static int __init ide_scan_pcidev(struct pci_dev *dev)
++static int ide_scan_pcidev(struct pci_dev *dev)
+ {
+ 	struct list_head *l;
+ 	struct pci_driver *d;
+@@ -847,21 +847,23 @@
+ 
+ /**
+  *	ide_scan_pcibus		-	perform the initial IDE driver scan
+- *	@scan_direction: set for reverse order scanning
+  *
+  *	Perform the initial bus rather than driver ordered scan of the
+  *	PCI drivers. After this all IDE pci handling becomes standard
+  *	module ordering not traditionally ordered.
+  */
+  	
+-void __init ide_scan_pcibus (int scan_direction)
++void ide_scan_pcibus(void)
+ {
+ 	struct pci_dev *dev = NULL;
+ 	struct pci_driver *d;
+ 	struct list_head *l, *n;
+ 
++	if (!pre_init)
++		return;
++
+ 	pre_init = 0;
+-	if (!scan_direction) {
++	if (!ide_scan_direction) {
+ 		while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
+ 			ide_scan_pcidev(dev);
+ 		}
+@@ -883,3 +885,5 @@
+ 		pci_register_driver(d);
+ 	}
+ }
++
++EXPORT_SYMBOL_GPL(ide_scan_pcibus);
+--- 1.16/drivers/ide/arm/icside.c	2004-02-28 12:38:08 +01:00
++++ edited/drivers/ide/arm/icside.c	2004-06-16 15:44:16 +02:00
+@@ -861,10 +861,19 @@
+ 		break;
+ 	}
+ 
+-	if (ret == 0)
++	if (ret == 0) {
+ 		ecard_set_drvdata(ec, state);
+-	else
++
++		/*
++		 * this locks the driver in-core - remove this
++		 * comment and the line below when we can
++		 * safely remove interfaces.
++		 */
++		if (!try_module_get(THIS_MODULE))
++			ret = -ENODEV;
++	} else {
+ 		kfree(state);
++	}
+  out:
+ 	return ret;
+ }
+@@ -947,8 +956,14 @@
+ 	return ecard_register_driver(&icside_driver);
+ }
+ 
++static void __exit icside_exit(void)
++{
++	ecard_remove_driver(&icside_driver);
++}
++
+ MODULE_AUTHOR("Russell King <rmk at arm.linux.org.uk>");
+ MODULE_LICENSE("GPL");
+ MODULE_DESCRIPTION("ICS IDE driver");
+ 
+ module_init(icside_init);
++module_exit(icside_exit);
+--- 1.6/drivers/ide/arm/rapide.c	2004-02-07 20:44:16 +01:00
++++ edited/drivers/ide/arm/rapide.c	2004-06-16 15:44:16 +02:00
+@@ -33,6 +33,14 @@
+ 
+ 	if (ret)
+ 		ecard_release(ec);
++	/*
++	 * this locks the driver in-core - remove this
++	 * comment and the two lines below when we can
++	 * safely remove interfaces.
++	 */
++	else if (!try_module_get(THIS_MODULE))
++		ret = -ENODEV;
++
+ 	return ret;
+ }
+ 
+@@ -60,7 +68,13 @@
+ 	return ecard_register_driver(&rapide_driver);
+ }
+ 
++static void __exit rapide_exit(void)
++{
++	ecard_remove_driver(&rapide_driver);
++}
++
+ MODULE_LICENSE("GPL");
+ MODULE_DESCRIPTION("Yellowstone RAPIDE driver");
+ 
+ module_init(rapide_init);
++module_exit(rapide_exit);
+--- 1.4/drivers/ide/pci/adma100.c	2003-02-18 19:06:19 +01:00
++++ edited/drivers/ide/pci/adma100.c	2004-06-16 15:44:16 +02:00
+@@ -16,7 +16,7 @@
+ #include <linux/pci.h>
+ #include <asm/io.h>
+ 
+-void __init ide_init_adma100 (ide_hwif_t *hwif)
++void __devinit ide_init_adma100 (ide_hwif_t *hwif)
+ {
+ 	unsigned long  phy_admctl = pci_resource_start(hwif->pci_dev, 4) + 0x80 + (hwif->channel * 0x20);
+ 	void *v_admctl;
+--- 1.22/drivers/ide/pci/aec62xx.c	2004-06-16 05:17:44 +02:00
++++ edited/drivers/ide/pci/aec62xx.c	2004-06-16 15:44:16 +02:00
+@@ -525,6 +525,8 @@
+ {
+ 	ide_pci_device_t *d = &aec62xx_chipsets[id->driver_data];
+ 
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
+ 	d->init_setup(dev, d);
+ 	return 0;
+ }
+@@ -550,7 +552,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit aec62xx_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(aec62xx_ide_init);
++module_exit(aec62xx_ide_exit);
+ 
+ MODULE_AUTHOR("Andre Hedrick");
+ MODULE_DESCRIPTION("PCI driver module for ARTOP AEC62xx IDE");
+--- 1.25/drivers/ide/pci/alim15x3.c	2004-06-15 18:29:40 +02:00
++++ edited/drivers/ide/pci/alim15x3.c	2004-06-16 15:45:33 +02:00
+@@ -581,7 +581,7 @@
+  *	appropriate also sets up the 1533 southbridge.
+  */
+   
+-static unsigned int __init init_chipset_ali15x3 (struct pci_dev *dev, const char *name)
++static unsigned int __devinit init_chipset_ali15x3 (struct pci_dev *dev, const char *name)
+ {
+ 	unsigned long flags;
+ 	u8 tmpbyte;
+@@ -675,7 +675,7 @@
+  *	FIXME: frobs bits that are not defined on newer ALi devicea
+  */
+ 
+-static unsigned int __init ata66_ali15x3 (ide_hwif_t *hwif)
++static unsigned int __devinit ata66_ali15x3 (ide_hwif_t *hwif)
+ {
+ 	struct pci_dev *dev	= hwif->pci_dev;
+ 	unsigned int ata66	= 0;
+@@ -746,7 +746,7 @@
+  *	Initialize the IDE structure side of the ALi 15x3 driver.
+  */
+  
+-static void __init init_hwif_common_ali15x3 (ide_hwif_t *hwif)
++static void __devinit init_hwif_common_ali15x3 (ide_hwif_t *hwif)
+ {
+ 	hwif->autodma = 0;
+ 	hwif->tuneproc = &ali15x3_tune_drive;
+@@ -792,7 +792,7 @@
+  *	Sparc systems
+  */
+ 
+-static void __init init_hwif_ali15x3 (ide_hwif_t *hwif)
++static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif)
+ {
+ 	u8 ideic, inmir;
+ 	s8 irq_routing_table[] = { -1,  9, 3, 10, 4,  5, 7,  6,
+@@ -844,7 +844,7 @@
+  *	the actual work.
+  */
+ 
+-static void __init init_dma_ali15x3 (ide_hwif_t *hwif, unsigned long dmabase)
++static void __devinit init_dma_ali15x3 (ide_hwif_t *hwif, unsigned long dmabase)
+ {
+ 	if (m5229_revision < 0x20)
+ 		return;
+@@ -875,6 +875,9 @@
+ {
+ 	ide_pci_device_t *d = &ali15x3_chipset;
+ 
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
++
+ 	if(pci_find_device(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS100, NULL))
+ 		printk(KERN_ERR "Warning: ATI Radeon IGP Northbridge is not yet fully tested.\n");
+ 
+@@ -903,7 +906,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit ali15x3_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(ali15x3_ide_init);
++module_exit(ali15x3_ide_exit);
+ 
+ MODULE_AUTHOR("Michael Aubry, Andrzej Krzysztofowicz, CJ, Andre Hedrick, Alan Cox");
+ MODULE_DESCRIPTION("PCI driver module for ALi 15x3 IDE");
+--- 1.31/drivers/ide/pci/amd74xx.c	2004-06-01 19:55:04 +02:00
++++ edited/drivers/ide/pci/amd74xx.c	2004-06-16 15:44:16 +02:00
+@@ -312,7 +312,7 @@
+  * and initialize its drive independent registers.
+  */
+ 
+-static unsigned int __init init_chipset_amd74xx(struct pci_dev *dev, const char *name)
++static unsigned int __devinit init_chipset_amd74xx(struct pci_dev *dev, const char *name)
+ {
+ 	unsigned char t;
+ 	unsigned int u;
+@@ -416,7 +416,7 @@
+ 	return dev->irq;
+ }
+ 
+-static void __init init_hwif_amd74xx(ide_hwif_t *hwif)
++static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif)
+ {
+ 	int i;
+ 
+@@ -496,6 +496,8 @@
+ 
+ static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_id *id)
+ {
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
+ 	amd_chipset = amd74xx_chipsets + id->driver_data;
+ 	amd_config = amd_ide_chips + id->driver_data;
+ 	if (dev->device != amd_config->id) BUG();
+@@ -538,7 +540,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit amd74xx_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(amd74xx_ide_init);
++module_exit(amd74xx_ide_exit);
+ 
+ MODULE_AUTHOR("Vojtech Pavlik");
+ MODULE_DESCRIPTION("AMD PCI IDE driver");
+--- 1.3/drivers/ide/pci/atiixp.c	2004-06-01 21:04:38 +02:00
++++ edited/drivers/ide/pci/atiixp.c	2004-06-16 15:46:09 +02:00
+@@ -479,6 +479,8 @@
+ 
+ static int __devinit atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id)
+ {
++ 	if (!try_module_get(THIS_MODULE))
++ 		return -ENODEV;
+ 	ide_setup_pci_device(dev, &atiixp_pci_info[id->driver_data]);
+ 	return 0;
+ }
+@@ -500,7 +502,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit atiixp_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(atiixp_ide_init);
++module_exit(atiixp_ide_exit);
+ 
+ MODULE_AUTHOR("HUI YU");
+ MODULE_DESCRIPTION("PCI driver module for ATI IXP IDE");
+--- 1.9/drivers/ide/pci/cmd640.c	2004-02-01 19:06:55 +01:00
++++ edited/drivers/ide/pci/cmd640.c	2004-06-16 15:44:17 +02:00
+@@ -276,7 +276,7 @@
+ 	spin_unlock_irqrestore(&ide_lock, flags);
+ }
+ 
+-static int __init match_pci_cmd640_device (void)
++static int __devinit match_pci_cmd640_device (void)
+ {
+ 	const u8 ven_dev[4] = {0x95, 0x10, 0x40, 0x06};
+ 	unsigned int i;
+@@ -296,7 +296,7 @@
+ /*
+  * Probe for CMD640x -- pci method 1
+  */
+-static int __init probe_for_cmd640_pci1 (void)
++static int __devinit probe_for_cmd640_pci1 (void)
+ {
+ 	__get_cmd640_reg = get_cmd640_reg_pci1;
+ 	__put_cmd640_reg = put_cmd640_reg_pci1;
+@@ -312,7 +312,7 @@
+ /*
+  * Probe for CMD640x -- pci method 2
+  */
+-static int __init probe_for_cmd640_pci2 (void)
++static int __devinit probe_for_cmd640_pci2 (void)
+ {
+ 	__get_cmd640_reg = get_cmd640_reg_pci2;
+ 	__put_cmd640_reg = put_cmd640_reg_pci2;
+@@ -326,7 +326,7 @@
+ /*
+  * Probe for CMD640x -- vlb
+  */
+-static int __init probe_for_cmd640_vlb (void)
++static int __devinit probe_for_cmd640_vlb (void)
+ {
+ 	u8 b;
+ 
+@@ -347,7 +347,7 @@
+  *  Returns 1 if an IDE interface/drive exists at 0x170,
+  *  Returns 0 otherwise.
+  */
+-static int __init secondary_port_responding (void)
++static int __devinit secondary_port_responding (void)
+ {
+ 	unsigned long flags;
+ 
+@@ -390,7 +390,7 @@
+  * Check whether prefetch is on for a drive,
+  * and initialize the unmask flags for safe operation.
+  */
+-static void __init check_prefetch (unsigned int index)
++static void __devinit check_prefetch (unsigned int index)
+ {
+ 	ide_drive_t *drive = cmd_drives[index];
+ 	u8 b = get_cmd640_reg(prefetch_regs[index]);
+@@ -411,7 +411,7 @@
+ /*
+  * Figure out which devices we control
+  */
+-static void __init setup_device_ptrs (void)
++static void __devinit setup_device_ptrs (void)
+ {
+ 	unsigned int i;
+ 
+@@ -493,7 +493,7 @@
+ /*
+  * This routine retrieves the initial drive timings from the chipset.
+  */
+-static void __init retrieve_drive_counts (unsigned int index)
++static void __devinit retrieve_drive_counts (unsigned int index)
+ {
+ 	u8 b;
+ 
+@@ -714,7 +714,7 @@
+ /*
+  * Probe for a cmd640 chipset, and initialize it if found.  Called from ide.c
+  */
+-int __init ide_probe_for_cmd640x (void)
++int __devinit ide_probe_for_cmd640x (void)
+ {
+ #ifdef CONFIG_BLK_DEV_CMD640_ENHANCED
+ 	int second_port_toggled = 0;
+--- 1.23/drivers/ide/pci/cmd64x.c	2004-06-16 05:17:44 +02:00
++++ edited/drivers/ide/pci/cmd64x.c	2004-06-16 15:49:12 +02:00
+@@ -746,6 +746,8 @@
+ 
+ static int __devinit cmd64x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
+ {
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
+ 	ide_setup_pci_device(dev, &cmd64x_chipsets[id->driver_data]);
+ 	return 0;
+ }
+@@ -770,7 +772,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit cmd64x_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(cmd64x_ide_init);
++module_exit(cmd64x_ide_exit);
+ 
+ MODULE_AUTHOR("Eddie Dost, David Miller, Andre Hedrick");
+ MODULE_DESCRIPTION("PCI driver module for CMD64x IDE");
+--- 1.11/drivers/ide/pci/cs5520.c	2004-06-15 18:29:40 +02:00
++++ edited/drivers/ide/pci/cs5520.c	2004-06-16 15:44:17 +02:00
+@@ -289,6 +289,10 @@
+ 		printk(KERN_WARNING "%s: Unable to enable 55x0.\n", d->name);
+ 		return 1;
+ 	}
++
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
++
+ 	pci_set_master(dev);
+ 	pci_set_dma_mask(dev, 0xFFFFFFFF);
+ 	init_chipset_cs5520(dev, d->name);
+@@ -329,7 +333,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit cs5520_ide_exit(void)
++{
++	return ide_pci_unregister_driver(&driver);
++}
++
+ module_init(cs5520_ide_init);
++module_exit(cs5520_ide_exit);
+ 
+ MODULE_AUTHOR("Alan Cox");
+ MODULE_DESCRIPTION("PCI driver module for Cyrix 5510/5520 IDE");
+--- 1.22/drivers/ide/pci/cs5530.c	2004-06-15 18:29:40 +02:00
++++ edited/drivers/ide/pci/cs5530.c	2004-06-16 15:49:00 +02:00
+@@ -267,7 +267,7 @@
+  *	Initialize the cs5530 bridge for reliable IDE DMA operation.
+  */
+ 
+-static unsigned int __init init_chipset_cs5530 (struct pci_dev *dev, const char *name)
++static unsigned int __devinit init_chipset_cs5530 (struct pci_dev *dev, const char *name)
+ {
+ 	struct pci_dev *master_0 = NULL, *cs5530_0 = NULL;
+ 	unsigned long flags;
+@@ -366,7 +366,7 @@
+  *	performs channel-specific pre-initialization before drive probing.
+  */
+ 
+-static void __init init_hwif_cs5530 (ide_hwif_t *hwif)
++static void __devinit init_hwif_cs5530 (ide_hwif_t *hwif)
+ {
+ 	unsigned long basereg;
+ 	u32 d0_timings;
+@@ -416,6 +416,8 @@
+ 
+ static int __devinit cs5530_init_one(struct pci_dev *dev, const struct pci_device_id *id)
+ {
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
+ 	ide_setup_pci_device(dev, &cs5530_chipset);
+ 	return 0;
+ }
+@@ -437,7 +439,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit cs5530_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(cs5530_ide_init);
++module_exit(cs5530_ide_exit);
+ 
+ MODULE_AUTHOR("Mark Lord");
+ MODULE_DESCRIPTION("PCI driver module for Cyrix/NS 5530 IDE");
+--- 1.17/drivers/ide/pci/cy82c693.c	2004-03-18 15:20:56 +01:00
++++ edited/drivers/ide/pci/cy82c693.c	2004-06-16 15:44:17 +02:00
+@@ -334,7 +334,7 @@
+ /*
+  * this function is called during init and is used to setup the cy82c693 chip
+  */
+-static unsigned int __init init_chipset_cy82c693(struct pci_dev *dev, const char *name)
++static unsigned int __devinit init_chipset_cy82c693(struct pci_dev *dev, const char *name)
+ {
+ 	if (PCI_FUNC(dev->devfn) != 1)
+ 		return 0;
+@@ -386,7 +386,7 @@
+ /*
+  * the init function - called for each ide channel once
+  */
+-static void __init init_hwif_cy82c693(ide_hwif_t *hwif)
++static void __devinit init_hwif_cy82c693(ide_hwif_t *hwif)
+ {
+ 	hwif->autodma = 0;
+ 
+@@ -410,9 +410,9 @@
+ 	hwif->drives[1].autodma = hwif->autodma;
+ }
+ 
+-static __initdata ide_hwif_t *primary;
++static __devinitdata ide_hwif_t *primary;
+ 
+-void __init init_iops_cy82c693(ide_hwif_t *hwif)
++void __devinit init_iops_cy82c693(ide_hwif_t *hwif)
+ {
+ 	if (PCI_FUNC(hwif->pci_dev->devfn) == 1)
+ 		primary = hwif;
+@@ -427,6 +427,9 @@
+ 	ide_pci_device_t *d = &cy82c693_chipsets[id->driver_data];
+ 	struct pci_dev *dev2;
+ 
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
++
+ 	/* CY82C693 is more than only a IDE controller.
+ 	   Function 1 is primary IDE channel, function 2 - secondary. */
+         if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE &&
+@@ -454,7 +457,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit cy82c693_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(cy82c693_ide_init);
++module_exit(cy82c693_ide_exit);
+ 
+ MODULE_AUTHOR("Andreas Krebs, Andre Hedrick");
+ MODULE_DESCRIPTION("PCI driver module for the Cypress CY82C693 IDE");
+--- 1.16/drivers/ide/pci/generic.c	2004-06-01 21:04:38 +02:00
++++ edited/drivers/ide/pci/generic.c	2004-06-16 15:44:17 +02:00
+@@ -41,12 +41,12 @@
+ 
+ #include "generic.h"
+ 
+-static unsigned int __init init_chipset_generic (struct pci_dev *dev, const char *name)
++static unsigned int __devinit init_chipset_generic (struct pci_dev *dev, const char *name)
+ {
+ 	return 0;
+ }
+ 
+-static void __init init_hwif_generic (ide_hwif_t *hwif)
++static void __devinit init_hwif_generic (ide_hwif_t *hwif)
+ {
+ 	switch(hwif->pci_dev->device) {
+ 		case PCI_DEVICE_ID_UMC_UM8673F:
+@@ -113,6 +113,8 @@
+ 		printk(KERN_INFO "Skipping disabled %s IDE controller.\n", d->name);
+ 		return 1; 
+ 	}
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
+ 	ide_setup_pci_device(dev, d);
+ 	return 0;
+ }
+@@ -146,7 +148,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit generic_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(generic_ide_init);
++module_exit(generic_ide_exit);
+ 
+ MODULE_AUTHOR("Andre Hedrick");
+ MODULE_DESCRIPTION("PCI driver module for generic PCI IDE");
+--- 1.23/drivers/ide/pci/hpt34x.c	2004-06-16 05:17:44 +02:00
++++ edited/drivers/ide/pci/hpt34x.c	2004-06-16 15:44:17 +02:00
+@@ -323,6 +323,9 @@
+ 	static char *chipset_names[] = {"HPT343", "HPT345"};
+ 	u16 pcicmd = 0;
+ 
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
++
+ 	pci_read_config_word(dev, PCI_COMMAND, &pcicmd);
+ 
+ 	d->name = chipset_names[(pcicmd & PCI_COMMAND_MEMORY) ? 1 : 0];
+@@ -349,7 +352,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit hpt34x_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(hpt34x_ide_init);
++module_exit(hpt34x_ide_exit);
+ 
+ MODULE_AUTHOR("Andre Hedrick");
+ MODULE_DESCRIPTION("PCI driver module for Highpoint 34x IDE");
+--- 1.34/drivers/ide/pci/hpt366.c	2004-06-16 05:17:44 +02:00
++++ edited/drivers/ide/pci/hpt366.c	2004-06-16 15:44:17 +02:00
+@@ -1241,6 +1241,8 @@
+ {
+ 	ide_pci_device_t *d = &hpt366_chipsets[id->driver_data];
+ 
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
+ 	d->init_setup(dev, d);
+ 	return 0;
+ }
+@@ -1266,7 +1268,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit hpt366_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(hpt366_ide_init);
++module_exit(hpt366_ide_exit);
+ 
+ MODULE_AUTHOR("Andre Hedrick");
+ MODULE_DESCRIPTION("PCI driver module for Highpoint HPT366 IDE");
+--- 1.18/drivers/ide/pci/it8172.c	2004-06-01 21:04:38 +02:00
++++ edited/drivers/ide/pci/it8172.c	2004-06-16 15:48:50 +02:00
+@@ -238,7 +238,7 @@
+ 	return 0;
+ }
+ 
+-static unsigned int __init init_chipset_it8172 (struct pci_dev *dev, const char *name)
++static unsigned int __devinit init_chipset_it8172 (struct pci_dev *dev, const char *name)
+ {
+ 	unsigned char progif;
+     
+@@ -252,7 +252,7 @@
+ }
+ 
+ 
+-static void __init init_hwif_it8172 (ide_hwif_t *hwif)
++static void __devinit init_hwif_it8172 (ide_hwif_t *hwif)
+ {
+ 	struct pci_dev* dev = hwif->pci_dev;
+ 	unsigned long cmdBase, ctrlBase;
+@@ -291,6 +291,8 @@
+         if ((!(PCI_FUNC(dev->devfn) & 1) ||
+             (!((dev->class >> 8) == PCI_CLASS_STORAGE_IDE))))
+                 return 1; /* IT8172 is more than only a IDE controller */
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
+ 	ide_setup_pci_device(dev, &it8172_chipsets[id->driver_data]);
+ 	return 0;
+ }
+@@ -312,7 +314,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit it8172_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(it8172_ide_init);
++module_exit(it8172_ide_exit);
+ 
+ MODULE_AUTHOR("SteveL at mvista.com");
+ MODULE_DESCRIPTION("PCI driver module for ITE 8172 IDE");
+--- 1.19/drivers/ide/pci/ns87415.c	2004-06-15 18:29:40 +02:00
++++ edited/drivers/ide/pci/ns87415.c	2004-06-16 15:48:42 +02:00
+@@ -130,7 +130,7 @@
+ 	return __ide_dma_check(drive);
+ }
+ 
+-static void __init init_hwif_ns87415 (ide_hwif_t *hwif)
++static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif)
+ {
+ 	struct pci_dev *dev = hwif->pci_dev;
+ 	unsigned int ctrl, using_inta;
+@@ -225,6 +225,8 @@
+ 
+ static int __devinit ns87415_init_one(struct pci_dev *dev, const struct pci_device_id *id)
+ {
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
+ 	ide_setup_pci_device(dev, &ns87415_chipset);
+ 	return 0;
+ }
+@@ -246,7 +248,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit ns87415_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(ns87415_ide_init);
++module_exit(ns87415_ide_exit);
+ 
+ MODULE_AUTHOR("Mark Lord, Eddie Dost, Andre Hedrick");
+ MODULE_DESCRIPTION("PCI driver module for NS87415 IDE");
+--- 1.18/drivers/ide/pci/opti621.c	2004-06-01 21:04:38 +02:00
++++ edited/drivers/ide/pci/opti621.c	2004-06-16 15:48:02 +02:00
+@@ -328,7 +328,7 @@
+ /*
+  * init_hwif_opti621() is called once for each hwif found at boot.
+  */
+-static void __init init_hwif_opti621 (ide_hwif_t *hwif)
++static void __devinit init_hwif_opti621 (ide_hwif_t *hwif)
+ {
+ 	hwif->autodma = 0;
+ 	hwif->drives[0].drive_data = PIO_DONT_KNOW;
+@@ -348,13 +348,15 @@
+ 	hwif->drives[1].autodma = hwif->autodma;
+ }
+ 
+-static void __init init_setup_opti621 (struct pci_dev *dev, ide_pci_device_t *d)
++static void __devinit init_setup_opti621 (struct pci_dev *dev, ide_pci_device_t *d)
+ {
+ 	ide_setup_pci_device(dev, d);
+ }
+ 
+ static int __devinit opti621_init_one(struct pci_dev *dev, const struct pci_device_id *id)
+ {
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
+ 	ide_setup_pci_device(dev, &opti621_chipsets[id->driver_data]);
+ 	return 0;
+ }
+@@ -377,7 +379,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit opti621_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(opti621_ide_init);
++module_exit(opti621_ide_exit);
+ 
+ MODULE_AUTHOR("Jaromir Koutek, Jan Harkes, Mark Lord");
+ MODULE_DESCRIPTION("PCI driver module for Opti621 IDE");
+--- 1.30/drivers/ide/pci/pdc202xx_new.c	2004-06-16 05:17:44 +02:00
++++ edited/drivers/ide/pci/pdc202xx_new.c	2004-06-16 15:44:17 +02:00
+@@ -514,6 +514,8 @@
+ {
+ 	ide_pci_device_t *d = &pdcnew_chipsets[id->driver_data];
+ 
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
+ 	d->init_setup(dev, d);
+ 	return 0;
+ }
+@@ -541,7 +543,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit pdc202new_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(pdc202new_ide_init);
++module_exit(pdc202new_ide_exit);
+ 
+ MODULE_AUTHOR("Andre Hedrick, Frank Tiernan");
+ MODULE_DESCRIPTION("PCI driver module for Promise PDC20268 and higher");
+--- 1.32/drivers/ide/pci/pdc202xx_old.c	2004-06-16 05:17:44 +02:00
++++ edited/drivers/ide/pci/pdc202xx_old.c	2004-06-16 15:44:17 +02:00
+@@ -884,6 +884,8 @@
+ {
+ 	ide_pci_device_t *d = &pdc202xx_chipsets[id->driver_data];
+ 
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
+ 	d->init_setup(dev, d);
+ 	return 0;
+ }
+@@ -909,7 +911,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit pdc202xx_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(pdc202xx_ide_init);
++module_exit(pdc202xx_ide_exit);
+ 
+ MODULE_AUTHOR("Andre Hedrick, Frank Tiernan");
+ MODULE_DESCRIPTION("PCI driver module for older Promise IDE");
+--- 1.32/drivers/ide/pci/piix.c	2004-06-15 18:29:18 +02:00
++++ edited/drivers/ide/pci/piix.c	2004-06-16 15:44:17 +02:00
+@@ -739,6 +739,8 @@
+ {
+ 	ide_pci_device_t *d = &piix_pci_info[id->driver_data];
+ 
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
+ 	d->init_setup(dev, d);
+ 	return 0;
+ }
+@@ -814,7 +816,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit piix_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(piix_ide_init);
++module_exit(piix_ide_exit);
+ 
+ MODULE_AUTHOR("Andre Hedrick, Andrzej Krzysztofowicz");
+ MODULE_DESCRIPTION("PCI driver module for Intel PIIX IDE");
+--- 1.15/drivers/ide/pci/rz1000.c	2004-06-15 18:29:40 +02:00
++++ edited/drivers/ide/pci/rz1000.c	2004-06-16 15:47:44 +02:00
+@@ -33,7 +33,7 @@
+ 
+ #include <asm/io.h>
+ 
+-static void __init init_hwif_rz1000 (ide_hwif_t *hwif)
++static void __devinit init_hwif_rz1000 (ide_hwif_t *hwif)
+ {
+ 	u16 reg;
+ 	struct pci_dev *dev = hwif->pci_dev;
+@@ -62,6 +62,8 @@
+ 
+ static int __devinit rz1000_init_one(struct pci_dev *dev, const struct pci_device_id *id)
+ {
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
+ 	ide_setup_pci_device(dev, &rz1000_chipset);
+ 	return 0;
+ }
+@@ -84,7 +86,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit rz1000_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(rz1000_ide_init);
++module_exit(rz1000_ide_exit);
+ 
+ MODULE_AUTHOR("Andre Hedrick");
+ MODULE_DESCRIPTION("PCI driver module for RZ1000 IDE");
+--- 1.19/drivers/ide/pci/sc1200.c	2004-06-15 18:29:40 +02:00
++++ edited/drivers/ide/pci/sc1200.c	2004-06-16 15:47:38 +02:00
+@@ -507,7 +507,7 @@
+ /*
+  * Initialize the sc1200 bridge for reliable IDE DMA operation.
+  */
+-static unsigned int __init init_chipset_sc1200 (struct pci_dev *dev, const char *name)
++static unsigned int __devinit init_chipset_sc1200 (struct pci_dev *dev, const char *name)
+ {
+ #if defined(DISPLAY_SC1200_TIMINGS) && defined(CONFIG_PROC_FS)
+ 	if (!bmide_dev) {
+@@ -523,7 +523,7 @@
+  * This gets invoked by the IDE driver once for each channel,
+  * and performs channel-specific pre-initialization before drive probing.
+  */
+-static void __init init_hwif_sc1200 (ide_hwif_t *hwif)
++static void __devinit init_hwif_sc1200 (ide_hwif_t *hwif)
+ {
+ 	if (hwif->mate)
+ 		hwif->serialized = hwif->mate->serialized = 1;
+@@ -554,6 +554,8 @@
+ 
+ static int __devinit sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id)
+ {
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
+ 	ide_setup_pci_device(dev, &sc1200_chipset);
+ 	return 0;
+ }
+@@ -577,7 +579,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit sc1200_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(sc1200_ide_init);
++module_exit(sc1200_ide_exit);
+ 
+ MODULE_AUTHOR("Mark Lord");
+ MODULE_DESCRIPTION("PCI driver module for NS SC1200 IDE");
+--- 1.29/drivers/ide/pci/serverworks.c	2004-06-01 21:04:38 +02:00
++++ edited/drivers/ide/pci/serverworks.c	2004-06-16 15:44:17 +02:00
+@@ -510,7 +510,7 @@
+ 	return __ide_dma_end(drive);
+ }
+ 
+-static unsigned int __init init_chipset_svwks (struct pci_dev *dev, const char *name)
++static unsigned int __devinit init_chipset_svwks (struct pci_dev *dev, const char *name)
+ {
+ 	unsigned int reg;
+ 	u8 btr;
+@@ -630,7 +630,7 @@
+ 	return (dev->irq) ? dev->irq : 0;
+ }
+ 
+-static unsigned int __init ata66_svwks_svwks (ide_hwif_t *hwif)
++static unsigned int __devinit ata66_svwks_svwks (ide_hwif_t *hwif)
+ {
+ 	return 1;
+ }
+@@ -642,7 +642,7 @@
+  * Bit 14 clear = primary IDE channel does not have 80-pin cable.
+  * Bit 14 set   = primary IDE channel has 80-pin cable.
+  */
+-static unsigned int __init ata66_svwks_dell (ide_hwif_t *hwif)
++static unsigned int __devinit ata66_svwks_dell (ide_hwif_t *hwif)
+ {
+ 	struct pci_dev *dev = hwif->pci_dev;
+ 	if (dev->subsystem_vendor == PCI_VENDOR_ID_DELL &&
+@@ -660,7 +660,7 @@
+  *
+  * WARNING: this only works on Alpine hardware!
+  */
+-static unsigned int __init ata66_svwks_cobalt (ide_hwif_t *hwif)
++static unsigned int __devinit ata66_svwks_cobalt (ide_hwif_t *hwif)
+ {
+ 	struct pci_dev *dev = hwif->pci_dev;
+ 	if (dev->subsystem_vendor == PCI_VENDOR_ID_SUN &&
+@@ -671,7 +671,7 @@
+ 	return 0;
+ }
+ 
+-static unsigned int __init ata66_svwks (ide_hwif_t *hwif)
++static unsigned int __devinit ata66_svwks (ide_hwif_t *hwif)
+ {
+ 	struct pci_dev *dev = hwif->pci_dev;
+ 
+@@ -696,7 +696,7 @@
+ }
+ 
+ #undef CAN_SW_DMA
+-static void __init init_hwif_svwks (ide_hwif_t *hwif)
++static void __devinit init_hwif_svwks (ide_hwif_t *hwif)
+ {
+ 	u8 dma_stat = 0;
+ 
+@@ -744,7 +744,7 @@
+ /*
+  * We allow the BM-DMA driver to only work on enabled interfaces.
+  */
+-static void __init init_dma_svwks (ide_hwif_t *hwif, unsigned long dmabase)
++static void __devinit init_dma_svwks (ide_hwif_t *hwif, unsigned long dmabase)
+ {
+ 	struct pci_dev *dev = hwif->pci_dev;
+ 
+@@ -756,12 +756,12 @@
+ 	ide_setup_dma(hwif, dmabase, 8);
+ }
+ 
+-static void __init init_setup_svwks (struct pci_dev *dev, ide_pci_device_t *d)
++static void __devinit init_setup_svwks (struct pci_dev *dev, ide_pci_device_t *d)
+ {
+ 	ide_setup_pci_device(dev, d);
+ }
+ 
+-static void __init init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d)
++static void __devinit init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d)
+ {
+ 	if (!(PCI_FUNC(dev->devfn) & 1)) {
+ 		d->bootable = NEVER_BOARD;
+@@ -798,6 +798,8 @@
+ {
+ 	ide_pci_device_t *d = &serverworks_chipsets[id->driver_data];
+ 
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
+ 	d->init_setup(dev, d);
+ 	return 0;
+ }
+@@ -826,7 +828,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit svwks_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(svwks_ide_init);
++module_exit(svwks_ide_exit);
+ 
+ MODULE_AUTHOR("Michael Aubry. Andrzej Krzysztofowicz, Andre Hedrick");
+ MODULE_DESCRIPTION("PCI driver module for Serverworks OSB4/CSB5/CSB6 IDE");
+--- 1.9/drivers/ide/pci/sgiioc4.c	2004-06-01 21:04:38 +02:00
++++ edited/drivers/ide/pci/sgiioc4.c	2004-06-16 15:49:46 +02:00
+@@ -382,7 +382,7 @@
+ }
+ 
+ /* Creates a dma map for the scatter-gather list entries */
+-static void __init
++static void __devinit
+ ide_dma_sgiioc4(ide_hwif_t * hwif, unsigned long dma_base)
+ {
+ 	int num_ports = sizeof (ioc4_dma_regs_t);
+@@ -608,7 +608,7 @@
+ 	return 0;
+ }
+ 
+-static void __init
++static void __devinit
+ ide_init_sgiioc4(ide_hwif_t * hwif)
+ {
+ 	hwif->mmio = 2;
+@@ -646,7 +646,7 @@
+ 	hwif->INB = &sgiioc4_INB;
+ }
+ 
+-static int __init
++static int __devinit
+ sgiioc4_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t * d)
+ {
+ 	unsigned long base, ctl, dma_base, irqport;
+@@ -716,7 +716,7 @@
+ 				     *pci_dev, pciio_endian_t device_end,
+ 				     pciio_endian_t desired_end);
+ 
+-static unsigned int __init
++static unsigned int __devinit
+ pci_init_sgiioc4(struct pci_dev *dev, ide_pci_device_t * d)
+ {
+ 	unsigned int class_rev;
+@@ -751,6 +751,9 @@
+ 		return -ENODEV;
+ 	}
+ 
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
++
+ 	return sgiioc4_ide_setup_pci_device(dev, d);
+ }
+ 
+@@ -793,7 +796,14 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void
++sgiioc4_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(sgiioc4_ide_init);
++module_exit(sgiioc4_ide_exit);
+ 
+ MODULE_AUTHOR("Aniket Malatpure - Silicon Graphics Inc. (SGI)");
+ MODULE_DESCRIPTION("PCI driver module for SGI IOC4 Base-IO Card");
+--- 1.30/drivers/ide/pci/siimage.c	2004-06-15 18:29:40 +02:00
++++ edited/drivers/ide/pci/siimage.c	2004-06-16 15:47:24 +02:00
+@@ -1121,6 +1121,8 @@
+  
+ static int __devinit siimage_init_one(struct pci_dev *dev, const struct pci_device_id *id)
+ {
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
+ 	ide_setup_pci_device(dev, &siimage_chipsets[id->driver_data]);
+ 	return 0;
+ }
+@@ -1144,7 +1146,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit siimage_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(siimage_ide_init);
++module_exit(siimage_ide_exit);
+ 
+ MODULE_AUTHOR("Andre Hedrick, Alan Cox");
+ MODULE_DESCRIPTION("PCI driver module for SiI IDE");
+--- 1.27/drivers/ide/pci/sis5513.c	2004-06-15 18:29:40 +02:00
++++ edited/drivers/ide/pci/sis5513.c	2004-06-16 15:47:18 +02:00
+@@ -746,7 +746,7 @@
+ */
+ 
+ /* Chip detection and general config */
+-static unsigned int __init init_chipset_sis5513 (struct pci_dev *dev, const char *name)
++static unsigned int __devinit init_chipset_sis5513 (struct pci_dev *dev, const char *name)
+ {
+ 	struct pci_dev *host;
+ 	int i = 0;
+@@ -890,7 +890,7 @@
+ 	return 0;
+ }
+ 
+-static unsigned int __init ata66_sis5513 (ide_hwif_t *hwif)
++static unsigned int __devinit ata66_sis5513 (ide_hwif_t *hwif)
+ {
+ 	u8 ata66 = 0;
+ 
+@@ -908,7 +908,7 @@
+         return ata66;
+ }
+ 
+-static void __init init_hwif_sis5513 (ide_hwif_t *hwif)
++static void __devinit init_hwif_sis5513 (ide_hwif_t *hwif)
+ {
+ 	hwif->autodma = 0;
+ 
+@@ -957,6 +957,8 @@
+ 
+ static int __devinit sis5513_init_one(struct pci_dev *dev, const struct pci_device_id *id)
+ {
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
+ 	ide_setup_pci_device(dev, &sis5513_chipset);
+ 	return 0;
+ }
+@@ -978,7 +980,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit sis5513_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(sis5513_ide_init);
++module_exit(sis5513_ide_exit);
+ 
+ MODULE_AUTHOR("Lionel Bouton, L C Chang, Andre Hedrick, Vojtech Pavlik");
+ MODULE_DESCRIPTION("PCI driver module for SIS IDE");
+--- 1.20/drivers/ide/pci/sl82c105.c	2004-06-15 18:29:40 +02:00
++++ edited/drivers/ide/pci/sl82c105.c	2004-06-16 15:47:12 +02:00
+@@ -388,7 +388,7 @@
+  * channel 0 here at least, but channel 1 has to be enabled by
+  * firmware or arch code. We still set both to 16 bits mode.
+  */
+-static unsigned int __init init_chipset_sl82c105(struct pci_dev *dev, const char *msg)
++static unsigned int __devinit init_chipset_sl82c105(struct pci_dev *dev, const char *msg)
+ {
+ 	u32 val;
+ 
+@@ -401,7 +401,7 @@
+ 	return dev->irq;
+ }
+ 
+-static void __init init_dma_sl82c105(ide_hwif_t *hwif, unsigned long dma_base)
++static void __devinit init_dma_sl82c105(ide_hwif_t *hwif, unsigned long dma_base)
+ {
+ 	unsigned int rev;
+ 	u8 dma_state;
+@@ -433,7 +433,7 @@
+  * Initialise the chip
+  */
+ 
+-static void __init init_hwif_sl82c105(ide_hwif_t *hwif)
++static void __devinit init_hwif_sl82c105(ide_hwif_t *hwif)
+ {
+ 	struct pci_dev *dev = hwif->pci_dev;
+ 	u32 val;
+@@ -492,6 +492,8 @@
+ 
+ static int __devinit sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id)
+ {
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
+ 	ide_setup_pci_device(dev, &sl82c105_chipset);
+ 	return 0;
+ }
+@@ -513,7 +515,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit sl82c105_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(sl82c105_ide_init);
++module_exit(sl82c105_ide_exit);
+ 
+ MODULE_DESCRIPTION("PCI driver module for W82C105 IDE");
+ MODULE_LICENSE("GPL");
+--- 1.22/drivers/ide/pci/slc90e66.c	2004-06-15 18:29:40 +02:00
++++ edited/drivers/ide/pci/slc90e66.c	2004-06-16 15:47:02 +02:00
+@@ -313,7 +313,7 @@
+ }
+ #endif /* CONFIG_BLK_DEV_IDEDMA */
+ 
+-static unsigned int __init init_chipset_slc90e66 (struct pci_dev *dev, const char *name)
++static unsigned int __devinit init_chipset_slc90e66 (struct pci_dev *dev, const char *name)
+ {
+ #if defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS)
+ 	if (!slc90e66_proc) {
+@@ -325,7 +325,7 @@
+ 	return 0;
+ }
+ 
+-static void __init init_hwif_slc90e66 (ide_hwif_t *hwif)
++static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif)
+ {
+ 	u8 reg47 = 0;
+ 	u8 mask = hwif->channel ? 0x01 : 0x02;  /* bit0:Primary */
+@@ -376,6 +376,8 @@
+ 
+ static int __devinit slc90e66_init_one(struct pci_dev *dev, const struct pci_device_id *id)
+ {
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
+ 	ide_setup_pci_device(dev, &slc90e66_chipset);
+ 	return 0;
+ }
+@@ -397,7 +399,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit slc90e66_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(slc90e66_ide_init);
++module_exit(slc90e66_ide_exit);
+ 
+ MODULE_AUTHOR("Andre Hedrick");
+ MODULE_DESCRIPTION("PCI driver module for SLC90E66 IDE");
+--- 1.9/drivers/ide/pci/triflex.c	2004-06-15 18:29:40 +02:00
++++ edited/drivers/ide/pci/triflex.c	2004-06-16 15:46:54 +02:00
+@@ -190,7 +190,7 @@
+ 	return hwif->ide_dma_on(drive);
+ }
+ 
+-static void __init init_hwif_triflex(ide_hwif_t *hwif)
++static void __devinit init_hwif_triflex(ide_hwif_t *hwif)
+ {
+ 	hwif->tuneproc = &triflex_tune_drive;
+ 	hwif->speedproc = &triflex_tune_chipset;
+@@ -206,7 +206,7 @@
+ 	hwif->drives[1].autodma = hwif->autodma;
+ }
+ 
+-static unsigned int __init init_chipset_triflex(struct pci_dev *dev, 
++static unsigned int __devinit init_chipset_triflex(struct pci_dev *dev, 
+ 		const char *name) 
+ {
+ #ifdef CONFIG_PROC_FS
+@@ -228,6 +228,8 @@
+ static int __devinit triflex_init_one(struct pci_dev *dev, 
+ 		const struct pci_device_id *id)
+ {
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
+ 	ide_setup_pci_device(dev, &triflex_device);
+ 	triflex_dev = dev;
+ 
+@@ -252,7 +254,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit triflex_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(triflex_ide_init);
++module_exit(triflex_ide_exit);
+ 
+ MODULE_AUTHOR("Torben Mathiasen");
+ MODULE_DESCRIPTION("PCI driver module for Compaq Triflex IDE");
+--- 1.21/drivers/ide/pci/trm290.c	2004-06-15 18:29:40 +02:00
++++ edited/drivers/ide/pci/trm290.c	2004-06-16 15:46:45 +02:00
+@@ -403,6 +403,8 @@
+ 
+ static int __devinit trm290_init_one(struct pci_dev *dev, const struct pci_device_id *id)
+ {
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
+ 	ide_setup_pci_device(dev, &trm290_chipset);
+ 	return 0;
+ }
+@@ -424,7 +426,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit trm290_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(trm290_ide_init);
++module_exit(trm290_ide_exit);
+ 
+ MODULE_AUTHOR("Mark Lord");
+ MODULE_DESCRIPTION("PCI driver module for Tekram TRM290 IDE");
+--- 1.23/drivers/ide/pci/via82cxxx.c	2004-06-15 18:29:40 +02:00
++++ edited/drivers/ide/pci/via82cxxx.c	2004-06-16 15:46:29 +02:00
+@@ -414,7 +414,7 @@
+  *	and initialize its drive independent registers.
+  */
+ 
+-static unsigned int __init init_chipset_via82cxxx(struct pci_dev *dev, const char *name)
++static unsigned int __devinit init_chipset_via82cxxx(struct pci_dev *dev, const char *name)
+ {
+ 	struct pci_dev *isa = NULL;
+ 	u8 t, v;
+@@ -575,7 +575,7 @@
+ 	return 0;
+ }
+ 
+-static void __init init_hwif_via82cxxx(ide_hwif_t *hwif)
++static void __devinit init_hwif_via82cxxx(ide_hwif_t *hwif)
+ {
+ 	int i;
+ 
+@@ -621,6 +621,8 @@
+ static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_id *id)
+ {
+ 	ide_setup_pci_device(dev, &via82cxxx_chipset);
++	if (!try_module_get(THIS_MODULE))
++		return -ENODEV;
+ 	return 0;
+ }
+ 
+@@ -642,7 +644,13 @@
+ 	return ide_pci_register_driver(&driver);
+ }
+ 
++static void __exit via_ide_exit(void)
++{
++	ide_pci_unregister_driver(&driver);
++}
++
+ module_init(via_ide_init);
++module_exit(via_ide_exit);
+ 
+ MODULE_AUTHOR("Vojtech Pavlik, Michel Aubry, Jeff Garzik, Andre Hedrick");
+ MODULE_DESCRIPTION("PCI driver module for VIA IDE");
+--- 1.124/include/linux/ide.h	2004-06-05 21:58:33 +02:00
++++ edited/include/linux/ide.h	2004-06-16 15:44:18 +02:00
+@@ -1224,6 +1224,7 @@
+ extern	ide_hwif_t	ide_hwifs[];		/* master data repository */
+ #endif
+ extern int noautodma;
++extern int ide_scan_direction;
+ 
+ extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs);
+ 
+@@ -1524,7 +1525,7 @@
+ 
+ extern int ideprobe_init(void);
+ 
+-extern void ide_scan_pcibus(int scan_direction) __init;
++extern void ide_scan_pcibus(void);
+ extern int ide_pci_register_driver(struct pci_driver *driver);
+ extern void ide_pci_unregister_driver(struct pci_driver *driver);
+ extern void ide_pci_setup_ports(struct pci_dev *dev, struct ide_pci_device_s *d, int autodma, int pciirq, ata_index_t *index);

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/modular-vesafb.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/modular-vesafb.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/modular-vesafb.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,111 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: modularised VESA FB
+## DP: Patch author: unknown
+## DP: Upstream status: not submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- kernel-source-2.6.6/drivers/video/Kconfig	2004-05-10 19:48:01.000000000 +1000
++++ kernel-source-2.6.6-1/drivers/video/Kconfig	2004-05-10 22:21:43.000000000 +1000
+@@ -283,7 +283,7 @@
+ 	  cards. Say Y if you have one of those.
+ 
+ config FB_VESA
+-	bool "VESA VGA graphics support"
++	tristate "VESA VGA graphics support"
+ 	depends on FB && (X86 || X86_64)
+ 	help
+ 	  This is the frame buffer device driver for generic VESA 2.0
+--- 1.37/drivers/video/vesafb.c	2004-06-01 11:27:56 +02:00
++++ edited/drivers/video/vesafb.c	2004-06-19 14:59:21 +02:00
+@@ -19,6 +19,7 @@
+ #include <linux/fb.h>
+ #include <linux/ioport.h>
+ #include <linux/init.h>
++#include <linux/moduleparam.h>
+ #ifdef __i386__
+ #include <video/edid.h>
+ #endif
+@@ -49,6 +50,7 @@
+ 
+ static int             inverse   = 0;
+ static int             mtrr      = 1;
++static int             mtrr_hdl;
+ static int	       vram __initdata = 0; /* Set amount of memory to be used */
+ static int             pmi_setpal = 0;	/* pmi for palette changes ??? */
+ static int             ypan       = 0;  /* 0..nothing, 1..ypan, 2..ywrap */
+@@ -56,6 +58,9 @@
+ static void            (*pmi_start)(void);
+ static void            (*pmi_pal)(void);
+ 
++static char	       *options;
++module_param(options, charp, 0);
++
+ /* --------------------------------------------------------------------- */
+ 
+ static int vesafb_pan_display(struct fb_var_screeninfo *var,
+@@ -219,6 +224,8 @@
+ 	struct fb_info *info;
+ 	int i, err;
+ 
++	vesafb_setup(options);
++
+ 	if (screen_info.orig_video_isVGA != VIDEO_TYPE_VLFB)
+ 		return -ENXIO;
+ 
+@@ -370,7 +377,7 @@
+                 	temp_size &= (temp_size - 1);
+                         
+                 /* Try and find a power of two to add */
+-		while (temp_size && mtrr_add(vesafb_fix.smem_start, temp_size, MTRR_TYPE_WRCOMB, 1)==-EINVAL) {
++		while (temp_size && (mtrr_hdl = mtrr_add(vesafb_fix.smem_start, temp_size, MTRR_TYPE_WRCOMB, 1)) == -EINVAL) {
+ 			temp_size >>= 1;
+ 		}
+ 	}
+@@ -391,6 +398,7 @@
+ 	}
+ 	printk(KERN_INFO "fb%d: %s frame buffer device\n",
+ 	       info->node, info->fix.id);
++	dev_set_drvdata(device, info);
+ 	return 0;
+ err:
+ 	framebuffer_release(info);
+@@ -398,6 +406,17 @@
+ 	return err;
+ }
+ 
++static void __exit vesafb_remove(struct device *device)
++{
++	struct fb_info *info = dev_get_drvdata(device);
++
++	unregister_framebuffer(info);
++	if (mtrr && mtrr_hdl >= 0)
++		mtrr_del(mtrr_hdl, 0, 0);
++	iounmap(info->screen_base);
++	release_mem_region(vesafb_fix.smem_start, vesafb_fix.smem_len);
++}
++
+ static struct device_driver vesafb_driver = {
+ 	.name	= "vesafb",
+ 	.bus	= &platform_bus_type,
+@@ -421,6 +440,16 @@
+ 	}
+ 	return ret;
+ }
++
++#ifdef MODULE
++static void __exit vesafb_exit(void)
++{
++	platform_device_unregister(&vesafb_device);
++	driver_unregister(&vesafb_driver);
++}
++module_init(vesafb_init);
++module_exit(vesafb_exit);
++#endif
+ 
+ /*
+  * Overrides for Emacs so that we follow Linus's tabbing style.

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/modular-xfrm_tunnel-export-symbol.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/modular-xfrm_tunnel-export-symbol.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/modular-xfrm_tunnel-export-symbol.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,12 @@
+# author: Joshua Kwan
+# upstream status: not submitted
+# Export some symbols to fully fix modular xfrm4_tunnel.
+
+--- kernel-source-2.6.8-2.6.8/net/ipv4/xfrm4_input.c~	2004-08-27 11:17:30.000000000 -0700
++++ kernel-source-2.6.8-2.6.8/net/ipv4/xfrm4_input.c	2004-08-27 11:18:04.000000000 -0700
+@@ -154,3 +154,5 @@
+ 	kfree_skb(skb);
+ 	return 0;
+ }
++
++EXPORT_SYMBOL(xfrm4_rcv_encap);

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/modular-xfrm_tunnel.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/modular-xfrm_tunnel.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/modular-xfrm_tunnel.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,371 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Modularise xfrm_tunnel.
+## DP: Patch author: Herbert Xu <herbert at gondor.apana.org.au>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/08/19 07:13:27-07:00 herbert at gondor.apana.org.au 
+#   [IPSEC]: Modularise xfrm_tunnel.
+#   
+#   This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as
+#   modules.
+#   
+#   This makes sense because they're only used by IPComp/IPIP/IP6Tunnel
+#   which are modules themselves.  It also means that distros can cut
+#   down on there core kernel size when compiling with IPsec support.
+#   
+#   Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# net/xfrm/xfrm_export.c
+#   2004/08/19 07:13:10-07:00 herbert at gondor.apana.org.au +0 -2
+#   [IPSEC]: Modularise xfrm_tunnel.
+#   
+#   This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as
+#   modules.
+#   
+#   This makes sense because they're only used by IPComp/IPIP/IP6Tunnel
+#   which are modules themselves.  It also means that distros can cut
+#   down on there core kernel size when compiling with IPsec support.
+#   
+#   Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# net/ipv6/xfrm6_tunnel.c
+#   2004/08/19 07:13:10-07:00 herbert at gondor.apana.org.au +10 -5
+#   [IPSEC]: Modularise xfrm_tunnel.
+#   
+#   This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as
+#   modules.
+#   
+#   This makes sense because they're only used by IPComp/IPIP/IP6Tunnel
+#   which are modules themselves.  It also means that distros can cut
+#   down on there core kernel size when compiling with IPsec support.
+#   
+#   Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# net/ipv6/xfrm6_policy.c
+#   2004/08/19 07:13:10-07:00 herbert at gondor.apana.org.au +0 -2
+#   [IPSEC]: Modularise xfrm_tunnel.
+#   
+#   This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as
+#   modules.
+#   
+#   This makes sense because they're only used by IPComp/IPIP/IP6Tunnel
+#   which are modules themselves.  It also means that distros can cut
+#   down on there core kernel size when compiling with IPsec support.
+#   
+#   Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# net/ipv6/Makefile
+#   2004/08/19 07:13:10-07:00 herbert at gondor.apana.org.au +2 -1
+#   [IPSEC]: Modularise xfrm_tunnel.
+#   
+#   This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as
+#   modules.
+#   
+#   This makes sense because they're only used by IPComp/IPIP/IP6Tunnel
+#   which are modules themselves.  It also means that distros can cut
+#   down on there core kernel size when compiling with IPsec support.
+#   
+#   Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# net/ipv6/Kconfig
+#   2004/08/19 07:13:10-07:00 herbert at gondor.apana.org.au +13 -1
+#   [IPSEC]: Modularise xfrm_tunnel.
+#   
+#   This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as
+#   modules.
+#   
+#   This makes sense because they're only used by IPComp/IPIP/IP6Tunnel
+#   which are modules themselves.  It also means that distros can cut
+#   down on there core kernel size when compiling with IPsec support.
+#   
+#   Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# net/ipv4/xfrm4_tunnel.c
+#   2004/08/19 07:13:10-07:00 herbert at gondor.apana.org.au +5 -0
+#   [IPSEC]: Modularise xfrm_tunnel.
+#   
+#   This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as
+#   modules.
+#   
+#   This makes sense because they're only used by IPComp/IPIP/IP6Tunnel
+#   which are modules themselves.  It also means that distros can cut
+#   down on there core kernel size when compiling with IPsec support.
+#   
+#   Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# net/ipv4/Makefile
+#   2004/08/19 07:13:10-07:00 herbert at gondor.apana.org.au +2 -1
+#   [IPSEC]: Modularise xfrm_tunnel.
+#   
+#   This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as
+#   modules.
+#   
+#   This makes sense because they're only used by IPComp/IPIP/IP6Tunnel
+#   which are modules themselves.  It also means that distros can cut
+#   down on there core kernel size when compiling with IPsec support.
+#   
+#   Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# net/ipv4/Kconfig
+#   2004/08/19 07:13:10-07:00 herbert at gondor.apana.org.au +11 -1
+#   [IPSEC]: Modularise xfrm_tunnel.
+#   
+#   This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as
+#   modules.
+#   
+#   This makes sense because they're only used by IPComp/IPIP/IP6Tunnel
+#   which are modules themselves.  It also means that distros can cut
+#   down on there core kernel size when compiling with IPsec support.
+#   
+#   Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# include/net/xfrm.h
+#   2004/08/19 07:13:10-07:00 herbert at gondor.apana.org.au +0 -2
+#   [IPSEC]: Modularise xfrm_tunnel.
+#   
+#   This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as
+#   modules.
+#   
+#   This makes sense because they're only used by IPComp/IPIP/IP6Tunnel
+#   which are modules themselves.  It also means that distros can cut
+#   down on there core kernel size when compiling with IPsec support.
+#   
+#   Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+diff -Nru a/include/net/xfrm.h b/include/net/xfrm.h
+--- a/include/net/xfrm.h	2004-08-25 12:31:08 +02:00
++++ b/include/net/xfrm.h	2004-08-25 12:31:08 +02:00
+@@ -792,8 +792,6 @@
+ extern void xfrm4_state_fini(void);
+ extern void xfrm6_state_init(void);
+ extern void xfrm6_state_fini(void);
+-extern void xfrm6_tunnel_init(void);
+-extern void xfrm6_tunnel_fini(void);
+ 
+ extern int xfrm_state_walk(u8 proto, int (*func)(struct xfrm_state *, int, void*), void *);
+ extern struct xfrm_state *xfrm_state_alloc(void);
+diff -Nru a/net/ipv4/Kconfig b/net/ipv4/Kconfig
+--- a/net/ipv4/Kconfig	2004-08-25 12:31:08 +02:00
++++ b/net/ipv4/Kconfig	2004-08-25 12:31:08 +02:00
+@@ -187,7 +187,7 @@
+ config NET_IPIP
+ 	tristate "IP: tunneling"
+ 	depends on INET
+-	select XFRM
++	select INET_TUNNEL
+ 	---help---
+ 	  Tunneling means encapsulating data of one protocol type within
+ 	  another protocol and sending it over a channel that understands the
+@@ -351,11 +351,21 @@
+ config INET_IPCOMP
+ 	tristate "IP: IPComp transformation"
+ 	select XFRM
++	select INET_TUNNEL
+ 	select CRYPTO
+ 	select CRYPTO_DEFLATE
+ 	---help---
+ 	  Support for IP Paylod Compression (RFC3173), typically needed
+ 	  for IPsec.
++	  
++	  If unsure, say Y.
++
++config INET_TUNNEL
++	tristate "IP: tunnel transformation"
++	select XFRM
++	---help---
++	  Support for generic IP tunnel transformation, which is required by
++	  the IP tunneling module as well as tunnel mode IPComp.
+ 	  
+ 	  If unsure, say Y.
+ 
+diff -Nru a/net/ipv4/Makefile b/net/ipv4/Makefile
+--- a/net/ipv4/Makefile	2004-08-25 12:31:08 +02:00
++++ b/net/ipv4/Makefile	2004-08-25 12:31:08 +02:00
+@@ -19,9 +19,10 @@
+ obj-$(CONFIG_INET_AH) += ah4.o
+ obj-$(CONFIG_INET_ESP) += esp4.o
+ obj-$(CONFIG_INET_IPCOMP) += ipcomp.o
++obj-$(CONFIG_INET_TUNNEL) += xfrm4_tunnel.o 
+ obj-$(CONFIG_IP_PNP) += ipconfig.o
+ obj-$(CONFIG_NETFILTER)	+= netfilter/
+ obj-$(CONFIG_IP_VS) += ipvs/
+ 
+ obj-$(CONFIG_XFRM) += xfrm4_policy.o xfrm4_state.o xfrm4_input.o \
+-		      xfrm4_tunnel.o xfrm4_output.o
++		      xfrm4_output.o
+diff -Nru a/net/ipv4/xfrm4_tunnel.c b/net/ipv4/xfrm4_tunnel.c
+--- a/net/ipv4/xfrm4_tunnel.c	2004-08-25 12:31:08 +02:00
++++ b/net/ipv4/xfrm4_tunnel.c	2004-08-25 12:31:08 +02:00
+@@ -4,6 +4,7 @@
+  */
+ 
+ #include <linux/skbuff.h>
++#include <linux/module.h>
+ #include <net/xfrm.h>
+ #include <net/ip.h>
+ #include <net/protocol.h>
+@@ -43,6 +44,8 @@
+ 	return ret;
+ }
+ 
++EXPORT_SYMBOL(xfrm4_tunnel_register);
++
+ int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler)
+ {
+ 	int ret;
+@@ -59,6 +62,8 @@
+ 
+ 	return ret;
+ }
++
++EXPORT_SYMBOL(xfrm4_tunnel_deregister);
+ 
+ static int ipip_rcv(struct sk_buff *skb)
+ {
+diff -Nru a/net/ipv6/Kconfig b/net/ipv6/Kconfig
+--- a/net/ipv6/Kconfig	2004-08-25 12:31:08 +02:00
++++ b/net/ipv6/Kconfig	2004-08-25 12:31:08 +02:00
+@@ -48,6 +48,7 @@
+ 	tristate "IPv6: IPComp transformation"
+ 	depends on IPV6
+ 	select XFRM
++	select INET6_TUNNEL
+ 	select CRYPTO
+ 	select CRYPTO_DEFLATE
+ 	---help---
+@@ -56,9 +57,21 @@
+ 
+ 	  If unsure, say Y.
+ 
++config INET6_TUNNEL
++	tristate "IPv6: tunnel transformation"
++	depends on IPV6
++	select XFRM
++	---help---
++	  Support for generic IPv6-in-IPv6 tunnel transformation, which is
++	  required by the IPv6-in-IPv6 tunneling module as well as tunnel mode
++	  IPComp.
++	  
++	  If unsure, say Y.
++
+ config IPV6_TUNNEL
+ 	tristate "IPv6: IPv6-in-IPv6 tunnel"
+ 	depends on IPV6
++	select INET6_TUNNEL
+ 	---help---
+ 	  Support for IPv6-in-IPv6 tunnels described in RFC 2473.
+ 
+diff -Nru a/net/ipv6/Makefile b/net/ipv6/Makefile
+--- a/net/ipv6/Makefile	2004-08-25 12:31:08 +02:00
++++ b/net/ipv6/Makefile	2004-08-25 12:31:08 +02:00
+@@ -11,12 +11,13 @@
+ 		ip6_flowlabel.o ipv6_syms.o
+ 
+ ipv6-$(CONFIG_XFRM) += xfrm6_policy.o xfrm6_state.o xfrm6_input.o \
+-	xfrm6_tunnel.o xfrm6_output.o
++	xfrm6_output.o
+ ipv6-objs += $(ipv6-y)
+ 
+ obj-$(CONFIG_INET6_AH) += ah6.o
+ obj-$(CONFIG_INET6_ESP) += esp6.o
+ obj-$(CONFIG_INET6_IPCOMP) += ipcomp6.o
++obj-$(CONFIG_INET6_TUNNEL) += xfrm6_tunnel.o 
+ obj-$(CONFIG_NETFILTER)	+= netfilter/
+ 
+ obj-$(CONFIG_IPV6_TUNNEL) += ip6_tunnel.o
+diff -Nru a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
+--- a/net/ipv6/xfrm6_policy.c	2004-08-25 12:31:08 +02:00
++++ b/net/ipv6/xfrm6_policy.c	2004-08-25 12:31:08 +02:00
+@@ -287,12 +287,10 @@
+ {
+ 	xfrm6_policy_init();
+ 	xfrm6_state_init();
+-	xfrm6_tunnel_init();
+ }
+ 
+ void __exit xfrm6_fini(void)
+ {
+-	xfrm6_tunnel_fini();
+ 	//xfrm6_input_fini();
+ 	xfrm6_policy_fini();
+ 	xfrm6_state_fini();
+diff -Nru a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c
+--- a/net/ipv6/xfrm6_tunnel.c	2004-08-25 12:31:08 +02:00
++++ b/net/ipv6/xfrm6_tunnel.c	2004-08-25 12:31:08 +02:00
+@@ -501,31 +501,32 @@
+ 	.flags          = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL,
+ };
+ 
+-void __init xfrm6_tunnel_init(void)
++static int __init xfrm6_tunnel_init(void)
+ {
+ 	X6TPRINTK3(KERN_DEBUG "%s()\n", __FUNCTION__);
+ 
+ 	if (xfrm_register_type(&xfrm6_tunnel_type, AF_INET6) < 0) {
+ 		X6TPRINTK1(KERN_ERR
+ 			   "xfrm6_tunnel init: can't add xfrm type\n");
+-		return;
++		return -EAGAIN;
+ 	}
+ 	if (inet6_add_protocol(&xfrm6_tunnel_protocol, IPPROTO_IPV6) < 0) {
+ 		X6TPRINTK1(KERN_ERR
+ 			   "xfrm6_tunnel init(): can't add protocol\n");
+ 		xfrm_unregister_type(&xfrm6_tunnel_type, AF_INET6);
+-		return;
++		return -EAGAIN;
+ 	}
+ 	if (xfrm6_tunnel_spi_init() < 0) {
+ 		X6TPRINTK1(KERN_ERR
+ 			   "xfrm6_tunnel init: failed to initialize spi\n");
+ 		inet6_del_protocol(&xfrm6_tunnel_protocol, IPPROTO_IPV6);
+ 		xfrm_unregister_type(&xfrm6_tunnel_type, AF_INET6);
+-		return;
++		return -EAGAIN;
+ 	}
++	return 0;
+ }
+ 
+-void __exit xfrm6_tunnel_fini(void)
++static void __exit xfrm6_tunnel_fini(void)
+ {
+ 	X6TPRINTK3(KERN_DEBUG "%s()\n", __FUNCTION__);
+ 
+@@ -537,3 +538,7 @@
+ 		X6TPRINTK1(KERN_ERR
+ 			   "xfrm6_tunnel close: can't remove xfrm type\n");
+ }
++
++module_init(xfrm6_tunnel_init);
++module_exit(xfrm6_tunnel_fini);
++MODULE_LICENSE("GPL");
+diff -Nru a/net/xfrm/xfrm_export.c b/net/xfrm/xfrm_export.c
+--- a/net/xfrm/xfrm_export.c	2004-08-25 12:31:08 +02:00
++++ b/net/xfrm/xfrm_export.c	2004-08-25 12:31:08 +02:00
+@@ -33,8 +33,6 @@
+ EXPORT_SYMBOL(xfrm_get_acqseq);
+ EXPORT_SYMBOL(xfrm_parse_spi);
+ EXPORT_SYMBOL(xfrm4_rcv);
+-EXPORT_SYMBOL(xfrm4_tunnel_register);
+-EXPORT_SYMBOL(xfrm4_tunnel_deregister);
+ EXPORT_SYMBOL(xfrm_register_type);
+ EXPORT_SYMBOL(xfrm_unregister_type);
+ EXPORT_SYMBOL(xfrm_get_type);

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/net-sched-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/net-sched-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/net-sched-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,82 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix crash in qdisc code
+## DP: Patch author: David S. Miller <davem at redhat.com>
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/08/15 19:33:16-07:00 kaber at trash.net 
+#   [PKT_SCHED]: cacheline-align qdisc data in qdisc_create()
+#   
+#   Signed-off-by: Patrick McHardy <kaber at trash.net>
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# net/sched/sch_api.c
+#   2004/08/15 19:32:59-07:00 kaber at trash.net +13 -8
+#   [PKT_SCHED]: cacheline-align qdisc data in qdisc_create()
+#   
+#   Signed-off-by: Patrick McHardy <kaber at trash.net>
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+diff -Nru a/net/sched/sch_api.c b/net/sched/sch_api.c
+--- a/net/sched/sch_api.c	2004-08-19 07:33:10 -07:00
++++ b/net/sched/sch_api.c	2004-08-19 07:33:10 -07:00
+@@ -389,7 +389,8 @@
+ {
+ 	int err;
+ 	struct rtattr *kind = tca[TCA_KIND-1];
+-	struct Qdisc *sch = NULL;
++	void *p = NULL;
++	struct Qdisc *sch;
+ 	struct Qdisc_ops *ops;
+ 	int size;
+ 
+@@ -407,12 +408,18 @@
+ 	if (ops == NULL)
+ 		goto err_out;
+ 
+-	size = sizeof(*sch) + ops->priv_size;
++	/* ensure that the Qdisc and the private data are 32-byte aligned */
++	size = ((sizeof(*sch) + QDISC_ALIGN_CONST) & ~QDISC_ALIGN_CONST);
++	size += ops->priv_size + QDISC_ALIGN_CONST;
+ 
+-	sch = kmalloc(size, GFP_KERNEL);
++	p = kmalloc(size, GFP_KERNEL);
+ 	err = -ENOBUFS;
+-	if (!sch)
++	if (!p)
+ 		goto err_out;
++	memset(p, 0, size);
++	sch = (struct Qdisc *)(((unsigned long)p + QDISC_ALIGN_CONST)
++	                       & ~QDISC_ALIGN_CONST);
++	sch->padded = (char *)sch - (char *)p;
+ 
+ 	/* Grrr... Resolve race condition with module unload */
+ 
+@@ -420,8 +427,6 @@
+ 	if (ops != qdisc_lookup_ops(kind))
+ 		goto err_out;
+ 
+-	memset(sch, 0, size);
+-
+ 	INIT_LIST_HEAD(&sch->list);
+ 	skb_queue_head_init(&sch->q);
+ 
+@@ -470,8 +475,8 @@
+ 
+ err_out:
+ 	*errp = err;
+-	if (sch)
+-		kfree(sch);
++	if (p)
++		kfree(p);
+ 	return NULL;
+ }
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/net-sched-sch-cbq-leak.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/net-sched-sch-cbq-leak.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/net-sched-sch-cbq-leak.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,79 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix class leak in CBQ scheduler.
+## DP: Patch author: Patrick McHardy <kaber at trash.net>
+## DP: Upstream status: merged
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/08/22 21:32:31-07:00 kaber at trash.net 
+#   [PKT_SCHED]: Fix class leak in CBQ scheduler.
+#   
+#   Signed-off-by: Patrick McHardy <kaber at trash.net>
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# net/sched/sch_cbq.c
+#   2004/08/22 21:32:15-07:00 kaber at trash.net +8 -6
+#   [PKT_SCHED]: Fix class leak in CBQ scheduler.
+#   
+#   Signed-off-by: Patrick McHardy <kaber at trash.net>
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+diff -Nru a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
+--- a/net/sched/sch_cbq.c	2004-10-21 00:55:22 -07:00
++++ b/net/sched/sch_cbq.c	2004-10-21 00:55:22 -07:00
+@@ -1746,15 +1746,18 @@
+ 	}
+ }
+ 
+-static void cbq_destroy_class(struct cbq_class *cl)
++static void cbq_destroy_class(struct Qdisc *sch, struct cbq_class *cl)
+ {
++	struct cbq_sched_data *q = qdisc_priv(sch);
++
+ 	cbq_destroy_filters(cl);
+ 	qdisc_destroy(cl->q);
+ 	qdisc_put_rtab(cl->R_tab);
+ #ifdef CONFIG_NET_ESTIMATOR
+ 	qdisc_kill_estimator(&cl->stats);
+ #endif
+-	kfree(cl);
++	if (cl != &q->link)
++		kfree(cl);
+ }
+ 
+ static void
+@@ -1777,8 +1780,7 @@
+ 
+ 		for (cl = q->classes[h]; cl; cl = next) {
+ 			next = cl->next;
+-			if (cl != &q->link)
+-				cbq_destroy_class(cl);
++			cbq_destroy_class(sch, cl);
+ 		}
+ 	}
+ 
+@@ -1799,7 +1801,7 @@
+ 		spin_unlock_bh(&sch->dev->queue_lock);
+ #endif
+ 
+-		cbq_destroy_class(cl);
++		cbq_destroy_class(sch, cl);
+ 	}
+ }
+ 
+@@ -2035,7 +2037,7 @@
+ 	sch_tree_unlock(sch);
+ 
+ 	if (--cl->refcnt == 0)
+-		cbq_destroy_class(cl);
++		cbq_destroy_class(sch, cl);
+ 
+ 	return 0;
+ }

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/net-sched-sch-slab-corruption.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/net-sched-sch-slab-corruption.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/net-sched-sch-slab-corruption.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,64 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix slab corruption in cbq_destroy
+## DP: Patch author: Thomas Graf <tgraf at suug.ch>
+## DP: Upstream status: merged
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/09/16 13:13:12-07:00 tgraf at suug.ch 
+#   [PKT_SCHED]: Fix slab corruption in cbq_destroy
+#   
+#   Fixes slab corruption in cbq_destroy. cbq_destroy_filters and
+#   qdisc_put_rtab(q->link.R_tab) are already called in cbq_destroy_class.
+#   The latter lead to a slab corruption due to repeated freeing of
+#   q->link.R_tab because q->link is part of q->classes. Problem introduced
+#   in 1.21.
+#   
+#   Signed-off-by: Thomas Graf <tgraf at suug.ch>
+#   Signed-off-by: Patrick McHardy <kaber at trash.net>
+#   Signed-off-by: David S. Miller <davem at davemloft.net>
+# 
+# net/sched/sch_cbq.c
+#   2004/09/16 13:12:54-07:00 tgraf at suug.ch +0 -6
+#   [PKT_SCHED]: Fix slab corruption in cbq_destroy
+#   
+#   Fixes slab corruption in cbq_destroy. cbq_destroy_filters and
+#   qdisc_put_rtab(q->link.R_tab) are already called in cbq_destroy_class.
+#   The latter lead to a slab corruption due to repeated freeing of
+#   q->link.R_tab because q->link is part of q->classes. Problem introduced
+#   in 1.21.
+#   
+#   Signed-off-by: Thomas Graf <tgraf at suug.ch>
+#   Signed-off-by: Patrick McHardy <kaber at trash.net>
+#   Signed-off-by: David S. Miller <davem at davemloft.net>
+# 
+diff -Nru a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
+--- a/net/sched/sch_cbq.c	2004-10-21 00:56:01 -07:00
++++ b/net/sched/sch_cbq.c	2004-10-21 00:56:01 -07:00
+@@ -1770,10 +1770,6 @@
+ #ifdef CONFIG_NET_CLS_POLICE
+ 	q->rx_class = NULL;
+ #endif
+-	for (h = 0; h < 16; h++) {
+-		for (cl = q->classes[h]; cl; cl = cl->next)
+-			cbq_destroy_filters(cl);
+-	}
+ 
+ 	for (h = 0; h < 16; h++) {
+ 		struct cbq_class *next;
+@@ -1783,8 +1779,6 @@
+ 			cbq_destroy_class(sch, cl);
+ 		}
+ 	}
+-
+-	qdisc_put_rtab(q->link.R_tab);
+ }
+ 
+ static void cbq_put(struct Qdisc *sch, unsigned long arg)

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/netfilter-localhost-frag.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/netfilter-localhost-frag.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/netfilter-localhost-frag.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,53 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: check for already tracked/untracked before fragment check
+## DP: Patch author: kaber at coreworks.de 
+## DP: Upstream status: backport from 2.6.9
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/09/28 20:34:58-07:00 kaber at coreworks.de 
+#   [NETFILTER]: move check for already tracked/untracked before fragment check
+#   
+#   Signed-off-by: Patrick McHardy <kaber at trash.net>
+#   Signed-off-by: David S. Miller <davem at davemloft.net>
+# 
+# net/ipv4/netfilter/ip_conntrack_core.c
+#   2004/09/28 20:34:27-07:00 kaber at coreworks.de +6 -6
+#   [NETFILTER]: move check for already tracked/untracked before fragment check
+#   
+#   Signed-off-by: Patrick McHardy <kaber at trash.net>
+#   Signed-off-by: David S. Miller <davem at davemloft.net>
+# 
+# Ported to 2.6.8 for Debian by Horms
+#
+--- a/net/ipv4/netfilter/ip_conntrack_core.c	2004-10-25 12:50:52.000000000 +0900
++++ b/net/ipv4/netfilter/ip_conntrack_core.c	2004-10-25 12:51:10.000000000 +0900
+@@ -795,6 +795,10 @@
+ 	int set_reply;
+ 	int ret;
+ 
++	/* Previously seen (loopback or untracked)?  Ignore. */
++	if ((*pskb)->nfct)
++		return NF_ACCEPT;
++
+ 	/* Never happen */
+ 	if ((*pskb)->nh.iph->frag_off & htons(IP_OFFSET)) {
+ 		if (net_ratelimit()) {
+@@ -822,10 +826,6 @@
+ 	}
+ #endif
+ 
+-	/* Previously seen (loopback or untracked)?  Ignore. */
+-	if ((*pskb)->nfct)
+-		return NF_ACCEPT;
+-
+ 	proto = ip_ct_find_proto((*pskb)->nh.iph->protocol);
+ 
+ 	/* It may be an icmp error... */

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/netstat-fix-output.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/netstat-fix-output.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/netstat-fix-output.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,23 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI> 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: fix /proc/net/netstat output for `netstat -s`
+## DP: Patch author: cp at absolutedigital.net
+## DP: Upstream status: included in 2.6.9-rc1
+ 
+ . $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -Nru a/net/ipv4/proc.c b/net/ipv4/proc.c
+--- a/net/ipv4/proc.c	2004-08-29 01:48:27 -07:00
++++ b/net/ipv4/proc.c	2004-08-29 01:48:27 -07:00
+@@ -330,7 +330,7 @@
+ {
+ 	int i;
+ 
+-	seq_puts(seq, "\nTcpExt:");
++	seq_puts(seq, "TcpExt:");
+ 	for (i = 0; snmp4_net_list[i].name != NULL; i++)
+ 		seq_printf(seq, " %s", snmp4_net_list[i].name);
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/nfs-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/nfs-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/nfs-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,31 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: fix instant OOPS in NFS client
+## DP: Patch author: Trond Myklebust <trond.myklebust at fys.uio.no>
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- 1.40/fs/nfs/file.c	2004-08-09 14:58:00 -04:00
++++ edited/fs/nfs/file.c	2004-08-13 22:54:01 -04:00
+@@ -72,7 +72,7 @@
+ 
+ static int nfs_check_flags(int flags)
+ {
+-	if (flags & (O_APPEND | O_DIRECT))
++	if ((flags & (O_APPEND | O_DIRECT)) == (O_APPEND | O_DIRECT))
+ 		return -EINVAL;
+ 
+ 	return 0;
+@@ -89,7 +89,7 @@
+ 	int res;
+ 
+ 	res = nfs_check_flags(filp->f_flags);
+-	if (!res)
++	if (res)
+ 		return res;
+ 
+ 	lock_kernel();

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/nfsd-subtreecheck-nostale.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/nfsd-subtreecheck-nostale.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/nfsd-subtreecheck-nostale.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,32 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: don't return ESTALE for wrong permissions on NFS server
+## DP: Patch author: Olaf Kirch <okir at suse.de>
+## DP: Upstream status: upstream wants a better fix
+## DP: Discussion URL: http://marc.theaimsgroup.com/?t=109286045700001&r=1&w=2
+## DP: BTS: #255931
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- linux-2.6.5/fs/exportfs/expfs.c.nostale	2004-04-04 05:37:44.000000000 +0200
++++ linux-2.6.5/fs/exportfs/expfs.c	2004-04-30 10:32:19.000000000 +0200
+@@ -278,7 +278,15 @@
+ 
+ 	/* drat - I just cannot find anything acceptable */
+ 	dput(result);
+-	return ERR_PTR(-ESTALE);
++
++	/* Originally, we would return ESTALE here. This is not
++	 * correct, however, as the file handle is valid; it just
++	 * failed our acceptance test.
++	 * This will lead to unexpected results in the client if
++	 * there are two processes accessing the same file; one
++	 * with proper permissions and one without.
++	 */
++	return ERR_PTR(-EACCES);
+ 
+  err_target:
+ 	dput(target_dir);

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/openpromfs-loop.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/openpromfs-loop.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/openpromfs-loop.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,192 @@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/08/25 23:53:13-07:00 davem at nuts.davemloft.net 
+#   [SPARC64]: Fix direct f_pos fiddling in openpromfs. 
+#   
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# fs/openpromfs/inode.c
+#   2004/08/25 23:52:33-07:00 davem at nuts.davemloft.net +24 -24
+#   [SPARC64]: Fix direct f_pos fiddling in openpromfs.
+# 
+diff -Nru a/fs/openpromfs/inode.c b/fs/openpromfs/inode.c
+--- a/fs/openpromfs/inode.c	2004-09-06 21:28:02 -07:00
++++ b/fs/openpromfs/inode.c	2004-09-06 21:28:02 -07:00
+@@ -79,7 +79,7 @@
+ 		count = 9 - file->f_pos;
+ 	if (copy_to_user(buf, buffer + file->f_pos, count))
+ 		return -EFAULT;
+-	file->f_pos += count;
++	*ppos += count;
+ 	return count;
+ }
+ 
+@@ -94,7 +94,7 @@
+ 	openprom_property *op;
+ 	char buffer[64];
+ 	
+-	if (filp->f_pos >= 0xffffff || count >= 0xffffff)
++	if (*ppos >= 0xffffff || count >= 0xffffff)
+ 		return -EINVAL;
+ 	if (!filp->private_data) {
+ 		node = nodes[(u16)((long)inode->u.generic_ip)].node;
+@@ -180,7 +180,7 @@
+ 	} else {
+ 		i = (op->len << 1) + 1;
+ 	}
+-	k = filp->f_pos;
++	k = *ppos;
+ 	if (k >= i) return 0;
+ 	if (count > i - k) count = i - k;
+ 	if (op->flag & OPP_STRING) {
+@@ -197,7 +197,7 @@
+ 			j = count;
+ 
+ 		if (j >= 0) {
+-			if (copy_to_user(buf + k - filp->f_pos,
++			if (copy_to_user(buf + k - *ppos,
+ 					 op->value + k - 1, j))
+ 				return -EFAULT;
+ 			count -= j;
+@@ -205,11 +205,11 @@
+ 		}
+ 
+ 		if (count) {
+-			if (put_user('\'', &buf [k++ - filp->f_pos]))
++			if (put_user('\'', &buf [k++ - *ppos]))
+ 				return -EFAULT;
+ 		}
+ 		if (count > 1) {
+-			if (put_user('\n', &buf [k++ - filp->f_pos]))
++			if (put_user('\n', &buf [k++ - *ppos]))
+ 				return -EFAULT;
+ 		}
+ 	} else if (op->flag & OPP_STRINGLIST) {
+@@ -287,7 +287,7 @@
+ 		if ((k < i - 1) && (k & 1)) {
+ 			sprintf (buffer, "%02x",
+ 				 (unsigned char) *(op->value + (k >> 1)) & 0xff);
+-			if (put_user(buffer[1], &buf[k++ - filp->f_pos]))
++			if (put_user(buffer[1], &buf[k++ - *ppos]))
+ 				return -EFAULT;
+ 			count--;
+ 		}
+@@ -295,7 +295,7 @@
+ 		for (; (count > 1) && (k < i - 1); k += 2) {
+ 			sprintf (buffer, "%02x",
+ 				 (unsigned char) *(op->value + (k >> 1)) & 0xff);
+-			if (copy_to_user(buf + k - filp->f_pos, buffer, 2))
++			if (copy_to_user(buf + k - *ppos, buffer, 2))
+ 				return -EFAULT;
+ 			count -= 2;
+ 		}
+@@ -303,18 +303,18 @@
+ 		if (count && (k < i - 1)) {
+ 			sprintf (buffer, "%02x",
+ 				 (unsigned char) *(op->value + (k >> 1)) & 0xff);
+-			if (put_user(buffer[0], &buf[k++ - filp->f_pos]))
++			if (put_user(buffer[0], &buf[k++ - *ppos]))
+ 				return -EFAULT;
+ 			count--;
+ 		}
+ 
+ 		if (count) {
+-			if (put_user('\n', &buf [k++ - filp->f_pos]))
++			if (put_user('\n', &buf [k++ - *ppos]))
+ 				return -EFAULT;
+ 		}
+ 	}
+-	count = k - filp->f_pos;
+-	filp->f_pos = k;
++	count = k - *ppos;
++	*ppos = k;
+ 	return count;
+ }
+ 
+@@ -327,14 +327,14 @@
+ 	void *b;
+ 	openprom_property *op;
+ 	
+-	if (filp->f_pos >= 0xffffff || count >= 0xffffff)
++	if (*ppos >= 0xffffff || count >= 0xffffff)
+ 		return -EINVAL;
+ 	if (!filp->private_data) {
+ 		i = property_read (filp, NULL, 0, NULL);
+ 		if (i)
+ 			return i;
+ 	}
+-	k = filp->f_pos;
++	k = *ppos;
+ 	op = (openprom_property *)filp->private_data;
+ 	if (!(op->flag & OPP_STRING)) {
+ 		u32 *first, *last;
+@@ -462,7 +462,7 @@
+ 				op->len = i;
+ 		} else
+ 			op->len = i;
+-		filp->f_pos += count;
++		*ppos += count;
+ 	}
+ write_try_string:
+ 	if (!(op->flag & OPP_BINARY)) {
+@@ -480,7 +480,7 @@
+ 				op->flag |= OPP_QUOTED;
+ 				buf++;
+ 				count--;
+-				filp->f_pos++;
++				(*ppos)++;
+ 				if (!count) {
+ 					op->flag |= OPP_STRING;
+ 					return 1;
+@@ -489,9 +489,9 @@
+ 				op->flag |= OPP_NOTQUOTED;
+ 		}
+ 		op->flag |= OPP_STRING;
+-		if (op->alloclen <= count + filp->f_pos) {
++		if (op->alloclen <= count + *ppos) {
+ 			b = kmalloc (sizeof (openprom_property)
+-				     + 2 * (count + filp->f_pos), GFP_KERNEL);
++				     + 2 * (count + *ppos), GFP_KERNEL);
+ 			if (!b)
+ 				return -ENOMEM;
+ 			memcpy (b, filp->private_data,
+@@ -499,14 +499,14 @@
+ 				+ strlen (op->name) + op->alloclen);
+ 			memset (((char *)b) + sizeof (openprom_property)
+ 				+ strlen (op->name) + op->alloclen, 
+-				0, 2*(count - filp->f_pos) - op->alloclen);
++				0, 2*(count - *ppos) - op->alloclen);
+ 			op = (openprom_property *)b;
+-			op->alloclen = 2*(count + filp->f_pos);
++			op->alloclen = 2*(count + *ppos);
+ 			b = filp->private_data;
+ 			filp->private_data = (void *)op;
+ 			kfree (b);
+ 		}
+-		p = op->value + filp->f_pos - ((op->flag & OPP_QUOTED) ? 1 : 0);
++		p = op->value + *ppos - ((op->flag & OPP_QUOTED) ? 1 : 0);
+ 		if (copy_from_user(p, buf, count))
+ 			return -EFAULT;
+ 		op->flag |= OPP_DIRTY;
+@@ -517,17 +517,17 @@
+ 			}
+ 		if (i < count) {
+ 			op->len = p - op->value;
+-			filp->f_pos += i + 1;
++			*ppos += i + 1;
+ 			if ((p > op->value) && (op->flag & OPP_QUOTED)
+ 			    && (*(p - 1) == '\''))
+ 				op->len--;
+ 		} else {
+ 			if (p - op->value > op->len)
+ 				op->len = p - op->value;
+-			filp->f_pos += count;
++			*ppos += count;
+ 		}
+ 	}
+-	return filp->f_pos - k;
++	return *ppos - k;
+ }
+ 
+ int property_release (struct inode *inode, struct file *filp)

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/parport_pc-via8231.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/parport_pc-via8231.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/parport_pc-via8231.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,447 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: VIA8231 support for parallel port driver
+## DP: Patch author: Pavel Fedin <sonic_amiga at rambler.ru>
+## DP: Upstream status: sumbitted, approved by Jeff Garzik <jgarzik at pobox.com>
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- a/drivers/parport/parport_pc.c.orig	2004-10-27 15:43:58.000000000 +0400
++++ b/drivers/parport/parport_pc.c	2004-10-27 15:31:11.000000000 +0400
+@@ -62,6 +62,7 @@
+ 
+ #include <linux/parport.h>
+ #include <linux/parport_pc.h>
++#include <linux/via.h>
+ #include <asm/parport.h>
+ 
+ #define PARPORT_PC_MAX_PORTS PARPORT_MAX
+@@ -2363,7 +2364,7 @@
+ 
+ /* ITE support maintained by Rich Liu <richliu at poorman.org> */
+ static int __devinit sio_ite_8872_probe (struct pci_dev *pdev, int autoirq,
+-					 int autodma)
++					 int autodma, struct parport_pc_via_data *via)
+ {
+ 	short inta_addr[6] = { 0x2A0, 0x2C0, 0x220, 0x240, 0x1E0 };
+ 	struct resource *base_res;
+@@ -2466,71 +2467,161 @@
+ 	return 0;
+ }
+ 
+-/* Via support maintained by Jeff Garzik <jgarzik at pobox.com> */
+-static int __devinit sio_via_686a_probe (struct pci_dev *pdev, int autoirq,
+-					 int autodma)
++/* VIA 8231 support by Pavel Fedin <sonic_amiga at rambler.ru>
++   based on VIA 686a support code by Jeff Garzik <jgarzik at pobox.com> */
++static int __initdata parport_init_mode = 0;
++
++/* Data for two known VIA chips */
++static struct parport_pc_via_data via_686a_data __devinitdata = {
++	0x51,
++	0x50,
++	0x85,
++	0x02,
++	0xE2,
++	0xF0,
++	0xE6
++};
++static struct parport_pc_via_data via_8231_data __devinitdata = {
++	0x45,
++	0x44,
++	0x50,
++	0x04,
++	0xF2,
++	0xFA,
++	0xF6
++};
++
++static int __devinit sio_via_probe (struct pci_dev *pdev, int autoirq,
++					 int autodma, struct parport_pc_via_data *via)
+ {
+-	u8 tmp;
++	u8 tmp, tmp2, siofunc, ppcontrol;
+ 	int dma, irq;
+-	unsigned port1, port2, have_eppecp;
++	unsigned port1, port2;
++	unsigned have_epp = 0;
++
++	printk(KERN_DEBUG "parport_pc: VIA 686A/8231 detected\n");
+ 
++	switch(parport_init_mode)
++	{
++	case 1:
++	    printk(KERN_DEBUG "parport_pc: setting SPP mode\n");
++	    siofunc = VIA_FUNCTION_PARPORT_SPP;
++	    ppcontrol = 0;
++	    break;
++	case 2:
++	    printk(KERN_DEBUG "parport_pc: setting PS/2 mode\n");
++	    siofunc = VIA_FUNCTION_PARPORT_SPP;
++	    ppcontrol = VIA_PARPORT_BIDIR;
++	    break;
++	case 3:
++	    printk(KERN_DEBUG "parport_pc: setting EPP mode\n");
++	    siofunc = VIA_FUNCTION_PARPORT_EPP;
++	    ppcontrol = VIA_PARPORT_BIDIR;
++	    have_epp = 1;
++	    break;
++	case 4:
++	    printk(KERN_DEBUG "parport_pc: setting ECP mode\n");
++	    siofunc = VIA_FUNCTION_PARPORT_ECP;
++	    ppcontrol = VIA_PARPORT_BIDIR;
++	    break;
++	case 5:
++	    printk(KERN_DEBUG "parport_pc: setting EPP+ECP mode\n");
++	    siofunc = VIA_FUNCTION_PARPORT_ECP;
++	    ppcontrol = VIA_PARPORT_BIDIR|VIA_PARPORT_ECPEPP;
++	    have_epp = 1;
++	    break;
++	 default:
++	    printk(KERN_DEBUG "parport_pc: probing current configuration\n");
++	    siofunc = VIA_FUNCTION_PROBE;
++	    break;
++	}   
+ 	/*
+-	 * unlock super i/o configuration, set 0x85_1
+-	 */
+-	pci_read_config_byte (pdev, 0x85, &tmp);
+-	tmp |= (1 << 1);
+-	pci_write_config_byte (pdev, 0x85, tmp);
+-	
+-	/* 
+-	 * Super I/O configuration, index port == 3f0h, data port == 3f1h
++	 * unlock super i/o configuration
+ 	 */
++	pci_read_config_byte(pdev, via->via_pci_superio_config_reg, &tmp);
++	tmp |= via->via_pci_superio_config_data;
++	pci_write_config_byte(pdev, via->via_pci_superio_config_reg, tmp);
++
++	/* Bits 1-0: Parallel Port Mode / Enable */
++	outb(via->viacfg_function, VIA_CONFIG_INDEX);
++	tmp = inb (VIA_CONFIG_DATA);
++	/* Bit 5: EPP+ECP enable; bit 7: PS/2 bidirectional port enable */
++	outb(via->viacfg_parport_control, VIA_CONFIG_INDEX);
++	tmp2 = inb (VIA_CONFIG_DATA);
++	if (siofunc == VIA_FUNCTION_PROBE)
++	{
++	    siofunc = tmp & VIA_FUNCTION_PARPORT_DISABLE;
++	    ppcontrol = tmp2;
++	}
++	else
++	{   
++	    tmp &= ~VIA_FUNCTION_PARPORT_DISABLE;
++	    tmp |= siofunc;
++	    outb(via->viacfg_function, VIA_CONFIG_INDEX);
++	    outb(tmp, VIA_CONFIG_DATA);
++	    tmp2 &= ~(VIA_PARPORT_BIDIR|VIA_PARPORT_ECPEPP);
++	    tmp2 |= ppcontrol;
++	    outb(via->viacfg_parport_control, VIA_CONFIG_INDEX);
++	    outb(tmp2, VIA_CONFIG_DATA);
++	}
+ 	
+-	/* 0xE2_1-0: Parallel Port Mode / Enable */
+-	outb (0xE2, 0x3F0);
+-	tmp = inb (0x3F1);
++	/* Parallel Port I/O Base Address, bits 9-2 */
++	outb(via->viacfg_parport_base, VIA_CONFIG_INDEX);
++	port1 = inb(VIA_CONFIG_DATA) << 2;
+ 	
+-	if ((tmp & 0x03) == 0x03) {
+-		printk (KERN_INFO "parport_pc: Via 686A parallel port disabled in BIOS\n");
+-		return 0;
++	printk (KERN_DEBUG "parport_pc: Current parallel port base: 0x%X\n",port1);
++	if ((port1 == 0x3BC) && have_epp)
++	{
++	    outb(via->viacfg_parport_base, VIA_CONFIG_INDEX);
++	    outb((0x378 >> 2), VIA_CONFIG_DATA);
++	    printk(KERN_DEBUG "parport_pc: Parallel port base changed to 0x378\n");
++	    port1 = 0x378;
+ 	}
++
++	/*
++	 * lock super i/o configuration
++	 */
++	pci_read_config_byte(pdev, via->via_pci_superio_config_reg, &tmp);
++	tmp &= ~via->via_pci_superio_config_data;
++	pci_write_config_byte(pdev, via->via_pci_superio_config_reg, tmp);
++
++	if (siofunc == VIA_FUNCTION_PARPORT_DISABLE) {
++		printk(KERN_INFO "parport_pc: VIA parallel port disabled in BIOS\n");
++		return 0;
++	}	
+ 	
+-	/* 0xE6: Parallel Port I/O Base Address, bits 9-2 */
+-	outb (0xE6, 0x3F0);
+-	port1 = inb (0x3F1) << 2;
+-	
++	/* Bits 7-4: PnP Routing for Parallel Port IRQ */
++	pci_read_config_byte(pdev, via->via_pci_parport_irq_reg, &tmp);
++	irq = ((tmp & VIA_IRQCONTROL_PARALLEL) >> 4);
++
++	if (siofunc == VIA_FUNCTION_PARPORT_ECP)
++	{
++	    /* Bits 3-2: PnP Routing for Parallel Port DMA */
++	    pci_read_config_byte(pdev, via->via_pci_parport_dma_reg, &tmp);
++	    dma = ((tmp & VIA_DMACONTROL_PARALLEL) >> 2);
++	}
++	else
++	    /* if ECP not enabled, DMA is not enabled, assumed bogus 'dma' value */
++	    dma = PARPORT_DMA_NONE;
++
++	/* Let the user (or defaults) steer us away from interrupts and DMA */
++	if (autoirq == PARPORT_IRQ_NONE) {
++	    irq = PARPORT_IRQ_NONE;
++	    dma = PARPORT_DMA_NONE;
++	}
++	if (autodma == PARPORT_DMA_NONE)
++	    dma = PARPORT_DMA_NONE;
++
+ 	switch (port1) {
+ 	case 0x3bc: port2 = 0x7bc; break;
+ 	case 0x378: port2 = 0x778; break;
+ 	case 0x278: port2 = 0x678; break;
+ 	default:
+-		printk (KERN_INFO "parport_pc: Weird Via 686A parport base 0x%X, ignoring\n",
++		printk(KERN_INFO "parport_pc: Weird VIA parport base 0x%X, ignoring\n",
+ 			port1);
+ 		return 0;
+ 	}
+ 
+-	/* 0xF0_5: EPP+ECP enable */
+-	outb (0xF0, 0x3F0);
+-	have_eppecp = (inb (0x3F1) & (1 << 5));
+-	
+-	/*
+-	 * lock super i/o configuration, clear 0x85_1
+-	 */
+-	pci_read_config_byte (pdev, 0x85, &tmp);
+-	tmp &= ~(1 << 1);
+-	pci_write_config_byte (pdev, 0x85, tmp);
+-
+-	/*
+-	 * Get DMA and IRQ from PCI->ISA bridge PCI config registers
+-	 */
+-
+-	/* 0x50_3-2: PnP Routing for Parallel Port DRQ */
+-	pci_read_config_byte (pdev, 0x50, &tmp);
+-	dma = ((tmp >> 2) & 0x03);
+-	
+-	/* 0x51_7-4: PnP Routing for Parallel Port IRQ */
+-	pci_read_config_byte (pdev, 0x51, &tmp);
+-	irq = ((tmp >> 4) & 0x0F);
+-
+ 	/* filter bogus IRQs */
+ 	switch (irq) {
+ 	case 0:
+@@ -2544,22 +2635,10 @@
+ 		break;
+ 	}
+ 
+-	/* if ECP not enabled, DMA is not enabled, assumed bogus 'dma' value */
+-	if (!have_eppecp)
+-		dma = PARPORT_DMA_NONE;
+-
+-	/* Let the user (or defaults) steer us away from interrupts and DMA */
+-	if (autoirq != PARPORT_IRQ_AUTO) {
+-		irq = PARPORT_IRQ_NONE;
+-		dma = PARPORT_DMA_NONE;
+-	}
+-	if (autodma != PARPORT_DMA_AUTO)
+-		dma = PARPORT_DMA_NONE;
+-
+ 	/* finally, do the probe with values obtained */
+ 	if (parport_pc_probe_port (port1, port2, irq, dma, NULL)) {
+ 		printk (KERN_INFO
+-			"parport_pc: Via 686A parallel port: io=0x%X", port1);
++			"parport_pc: VIA parallel port: io=0x%X", port1);
+ 		if (irq != PARPORT_IRQ_NONE)
+ 			printk (", irq=%d", irq);
+ 		if (dma != PARPORT_DMA_NONE)
+@@ -2568,7 +2647,7 @@
+ 		return 1;
+ 	}
+ 	
+-	printk (KERN_WARNING "parport_pc: Strange, can't probe Via 686A parallel port: io=0x%X, irq=%d, dma=%d\n",
++	printk(KERN_WARNING "parport_pc: Strange, can't probe VIA parallel port: io=0x%X, irq=%d, dma=%d\n",
+ 		port1, irq, dma);
+ 	return 0;
+ }
+@@ -2576,19 +2655,21 @@
+ 
+ enum parport_pc_sio_types {
+ 	sio_via_686a = 0,	/* Via VT82C686A motherboard Super I/O */
++	sio_via_8231,		/* Via VT8231 south bridge integrated Super IO */
+ 	sio_ite_8872,
+ 	last_sio
+ };
+ 
+ /* each element directly indexed from enum list, above */
+ static struct parport_pc_superio {
+-	int (*probe) (struct pci_dev *pdev, int autoirq, int autodma);
++	int (*probe) (struct pci_dev *pdev, int autoirq, int autodma, struct parport_pc_via_data *via);
++	struct parport_pc_via_data *via;
+ } parport_pc_superio_info[] __devinitdata = {
+-	{ sio_via_686a_probe, },
+-	{ sio_ite_8872_probe, },
++	{ sio_via_probe, &via_686a_data, },
++	{ sio_via_probe, &via_8231_data, },
++	{ sio_ite_8872_probe, NULL, },
+ };
+ 
+-
+ enum parport_pc_pci_cards {
+ 	siig_1p_10x = last_sio,
+ 	siig_2p_10x,
+@@ -2714,6 +2795,7 @@
+ static struct pci_device_id parport_pc_pci_tbl[] = {
+ 	/* Super-IO onboard chips */
+ 	{ 0x1106, 0x0686, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sio_via_686a },
++	{ 0x1106, 0x8231, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sio_via_8231 },
+ 	{ PCI_VENDOR_ID_ITE, PCI_DEVICE_ID_ITE_8872,
+ 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, sio_ite_8872 },
+ 
+@@ -2855,7 +2937,7 @@
+ 			continue;
+ 
+ 		if (parport_pc_superio_info[id->driver_data].probe
+-			(pdev, autoirq, autodma)) {
++			(pdev, autoirq, autodma,parport_pc_superio_info[id->driver_data].via)) {
+ 			ret++;
+ 		}
+ 	}
+@@ -3041,9 +3123,27 @@
+ 				     PARPORT_DMA_NONE, PARPORT_DMA_NOFIFO);
+ }
+ 
++static int __init parport_init_mode_setup(const char *str) {
++
++	printk(KERN_DEBUG "parport_pc.c: Specified parameter parport_init_mode=%s\n", str);
++
++	if (!strcmp (str, "spp"))
++	    parport_init_mode=1;
++	if (!strcmp (str, "ps2"))
++	    parport_init_mode=2;
++	if (!strcmp (str, "epp"))
++	    parport_init_mode=3;
++	if (!strcmp (str, "ecp"))
++	    parport_init_mode=4;
++	if (!strcmp (str, "ecpepp"))
++	    parport_init_mode=5;
++	return 1;
++}
++
+ #ifdef MODULE
+ static const char *irq[PARPORT_PC_MAX_PORTS];
+ static const char *dma[PARPORT_PC_MAX_PORTS];
++static const char *init_mode;
+ 
+ MODULE_PARM_DESC(io, "Base I/O address (SPP regs)");
+ MODULE_PARM(io, "1-" __MODULE_STRING(PARPORT_PC_MAX_PORTS) "i");
+@@ -3058,12 +3158,17 @@
+ MODULE_PARM_DESC(verbose_probing, "Log chit-chat during initialisation");
+ MODULE_PARM(verbose_probing, "i");
+ #endif
++MODULE_PARM_DESC(init_mode, "Initialise mode for VIA VT8231 port (spp, ps2, epp, ecp or ecpepp)");
++MODULE_PARM(init_mode, "s");
+ 
+ static int __init parse_parport_params(void)
+ {
+ 	unsigned int i;
+ 	int val;
+ 
++	if (init_mode)
++		parport_init_mode_setup(init_mode);
++
+ 	for (i = 0; i < PARPORT_PC_MAX_PORTS && io[i]; i++) {
+ 		if (parport_parse_irq(irq[i], &val))
+ 			return 1;
+@@ -3171,6 +3276,15 @@
+ }
+ 
+ __setup ("parport=", parport_setup);
++
++/*
++ * Acceptable parameters:
++ *
++ * parport_init_mode=[spp|ps2|epp|ecp|ecpepp]
++ */
++
++__setup("parport_init_mode=",parport_init_mode_setup);
++
+ #endif
+ 
+ /* "Parser" ends here */
+--- a/include/linux/parport_pc.h.orig	2004-10-27 15:45:37.000000000 +0400
++++ b/include/linux/parport_pc.h	2004-10-27 15:33:50.000000000 +0400
+@@ -43,6 +43,23 @@
+ 	struct parport *port;
+ };
+ 
++struct parport_pc_via_data
++{
++	/* ISA PnP IRQ routing register 1 */
++	u8 via_pci_parport_irq_reg;
++	/* ISA PnP DMA request routing register */
++	u8 via_pci_parport_dma_reg;
++	/* Register and value to enable SuperIO configuration access */
++	u8 via_pci_superio_config_reg;
++	u8 via_pci_superio_config_data;
++	/* SuperIO function register number */
++	u8 viacfg_function;
++	/* parallel port control register number */
++	u8 viacfg_parport_control;
++	/* Parallel port base address register */
++	u8 viacfg_parport_base;
++};
++
+ static __inline__ void parport_pc_write_data(struct parport *p, unsigned char d)
+ {
+ #ifdef DEBUG_PARPORT
+--- a/include/linux/via.h.orig	1970-01-01 03:00:00.000000000 +0300
++++ b/include/linux/via.h	2004-10-27 15:15:27.000000000 +0400
+@@ -0,0 +1,22 @@
++/* Miscellaneous definitions for VIA chipsets
++   Currently used only by drivers/parport/parport_pc.c */
++
++/* Values for SuperIO function select configuration register */
++#define VIA_FUNCTION_PARPORT_SPP     0x00
++#define VIA_FUNCTION_PARPORT_ECP     0x01
++#define VIA_FUNCTION_PARPORT_EPP     0x02
++#define VIA_FUNCTION_PARPORT_DISABLE 0x03
++#define VIA_FUNCTION_PROBE           0xFF /* Special magic value to be used in code, not to be written into chip */
++
++/* Bits for parallel port mode configuration register */
++#define VIA_PARPORT_ECPEPP 0X20
++#define VIA_PARPORT_BIDIR  0x80
++
++/* VIA configuration registers */
++#define VIA_CONFIG_INDEX 0x3F0
++#define VIA_CONFIG_DATA  0x3F1
++
++/* Mask for parallel port IRQ bits (in ISA PnP IRQ routing register 1) */
++#define VIA_IRQCONTROL_PARALLEL 0xF0
++/* Mask for parallel port DMA bits (in ISA PnP DMA routing register) */
++#define VIA_DMACONTROL_PARALLEL 0x0C
+--- a/Documentation/kernel-parameters.txt.orig	2004-10-27 15:46:17.000000000 +0400
++++ b/Documentation/kernel-parameters.txt	2004-10-27 15:55:09.000000000 +0400
+@@ -795,6 +795,16 @@
+ 					Parallel ports are assigned in the
+ 					order they are specified on the command
+ 					line, starting with parport0.
++	
++	parport_init_mode=
++			[HW,PPT]	Configure VIA parallel port to
++					operate in specific mode. This is
++					necessary on Pegasos computer where
++					firmware has no options for setting up
++					parallel port mode and sets it to
++					spp. Currently this function knows
++					686a and 8231 chips.
++			Format: [spp|ps2|epp|ecp|ecpepp]
+ 
+ 	pas2=		[HW,OSS]
+ 			Format: <io>,<irq>,<dma>,<dma16>,<sb_io>,<sb_irq>,<sb_dma>,<sb_dma16>

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/pcxx-is-broken.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/pcxx-is-broken.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/pcxx-is-broken.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,22 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Mark CONFIG_DIGI broken, it doesn't compile
+## DP: Patch author: Christoph Hellwig
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- 1.49/drivers/char/Kconfig	2004-08-28 19:04:06 +02:00
++++ edited/drivers/char/Kconfig	2004-08-29 22:39:10 +02:00
+@@ -138,7 +138,7 @@
+ 
+ config DIGIEPCA
+ 	tristate "Digiboard Intelligent Async Support"
+-	depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP
++	depends on SERIAL_NONSTANDARD && BROKEN
+ 	---help---
+ 	  This is a driver for Digi International's Xx, Xeve, and Xem series
+ 	  of cards which provide multiple serial ports. You would need

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/pmac-no-of-stdout.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/pmac-no-of-stdout.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/pmac-no-of-stdout.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,23 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: fix oldworld pmacs that don't have an OF stdout
+## DP: Patch author: Benjamin Herrenschmidt <benh at kernel.crashing.org>
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- 1.59/arch/ppc/kernel/setup.c	2004-07-27 00:27:53 +02:00
++++ edited/arch/ppc/kernel/setup.c	2004-08-18 23:42:12 +02:00
+@@ -484,6 +484,9 @@
+ 	char *name;
+ 	int offset;
+ 
++	if (of_stdout_device == NULL)
++		return -ENODEV;
++
+ 	/* The user has requested a console so this is already set up. */
+ 	if (strstr(saved_command_line, "console="))
+ 		return -EBUSY;

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-970fx-support.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-970fx-support.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-970fx-support.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,60 @@
+#! /bin/sh -e 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: PPC970FX cpu support.
+## DP: Patch author: Benjamin Herrenschmidt <benh at kernel.crashing.org>
+## DP: Upstream status: backport.
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- kernel-source-2.6.8-2.6.8/arch/ppc/kernel/cpu_setup_power4.S	2004-08-13 22:37:37.000000000 -0700
++++ kernel-source-2.6.8-custom.1.0/arch/ppc/kernel/cpu_setup_power4.S	2004-12-26 17:33:16.341931632 -0800
+@@ -109,10 +109,12 @@
+ 	lis	r5,cpu_state_storage at h
+ 	ori	r5,r5,cpu_state_storage at l
+ 
+-	/* We only deal with 970 for now */
++	/* Deal with both 970 and 970FX */
+ 	mfspr	r0,SPRN_PVR
+ 	srwi	r0,r0,16
+-	cmpwi	r0,0x39
++	cmpwi	cr0,r0,0x39
++	cmpwi	cr1,r0,0x3c
++	cror	4*cr0+eq,4*cr0+eq,4*cr1+eq
+ 	bne	1f
+ 
+ 	/* Save HID0,1,4 and 5 */
+@@ -141,10 +143,12 @@
+ 	lis	r5,(cpu_state_storage-KERNELBASE)@h
+ 	ori	r5,r5,cpu_state_storage at l
+ 
+-	/* We only deal with 970 for now */
++	/* Deal with both 970 and 970FX */
+ 	mfspr	r0,SPRN_PVR
+ 	srwi	r0,r0,16
+-	cmpwi	r0,0x39
++	cmpwi	cr0,r0,0x39
++	cmpwi	cr1,r0,0x3c
++	cror	4*cr0+eq,4*cr0+eq,4*cr1+eq
+ 	bne	1f
+ 
+ 	/* Clear interrupt prefix */
+--- kernel-source-2.6.8-2.6.8/arch/ppc/kernel/cputable.c	2004-08-13 22:36:58.000000000 -0700
++++ kernel-source-2.6.8-custom.1.0/arch/ppc/kernel/cputable.c	2004-12-26 17:29:20.956715624 -0800
+@@ -445,6 +445,15 @@
+ 	128, 128,
+ 	__setup_cpu_ppc970
+     },
++    {	/* PPC970FX */
++	0xffff0000, 0x003c0000, "PPC970FX",
++	CPU_FTR_COMMON |
++	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
++	CPU_FTR_ALTIVEC_COMP | CPU_FTR_CAN_NAP,
++	COMMON_PPC | PPC_FEATURE_64 | PPC_FEATURE_ALTIVEC_COMP,
++	128, 128,
++	__setup_cpu_ppc970
++    },
+ #endif /* CONFIG_POWER4 */
+ #ifdef CONFIG_8xx
+     {	/* 8xx */

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-cmdline.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-cmdline.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-cmdline.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,20 @@
+#! /bin/sh -e 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix the CONFIG_CMDLINE which was broken on openfirmware powerpc.
+## DP: Patch author: Sven Luther <luther at debian.org>
+## DP: Upstream status: submitted to linuxppc-dev, awaiting feedback.
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- kernel-source-2.6.8.orig/arch/ppc/kernel/setup.c	2004-08-28 08:11:58.000000000 +0200
++++ kernel-source-2.6.8/arch/ppc/kernel/setup.c	2004-08-31 11:14:44.976745472 +0200
+@@ -418,7 +418,6 @@
+ 	 * are used for initrd_start and initrd_size,
+ 	 * otherwise they contain 0xdeadbeef.
+ 	 */
+-	cmd_line[0] = 0;
+ 	if (r3 >= 0x4000 && r3 < 0x800000 && r4 == 0) {
+ 		strlcpy(cmd_line, (char *)r3 + KERNELBASE,
+ 			sizeof(cmd_line));

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-g4-errata.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-g4-errata.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-g4-errata.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,26 @@
+#! /bin/sh -e 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Clears the BTIC bit if it was previously set by the firmware, but is broken in the CPUs.
+## DP: Patch author: Sven Luther <luther at debian.org>
+## DP: Upstream status: reviewed and submited by benh
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- kernel-source-2.6.8.orig/arch/ppc/kernel/cpu_setup_6xx.S	2004-08-14 07:36:18.000000000 +0200
++++ kernel-source-2.6.8/arch/ppc/kernel/cpu_setup_6xx.S	2004-08-26 11:24:12.970564536 +0200
+@@ -218,10 +218,10 @@
+ 
+ 	/* All of the bits we have to set.....
+ 	 */
+-	ori	r11,r11,HID0_SGE | HID0_FOLD | HID0_BHTE | HID0_LRSTK
++	ori	r11,r11,HID0_SGE | HID0_FOLD | HID0_BHTE | HID0_BTIC | HID0_LRSTK
+ BEGIN_FTR_SECTION
+-	ori	r11,r11,HID0_BTIC
+-END_FTR_SECTION_IFCLR(CPU_FTR_NO_BTIC)
++	xori	r11,r11,HID0_BTIC
++END_FTR_SECTION_IFSET(CPU_FTR_NO_BTIC)
+ BEGIN_FTR_SECTION
+ 	oris	r11,r11,HID0_DPM at h	/* enable dynamic power mgmt */
+ END_FTR_SECTION_IFCLR(CPU_FTR_NO_DPM)

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-g4-l2-flush-errata.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-g4-l2-flush-errata.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-g4-l2-flush-errata.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,239 @@
+#! /bin/sh -e 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fixes g4 l2 cache flush and MSR erratas.
+## DP: Patch author: Sven Luther <luther at debian.org>
+## DP: Upstream status: under review by benh.
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -urN -X dontdiff linux-2.6.7-pegasos-orig/arch/ppc/kernel/cputable.c linux-2.6.7/arch/ppc/kernel/cputable.c
+--- linux-2.6.7-pegasos-orig/arch/ppc/kernel/cputable.c	2004-08-11 23:19:46.000000000 -0600
++++ linux-2.6.7/arch/ppc/kernel/cputable.c	2004-08-12 20:08:49.000000000 -0600
+@@ -263,7 +263,8 @@
+ 	CPU_FTR_COMMON |
+     	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB |
+ 	CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
+-	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NEED_COHERENT,
++	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NEED_COHERENT |
++	CPU_FTR_HWFLUSH_L2_CACHE,
+ 	COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP,
+ 	32, 32,
+ 	__setup_cpu_745x
+@@ -274,7 +275,8 @@
+     	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP |
+ 	CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
+ 	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR |
+-	CPU_FTR_L3_DISABLE_NAP | CPU_FTR_NEED_COHERENT,
++	CPU_FTR_L3_DISABLE_NAP | CPU_FTR_NEED_COHERENT | 
++	CPU_FTR_HWFLUSH_L2_CACHE,
+ 	COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP,
+ 	32, 32,
+ 	__setup_cpu_745x
+@@ -285,7 +287,7 @@
+     	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP |
+ 	CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
+ 	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR |
+-	CPU_FTR_NEED_COHERENT,
++	CPU_FTR_NEED_COHERENT | CPU_FTR_HWFLUSH_L2_CACHE,
+ 	COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP,
+ 	32, 32,
+ 	__setup_cpu_745x
+@@ -296,7 +298,7 @@
+     	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB |
+ 	CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
+ 	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_HAS_HIGH_BATS |
+-	CPU_FTR_NEED_COHERENT,
++	CPU_FTR_NEED_COHERENT | CPU_FTR_HWFLUSH_L2_CACHE,
+ 	COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP,
+ 	32, 32,
+ 	__setup_cpu_745x
+@@ -307,7 +309,8 @@
+     	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP |
+ 	CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
+ 	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR |
+-	CPU_FTR_L3_DISABLE_NAP | CPU_FTR_NEED_COHERENT | CPU_FTR_HAS_HIGH_BATS,
++	CPU_FTR_L3_DISABLE_NAP | CPU_FTR_NEED_COHERENT | CPU_FTR_HAS_HIGH_BATS |
++	CPU_FTR_HWFLUSH_L2_CACHE,
+ 	COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP,
+ 	32, 32,
+ 	__setup_cpu_745x
+@@ -318,7 +321,7 @@
+     	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP |
+ 	CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
+ 	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR |
+-	CPU_FTR_HAS_HIGH_BATS | CPU_FTR_NEED_COHERENT,
++	CPU_FTR_HAS_HIGH_BATS | CPU_FTR_NEED_COHERENT | CPU_FTR_HWFLUSH_L2_CACHE,
+ 	COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP,
+ 	32, 32,
+ 	__setup_cpu_745x
+@@ -329,7 +332,8 @@
+     	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP |
+ 	CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
+ 	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR |
+-	CPU_FTR_HAS_HIGH_BATS | CPU_FTR_NEED_COHERENT | CPU_FTR_NO_BTIC,
++	CPU_FTR_HAS_HIGH_BATS | CPU_FTR_NEED_COHERENT | CPU_FTR_NO_BTIC |
++	CPU_FTR_HWFLUSH_L2_CACHE,
+ 	COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP,
+ 	32, 32,
+ 	__setup_cpu_745x
+@@ -340,7 +344,8 @@
+     	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP |
+ 	CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
+ 	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR |
+-	CPU_FTR_HAS_HIGH_BATS | CPU_FTR_NEED_COHERENT | CPU_FTR_NO_BTIC,
++	CPU_FTR_HAS_HIGH_BATS | CPU_FTR_NEED_COHERENT | CPU_FTR_NO_BTIC | 
++	CPU_FTR_HWFLUSH_L2_CACHE,
+ 	COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP,
+ 	32, 32,
+ 	__setup_cpu_745x
+@@ -351,7 +356,7 @@
+     	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP |
+ 	CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
+ 	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR |
+-	CPU_FTR_HAS_HIGH_BATS | CPU_FTR_NEED_COHERENT,
++	CPU_FTR_HAS_HIGH_BATS | CPU_FTR_NEED_COHERENT | CPU_FTR_HWFLUSH_L2_CACHE,
+ 	COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP,
+ 	32, 32,
+ 	__setup_cpu_745x
+@@ -362,7 +367,7 @@
+     	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP |
+ 	CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP |
+ 	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR |
+-	CPU_FTR_HAS_HIGH_BATS | CPU_FTR_NEED_COHERENT,
++	CPU_FTR_HAS_HIGH_BATS | CPU_FTR_NEED_COHERENT | CPU_FTR_HWFLUSH_L2_CACHE,
+ 	COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP,
+ 	32, 32,
+ 	__setup_cpu_745x
+diff -urN -X dontdiff linux-2.6.7-pegasos-orig/arch/ppc/kernel/l2cr.S linux-2.6.7/arch/ppc/kernel/l2cr.S
+--- linux-2.6.7-pegasos-orig/arch/ppc/kernel/l2cr.S	2004-08-12 02:31:16.000000000 -0600
++++ linux-2.6.7/arch/ppc/kernel/l2cr.S	2004-08-12 20:52:04.716349536 -0600
+@@ -36,7 +36,9 @@
+ 		several months.  The L2CR is similar, but I'm going
+ 		to assume the user of this functions knows what they
+ 		are doing.
+-
++	June 17, 2004.
++	- JPAN: Fixed 745X L3 cache enablement routine, also use HW flush assist.
++	
+ 	Author:	Terry Greeniaus (tgree at phys.ualberta.ca)
+ 	Please e-mail updates to this file to me, thanks!
+ */
+@@ -154,9 +156,7 @@
+ 	       Don't do this unless you accomodate all processor variations.
+ 	       The bit moved on the 7450.....
+ 	  ****/
+-
+-	/* TODO: use HW flush assist when available */
+-
++BEGIN_FTR_SECTION
+ 	lis	r4,0x0002
+ 	mtctr	r4
+ 	li	r4,0
+@@ -175,7 +175,23 @@
+ 	dcbf	0,r4
+ 	addi	r4,r4,32		/* Go to start of next cache line */
+ 	bdnz	1b
++END_FTR_SECTION_IFCLR(CPU_FTR_HWFLUSH_L2_CACHE)
+ 
++BEGIN_FTR_SECTION
++	/* Use HW flush assist, MPC7447A errata #3 */
++	oris	r4,r4,0x0010	/* Set L2CR[IONLY/11] = 1 */
++	oris	r4,r4,0x0001	/* Set L2CR[DONLY/15] = 1 */
++	mtspr   L2CR,r4		/* Lock the L2	*/
++	sync
++	ori	r4,r4,0x0800	/* Set L2CR[L2HWF/20] = 1 */
++	mtspr   L2CR,r4		/* Flush the L2 */
++1:	
++	mfspr	r4,L2CR
++	andi.	r4,r4,0x0800	/* L2HWF still set? */
++	bne	1b
++	sync	/* sync to clear the store queues before L3 flush (UM step 5)*/
++END_FTR_SECTION_IFSET(CPU_FTR_HWFLUSH_L2_CACHE)
++	
+ 2:
+ 	/* Set up the L2CR configuration bits (and switch L2 off) */
+ 	/* CPU errata: Make sure the mtspr below is already in the
+@@ -292,17 +308,18 @@
+ 
+ 	/* Flush the cache.
+ 	 */
+-
+-	/* TODO: use HW flush assist */
+-
+-	lis	r4,0x0008
+-	mtctr	r4
+-	li	r4,0
+-1:
+-	lwzx	r0,r0,r4
+-	dcbf	0,r4
+-	addi	r4,r4,32		/* Go to start of next cache line */
+-	bdnz	1b
++	/* use HW flush assist. (UM 3.6.3.1.5) */
++	mfspr	r4, SPRN_L3CR
++	oris	r4,r4,0x0040	/* Set L3CR[L3IO/9] = 1. */
++	ori	r4,r4,0x0040	/* Set L3CR[L3DO/29] = 1.*/
++	mtspr	1018,r4		/* Lock the L3 by making IONLY and DONLY */
++	ori	r4,r4,0x0800	/* Set L3CR[L3HWF/20] for hardware flush */
++	mtspr	SPRN_L3CR,r4
++flush_745x_L3_poll:
++	mfspr	r4,SPRN_L3CR
++	rlwinm.	r4,r4,0,20,20
++	bne	flush_745x_L3_poll
++	sync	/* Clear the store queues per procedure (UM step 8) */
+ 
+ 2:
+ 	/* Set up the L3CR configuration bits (and switch L3 off) */
+@@ -348,8 +365,8 @@
+ 	cmplwi	r5,0
+ 	beq	4f
+ 
+-	/* Enable the cache */
+-	oris	r3,r3,(L3CR_L3E | L3CR_L3CLKEN)@h
++	/* enable L3 clock */
++	oris	r3,r3,(L3CR_L3CLKEN)@h
+ 	mtspr	SPRN_L3CR,r3
+ 	sync
+ 
+@@ -357,6 +374,15 @@
+ 	li	r0,256
+ 	mtctr	r0
+ 1:	bdnz	1b
++	
++	/* Clear MSSSR0 which may cause parity error */
++	xor	r5,r5,r5
++	mtspr	1015, r5
++	
++	/* Enable L3 cache */
++	oris	r3,r3,(L3CR_L3E)@h
++	mtspr	SPRN_L3CR,r3
++	sync
+ 
+ 	/* Restore MSR (restores EE and DR bits to original state) */
+ 4:	SYNC
+diff -urN -X dontdiff linux-2.6.7-pegasos-orig/arch/ppc/kernel/traps.c linux-2.6.7/arch/ppc/kernel/traps.c
+--- linux-2.6.7-pegasos-orig/arch/ppc/kernel/traps.c	2004-08-12 02:31:30.000000000 -0600
++++ linux-2.6.7/arch/ppc/kernel/traps.c	2004-08-12 02:10:05.000000000 -0600
+@@ -263,7 +263,9 @@
+ 	case 0x80000:
+ 		printk("Machine check signal\n");
+ 		break;
+-	case 0:		/* for 601 */
++	case 0:		/* for 601 and 744x */
++		printk("Transfer error ack signal if 601, or MCP if 744x \n");
++		break;
+ 	case 0x40000:
+ 	case 0x140000:	/* 7450 MSS error and TEA */
+ 		printk("Transfer error ack signal\n");
+diff -urN -X dontdiff linux-2.6.7-pegasos-orig/include/asm-ppc/cputable.h linux-2.6.7/include/asm-ppc/cputable.h
+--- linux-2.6.7-pegasos-orig/include/asm-ppc/cputable.h	2004-08-11 23:19:46.000000000 -0600
++++ linux-2.6.7/include/asm-ppc/cputable.h	2004-08-12 19:51:45.000000000 -0600
+@@ -77,6 +77,7 @@
+ #define CPU_FTR_HAS_HIGH_BATS		0x00010000
+ #define CPU_FTR_NEED_COHERENT           0x00020000
+ #define CPU_FTR_NO_BTIC			0x00040000
++#define CPU_FTR_HWFLUSH_L2_CACHE	0x00080000
+ 
+ #ifdef __ASSEMBLY__
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-g5-thermal-management-update.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-g5-thermal-management-update.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-g5-thermal-management-update.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,1000 @@
+#! /bin/sh -e 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: G5 thermal management update
+## DP: Patch author: Benjamin Herrenschmidt <benh at kernel.crashing.org>
+## DP: Upstream status: backport.
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -urN debian-kernel-2.6.8/drivers/macintosh/therm_pm72.c debian-kernel-2.6.8-patched/drivers/macintosh/therm_pm72.c
+--- debian-kernel-2.6.8/drivers/macintosh/therm_pm72.c	2004-08-14 07:37:38.000000000 +0200
++++ debian-kernel-2.6.8-patched/drivers/macintosh/therm_pm72.c	2004-12-05 05:20:34.000000000 +0100
+@@ -46,6 +46,9 @@
+  *          overtemp conditions so userland can take some policy
+  *          decisions, like slewing down CPUs
+  *	  - Deal with fan and i2c failures in a better way
++ *	  - Maybe do a generic PID based on params used for
++ *	    U3 and Drives ?
++ *        - Add RackMac3,1 support (XServe g5)
+  *
+  * History:
+  *
+@@ -73,6 +76,15 @@
+  *        values in the configuration register
+  *	- Switch back to use of target fan speed for PID, thus lowering
+  *        pressure on i2c
++ *
++ *  Oct. 20, 2004 : 1.1
++ *	- Add device-tree lookup for fan IDs, should detect liquid cooling
++ *        pumps when present
++ *	- Enable driver for PowerMac7,3 machines
++ *	- Split the U3/Backside cooling on U3 & U3H versions as Darwin does
++ *	- Add new CPU cooling algorithm for machines with liquid cooling
++ *	- Workaround for some PowerMac7,3 with empty "fan" node in the devtree
++ *	- Fix a signed/unsigned compare issue in some PID loops
+  */
+ 
+ #include <linux/config.h>
+@@ -101,7 +113,7 @@
+ 
+ #include "therm_pm72.h"
+ 
+-#define VERSION "0.9"
++#define VERSION "1.1"
+ 
+ #undef DEBUG
+ 
+@@ -121,16 +133,100 @@
+ static struct i2c_adapter *		u3_1;
+ static struct i2c_client *		fcu;
+ static struct cpu_pid_state		cpu_state[2];
++static struct basckside_pid_params	backside_params;
+ static struct backside_pid_state	backside_state;
+ static struct drives_pid_state		drives_state;
+ static int				state;
+ static int				cpu_count;
++static int				cpu_pid_type;
+ static pid_t				ctrl_task;
+ static struct completion		ctrl_complete;
+ static int				critical_state;
+ static DECLARE_MUTEX(driver_lock);
+ 
+ /*
++ * We have 2 types of CPU PID control. One is "split" old style control
++ * for intake & exhaust fans, the other is "combined" control for both
++ * CPUs that also deals with the pumps when present. To be "compatible"
++ * with OS X at this point, we only use "COMBINED" on the machines that
++ * are identified as having the pumps (though that identification is at
++ * least dodgy). Ultimately, we could probably switch completely to this
++ * algorithm provided we hack it to deal with the UP case
++ */
++#define CPU_PID_TYPE_SPLIT	0
++#define CPU_PID_TYPE_COMBINED	1
++
++/*
++ * This table describes all fans in the FCU. The "id" and "type" values
++ * are defaults valid for all earlier machines. Newer machines will
++ * eventually override the table content based on the device-tree
++ */
++struct fcu_fan_table
++{
++	char*	loc;	/* location code */
++	int	type;	/* 0 = rpm, 1 = pwm, 2 = pump */
++	int	id;	/* id or -1 */
++};
++
++#define FCU_FAN_RPM		0
++#define FCU_FAN_PWM		1
++
++#define FCU_FAN_ABSENT_ID	-1
++
++#define FCU_FAN_COUNT		ARRAY_SIZE(fcu_fans)
++
++struct fcu_fan_table	fcu_fans[] = {
++	[BACKSIDE_FAN_PWM_INDEX] = {
++		.loc	= "BACKSIDE",
++		.type	= FCU_FAN_PWM,
++		.id	= BACKSIDE_FAN_PWM_DEFAULT_ID,
++	},
++	[DRIVES_FAN_RPM_INDEX] = {
++		.loc	= "DRIVE BAY",
++		.type	= FCU_FAN_RPM,
++		.id	= DRIVES_FAN_RPM_DEFAULT_ID,
++	},
++	[SLOTS_FAN_PWM_INDEX] = {
++		.loc	= "SLOT",
++		.type	= FCU_FAN_PWM,
++		.id	= SLOTS_FAN_PWM_DEFAULT_ID,
++	},
++	[CPUA_INTAKE_FAN_RPM_INDEX] = {
++		.loc	= "CPU A INTAKE",
++		.type	= FCU_FAN_RPM,
++		.id	= CPUA_INTAKE_FAN_RPM_DEFAULT_ID,
++	},
++	[CPUA_EXHAUST_FAN_RPM_INDEX] = {
++		.loc	= "CPU A EXHAUST",
++		.type	= FCU_FAN_RPM,
++		.id	= CPUA_EXHAUST_FAN_RPM_DEFAULT_ID,
++	},
++	[CPUB_INTAKE_FAN_RPM_INDEX] = {
++		.loc	= "CPU B INTAKE",
++		.type	= FCU_FAN_RPM,
++		.id	= CPUB_INTAKE_FAN_RPM_DEFAULT_ID,
++	},
++	[CPUB_EXHAUST_FAN_RPM_INDEX] = {
++		.loc	= "CPU B EXHAUST",
++		.type	= FCU_FAN_RPM,
++		.id	= CPUB_EXHAUST_FAN_RPM_DEFAULT_ID,
++	},
++	/* pumps aren't present by default, have to be looked up in the
++	 * device-tree
++	 */
++	[CPUA_PUMP_RPM_INDEX] = {
++		.loc	= "CPU A PUMP",
++		.type	= FCU_FAN_RPM,		
++		.id	= FCU_FAN_ABSENT_ID,
++	},
++	[CPUB_PUMP_RPM_INDEX] = {
++		.loc	= "CPU B PUMP",
++		.type	= FCU_FAN_RPM,
++		.id	= FCU_FAN_ABSENT_ID,
++	},
++};
++
++/*
+  * i2c_driver structure to attach to the host i2c controller
+  */
+ 
+@@ -139,8 +235,8 @@
+ 
+ static struct i2c_driver therm_pm72_driver =
+ {
++	.owner		= THIS_MODULE,
+ 	.name		= "therm_pm72",
+-	.id		= 0xDEADBEEF,
+ 	.flags		= I2C_DF_NOTIFY,
+ 	.attach_adapter	= therm_pm72_attach,
+ 	.detach_adapter	= therm_pm72_detach,
+@@ -170,7 +266,6 @@
+ 	clt->addr = (id >> 1) & 0x7f;
+ 	clt->adapter = adap;
+ 	clt->driver = &therm_pm72_driver;
+-	clt->id = 0xDEADBEEF;
+ 	strncpy(clt->name, name, I2C_NAME_SIZE-1);
+ 
+ 	if (i2c_attach_client(clt)) {
+@@ -331,10 +426,16 @@
+ 	return 0;
+ }
+ 
+-static int set_rpm_fan(int fan, int rpm)
++static int set_rpm_fan(int fan_index, int rpm)
+ {
+ 	unsigned char buf[2];
+-	int rc;
++	int rc, id;
++
++	if (fcu_fans[fan_index].type != FCU_FAN_RPM)
++		return -EINVAL;
++	id = fcu_fans[fan_index].id; 
++	if (id == FCU_FAN_ABSENT_ID)
++		return -EINVAL;
+ 
+ 	if (rpm < 300)
+ 		rpm = 300;
+@@ -342,43 +443,55 @@
+ 		rpm = 8191;
+ 	buf[0] = rpm >> 5;
+ 	buf[1] = rpm << 3;
+-	rc = fan_write_reg(0x10 + (fan * 2), buf, 2);
++	rc = fan_write_reg(0x10 + (id * 2), buf, 2);
+ 	if (rc < 0)
+ 		return -EIO;
+ 	return 0;
+ }
+ 
+-static int get_rpm_fan(int fan, int programmed)
++static int get_rpm_fan(int fan_index, int programmed)
+ {
+ 	unsigned char failure;
+ 	unsigned char active;
+ 	unsigned char buf[2];
+-	int rc, reg_base;
++	int rc, id, reg_base;
++
++	if (fcu_fans[fan_index].type != FCU_FAN_RPM)
++		return -EINVAL;
++	id = fcu_fans[fan_index].id; 
++	if (id == FCU_FAN_ABSENT_ID)
++		return -EINVAL;
+ 
+ 	rc = fan_read_reg(0xb, &failure, 1);
+ 	if (rc != 1)
+ 		return -EIO;
+-	if ((failure & (1 << fan)) != 0)
++	if ((failure & (1 << id)) != 0)
+ 		return -EFAULT;
+ 	rc = fan_read_reg(0xd, &active, 1);
+ 	if (rc != 1)
+ 		return -EIO;
+-	if ((active & (1 << fan)) == 0)
++	if ((active & (1 << id)) == 0)
+ 		return -ENXIO;
+ 
+ 	/* Programmed value or real current speed */
+ 	reg_base = programmed ? 0x10 : 0x11;
+-	rc = fan_read_reg(reg_base + (fan * 2), buf, 2);
++	rc = fan_read_reg(reg_base + (id * 2), buf, 2);
+ 	if (rc != 2)
+ 		return -EIO;
+ 
+ 	return (buf[0] << 5) | buf[1] >> 3;
+ }
+ 
+-static int set_pwm_fan(int fan, int pwm)
++static int set_pwm_fan(int fan_index, int pwm)
+ {
+ 	unsigned char buf[2];
+-	int rc;
++	int rc, id;
++
++	if (fcu_fans[fan_index].type != FCU_FAN_PWM)
++		return -EINVAL;
++	id = fcu_fans[fan_index].id; 
++	if (id == FCU_FAN_ABSENT_ID)
++		return -EINVAL;
+ 
+ 	if (pwm < 10)
+ 		pwm = 10;
+@@ -386,32 +499,38 @@
+ 		pwm = 100;
+ 	pwm = (pwm * 2559) / 1000;
+ 	buf[0] = pwm;
+-	rc = fan_write_reg(0x30 + (fan * 2), buf, 1);
++	rc = fan_write_reg(0x30 + (id * 2), buf, 1);
+ 	if (rc < 0)
+ 		return rc;
+ 	return 0;
+ }
+ 
+-static int get_pwm_fan(int fan)
++static int get_pwm_fan(int fan_index)
+ {
+ 	unsigned char failure;
+ 	unsigned char active;
+ 	unsigned char buf[2];
+-	int rc;
++	int rc, id;
++
++	if (fcu_fans[fan_index].type != FCU_FAN_PWM)
++		return -EINVAL;
++	id = fcu_fans[fan_index].id; 
++	if (id == FCU_FAN_ABSENT_ID)
++		return -EINVAL;
+ 
+ 	rc = fan_read_reg(0x2b, &failure, 1);
+ 	if (rc != 1)
+ 		return -EIO;
+-	if ((failure & (1 << fan)) != 0)
++	if ((failure & (1 << id)) != 0)
+ 		return -EFAULT;
+ 	rc = fan_read_reg(0x2d, &active, 1);
+ 	if (rc != 1)
+ 		return -EIO;
+-	if ((active & (1 << fan)) == 0)
++	if ((active & (1 << id)) == 0)
+ 		return -ENXIO;
+ 
+ 	/* Programmed value or real current speed */
+-	rc = fan_read_reg(0x30 + (fan * 2), buf, 1);
++	rc = fan_read_reg(0x30 + (id * 2), buf, 1);
+ 	if (rc != 1)
+ 		return -EIO;
+ 
+@@ -513,80 +632,84 @@
+ /*
+  * CPUs fans control loop
+  */
+-static void do_monitor_cpu(struct cpu_pid_state *state)
++
++static int do_read_one_cpu_values(struct cpu_pid_state *state, s32 *temp, s32 *power)
+ {
+-	s32 temp, voltage, current_a, power, power_target;
+-	s32 integral, derivative, proportional, adj_in_target, sval;
+-	s64 integ_p, deriv_p, prop_p, sum; 
+-	int i, intake, rc;
++	s32 ltemp, volts, amps;
++	int rc = 0;
+ 
+-	DBG("cpu %d:\n", state->index);
++	/* Default (in case of error) */
++	*temp = state->cur_temp;
++	*power = state->cur_power;
+ 
+ 	/* Read current fan status */
+ 	if (state->index == 0)
+-		rc = get_rpm_fan(CPUA_EXHAUST_FAN_RPM_ID, !RPM_PID_USE_ACTUAL_SPEED);
++		rc = get_rpm_fan(CPUA_EXHAUST_FAN_RPM_INDEX, !RPM_PID_USE_ACTUAL_SPEED);
+ 	else
+-		rc = get_rpm_fan(CPUB_EXHAUST_FAN_RPM_ID, !RPM_PID_USE_ACTUAL_SPEED);
++		rc = get_rpm_fan(CPUB_EXHAUST_FAN_RPM_INDEX, !RPM_PID_USE_ACTUAL_SPEED);
+ 	if (rc < 0) {
+-		printk(KERN_WARNING "Error %d reading CPU %d exhaust fan !\n",
+-		       rc, state->index);
+-		/* XXX What do we do now ? */
+-	} else
++		/* XXX What do we do now ? Nothing for now, keep old value, but
++		 * return error upstream
++		 */
++		DBG("  cpu %d, fan reading error !\n", state->index);
++	} else {
+ 		state->rpm = rc;
+-	DBG("  current rpm: %d\n", state->rpm);
++		DBG("  cpu %d, exhaust RPM: %d\n", state->index, state->rpm);
++	}
+ 
+ 	/* Get some sensor readings and scale it */
+-	temp = read_smon_adc(state, 1);
+-	if (temp == -1) {
++	ltemp = read_smon_adc(state, 1);
++	if (ltemp == -1) {
++		/* XXX What do we do now ? */
+ 		state->overtemp++;
+-		return;
++		if (rc == 0)
++			rc = -EIO;
++		DBG("  cpu %d, temp reading error !\n", state->index);
++	} else {
++		/* Fixup temperature according to diode calibration
++		 */
++		DBG("  cpu %d, temp raw: %04x, m_diode: %04x, b_diode: %04x\n",
++		    state->index,
++		    ltemp, state->mpu.mdiode, state->mpu.bdiode);
++		*temp = ((s32)ltemp * (s32)state->mpu.mdiode + ((s32)state->mpu.bdiode << 12)) >> 2;
++		state->last_temp = *temp;
++		DBG("  temp: %d.%03d\n", FIX32TOPRINT((*temp)));
+ 	}
+-	voltage = read_smon_adc(state, 3);
+-	current_a = read_smon_adc(state, 4);
+ 
+-	/* Fixup temperature according to diode calibration
++	/*
++	 * Read voltage & current and calculate power
+ 	 */
+-	DBG("  temp raw: %04x, m_diode: %04x, b_diode: %04x\n",
+-	    temp, state->mpu.mdiode, state->mpu.bdiode);
+-	temp = ((s32)temp * (s32)state->mpu.mdiode + ((s32)state->mpu.bdiode << 12)) >> 2;
+-	state->last_temp = temp;
+-	DBG("  temp: %d.%03d\n", FIX32TOPRINT(temp));
++	volts = read_smon_adc(state, 3);
++	amps = read_smon_adc(state, 4);
+ 
+-	/* Check tmax, increment overtemp if we are there. At tmax+8, we go
+-	 * full blown immediately and try to trigger a shutdown
+-	 */
+-	if (temp >= ((state->mpu.tmax + 8) << 16)) {
+-		printk(KERN_WARNING "Warning ! CPU %d temperature way above maximum"
+-		       " (%d) !\n",
+-		       state->index, temp >> 16);
+-		state->overtemp = CPU_MAX_OVERTEMP;
+-	} else if (temp > (state->mpu.tmax << 16))
+-		state->overtemp++;
+-	else
+-		state->overtemp = 0;
+-	if (state->overtemp >= CPU_MAX_OVERTEMP)
+-		critical_state = 1;
+-	if (state->overtemp > 0) {
+-		state->rpm = state->mpu.rmaxn_exhaust_fan;
+-		state->intake_rpm = intake = state->mpu.rmaxn_intake_fan;
+-		goto do_set_fans;
+-	}
+-	
+-	/* Scale other sensor values according to fixed scales
++	/* Scale voltage and current raw sensor values according to fixed scales
+ 	 * obtained in Darwin and calculate power from I and V
+ 	 */
+-	state->voltage = voltage *= ADC_CPU_VOLTAGE_SCALE;
+-	state->current_a = current_a *= ADC_CPU_CURRENT_SCALE;
+-	power = (((u64)current_a) * ((u64)voltage)) >> 16;
++	volts *= ADC_CPU_VOLTAGE_SCALE;
++	amps *= ADC_CPU_CURRENT_SCALE;
++	*power = (((u64)volts) * ((u64)amps)) >> 16;
++	state->voltage = volts;
++	state->current_a = amps;
++	state->last_power = *power;
++
++	DBG("  cpu %d, current: %d.%03d, voltage: %d.%03d, power: %d.%03d W\n",
++	    state->index, FIX32TOPRINT(state->current_a),
++	    FIX32TOPRINT(state->voltage), FIX32TOPRINT(*power));
++
++	return 0;
++}
++
++static void do_cpu_pid(struct cpu_pid_state *state, s32 temp, s32 power)
++{
++	s32 power_target, integral, derivative, proportional, adj_in_target, sval;
++	s64 integ_p, deriv_p, prop_p, sum; 
++	int i;
+ 
+ 	/* Calculate power target value (could be done once for all)
+ 	 * and convert to a 16.16 fp number
+ 	 */
+ 	power_target = ((u32)(state->mpu.pmaxh - state->mpu.padjmax)) << 16;
+-
+-	DBG("  current: %d.%03d, voltage: %d.%03d\n",
+-	    FIX32TOPRINT(current_a), FIX32TOPRINT(voltage));
+-	DBG("  power: %d.%03d W, target: %d.%03d, error: %d.%03d\n", FIX32TOPRINT(power),
++	DBG("  power target: %d.%03d, error: %d.%03d\n",
+ 	    FIX32TOPRINT(power_target), FIX32TOPRINT(power_target - power));
+ 
+ 	/* Store temperature and power in history array */
+@@ -626,7 +749,7 @@
+ 	 * input target is mpu.ttarget, input max is mpu.tmax
+ 	 */
+ 	integ_p = ((s64)state->mpu.pid_gr) * (s64)integral;
+-	DBG("   integ_p: %d\n", (int)(deriv_p >> 36));
++	DBG("   integ_p: %d\n", (int)(integ_p >> 36));
+ 	sval = (state->mpu.tmax << 16) - ((integ_p >> 20) & 0xffffffff);
+ 	adj_in_target = (state->mpu.ttarget << 16);
+ 	if (adj_in_target > sval)
+@@ -655,15 +778,136 @@
+ 	DBG("   sum: %d\n", (int)sum);
+ 	state->rpm += (s32)sum;
+ 
+-	if (state->rpm < state->mpu.rminn_exhaust_fan)
++	if (state->rpm < (int)state->mpu.rminn_exhaust_fan)
+ 		state->rpm = state->mpu.rminn_exhaust_fan;
+-	if (state->rpm > state->mpu.rmaxn_exhaust_fan)
++	if (state->rpm > (int)state->mpu.rmaxn_exhaust_fan)
+ 		state->rpm = state->mpu.rmaxn_exhaust_fan;
++}
++
++static void do_monitor_cpu_combined(void)
++{
++	struct cpu_pid_state *state0 = &cpu_state[0];
++	struct cpu_pid_state *state1 = &cpu_state[1];
++	s32 temp0, power0, temp1, power1;
++	s32 temp_combi, power_combi;
++	int rc, intake, pump;
++
++	rc = do_read_one_cpu_values(state0, &temp0, &power0);
++	if (rc < 0) {
++		/* XXX What do we do now ? */
++	}
++	state1->overtemp = 0;
++	rc = do_read_one_cpu_values(state1, &temp1, &power1);
++	if (rc < 0) {
++		/* XXX What do we do now ? */
++	}
++	if (state1->overtemp)
++		state0->overtemp++;
++
++	temp_combi = max(temp0, temp1);
++	power_combi = max(power0, power1);
++
++	/* Check tmax, increment overtemp if we are there. At tmax+8, we go
++	 * full blown immediately and try to trigger a shutdown
++	 */
++	if (temp_combi >= ((state0->mpu.tmax + 8) << 16)) {
++		printk(KERN_WARNING "Warning ! Temperature way above maximum (%d) !\n",
++		       temp_combi >> 16);
++		state0->overtemp = CPU_MAX_OVERTEMP;
++	} else if (temp_combi > (state0->mpu.tmax << 16))
++		state0->overtemp++;
++	else
++		state0->overtemp = 0;
++	if (state0->overtemp >= CPU_MAX_OVERTEMP)
++		critical_state = 1;
++	if (state0->overtemp > 0) {
++		state0->rpm = state0->mpu.rmaxn_exhaust_fan;
++		state0->intake_rpm = intake = state0->mpu.rmaxn_intake_fan;
++		pump = CPU_PUMP_OUTPUT_MAX;
++		goto do_set_fans;
++	}
++
++	/* Do the PID */
++	do_cpu_pid(state0, temp_combi, power_combi);
++
++	/* Calculate intake fan speed */
++	intake = (state0->rpm * CPU_INTAKE_SCALE) >> 16;
++	if (intake < (int)state0->mpu.rminn_intake_fan)
++		intake = state0->mpu.rminn_intake_fan;
++	if (intake > (int)state0->mpu.rmaxn_intake_fan)
++		intake = state0->mpu.rmaxn_intake_fan;
++	state0->intake_rpm = intake;
++
++	/* Calculate pump speed */
++	pump = (state0->rpm * CPU_PUMP_OUTPUT_MAX) /
++		state0->mpu.rmaxn_exhaust_fan;
++	if (pump > CPU_PUMP_OUTPUT_MAX)
++		pump = CPU_PUMP_OUTPUT_MAX;
++	if (pump < CPU_PUMP_OUTPUT_MIN)
++		pump = CPU_PUMP_OUTPUT_MIN;
++	
++ do_set_fans:
++	/* We copy values from state 0 to state 1 for /sysfs */
++	state1->rpm = state0->rpm;
++	state1->intake_rpm = state0->intake_rpm;
++
++	DBG("** CPU %d RPM: %d Ex, %d, Pump: %d, In, overtemp: %d\n",
++	    state1->index, (int)state1->rpm, intake, pump, state1->overtemp);
++
++	/* We should check for errors, shouldn't we ? But then, what
++	 * do we do once the error occurs ? For FCU notified fan
++	 * failures (-EFAULT) we probably want to notify userland
++	 * some way...
++	 */
++	set_rpm_fan(CPUA_INTAKE_FAN_RPM_INDEX, intake);
++	set_rpm_fan(CPUA_EXHAUST_FAN_RPM_INDEX, state0->rpm);
++	set_rpm_fan(CPUB_INTAKE_FAN_RPM_INDEX, intake);
++	set_rpm_fan(CPUB_EXHAUST_FAN_RPM_INDEX, state0->rpm);
++
++	if (fcu_fans[CPUA_PUMP_RPM_INDEX].id != FCU_FAN_ABSENT_ID)
++		set_rpm_fan(CPUA_PUMP_RPM_INDEX, pump);
++	if (fcu_fans[CPUB_PUMP_RPM_INDEX].id != FCU_FAN_ABSENT_ID)
++		set_rpm_fan(CPUB_PUMP_RPM_INDEX, pump);
++}
++
++static void do_monitor_cpu_split(struct cpu_pid_state *state)
++{
++	s32 temp, power;
++	int rc, intake;
++
++	/* Read current fan status */
++	rc = do_read_one_cpu_values(state, &temp, &power);
++	if (rc < 0) {
++		/* XXX What do we do now ? */
++	}
++
++	/* Check tmax, increment overtemp if we are there. At tmax+8, we go
++	 * full blown immediately and try to trigger a shutdown
++	 */
++	if (temp >= ((state->mpu.tmax + 8) << 16)) {
++		printk(KERN_WARNING "Warning ! CPU %d temperature way above maximum"
++		       " (%d) !\n",
++		       state->index, temp >> 16);
++		state->overtemp = CPU_MAX_OVERTEMP;
++	} else if (temp > (state->mpu.tmax << 16))
++		state->overtemp++;
++	else
++		state->overtemp = 0;
++	if (state->overtemp >= CPU_MAX_OVERTEMP)
++		critical_state = 1;
++	if (state->overtemp > 0) {
++		state->rpm = state->mpu.rmaxn_exhaust_fan;
++		state->intake_rpm = intake = state->mpu.rmaxn_intake_fan;
++		goto do_set_fans;
++	}
++
++	/* Do the PID */
++	do_cpu_pid(state, temp, power);
+ 
+ 	intake = (state->rpm * CPU_INTAKE_SCALE) >> 16;
+-	if (intake < state->mpu.rminn_intake_fan)
++	if (intake < (int)state->mpu.rminn_intake_fan)
+ 		intake = state->mpu.rminn_intake_fan;
+-	if (intake > state->mpu.rmaxn_intake_fan)
++	if (intake > (int)state->mpu.rmaxn_intake_fan)
+ 		intake = state->mpu.rmaxn_intake_fan;
+ 	state->intake_rpm = intake;
+ 
+@@ -677,11 +921,11 @@
+ 	 * some way...
+ 	 */
+ 	if (state->index == 0) {
+-		set_rpm_fan(CPUA_INTAKE_FAN_RPM_ID, intake);
+-		set_rpm_fan(CPUA_EXHAUST_FAN_RPM_ID, state->rpm);
++		set_rpm_fan(CPUA_INTAKE_FAN_RPM_INDEX, intake);
++		set_rpm_fan(CPUA_EXHAUST_FAN_RPM_INDEX, state->rpm);
+ 	} else {
+-		set_rpm_fan(CPUB_INTAKE_FAN_RPM_ID, intake);
+-		set_rpm_fan(CPUB_EXHAUST_FAN_RPM_ID, state->rpm);
++		set_rpm_fan(CPUB_INTAKE_FAN_RPM_INDEX, intake);
++		set_rpm_fan(CPUB_EXHAUST_FAN_RPM_INDEX, state->rpm);
+ 	}
+ }
+ 
+@@ -696,6 +940,7 @@
+ 	state->overtemp = 0;
+ 	state->adc_config = 0x00;
+ 
++
+ 	if (index == 0)
+ 		state->monitor = attach_i2c_chip(SUPPLY_MONITOR_ID, "CPU0_monitor");
+ 	else if (index == 1)
+@@ -778,7 +1023,7 @@
+ 	DBG("backside:\n");
+ 
+ 	/* Check fan status */
+-	rc = get_pwm_fan(BACKSIDE_FAN_PWM_ID);
++	rc = get_pwm_fan(BACKSIDE_FAN_PWM_INDEX);
+ 	if (rc < 0) {
+ 		printk(KERN_WARNING "Error %d reading backside fan !\n", rc);
+ 		/* XXX What do we do now ? */
+@@ -790,12 +1035,12 @@
+ 	temp = i2c_smbus_read_byte_data(state->monitor, MAX6690_EXT_TEMP) << 16;
+ 	state->last_temp = temp;
+ 	DBG("  temp: %d.%03d, target: %d.%03d\n", FIX32TOPRINT(temp),
+-	    FIX32TOPRINT(BACKSIDE_PID_INPUT_TARGET));
++	    FIX32TOPRINT(backside_params.input_target));
+ 
+ 	/* Store temperature and error in history array */
+ 	state->cur_sample = (state->cur_sample + 1) % BACKSIDE_PID_HISTORY_SIZE;
+ 	state->sample_history[state->cur_sample] = temp;
+-	state->error_history[state->cur_sample] = temp - BACKSIDE_PID_INPUT_TARGET;
++	state->error_history[state->cur_sample] = temp - backside_params.input_target;
+ 	
+ 	/* If first loop, fill the history table */
+ 	if (state->first) {
+@@ -804,7 +1049,7 @@
+ 				BACKSIDE_PID_HISTORY_SIZE;
+ 			state->sample_history[state->cur_sample] = temp;
+ 			state->error_history[state->cur_sample] =
+-				temp - BACKSIDE_PID_INPUT_TARGET;
++				temp - backside_params.input_target;
+ 		}
+ 		state->first = 0;
+ 	}
+@@ -816,7 +1061,7 @@
+ 		integral += state->error_history[i];
+ 	integral *= BACKSIDE_PID_INTERVAL;
+ 	DBG("  integral: %08x\n", integral);
+-	integ_p = ((s64)BACKSIDE_PID_G_r) * (s64)integral;
++	integ_p = ((s64)backside_params.G_r) * (s64)integral;
+ 	DBG("   integ_p: %d\n", (int)(integ_p >> 36));
+ 	sum += integ_p;
+ 
+@@ -825,12 +1070,12 @@
+ 		state->error_history[(state->cur_sample + BACKSIDE_PID_HISTORY_SIZE - 1)
+ 				    % BACKSIDE_PID_HISTORY_SIZE];
+ 	derivative /= BACKSIDE_PID_INTERVAL;
+-	deriv_p = ((s64)BACKSIDE_PID_G_d) * (s64)derivative;
++	deriv_p = ((s64)backside_params.G_d) * (s64)derivative;
+ 	DBG("   deriv_p: %d\n", (int)(deriv_p >> 36));
+ 	sum += deriv_p;
+ 
+ 	/* Calculate the proportional term */
+-	prop_p = ((s64)BACKSIDE_PID_G_p) * (s64)(state->error_history[state->cur_sample]);
++	prop_p = ((s64)backside_params.G_p) * (s64)(state->error_history[state->cur_sample]);
+ 	DBG("   prop_p: %d\n", (int)(prop_p >> 36));
+ 	sum += prop_p;
+ 
+@@ -839,13 +1084,13 @@
+ 
+ 	DBG("   sum: %d\n", (int)sum);
+ 	state->pwm += (s32)sum;
+-	if (state->pwm < BACKSIDE_PID_OUTPUT_MIN)
+-		state->pwm = BACKSIDE_PID_OUTPUT_MIN;
+-	if (state->pwm > BACKSIDE_PID_OUTPUT_MAX)
+-		state->pwm = BACKSIDE_PID_OUTPUT_MAX;
++	if (state->pwm < backside_params.output_min)
++		state->pwm = backside_params.output_min;
++	if (state->pwm > backside_params.output_max)
++		state->pwm = backside_params.output_max;
+ 
+ 	DBG("** BACKSIDE PWM: %d\n", (int)state->pwm);
+-	set_pwm_fan(BACKSIDE_FAN_PWM_ID, state->pwm);
++	set_pwm_fan(BACKSIDE_FAN_PWM_INDEX, state->pwm);
+ }
+ 
+ /*
+@@ -853,6 +1098,35 @@
+  */
+ static int init_backside_state(struct backside_pid_state *state)
+ {
++	struct device_node *u3;
++	int u3h = 1; /* conservative by default */
++
++	/*
++	 * There are different PID params for machines with U3 and machines
++	 * with U3H, pick the right ones now
++	 */
++	u3 = of_find_node_by_path("/u3 at 0,f8000000");
++	if (u3 != NULL) {
++		u32 *vers = (u32 *)get_property(u3, "device-rev", NULL);
++		if (vers)
++			if (((*vers) & 0x3f) < 0x34)
++				u3h = 0;
++		of_node_put(u3);
++	}
++
++	backside_params.G_p = BACKSIDE_PID_G_p;
++	backside_params.G_r = BACKSIDE_PID_G_r;
++	backside_params.output_max = BACKSIDE_PID_OUTPUT_MAX;
++	if (u3h) {
++		backside_params.G_d = BACKSIDE_PID_U3H_G_d;
++		backside_params.input_target = BACKSIDE_PID_U3H_INPUT_TARGET;
++		backside_params.output_min = BACKSIDE_PID_U3H_OUTPUT_MIN;
++	} else {
++		backside_params.G_d = BACKSIDE_PID_U3_G_d;
++		backside_params.input_target = BACKSIDE_PID_U3_INPUT_TARGET;
++		backside_params.output_min = BACKSIDE_PID_U3_OUTPUT_MIN;
++	}
++
+ 	state->ticks = 1;
+ 	state->first = 1;
+ 	state->pwm = 50;
+@@ -898,7 +1172,7 @@
+ 	DBG("drives:\n");
+ 
+ 	/* Check fan status */
+-	rc = get_rpm_fan(DRIVES_FAN_RPM_ID, !RPM_PID_USE_ACTUAL_SPEED);
++	rc = get_rpm_fan(DRIVES_FAN_RPM_INDEX, !RPM_PID_USE_ACTUAL_SPEED);
+ 	if (rc < 0) {
+ 		printk(KERN_WARNING "Error %d reading drives fan !\n", rc);
+ 		/* XXX What do we do now ? */
+@@ -965,7 +1239,7 @@
+ 		state->rpm = DRIVES_PID_OUTPUT_MAX;
+ 
+ 	DBG("** DRIVES RPM: %d\n", (int)state->rpm);
+-	set_rpm_fan(DRIVES_FAN_RPM_ID, state->rpm);
++	set_rpm_fan(DRIVES_FAN_RPM_INDEX, state->rpm);
+ }
+ 
+ /*
+@@ -1032,7 +1306,7 @@
+ 	}
+ 
+ 	/* Set the PCI fan once for now */
+-	set_pwm_fan(SLOTS_FAN_PWM_ID, SLOTS_FAN_DEFAULT_PWM);
++	set_pwm_fan(SLOTS_FAN_PWM_INDEX, SLOTS_FAN_DEFAULT_PWM);
+ 
+ 	/* Initialize ADCs */
+ 	initialize_adc(&cpu_state[0]);
+@@ -1047,9 +1321,13 @@
+ 		start = jiffies;
+ 
+ 		down(&driver_lock);
+-		do_monitor_cpu(&cpu_state[0]);
+-		if (cpu_state[1].monitor != NULL)
+-			do_monitor_cpu(&cpu_state[1]);
++		if (cpu_pid_type == CPU_PID_TYPE_COMBINED)
++			do_monitor_cpu_combined();
++		else {
++			do_monitor_cpu_split(&cpu_state[0]);
++			if (cpu_state[1].monitor != NULL)
++				do_monitor_cpu_split(&cpu_state[1]);
++		}
+ 		do_monitor_backside(&backside_state);
+ 		do_monitor_drives(&drives_state);
+ 		up(&driver_lock);
+@@ -1113,6 +1391,19 @@
+ 
+ 	DBG("counted %d CPUs in the device-tree\n", cpu_count);
+ 
++	/* Decide the type of PID algorithm to use based on the presence of
++	 * the pumps, though that may not be the best way, that is good enough
++	 * for now
++	 */
++	if (machine_is_compatible("PowerMac7,3")
++	    && (cpu_count > 1)
++	    && fcu_fans[CPUA_PUMP_RPM_INDEX].id != FCU_FAN_ABSENT_ID
++	    && fcu_fans[CPUB_PUMP_RPM_INDEX].id != FCU_FAN_ABSENT_ID) {
++		printk(KERN_INFO "Liquid cooling pumps detected, using new algorithm !\n");
++		cpu_pid_type = CPU_PID_TYPE_COMBINED;
++	} else
++		cpu_pid_type = CPU_PID_TYPE_SPLIT;
++
+ 	/* Create control loops for everything. If any fail, everything
+ 	 * fails
+ 	 */
+@@ -1257,12 +1548,91 @@
+ 	return 0;
+ }
+ 
++static void fcu_lookup_fans(struct device_node *fcu_node)
++{
++	struct device_node *np = NULL;
++	int i;
++
++	/* The table is filled by default with values that are suitable
++	 * for the old machines without device-tree informations. We scan
++	 * the device-tree and override those values with whatever is
++	 * there
++	 */
++
++	DBG("Looking up FCU controls in device-tree...\n");
++
++	while ((np = of_get_next_child(fcu_node, np)) != NULL) {
++		int type = -1;
++		char *loc;
++		u32 *reg;
++
++		DBG(" control: %s, type: %s\n", np->name, np->type);
++
++		/* Detect control type */
++		if (!strcmp(np->type, "fan-rpm-control") ||
++		    !strcmp(np->type, "fan-rpm"))
++			type = FCU_FAN_RPM;
++		if (!strcmp(np->type, "fan-pwm-control") ||
++		    !strcmp(np->type, "fan-pwm"))
++			type = FCU_FAN_PWM;
++		/* Only care about fans for now */
++		if (type == -1)
++			continue;
++
++		/* Lookup for a matching location */
++		loc = (char *)get_property(np, "location", NULL);
++		reg = (u32 *)get_property(np, "reg", NULL);
++		if (loc == NULL || reg == NULL)
++			continue;
++		DBG(" matching location: %s, reg: 0x%08x\n", loc, *reg);
++
++		for (i = 0; i < FCU_FAN_COUNT; i++) {
++			int fan_id;
++
++			if (strcmp(loc, fcu_fans[i].loc))
++				continue;
++			DBG(" location match, index: %d\n", i);
++			fcu_fans[i].id = FCU_FAN_ABSENT_ID;
++			if (type != fcu_fans[i].type) {
++				printk(KERN_WARNING "therm_pm72: Fan type mismatch "
++				       "in device-tree for %s\n", np->full_name);
++				break;
++			}
++			if (type == FCU_FAN_RPM)
++				fan_id = ((*reg) - 0x10) / 2;
++			else
++				fan_id = ((*reg) - 0x30) / 2;
++			if (fan_id > 7) {
++				printk(KERN_WARNING "therm_pm72: Can't parse "
++				       "fan ID in device-tree for %s\n", np->full_name);
++				break;
++			}
++			DBG(" fan id -> %d, type -> %d\n", fan_id, type);
++			fcu_fans[i].id = fan_id;
++		}
++	}
++
++	/* Now dump the array */
++	printk(KERN_INFO "Detected fan controls:\n");
++	for (i = 0; i < FCU_FAN_COUNT; i++) {
++		if (fcu_fans[i].id == FCU_FAN_ABSENT_ID)
++			continue;
++		printk(KERN_INFO "  %d: %s fan, id %d, location: %s\n", i,
++		       fcu_fans[i].type == FCU_FAN_RPM ? "RPM" : "PWM",
++		       fcu_fans[i].id, fcu_fans[i].loc);
++	}
++}
++
+ static int fcu_of_probe(struct of_device* dev, const struct of_match *match)
+ {
+ 	int rc;
+ 
+ 	state = state_detached;
+ 
++	/* Lookup the fans in the device tree */
++	fcu_lookup_fans(dev->node);
++
++	/* Add the driver */
+ 	rc = i2c_add_driver(&therm_pm72_driver);
+ 	if (rc < 0)
+ 		return rc;
+@@ -1301,15 +1671,20 @@
+ {
+ 	struct device_node *np;
+ 
+-	if (!machine_is_compatible("PowerMac7,2"))
++	if (!machine_is_compatible("PowerMac7,2") &&
++	    !machine_is_compatible("PowerMac7,3"))
+ 	    	return -ENODEV;
+ 
+ 	printk(KERN_INFO "PowerMac G5 Thermal control driver %s\n", VERSION);
+ 
+ 	np = of_find_node_by_type(NULL, "fcu");
+ 	if (np == NULL) {
+-		printk(KERN_ERR "Can't find FCU in device-tree !\n");
+-		return -ENODEV;
++		/* Some machines have strangely broken device-tree */
++		np = of_find_node_by_path("/u3 at 0,f8000000/i2c at f8001000/fan at 15e");
++		if (np == NULL) {
++			    printk(KERN_ERR "Can't find FCU in device-tree !\n");
++			    return -ENODEV;
++		}
+ 	}
+ 	of_dev = of_platform_device_create(np, "temperature");
+ 	if (of_dev == NULL) {
+diff -urN debian-kernel-2.6.8/drivers/macintosh/therm_pm72.h debian-kernel-2.6.8-patched/drivers/macintosh/therm_pm72.h
+--- debian-kernel-2.6.8/drivers/macintosh/therm_pm72.h	2004-08-14 07:36:57.000000000 +0200
++++ debian-kernel-2.6.8-patched/drivers/macintosh/therm_pm72.h	2004-11-22 01:49:45.000000000 +0100
+@@ -119,18 +119,33 @@
+ #define ADC_CPU_CURRENT_SCALE	0x1f40	/* _AD4 */
+ 
+ /*
+- * PID factors for the U3/Backside fan control loop
++ * PID factors for the U3/Backside fan control loop. We have 2 sets
++ * of values here, one set for U3 and one set for U3H
+  */
+-#define BACKSIDE_FAN_PWM_ID		1
+-#define BACKSIDE_PID_G_d		0x02800000
++#define BACKSIDE_FAN_PWM_DEFAULT_ID	1
++#define BACKSIDE_FAN_PWM_INDEX		0
++#define BACKSIDE_PID_U3_G_d		0x02800000
++#define BACKSIDE_PID_U3H_G_d		0x01400000
+ #define BACKSIDE_PID_G_p		0x00500000
+ #define BACKSIDE_PID_G_r		0x00000000
+-#define BACKSIDE_PID_INPUT_TARGET	0x00410000
++#define BACKSIDE_PID_U3_INPUT_TARGET	0x00410000
++#define BACKSIDE_PID_U3H_INPUT_TARGET	0x004b0000
+ #define BACKSIDE_PID_INTERVAL		5
+ #define BACKSIDE_PID_OUTPUT_MAX		100
+-#define BACKSIDE_PID_OUTPUT_MIN		20
++#define BACKSIDE_PID_U3_OUTPUT_MIN	20
++#define BACKSIDE_PID_U3H_OUTPUT_MIN	30
+ #define BACKSIDE_PID_HISTORY_SIZE	2
+ 
++struct basckside_pid_params
++{
++	s32			G_d;
++	s32			G_p;
++	s32			G_r;
++	s32			input_target;
++	s32			output_min;
++	s32			output_max;
++};
++
+ struct backside_pid_state
+ {
+ 	int			ticks;
+@@ -146,7 +161,8 @@
+ /*
+  * PID factors for the Drive Bay fan control loop
+  */
+-#define DRIVES_FAN_RPM_ID      		2
++#define DRIVES_FAN_RPM_DEFAULT_ID	2
++#define DRIVES_FAN_RPM_INDEX		1
+ #define DRIVES_PID_G_d			0x01e00000
+ #define DRIVES_PID_G_p			0x00500000
+ #define DRIVES_PID_G_r			0x00000000
+@@ -168,7 +184,8 @@
+ 	int			first;
+ };
+ 
+-#define SLOTS_FAN_PWM_ID       		2
++#define SLOTS_FAN_PWM_DEFAULT_ID	2
++#define SLOTS_FAN_PWM_INDEX		2
+ #define	SLOTS_FAN_DEFAULT_PWM		50 /* Do better here ! */
+ 
+ /*
+@@ -191,10 +208,15 @@
+  * CPU B FAKE POWER	49	(I_V_inputs: 18, 19)
+  */
+ 
+-#define CPUA_INTAKE_FAN_RPM_ID		3
+-#define CPUA_EXHAUST_FAN_RPM_ID		4
+-#define CPUB_INTAKE_FAN_RPM_ID		5
+-#define CPUB_EXHAUST_FAN_RPM_ID		6
++#define CPUA_INTAKE_FAN_RPM_DEFAULT_ID	3
++#define CPUA_EXHAUST_FAN_RPM_DEFAULT_ID	4
++#define CPUB_INTAKE_FAN_RPM_DEFAULT_ID	5
++#define CPUB_EXHAUST_FAN_RPM_DEFAULT_ID	6
++
++#define CPUA_INTAKE_FAN_RPM_INDEX	3
++#define CPUA_EXHAUST_FAN_RPM_INDEX	4
++#define CPUB_INTAKE_FAN_RPM_INDEX	5
++#define CPUB_EXHAUST_FAN_RPM_INDEX	6
+ 
+ #define CPU_INTAKE_SCALE		0x0000f852
+ #define CPU_TEMP_HISTORY_SIZE		2
+@@ -202,6 +224,11 @@
+ #define CPU_PID_INTERVAL		1
+ #define CPU_MAX_OVERTEMP		30
+ 
++#define CPUA_PUMP_RPM_INDEX		7
++#define CPUB_PUMP_RPM_INDEX		8
++#define CPU_PUMP_OUTPUT_MAX		3700
++#define CPU_PUMP_OUTPUT_MIN		1000
++
+ struct cpu_pid_state
+ {
+ 	int			index;
+@@ -219,6 +246,7 @@
+ 	s32			voltage;
+ 	s32			current_a;
+ 	s32			last_temp;
++	s32			last_power;
+ 	int			first;
+ 	u8			adc_config;
+ };

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-ibm-240-e30.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-ibm-240-e30.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-ibm-240-e30.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,251 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Add support for IBM 7043-240/E30
+## DP: Patch author: Gustavo Barbieri <barbieri at gmail.com>
+## DP: Upstream status: minimum impact hack, better patch pending inclusion
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -Naur linux-2.6.6-orig/arch/ppc/platforms/prep_pci.c linux-2.6.6/arch/ppc/platforms/prep_pci.c
+--- linux-2.6.6-orig/arch/ppc/platforms/prep_pci.c	2004-05-09 23:33:20.000000000 -0300
++++ linux-2.6.6/arch/ppc/platforms/prep_pci.c	2004-06-01 19:06:41.000000000 -0300
+@@ -42,6 +42,75 @@
+
+ /* Tables for known hardware */
+
++/*
++ * IBM RS/6000 7043-240  -- Leigh Brown
++ * XXX we should get all this from the residual data
++ */
++static char ibm_doral_pci_IRQ_map[23] __prepdata = {
++        0, /* Slot 0  - unused */
++        3, /* Slot 1  - PCI Slot 1 device 0x08 */
++        5, /* Slot 2  - PCI Slot 3 device 0x10 */
++       11, /* Slot 3  - PCI Slot 5 device 0x18 */
++        2, /* Slot 4  - Integrated PCI device 0x20 */
++        1, /* Slot 5  - Integrated PCI device 0x28 */
++        0, /* Slot 6  - Integrated PCI device 0x30 - no IRQ */
++        0, /* Slot 7  - Integrated PCI device 0x38 - no IRQ */
++        0, /* Slot 8  - unused */
++        0, /* Slot 9  - unused */
++        0, /* Slot 10 - unused */
++        0, /* Slot 11 - unused */
++        0, /* Slot 12 - unused */
++        0, /* Slot 13 - unused */
++        0, /* Slot 14 - unused */
++        0, /* Slot 15 - unused */
++        0, /* Slot 16 - unused */
++        0, /* Slot 17 - unused */
++        0, /* Slot 18 - unused */
++        0, /* Slot 19 - unused */
++        0, /* Slot 20 - unused */
++        0, /* Slot 21 - unused */
++        0, /* Slot 22 - unused */
++};
++
++/*
++ * IBM RS/6000 7024-E30  -- Leigh Brown
++ * XXX we should get all this from the residual data
++ */
++static char ibm_7024e30_pci_IRQ_map[23] __prepdata = {
++        0, /* Slot 0  - unused */
++        0, /* Slot 1  - unused */
++        0, /* Slot 2  - unused */
++        0, /* Slot 3  - unused */
++        0, /* Slot 4  - unused */
++        0, /* Slot 5  - unused */
++        0, /* Slot 6  - unused */
++        0, /* Slot 7  - unused */
++        0, /* Slot 8  - unused */
++        0, /* Slot 9  - unused */
++        0, /* Slot 10 - unused */
++        0, /* Slot 11 - Unknown Integrated PCI device - no IRQ */
++        0, /* Slot 12 - Unknown Integrated PCI device - no IRQ */
++        0, /* Slot 13 - Unknown Integrated PCI device - no IRQ */
++        2, /* Slot 14 - PCI Slot 1 INTA and INTC */
++        4, /* Slot 15 - PCI Slot 2 INTA and INTC */
++        0, /* Slot 16 - unused */
++        0, /* Slot 17 - unused */
++        0, /* Slot 18 - unused */
++        0, /* Slot 19 - unused */
++        0, /* Slot 20 - unused */
++        0, /* Slot 21 - unused */
++        0, /* Slot 22 - unused */
++};
++
++static char ibm_7024e30_pci_IRQ_routes[] __prepdata = {
++        0,      /* Line 0 - unused */
++        15,     /* Line 1 */
++        15,     /* Line 2 */
++        15,     /* Line 3 */
++        15,     /* Line 4 */
++};
++
++
+ /* Motorola PowerStackII - Utah */
+ static char Utah_pci_IRQ_map[23] __prepdata =
+ {
+@@ -885,6 +954,50 @@
+ }
+
+ static void __init
++ibm_7024e30_pci_map_non0(struct pci_dev *dev)
++{
++	unsigned char intpin;
++	int irq;
++	static unsigned char bridge_intrs[5][4] = {
++		{ 1, 0, 0, 0 },
++		{ 8, 9, 8, 9 },
++		{ 10, 11, 10, 11 },
++		{ 12, 13, 12, 13 }
++	};
++
++	if (dev == NULL || PCI_SLOT(dev->devfn) > 4)
++		return;
++	pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &intpin);
++	if (intpin < 1 || intpin > 4)
++		return;
++	irq = bridge_intrs[PCI_SLOT(dev->devfn)][intpin - 1];
++	dev->irq = openpic_to_irq(irq);
++	pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
++}
++
++void __init
++prep_doral_setup_pci(char *irq_edge_mask_lo, char *irq_edge_mask_hi)
++{
++	Motherboard_map_name = "IBM 7043-240 (Doral)";
++	Motherboard_map = ibm_doral_pci_IRQ_map;
++	Motherboard_routes = NULL;
++	Motherboard_non0 = NULL;
++	*irq_edge_mask_lo = 0x00; /* irq's 0-7 all edge-triggered */
++	*irq_edge_mask_hi = 0xA0; /* irq's 13, 15 level-triggered */
++}
++
++void __init
++prep_7024e30_setup_pci(char *irq_edge_mask_lo, char *irq_edge_mask_hi)
++{
++	Motherboard_map_name = "IBM 7024-E30";
++	Motherboard_map = ibm_7024e30_pci_IRQ_map;
++	Motherboard_routes = ibm_7024e30_pci_IRQ_routes;
++	Motherboard_non0 = ibm_7024e30_pci_map_non0;
++	*irq_edge_mask_lo = 0x00; /* irq's 0-7 all edge-triggered */
++	*irq_edge_mask_hi = 0xA0; /* irq's 13, 15 level-triggered */
++}
++
++static void __init
+ ibm43p_pci_map_non0(struct pci_dev *dev)
+ {
+ 	unsigned char intpin;
+@@ -1021,11 +1134,13 @@
+ 		return;
+ 	}
+
+-	/* Set up mapping from slots */
+-	for (i = 1;  i <= 4;  i++)
+-		ibc_pirq[i-1] = Motherboard_routes[i];
+-	/* Enable PCI interrupts */
+-	*ibc_pcicon |= 0x20;
++ 	if (Motherboard_routes) { /* Doral does not like this code */
++	        /* Set up mapping from slots */
++	        for (i = 1;  i <= 4;  i++)
++		        ibc_pirq[i-1] = Motherboard_routes[i];
++		/* Enable PCI interrupts */
++		*ibc_pcicon |= 0x20;
++	}
+ }
+
+ void __init
+@@ -1269,7 +1384,8 @@
+ 		hostbridge = residual_find_device(PROCESSORDEVICE, NULL,
+ 			BridgeController, PCIBridge, -1, 0);
+ 		if (hostbridge &&
+-			hostbridge->DeviceId.Interface == PCIBridgeIndirect) {
++			((hostbridge->DeviceId.Interface == PCIBridgeIndirect) ||
++			 (hostbridge->DeviceId.Interface == PCIBridgeRS6K))) {
+ 			PnP_TAG_PACKET * pkt;
+ 			pkt = PnP_find_large_vendor_packet(
+ 				res->DevicePnPHeap+hostbridge->AllocatedOffset,
+diff -Naur linux-2.6.6-orig/arch/ppc/platforms/prep_setup.c linux-2.6.6/arch/ppc/platforms/prep_setup.c
+--- linux-2.6.6-orig/arch/ppc/platforms/prep_setup.c	2004-05-09 23:33:13.000000000 -0300
++++ linux-2.6.6/arch/ppc/platforms/prep_setup.c	2004-06-01 19:25:58.000000000 -0300
+@@ -79,6 +79,8 @@
+
+ int _prep_type;
+
++extern void prep_doral_setup_pci(char *irq_edge_mask_lo, char *irq_edge_mask_hi);
++extern void prep_7024e30_setup_pci(char *irq_edge_mask_lo, char *irq_edge_mask_hi);
+ extern void prep_sandalfoot_setup_pci(char *irq_edge_mask_lo, char *irq_edge_mask_hi);
+ extern void prep_thinkpad_setup_pci(char *irq_edge_mask_lo, char *irq_edge_mask_hi);
+ extern void prep_carolina_setup_pci(char *irq_edge_mask_lo, char *irq_edge_mask_hi);
+@@ -127,8 +129,8 @@
+ /* planar ID values: */
+ /* Sandalfoot/Sandalbow (6015/7020) */
+ #define PREP_IBM_SANDALFOOT	0xfc
+-/* Woodfield, Thinkpad 850/860 (6042/7249) */
+-#define PREP_IBM_THINKPAD	0xff /* planar ID unimplemented */
++/* Woodfield, Thinkpad 850/860 (6042/7249), 7043-240 */
++#define PREP_IBM_NO_PLANAR_ID	0xff /* planar ID unimplemented */
+ /* PowerSeries 830/850 (6050/6070) */
+ #define PREP_IBM_CAROLINA_IDE_0	0xf0
+ #define PREP_IBM_CAROLINA_IDE_1	0xf1
+@@ -145,6 +147,12 @@
+ #define PREP_IBM_TIGER1_180		0xd3
+ #define PREP_IBM_TIGER1_xxx		0xd4 /* unknown, but probably exists */
+ #define PREP_IBM_TIGER1_333		0xd5 /* missing from Tiger Tech Spec */
++/* 7024-E30 */
++#define PREP_IBM_7024E30		0x95
++
++/* Residual data model strings */
++#define PREP_IBM_MODEL_TIGER1	"IBM Model 7042/7043 (ED)"
++#define PREP_IBM_MODEL_DORAL	"IBM PPS Model 7043 (ED)"
+
+ /* setup_ibm_pci:
+  * 	set Motherboard_map_name, Motherboard_map, Motherboard_routes.
+@@ -714,11 +722,24 @@
+ 				ppc_md.power_off = prep_sig750_poweroff;
+ 				ppc_md.show_cpuinfo = prep_sandalfoot_cpuinfo;
+ 				break;
+-			case PREP_IBM_THINKPAD:
+-				prep_gen_enable_l2();
+-				setup_ibm_pci = prep_thinkpad_setup_pci;
+-				ppc_md.power_off = prep_carrera_poweroff;
+-				ppc_md.show_cpuinfo = prep_thinkpad_cpuinfo;
++			case PREP_IBM_NO_PLANAR_ID:
++#ifdef CONFIG_PREP_RESIDUAL
++				if (res &&
++				    strcmp(res->VitalProductData.PrintableModel,
++					    PREP_IBM_MODEL_DORAL) == 0) {
++					prep_carolina_enable_l2();
++					setup_ibm_pci = prep_doral_setup_pci;
++					ppc_md.power_off = prep_sig750_poweroff;
++					ppc_md.show_cpuinfo = prep_tiger1_cpuinfo;
++				} else
++#endif /* CONFIG_PREP_RESIDUAL */
++				{
++					/* Assume it is a thinkpad */
++					prep_gen_enable_l2();
++					setup_ibm_pci = prep_thinkpad_setup_pci;
++					ppc_md.power_off = prep_carrera_poweroff;
++					ppc_md.show_cpuinfo = prep_thinkpad_cpuinfo;
++				}
+ 				break;
+ 			default:
+ 				printk(" -- unknown! Assuming Carolina");
+@@ -747,6 +770,12 @@
+ 				ppc_md.show_cpuinfo = prep_tiger1_cpuinfo;
+ 				ppc_md.progress = prep_tiger1_progress;
+ 				break;
++			case PREP_IBM_7024E30:
++				prep_carolina_enable_l2();
++				setup_ibm_pci = prep_7024e30_setup_pci;
++				ppc_md.power_off = prep_sig750_poweroff;
++				ppc_md.show_cpuinfo = prep_carolina_cpuinfo;
++				break;
+ 		}
+ 		printk("\n");
+
+
+** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-misc-powermac-fixes.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-misc-powermac-fixes.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-misc-powermac-fixes.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,113 @@
+#! /bin/sh -e 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Misc powermac fixes backports
+## DP: Patch author: Benjamin Herrenschmidt <benh at kernel.crashing.org>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -urN kernel-source-2.6.8.orig/arch/ppc/kernel/pci.c kernel-source-2.6.8/arch/ppc/kernel/pci.c
+--- kernel-source-2.6.8.orig/arch/ppc/kernel/pci.c	2004-08-14 07:36:57.000000000 +0200
++++ kernel-source-2.6.8/arch/ppc/kernel/pci.c	2004-12-28 04:39:16.543300968 +0100
+@@ -33,6 +33,7 @@
+ unsigned long isa_io_base     = 0;
+ unsigned long isa_mem_base    = 0;
+ unsigned long pci_dram_offset = 0;
++int pcibios_assign_bus_offset = 1;
+ 
+ void pcibios_make_OF_bus_map(void);
+ 
+@@ -1279,7 +1280,7 @@
+ 		bus = pci_scan_bus(hose->first_busno, hose->ops, hose);
+ 		hose->last_busno = bus->subordinate;
+ 		if (pci_assign_all_busses || next_busno <= hose->last_busno)
+-			next_busno = hose->last_busno+1;
++			next_busno = hose->last_busno + pcibios_assign_bus_offset;
+ 	}
+ 	pci_bus_count = next_busno;
+ 
+diff -urN kernel-source-2.6.8.orig/arch/ppc/platforms/pmac_feature.c kernel-source-2.6.8/arch/ppc/platforms/pmac_feature.c
+--- kernel-source-2.6.8.orig/arch/ppc/platforms/pmac_feature.c	2004-08-14 07:37:41.000000000 +0200
++++ kernel-source-2.6.8/arch/ppc/platforms/pmac_feature.c	2004-12-28 04:41:06.253622464 +0100
+@@ -2169,6 +2169,14 @@
+ 		PMAC_TYPE_POWERMAC_G5,		g5_features,
+ 		0,
+ 	},
++	{	"PowerMac7,3",			"PowerMac G5",
++		PMAC_TYPE_POWERMAC_G5,		g5_features,
++		0,
++	},
++	{	"RackMac3,1",			"XServe G5",
++		PMAC_TYPE_POWERMAC_G5,		g5_features,
++		0,
++	},
+ #endif /* CONFIG_POWER4 */
+ };
+ 
+@@ -2665,7 +2673,7 @@
+ 			struct device_node *p = of_get_parent(ui2c);
+ 			if (p && !strcmp(p->name, "uni-n"))
+ 				break;
+-			ui2c = of_find_node_by_type(np, "i2c");
++			ui2c = of_find_node_by_type(ui2c, "i2c");
+ 		}
+ 		if (ui2c == NULL)
+ 			break;
+diff -urN kernel-source-2.6.8.orig/arch/ppc/platforms/pmac_pci.c kernel-source-2.6.8/arch/ppc/platforms/pmac_pci.c
+--- kernel-source-2.6.8.orig/arch/ppc/platforms/pmac_pci.c	2004-08-14 07:36:58.000000000 +0200
++++ kernel-source-2.6.8/arch/ppc/platforms/pmac_pci.c	2004-12-28 04:39:16.756268592 +0100
+@@ -50,6 +50,7 @@
+ #endif /* CONFIG_POWER4 */
+ 
+ extern u8 pci_cache_line_size;
++extern int pcibios_assign_bus_offset;
+ 
+ struct pci_dev *k2_skiplist[2];
+ 
+@@ -315,6 +316,10 @@
+ 	unsigned int addr;
+ 	int i;
+ 
++	struct device_node *np = pci_busdev_to_OF_node(bus, devfn);
++	if (np == NULL)
++		return PCIBIOS_DEVICE_NOT_FOUND;
++
+ 	/*
+ 	 * When a device in K2 is powered down, we die on config
+ 	 * cycle accesses. Fix that here.
+@@ -362,6 +367,9 @@
+ 	unsigned int addr;
+ 	int i;
+ 
++	struct device_node *np = pci_busdev_to_OF_node(bus, devfn);
++	if (np == NULL)
++		return PCIBIOS_DEVICE_NOT_FOUND;
+ 	/*
+ 	 * When a device in K2 is powered down, we die on config
+ 	 * cycle accesses. Fix that here.
+@@ -565,6 +573,14 @@
+ 
+ 	init_p2pbridge();
+ 	fixup_nec_usb2();
++	
++	/* We are still having some issues with the Xserve G4, enabling
++	 * some offset between bus number and domains for now when we
++	 * assign all busses should help for now
++	 */
++	if (pci_assign_all_busses)
++		pcibios_assign_bus_offset = 0x10;
++
+ #ifdef CONFIG_POWER4 
+ 	/* There is something wrong with DMA on U3/HT. I haven't figured out
+ 	 * the details yet, but if I set the cache line size to 128 bytes like
+@@ -707,7 +723,7 @@
+ 	 * properties or figuring out the U3 address space decoding logic and
+ 	 * then read its configuration register (if any).
+ 	 */
+-	hose->io_base_phys = 0xf4000000 + 0x00400000;
++	hose->io_base_phys = 0xf4000000;
+ 	hose->io_base_virt = ioremap(hose->io_base_phys, 0x00400000);
+ 	isa_io_base = (unsigned long) hose->io_base_virt;
+ 	hose->io_resource.name = np->full_name;

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-pegasos-2.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-pegasos-2.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-pegasos-2.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,312 @@
+#! /bin/sh -e 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Add Pegasos 1 and 2 support.
+## DP: Patch author: Sven Luther <luther at debian.org>
+## DP: Upstream status: submitted and approved.
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -urN kernel-source-2.6.8.orig/arch/ppc/kernel/ppc_ksyms.c kernel-source-2.6.8/arch/ppc/kernel/ppc_ksyms.c
+--- kernel-source-2.6.8.orig/arch/ppc/kernel/ppc_ksyms.c	2004-08-14 07:37:41.000000000 +0200
++++ kernel-source-2.6.8/arch/ppc/kernel/ppc_ksyms.c	2004-12-26 11:50:48.234758552 +0100
+@@ -96,6 +96,9 @@
+ EXPORT_SYMBOL(_prep_type);
+ EXPORT_SYMBOL(ucSystemType);
+ #endif
++#if defined(CONFIG_PPC_MULTIPLATFORM)
++EXPORT_SYMBOL(_chrp_type);
++#endif
+ 
+ #if !defined(__INLINE_BITOPS)
+ EXPORT_SYMBOL(set_bit);
+diff -urN kernel-source-2.6.8.orig/arch/ppc/platforms/chrp_pci.c kernel-source-2.6.8/arch/ppc/platforms/chrp_pci.c
+--- kernel-source-2.6.8.orig/arch/ppc/platforms/chrp_pci.c	2004-12-26 12:03:07.438382520 +0100
++++ kernel-source-2.6.8/arch/ppc/platforms/chrp_pci.c	2004-12-26 12:02:26.819557520 +0100
+@@ -97,8 +97,9 @@
+ rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
+ 		 int len, u32 *val)
+ {
++	struct pci_controller *hose = bus->sysdata;
+ 	unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
+-		| ((bus->number & 0xff) << 16);
++		| (((bus->number - hose->first_busno) & 0xff) << 16) | (pci_domain_nr(bus) << 24);
+         unsigned long ret = ~0UL;
+ 	int rval;
+ 
+@@ -111,8 +112,9 @@
+ rtas_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
+ 		  int len, u32 val)
+ {
++	struct pci_controller *hose = bus->sysdata;
+ 	unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
+-		| ((bus->number & 0xff) << 16);
++		| (((bus->number - hose->first_busno) & 0xff) << 16) | (pci_domain_nr(bus) << 24);
+ 	int rval;
+ 
+ 	rval = call_rtas("write-pci-config", 3, 1, NULL, addr, len, val);
+@@ -186,6 +188,26 @@
+ 	iounmap(reg);
+ }
+ 
++/* Marvell Discovery II based Pegasos 2 */
++//#define PEGASOS_USE_PCI_DOMAINS
++
++static void __init
++setup_peg2(struct pci_controller *hose, struct device_node *dev)
++{
++	struct device_node *root = find_path_device("/");
++	struct device_node *rtas;
++
++	rtas = of_find_node_by_name (root, "rtas");
++	if (rtas) {
++		hose->ops = &rtas_pci_ops;
++	} else {
++		printk ("RTAS supporting Pegasos OF not found, please upgrade your firmware\n");
++	}
++#ifndef PEGASOS_USE_PCI_DOMAINS
++	pci_assign_all_busses = 1;
++#endif
++}
++
+ void __init
+ chrp_find_bridges(void)
+ {
+@@ -195,7 +217,7 @@
+ 	struct pci_controller *hose;
+ 	unsigned int *dma;
+ 	char *model, *machine;
+-	int is_longtrail = 0, is_mot = 0;
++	int is_longtrail = 0, is_mot = 0, is_pegasos = 0;
+ 	struct device_node *root = find_path_device("/");
+ 
+ 	/*
+@@ -207,6 +229,8 @@
+ 	if (machine != NULL) {
+ 		is_longtrail = strncmp(machine, "IBM,LongTrail", 13) == 0;
+ 		is_mot = strncmp(machine, "MOT", 3) == 0;
++		if (strncmp(machine, "Pegasos2", 8) == 0) is_pegasos = 2;
++		else if (strncmp(machine, "Pegasos", 7) == 0) is_pegasos = 1;
+ 	}
+ 	for (dev = root->child; dev != NULL; dev = dev->sibling) {
+ 		if (dev->type == NULL || strcmp(dev->type, "pci") != 0)
+@@ -257,6 +281,10 @@
+ 			hose->cfg_data = (unsigned char *)
+ 				ioremap(GG2_PCI_CONFIG_BASE, 0x80000);
+ 			gg2_pci_config_base = (unsigned long) hose->cfg_data;
++		} else if (is_pegasos == 1) {
++			setup_indirect_pci(hose, 0xfec00cf8, 0xfee00cfc);
++		} else if (is_pegasos == 2) {
++			setup_peg2(hose, dev);
+ 		} else {
+ 			printk("No methods for %s (model %s), using RTAS\n",
+ 			       dev->full_name, model);
+@@ -274,6 +302,9 @@
+ 			printk("pci_dram_offset = %lx\n", pci_dram_offset);
+ 		}
+ 	}
+-
+-	ppc_md.pcibios_fixup = chrp_pcibios_fixup;
++	
++	if (is_pegasos)
++		ppc_md.pcibios_fixup = NULL;
++	else
++		ppc_md.pcibios_fixup = chrp_pcibios_fixup;
+ }
+diff -urN kernel-source-2.6.8.orig/arch/ppc/platforms/chrp_setup.c kernel-source-2.6.8/arch/ppc/platforms/chrp_setup.c
+--- kernel-source-2.6.8.orig/arch/ppc/platforms/chrp_setup.c	2004-12-26 12:03:07.440382216 +0100
++++ kernel-source-2.6.8/arch/ppc/platforms/chrp_setup.c	2004-12-26 12:01:39.050819472 +0100
+@@ -68,6 +68,8 @@
+ extern unsigned long pmac_find_end_of_memory(void);
+ extern int of_show_percpuinfo(struct seq_file *, int);
+ 
++int _chrp_type;
++
+ /*
+  * XXX this should be in xmon.h, but putting it there means xmon.h
+  * has to include <linux/interrupt.h> (to get irqreturn_t), which
+@@ -214,6 +216,36 @@
+ 	}
+ }
+ 
++void pegasos_set_l2cr(void)
++{
++	struct device_node *root = find_path_device("/");
++	char *machine;
++	struct device_node *np;
++
++	/* On Pegasos, enable the l2 cache if needed, as the OF forgets it */
++	if (root == NULL)
++		return;
++	machine = get_property(root, "model", NULL);
++	if (machine == NULL)
++		return;
++	if (_chrp_type == _CHRP_Pegasos) {
++		/* Enable L2 cache if needed */
++		np = find_type_devices("cpu");
++		if (np != NULL) {
++			unsigned int *l2cr = (unsigned int *)
++				get_property (np, "l2cr", NULL);
++			if (l2cr == NULL) {
++				printk ("Pegasos l2cr : no cpu l2cr property found\n");
++				return;
++			}
++			if (!((*l2cr) & 0x80000000)) {
++				printk ("Pegasos l2cr : L2 cache was not active, activating\n");
++				_set_L2CR(0);
++				_set_L2CR((*l2cr) | 0x80000000);
++			}
++		}
++	}
++}
+ 
+ void __init
+ chrp_setup_arch(void)
+@@ -236,6 +268,9 @@
+ 	/* Lookup PCI host bridges */
+ 	chrp_find_bridges();
+ 
++	/* On pegasos, enable the L2 cache if not already done by OF */
++	pegasos_set_l2cr();
++
+ #ifndef CONFIG_PPC64BRIDGE
+ 	/*
+ 	 *  Temporary fixes for PCI devices.
+@@ -400,16 +435,19 @@
+ 	if (np == NULL)
+ 		printk(KERN_ERR "Cannot find PCI interrupt acknowledge address\n");
+ 
+-	chrp_find_openpic();
+-
+-	prom_get_irq_senses(init_senses, NUM_8259_INTERRUPTS, NR_IRQS);
+-	OpenPIC_InitSenses = init_senses;
+-	OpenPIC_NumInitSenses = NR_IRQS - NUM_8259_INTERRUPTS;
+-
+-	openpic_init(NUM_8259_INTERRUPTS);
+-	/* We have a cascade on OpenPIC IRQ 0, Linux IRQ 16 */
+-	openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
++	/* Pegasos doesn't have openpic */
++	if (_chrp_type != _CHRP_Pegasos) {
++		chrp_find_openpic();
++
++		prom_get_irq_senses(init_senses, NUM_8259_INTERRUPTS, NR_IRQS);
++		OpenPIC_InitSenses = init_senses;
++		OpenPIC_NumInitSenses = NR_IRQS - NUM_8259_INTERRUPTS;
++
++		openpic_init(NUM_8259_INTERRUPTS);
++		/* We have a cascade on OpenPIC IRQ 0, Linux IRQ 16 */
++		openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
+ 			       i8259_irq);
++	}
+ 
+ 	for (i = 0; i < NUM_8259_INTERRUPTS; i++)
+ 		irq_desc[i].handler = &i8259_pic;
+@@ -450,6 +488,8 @@
+ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
+ 	  unsigned long r6, unsigned long r7)
+ {
++	struct device_node *root = find_path_device ("/");
++	char *machine;
+ #ifdef CONFIG_BLK_DEV_INITRD
+ 	/* take care of initrd if we have one */
+ 	if ( r6 )
+@@ -464,12 +504,27 @@
+ 	DMA_MODE_WRITE = 0x48;
+ 	isa_io_base = CHRP_ISA_IO_BASE;		/* default value */
+ 
++	machine = get_property(root, "model", NULL);
++	if (strncmp(machine, "Pegasos", 7) == 0) {
++		_chrp_type = _CHRP_Pegasos;
++	} else if (strncmp(machine, "IBM", 3) == 0) {
++		_chrp_type = _CHRP_IBM;
++	} else if (strncmp(machine, "MOT", 3) == 0) {
++		_chrp_type = _CHRP_Motorola;
++	} else {
++		/* Let's assume it is an IBM chrp if all else fails */
++		_chrp_type = _CHRP_IBM;
++	}
++	
+ 	ppc_md.setup_arch     = chrp_setup_arch;
+ 	ppc_md.show_percpuinfo = of_show_percpuinfo;
+ 	ppc_md.show_cpuinfo   = chrp_show_cpuinfo;
+ 	ppc_md.irq_canonicalize = chrp_irq_canonicalize;
+ 	ppc_md.init_IRQ       = chrp_init_IRQ;
+-	ppc_md.get_irq        = openpic_get_irq;
++	if (_chrp_type == _CHRP_Pegasos)
++		ppc_md.get_irq        = i8259_irq;
++	else
++		ppc_md.get_irq        = openpic_get_irq;
+ 
+ 	ppc_md.init           = chrp_init2;
+ 
+diff -urN kernel-source-2.6.8.orig/arch/ppc/platforms/chrp_time.c kernel-source-2.6.8/arch/ppc/platforms/chrp_time.c
+--- kernel-source-2.6.8.orig/arch/ppc/platforms/chrp_time.c	2004-12-26 12:03:07.552365192 +0100
++++ kernel-source-2.6.8/arch/ppc/platforms/chrp_time.c	2004-11-24 22:47:24.000000000 +0100
+@@ -41,6 +41,8 @@
+ 	int base;
+ 
+ 	rtcs = find_compatible_devices("rtc", "pnpPNP,b00");
++	if (rtcs == NULL)
++		rtcs = find_compatible_devices("rtc", "ds1385-rtc");
+ 	if (rtcs == NULL || rtcs->addrs == NULL)
+ 		return 0;
+ 	base = rtcs->addrs[0].address;
+diff -urN kernel-source-2.6.8.orig/arch/ppc/syslib/prom_init.c kernel-source-2.6.8/arch/ppc/syslib/prom_init.c
+--- kernel-source-2.6.8.orig/arch/ppc/syslib/prom_init.c	2004-12-26 12:03:07.672346952 +0100
++++ kernel-source-2.6.8/arch/ppc/syslib/prom_init.c	2004-12-26 11:58:49.597580280 +0100
+@@ -794,6 +794,9 @@
+ 	char *p, *d;
+  	unsigned long phys;
+ 	void *result[3];
++	char model[32];
++	phandle node;
++	int rc;
+ 
+  	/* Default */
+  	phys = (unsigned long) &_stext;
+@@ -850,11 +853,20 @@
+ 
+ 	klimit = (char *) (mem - offset);
+ 
+-	/* If we are already running at 0xc0000000, we assume we were
+-	 * loaded by an OF bootloader which did set a BAT for us.
+-	 * This breaks OF translate so we force phys to be 0.
+-	 */
+-	if (offset == 0) {
++	node = call_prom("finddevice", 1, 1, "/");
++	rc = call_prom("getprop", 4, 1, node, "model", model, sizeof(model));
++	if (rc > 0 && !strncmp (model, "Pegasos", 7)
++		&& strncmp (model, "Pegasos2", 8)) {
++		/* Pegasos 1 has a broken translate method in the OF,
++		 * and furthermore the BATs are mapped 1:1 so the phys
++		 * address calculated above is correct, so let's use
++		 * it directly.
++		 */
++	} else if (offset == 0) {
++		/* If we are already running at 0xc0000000, we assume we were
++	 	 * loaded by an OF bootloader which did set a BAT for us.
++	 	 * This breaks OF translate so we force phys to be 0.
++	 	 */
+ 		prom_print("(already at 0xc0000000) phys=0\n");
+ 		phys = 0;
+ 	} else if ((int) call_prom("getprop", 4, 1, prom_chosen, "mmu",
+diff -urN kernel-source-2.6.8.orig/include/asm-ppc/processor.h kernel-source-2.6.8/include/asm-ppc/processor.h
+--- kernel-source-2.6.8.orig/include/asm-ppc/processor.h	2004-08-14 07:36:11.000000000 +0200
++++ kernel-source-2.6.8/include/asm-ppc/processor.h	2004-12-26 13:50:25.909586120 +0100
+@@ -34,6 +34,7 @@
+ /* these are arbitrary */
+ #define _CHRP_Motorola	0x04	/* motorola chrp, the cobra */
+ #define _CHRP_IBM	0x05	/* IBM chrp, the longtrail and longtrail 2 */
++#define _CHRP_Pegasos	0x06	/* Genesi/bplan's Pegasos and Pegasos2 */
+ 
+ #define _GLOBAL(n)\
+ 	.stabs __stringify(n:F-1),N_FUN,0,0,n;\
+@@ -54,6 +55,7 @@
+ 
+ /* what kind of prep workstation we are */
+ extern int _prep_type;
++extern int _chrp_type;
+ 
+ /*
+  * This is used to identify the board type from a given PReP board

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-pegasos-via82cxxx.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-pegasos-via82cxxx.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-pegasos-via82cxxx.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,37 @@
+#! /bin/sh -e 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Hacky workaround for the via-ide dual interrupt on pegasos hardware.
+## DP: Patch author: Sven Luther <luther at debian.org>
+## DP: Upstream status: hack moved from the kernel-patch-powerpc package.
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- kernel-source-2.6.8/drivers/ide/pci/via82cxxx.c.orig	2004-11-24 22:47:24.000000000 +0100
++++ kernel-source-2.6.8/drivers/ide/pci/via82cxxx.c	2004-12-26 12:10:06.900614568 +0100
+@@ -36,6 +36,10 @@
+ #include <linux/ide.h>
+ #include <asm/io.h>
+ 
++#ifdef CONFIG_PPC_MULTIPLATFORM
++#include <asm/processor.h>
++#endif
++
+ #include "ide-timing.h"
+ 
+ #define DISPLAY_VIA_TIMINGS
+@@ -584,6 +588,13 @@
+ 	hwif->tuneproc = &via82cxxx_tune_drive;
+ 	hwif->speedproc = &via_set_drive;
+ 
++
++#ifdef CONFIG_PPC_MULTIPLATFORM
++	if(_machine == _MACH_chrp && _chrp_type == _CHRP_Pegasos) {
++		hwif->irq = hwif->channel ? 15 : 14;
++	}
++#endif
++
+ 	for (i = 0; i < 2; i++) {
+ 		hwif->drives[i].io_32bit = 1;
+ 		hwif->drives[i].unmask = (via_config->flags & VIA_NO_UNMASK) ? 0 : 1;

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-pegasos.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-pegasos.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-pegasos.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,266 @@
+#! /bin/sh -e 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Add Pegasos 1 and 2 support.
+## DP: Patch author: Sven Luther <luther at debian.org>
+## DP: Upstream status: submitted and approved.
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -ur kernel-source-2.6.7.orig/arch/ppc/platforms/chrp_pci.c kernel-source-2.6.7.peg2/arch/ppc/platforms/chrp_pci.c
+--- kernel-source-2.6.7.orig/arch/ppc/platforms/chrp_pci.c	2004-06-16 07:20:26.000000000 +0200
++++ kernel-source-2.6.7.peg2/arch/ppc/platforms/chrp_pci.c	2004-06-29 18:10:43.000000000 +0200
+@@ -97,8 +97,9 @@
+ rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
+ 		 int len, u32 *val)
+ {
++	struct pci_controller *hose = bus->sysdata;
+ 	unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
+-		| ((bus->number & 0xff) << 16);
++		| (((bus->number - hose->first_busno) & 0xff) << 16) | (pci_domain_nr(bus) << 24);
+         unsigned long ret = ~0UL;
+ 	int rval;
+ 
+@@ -111,8 +112,9 @@
+ rtas_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
+ 		  int len, u32 val)
+ {
++	struct pci_controller *hose = bus->sysdata;
+ 	unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
+-		| ((bus->number & 0xff) << 16);
++		| (((bus->number - hose->first_busno) & 0xff) << 16) | (pci_domain_nr(bus) << 24);
+ 	int rval;
+ 
+ 	rval = call_rtas("write-pci-config", 3, 1, NULL, addr, len, val);
+@@ -186,6 +188,26 @@
+ 	iounmap(reg);
+ }
+ 
++/* Marvell Discovery II based Pegasos 2 */
++//#define PEGASOS_USE_PCI_DOMAINS
++
++static void __init
++setup_peg2(struct pci_controller *hose, struct device_node *dev)
++{
++	struct device_node *root = find_path_device("/");
++	struct device_node *rtas;
++
++	rtas = of_find_node_by_name (root, "rtas");
++	if (rtas) {
++		hose->ops = &rtas_pci_ops;
++	} else {
++		printk ("RTAS supporting Pegasos OF not found, please upgrade your firmware\n");
++	}
++#ifndef PEGASOS_USE_PCI_DOMAINS
++	pci_assign_all_busses = 1;
++#endif
++}
++
+ void __init
+ chrp_find_bridges(void)
+ {
+@@ -195,7 +217,7 @@
+ 	struct pci_controller *hose;
+ 	unsigned int *dma;
+ 	char *model, *machine;
+-	int is_longtrail = 0, is_mot = 0;
++	int is_longtrail = 0, is_mot = 0, is_pegasos = 0;
+ 	struct device_node *root = find_path_device("/");
+ 
+ 	/*
+@@ -207,6 +229,8 @@
+ 	if (machine != NULL) {
+ 		is_longtrail = strncmp(machine, "IBM,LongTrail", 13) == 0;
+ 		is_mot = strncmp(machine, "MOT", 3) == 0;
++		if (strncmp(machine, "Pegasos2", 8) == 0) is_pegasos = 2;
++		else if (strncmp(machine, "Pegasos", 7) == 0) is_pegasos = 1;
+ 	}
+ 	for (dev = root->child; dev != NULL; dev = dev->sibling) {
+ 		if (dev->type == NULL || strcmp(dev->type, "pci") != 0)
+@@ -257,6 +281,10 @@
+ 			hose->cfg_data = (unsigned char *)
+ 				ioremap(GG2_PCI_CONFIG_BASE, 0x80000);
+ 			gg2_pci_config_base = (unsigned long) hose->cfg_data;
++		} else if (is_pegasos == 1) {
++			setup_indirect_pci(hose, 0xfec00cf8, 0xfee00cfc);
++		} else if (is_pegasos == 2) {
++			setup_peg2(hose, dev);
+ 		} else {
+ 			printk("No methods for %s (model %s), using RTAS\n",
+ 			       dev->full_name, model);
+@@ -274,6 +302,9 @@
+ 			printk("pci_dram_offset = %lx\n", pci_dram_offset);
+ 		}
+ 	}
+-
+-	ppc_md.pcibios_fixup = chrp_pcibios_fixup;
++	
++	if (is_pegasos)
++		ppc_md.pcibios_fixup = NULL;
++	else
++		ppc_md.pcibios_fixup = chrp_pcibios_fixup;
+ }
+diff -ur kernel-source-2.6.7.orig/arch/ppc/platforms/chrp_setup.c kernel-source-2.6.7.peg2/arch/ppc/platforms/chrp_setup.c
+--- kernel-source-2.6.7.orig/arch/ppc/platforms/chrp_setup.c	2004-06-16 07:19:52.000000000 +0200
++++ kernel-source-2.6.7.peg2/arch/ppc/platforms/chrp_setup.c	2004-06-29 18:10:44.000000000 +0200
+@@ -214,6 +214,37 @@
+ 	}
+ }
+ 
++void pegasos_set_l2cr(void)
++{
++	struct device_node *root = find_path_device("/");
++	char *machine;
++	struct device_node *np;
++	int l2cr_value;
++
++	/* On Pegasos, enable the l2 cache if needed, as the OF forgets it */
++	if (root == NULL)
++		return;
++	machine = get_property(root, "model", NULL);
++	if (machine == NULL)
++		return;
++	if (strncmp(machine, "Pegasos", 7) == 0) {
++		/* Enable L2 cache if needed */
++		np = find_type_devices("cpu");
++		if (np != NULL) {
++			unsigned int *l2cr = (unsigned int *)
++				get_property (np, "l2cr", NULL);
++			if (l2cr == NULL) {
++				printk ("Pegasos l2cr : no cpu l2cr property found\n");
++				return;
++			}
++			if (!((*l2cr) & 0x80000000)) {
++				printk ("Pegasos l2cr : L2 cache was not active, activating\n");
++				_set_L2CR(0);
++				_set_L2CR((*l2cr) | 0x80000000);
++			}
++		}
++	}
++}
+ 
+ void __init
+ chrp_setup_arch(void)
+@@ -236,6 +267,9 @@
+ 	/* Lookup PCI host bridges */
+ 	chrp_find_bridges();
+ 
++	/* On pegasos, enable the L2 cache if not already done by OF */
++	pegasos_set_l2cr();
++
+ #ifndef CONFIG_PPC64BRIDGE
+ 	/*
+ 	 *  Temporary fixes for PCI devices.
+@@ -387,6 +421,8 @@
+ #if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(XMON)
+ 	struct device_node *kbd;
+ #endif
++	struct device_node *root = find_path_device ("/");
++	char *machine;
+ 
+ 	for (np = find_devices("pci"); np != NULL; np = np->next) {
+ 		unsigned int *addrp = (unsigned int *)
+@@ -400,16 +436,20 @@
+ 	if (np == NULL)
+ 		printk(KERN_ERR "Cannot find PCI interrupt acknowledge address\n");
+ 
+-	chrp_find_openpic();
+-
+-	prom_get_irq_senses(init_senses, NUM_8259_INTERRUPTS, NR_IRQS);
+-	OpenPIC_InitSenses = init_senses;
+-	OpenPIC_NumInitSenses = NR_IRQS - NUM_8259_INTERRUPTS;
+-
+-	openpic_init(NUM_8259_INTERRUPTS);
+-	/* We have a cascade on OpenPIC IRQ 0, Linux IRQ 16 */
+-	openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
++	/* Pegasos doesn't have openpic */
++	machine = get_property(root, "model", NULL);
++	if (strncmp(machine, "Pegasos", 7) != 0) {
++		chrp_find_openpic();
++
++		prom_get_irq_senses(init_senses, NUM_8259_INTERRUPTS, NR_IRQS);
++		OpenPIC_InitSenses = init_senses;
++		OpenPIC_NumInitSenses = NR_IRQS - NUM_8259_INTERRUPTS;
++
++		openpic_init(NUM_8259_INTERRUPTS);
++		/* We have a cascade on OpenPIC IRQ 0, Linux IRQ 16 */
++		openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
+ 			       i8259_irq);
++	}
+ 
+ 	for (i = 0; i < NUM_8259_INTERRUPTS; i++)
+ 		irq_desc[i].handler = &i8259_pic;
+@@ -450,6 +490,8 @@
+ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
+ 	  unsigned long r6, unsigned long r7)
+ {
++	struct device_node *root = find_path_device ("/");
++	char *machine;
+ #ifdef CONFIG_BLK_DEV_INITRD
+ 	/* take care of initrd if we have one */
+ 	if ( r6 )
+@@ -469,7 +511,11 @@
+ 	ppc_md.show_cpuinfo   = chrp_show_cpuinfo;
+ 	ppc_md.irq_canonicalize = chrp_irq_canonicalize;
+ 	ppc_md.init_IRQ       = chrp_init_IRQ;
+-	ppc_md.get_irq        = openpic_get_irq;
++	machine = get_property(root, "model", NULL);
++	if (strncmp(machine, "Pegasos", 7) == 0)
++		ppc_md.get_irq        = i8259_irq;
++	else
++		ppc_md.get_irq        = openpic_get_irq;
+ 
+ 	ppc_md.init           = chrp_init2;
+ 
+diff -ur kernel-source-2.6.7.orig/arch/ppc/platforms/chrp_time.c kernel-source-2.6.7.peg2/arch/ppc/platforms/chrp_time.c
+--- kernel-source-2.6.7.orig/arch/ppc/platforms/chrp_time.c	2004-06-16 07:18:57.000000000 +0200
++++ kernel-source-2.6.7.peg2/arch/ppc/platforms/chrp_time.c	2004-06-29 18:10:44.000000000 +0200
+@@ -41,6 +41,8 @@
+ 	int base;
+ 
+ 	rtcs = find_compatible_devices("rtc", "pnpPNP,b00");
++	if (rtcs == NULL)
++		rtcs = find_compatible_devices("rtc", "ds1385-rtc");
+ 	if (rtcs == NULL || rtcs->addrs == NULL)
+ 		return 0;
+ 	base = rtcs->addrs[0].address;
+diff -ur kernel-source-2.6.7.orig/arch/ppc/syslib/prom_init.c kernel-source-2.6.7.peg2/arch/ppc/syslib/prom_init.c
+--- kernel-source-2.6.7.orig/arch/ppc/syslib/prom_init.c	2004-06-16 07:20:24.000000000 +0200
++++ kernel-source-2.6.7.peg2/arch/ppc/syslib/prom_init.c	2004-06-30 07:51:49.975232432 +0200
+@@ -794,6 +794,9 @@
+ 	char *p, *d;
+  	unsigned long phys;
+ 	void *result[3];
++	char model[32];
++	phandle node;
++	int rc;
+ 
+  	/* Default */
+  	phys = (unsigned long) &_stext;
+@@ -850,11 +853,20 @@
+ 
+ 	klimit = (char *) (mem - offset);
+ 
+-	/* If we are already running at 0xc0000000, we assume we were
+-	 * loaded by an OF bootloader which did set a BAT for us.
+-	 * This breaks OF translate so we force phys to be 0.
+-	 */
+-	if (offset == 0) {
++	node = call_prom("finddevice", 1, 1, "/");
++	rc = call_prom("getprop", 4, 1, node, "model", model, sizeof(model));
++	if (rc > 0 && !strncmp (model, "Pegasos", 7)
++		&& strncmp (model, "Pegasos2", 8)) {
++		/* Pegasos 1 has a broken translate method in the OF,
++		 * and furthermore the BATs are mapped 1:1 so the phys
++		 * address calculated above is correct, so let's use
++		 * it directly.
++		 */
++	} else if (offset == 0) {
++		/* If we are already running at 0xc0000000, we assume we were
++	 	* loaded by an OF bootloader which did set a BAT for us.
++	 	* This breaks OF translate so we force phys to be 0.
++	 	*/
+ 		prom_print("(already at 0xc0000000) phys=0\n");
+ 		phys = 0;
+ 	} else if ((int) call_prom("getprop", 4, 1, prom_chosen, "mmu",

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-prep-powerstack-irq.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-prep-powerstack-irq.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-prep-powerstack-irq.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,27 @@
+--- kernel-source-2.6.8.orig/arch/ppc/platforms/prep_pci.c	2004-12-28 08:24:07.000000000 +0100
++++ kernel-source-2.6.8/arch/ppc/platforms/prep_pci.c	2005-01-03 11:15:30.604274816 +0100ll lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix PReP - motorola powerstack II utah pci irq mapping.
+## DP: Patch author: Tom Rini <trini at kernel.crashing.org>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+@@ -115,13 +115,13 @@
+ static char Utah_pci_IRQ_map[23] __prepdata =
+ {
+         0,   /* Slot 0  - unused */
+-        0,   /* Slot 1  - unused */
++        4,   /* Slot 1  - IDE - SL82C105 */
+         5,   /* Slot 2  - SCSI - NCR825A  */
+         0,   /* Slot 3  - unused */
+-        1,   /* Slot 4  - Ethernet - DEC2114x */
++        3,   /* Slot 4  - Ethernet - DEC2114x */
+         0,   /* Slot 5  - unused */
+-        3,   /* Slot 6  - PCI Card slot #1 */
+-        4,   /* Slot 7  - PCI Card slot #2 */
++        2,   /* Slot 6  - PCI Card slot #1 */
++        3,   /* Slot 7  - PCI Card slot #2 */
+         5,   /* Slot 8  - PCI Card slot #3 */
+         5,   /* Slot 9  - PCI Bridge */
+              /* added here in case we ever support PCI bridges */

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-serial.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-serial.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/powerpc-serial.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,51 @@
+#! /bin/sh -e 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Disables legacy serial driver on powermacs.
+## DP: Patch author: Sven Luther <luther at debian.org> 
+## DP: Patch author: adapted from the SuSE kernel tree.
+## DP: Upstream status: workaround hack waiting for a clean legacy device solution.
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- linux-2.6.0-test11.orig/drivers/serial/8250.c	2003-11-26 20:42:55.000000000 +0000
++++ linux-2.6.0-test11.SuSE/drivers/serial/8250.c	2003-11-29 15:57:50.000000000 +0000
+@@ -43,6 +43,10 @@
+ #include <linux/serial_core.h>
+ #include "8250.h"
+ 
++#ifdef CONFIG_PPC_MULTIPLATFORM
++#include <asm/processor.h>
++#endif
++
+ /*
+  * Configuration:
+  *   share_irqs - whether we pass SA_SHIRQ to request_irq().  This option
+@@ -2026,6 +2030,12 @@ static struct console serial8250_console
+ 
+ static int __init serial8250_console_init(void)
+ {
++#ifdef CONFIG_PPC_MULTIPLATFORM
++	if(_machine == _MACH_Pmac) {
++		printk("%s: nothing to do on PowerMac\n",__FUNCTION__);
++		return -ENODEV;
++	}
++#endif
+ 	serial8250_isa_init_ports();
+ 	register_console(&serial8250_console);
+ 	return 0;
+@@ -2175,6 +2185,12 @@ static int __init serial8250_init(void)
+ {
+ 	int ret, i;
+ 
++#ifdef CONFIG_PPC_MULTIPLATFORM
++	if(_machine == _MACH_Pmac) {
++		printk("%s: nothing to do on PowerMac\n",__FUNCTION__);
++		return -ENODEV;
++	}
++#endif
+ 	printk(KERN_INFO "Serial: 8250/16550 driver $Revision: 1.90 $ "
+ 		"%d ports, IRQ sharing %sabled\n", (int) UART_NR,
+ 		share_irqs ? "en" : "dis");
+

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ppc-boot-isa.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ppc-boot-isa.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ppc-boot-isa.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,226 @@
+#! /bin/sh -e 
+## ppc-boot-isa.dpatch by Hollis Blanchard <hollis at ambient.ltc.austin.ibm.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix VGA console on PReP systems
+## DP: Patch author: Hollis Blanchard <hollis at ambient.ltc.austin.ibm.com>
+## DP: Upstream status: backport from 2.6.9-rc2
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated patch for the following project:
+# Project Name: Linux kernel tree
+# This patch format is intended for GNU patch command version 2.5 or higher.
+# This patch includes the following deltas:
+#	           ChangeSet	1.1865  -> 1.1867 
+#	arch/ppc/boot/simple/Makefile	1.32    -> 1.33   
+#	arch/ppc/boot/simple/misc-prep.c	1.1     -> 1.2    
+#	arch/ppc/boot/include/nonstdio.h	1.5     -> 1.6    
+#	arch/ppc/boot/simple/legacy.S	1.2     ->         (deleted)      
+#	arch/ppc/boot/common/misc-common.c	1.13    -> 1.14   
+#	arch/ppc/boot/simple/misc.c	1.20    -> 1.21   
+#	arch/ppc/boot/simple/chrpmap.S	1.2     ->         (deleted)      
+#	arch/ppc/boot/common/serial_stub.c	1.1     -> 1.2    
+#	               (new)	        -> 1.3     arch/ppc/boot/simple/prepmap.c
+#	               (new)	        -> 1.3     arch/ppc/boot/simple/chrpmap.c
+#
+# The following is the BitKeeper ChangeSet Log
+# --------------------------------------------
+# 04/08/23	hollis at ambient.ltc.austin.ibm.com	1.1866
+# reorg the boot stuff a little to reflect the following:
+# - ISA_io doesn't need to be initialized with assembly
+# - serial_fixups() just initializes ISA_io, so should be renamed
+# - we must initialize ISA_io before calling vga_init() 
+# --------------------------------------------
+# 04/08/24	hollis at ambient.ltc.austin.ibm.com	1.1867
+# prepmap.c, chrpmap.c:
+#   abbreviate copyright and license
+# --------------------------------------------
+#
+diff -Nru a/arch/ppc/boot/common/misc-common.c b/arch/ppc/boot/common/misc-common.c
+--- a/arch/ppc/boot/common/misc-common.c	Tue Aug 24 12:37:26 2004
++++ b/arch/ppc/boot/common/misc-common.c	Tue Aug 24 12:37:26 2004
+@@ -526,6 +526,11 @@
+  * on others it's an offset from a given location. -- Tom
+  */
+ 
++void ISA_init(unsigned long base)
++{
++	ISA_io = (unsigned char *)base;
++}
++
+ void
+ outb(int port, unsigned char val)
+ {
+diff -Nru a/arch/ppc/boot/common/serial_stub.c b/arch/ppc/boot/common/serial_stub.c
+--- a/arch/ppc/boot/common/serial_stub.c	Tue Aug 24 12:37:26 2004
++++ b/arch/ppc/boot/common/serial_stub.c	Tue Aug 24 12:37:26 2004
+@@ -11,11 +11,6 @@
+  * is" without any warranty of any kind, whether express or implied.
+  */
+ 
+-void __attribute__ ((weak))
+-serial_fixups(void)
+-{
+-}
+-
+ unsigned long __attribute__ ((weak))
+ serial_init(int chan, void *ignored)
+ {
+diff -Nru a/arch/ppc/boot/include/nonstdio.h b/arch/ppc/boot/include/nonstdio.h
+--- a/arch/ppc/boot/include/nonstdio.h	Tue Aug 24 12:37:26 2004
++++ b/arch/ppc/boot/include/nonstdio.h	Tue Aug 24 12:37:26 2004
+@@ -30,3 +30,5 @@
+ extern void puts(const char *);
+ extern void udelay(long delay);
+ extern unsigned char inb(int port);
++extern void board_isa_init(void);
++extern void ISA_init(unsigned long base);
+diff -Nru a/arch/ppc/boot/simple/Makefile b/arch/ppc/boot/simple/Makefile
+--- a/arch/ppc/boot/simple/Makefile	Tue Aug 24 12:37:26 2004
++++ b/arch/ppc/boot/simple/Makefile	Tue Aug 24 12:37:26 2004
+@@ -73,7 +73,7 @@
+ zimageinitrd-$(CONFIG_GEMINI)		:= zImage.initrd-STRIPELF
+          end-$(CONFIG_GEMINI)		:= gemini
+ 
+-     extra.o-$(CONFIG_K2)		:= legacy.o
++     extra.o-$(CONFIG_K2)		:= prepmap.o
+          end-$(CONFIG_K2)		:= k2
+    cacheflag-$(CONFIG_K2)		:= -include $(clear_L2_L3)
+ 
+@@ -89,7 +89,7 @@
+          end-$(motorola)		:= pplus
+ 
+ # Overrides previous assingment
+-     extra.o-$(CONFIG_PPLUS)		:= legacy.o
++     extra.o-$(CONFIG_PPLUS)		:= prepmap.o
+      extra.o-$(CONFIG_LOPEC)		:= mpc10x_memory.o
+ 
+       zimage-$(pcore)			:= zImage-STRIPELF
+@@ -100,7 +100,7 @@
+ 
+       zimage-$(CONFIG_PPC_PREP)		:= zImage-PPLUS
+ zimageinitrd-$(CONFIG_PPC_PREP)		:= zImage.initrd-PPLUS
+-     extra.o-$(CONFIG_PPC_PREP)		:= legacy.o
++     extra.o-$(CONFIG_PPC_PREP)		:= prepmap.o
+         misc-$(CONFIG_PPC_PREP)		+= misc-prep.o mpc10x_memory.o
+          end-$(CONFIG_PPC_PREP)		:= prep
+ 
+diff -Nru a/arch/ppc/boot/simple/chrpmap.S b/arch/ppc/boot/simple/chrpmap.S
+--- a/arch/ppc/boot/simple/chrpmap.S	Tue Aug 24 12:37:26 2004
++++ /dev/null	Wed Dec 31 16:00:00 1969
+@@ -1,19 +0,0 @@
+-/*
+- * arch/ppc/boot/simple/chrpmap.S
+- *
+- * Author: Tom Rini <trini at mvista.com>
+- *
+- * This will go and setup ISA_io to 0xFE00000 and return.
+- */
+-
+-#include <asm/ppc_asm.h>
+-
+-	.text
+-
+-	.globl serial_fixups
+-serial_fixups:
+-	lis	r3,ISA_io at h	/* Load ISA_io */
+-	ori	r3,r3,ISA_io at l
+-	lis	r4,0xFE00	/* Load the value, 0xFE00000 */
+-	stw	r4,0(r3)	/* store */
+-	blr
+diff -Nru a/arch/ppc/boot/simple/chrpmap.c b/arch/ppc/boot/simple/chrpmap.c
+--- /dev/null	Wed Dec 31 16:00:00 1969
++++ b/arch/ppc/boot/simple/chrpmap.c	Tue Aug 24 12:37:26 2004
+@@ -0,0 +1,12 @@
++/*
++ * 2004 (C) IBM. This file is licensed under the terms of the GNU General
++ * Public License version 2. This program is licensed "as is" without any
++ * warranty of any kind, whether express or implied.
++ */
++
++#include <nonstdio.h>
++
++void board_isa_init(void)
++{
++	ISA_init(0xFE000000);
++}
+diff -Nru a/arch/ppc/boot/simple/legacy.S b/arch/ppc/boot/simple/legacy.S
+--- a/arch/ppc/boot/simple/legacy.S	Tue Aug 24 12:37:26 2004
++++ /dev/null	Wed Dec 31 16:00:00 1969
+@@ -1,19 +0,0 @@
+-/*
+- * arch/ppc/boot/simple/legacy.S
+- *
+- * Author: Tom Rini <trini at mvista.com>
+- *
+- * This will go and setup ISA_io to 0x8000000 and return.
+- */
+-
+-#include <asm/ppc_asm.h>
+-
+-	.text
+-
+-	.globl serial_fixups
+-serial_fixups:
+-	lis	r3,ISA_io at h	/* Load ISA_io */
+-	ori	r3,r3,ISA_io at l
+-	lis	r4,0x8000	/* Load the value, 0x8000000 */
+-	stw	r4,0(r3)	/* store */
+-	blr
+diff -Nru a/arch/ppc/boot/simple/misc-prep.c b/arch/ppc/boot/simple/misc-prep.c
+--- a/arch/ppc/boot/simple/misc-prep.c	Tue Aug 24 12:37:26 2004
++++ b/arch/ppc/boot/simple/misc-prep.c	Tue Aug 24 12:37:26 2004
+@@ -88,6 +88,7 @@
+ 		ofinit(OFW_interface);
+ 	}
+ 
++	board_isa_init();
+ #if defined(CONFIG_VGA_CONSOLE)
+ 	vga_init((unsigned char *)0xC0000000);
+ #endif /* CONFIG_VGA_CONSOLE */
+diff -Nru a/arch/ppc/boot/simple/misc.c b/arch/ppc/boot/simple/misc.c
+--- a/arch/ppc/boot/simple/misc.c	Tue Aug 24 12:37:26 2004
++++ b/arch/ppc/boot/simple/misc.c	Tue Aug 24 12:37:26 2004
+@@ -97,7 +97,6 @@
+ 	struct bi_record *rec;
+ 	unsigned long initrd_loc, TotalMemory = 0;
+ 
+-	serial_fixups();
+ #ifdef CONFIG_SERIAL_8250_CONSOLE
+ 	com_port = serial_init(0, NULL);
+ #endif
+@@ -268,10 +267,16 @@
+ 	return rec;
+ }
+ 
++void __attribute__ ((weak))
++board_isa_init(void)
++{
++}
++
+ /* Allow decompress_kernel to be hooked into.  This is the default. */
+ void * __attribute__ ((weak))
+ load_kernel(unsigned long load_addr, int num_words, unsigned long cksum,
+ 		void *ign1, void *ign2)
+ {
++		board_isa_init();
+ 		return decompress_kernel(load_addr, num_words, cksum);
+ }
+diff -Nru a/arch/ppc/boot/simple/prepmap.c b/arch/ppc/boot/simple/prepmap.c
+--- /dev/null	Wed Dec 31 16:00:00 1969
++++ b/arch/ppc/boot/simple/prepmap.c	Tue Aug 24 12:37:26 2004
+@@ -0,0 +1,12 @@
++/*
++ * 2004 (C) IBM. This file is licensed under the terms of the GNU General
++ * Public License version 2. This program is licensed "as is" without any
++ * warranty of any kind, whether express or implied.
++ */
++
++#include <nonstdio.h>
++
++void board_isa_init(void)
++{
++	ISA_init(0x80000000);
++}

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ptmx-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ptmx-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/ptmx-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,190 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Rewrite /dev/ptx open() handler to avoid leak
+## DP: Patch author: Al Viro <viro at parcelfarce.linux.theplanet.co.uk>
+## DP: Upstream status: submission pending
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -urN RC8-rc3-bk4-base/drivers/char/tty_io.c RC8-rc3-bk4-current/drivers/char/tty_io.c
+--- RC8-rc3-bk4-base/drivers/char/tty_io.c	2004-08-09 20:15:43.000000000 -0400
++++ RC8-rc3-bk4-current/drivers/char/tty_io.c	2004-08-10 04:31:44.893061904 -0400
+@@ -142,6 +142,7 @@
+ ssize_t redirected_tty_write(struct file *, const char __user *, size_t, loff_t *);
+ static unsigned int tty_poll(struct file *, poll_table *);
+ static int tty_open(struct inode *, struct file *);
++static int ptmx_open(struct inode *, struct file *);
+ static int tty_release(struct inode *, struct file *);
+ int tty_ioctl(struct inode * inode, struct file * file,
+ 	      unsigned int cmd, unsigned long arg);
+@@ -377,6 +378,19 @@
+ 	.fasync		= tty_fasync,
+ };
+ 
++#ifdef CONFIG_UNIX98_PTYS
++static struct file_operations ptmx_fops = {
++	.llseek		= no_llseek,
++	.read		= tty_read,
++	.write		= tty_write,
++	.poll		= tty_poll,
++	.ioctl		= tty_ioctl,
++	.open		= ptmx_open,
++	.release	= tty_release,
++	.fasync		= tty_fasync,
++};
++#endif
++
+ static struct file_operations console_fops = {
+ 	.llseek		= no_llseek,
+ 	.read		= tty_read,
+@@ -1358,53 +1372,13 @@
+ 		return -ENODEV;
+ 	}
+ 
+-#ifdef CONFIG_UNIX98_PTYS
+-	if (device == MKDEV(TTYAUX_MAJOR,2)) {
+-		int idr_ret;
+-
+-		/* find a device that is not in use. */
+-		down(&allocated_ptys_lock);
+-		if (!idr_pre_get(&allocated_ptys, GFP_KERNEL)) {
+-			up(&allocated_ptys_lock);
+-			return -ENOMEM;
+-		}
+-		idr_ret = idr_get_new(&allocated_ptys, NULL, &index);
+-		if (idr_ret < 0) {
+-			up(&allocated_ptys_lock);
+-			if (idr_ret == -EAGAIN)
+-				return -ENOMEM;
+-			return -EIO;
+-		}
+-		if (index >= pty_limit) {
+-			idr_remove(&allocated_ptys, index);
+-			up(&allocated_ptys_lock);
+-			return -EIO;
+-		}
+-		up(&allocated_ptys_lock);
+-
+-		driver = ptm_driver;
+-		retval = init_dev(driver, index, &tty);
+-		if (retval) {
+-			down(&allocated_ptys_lock);
+-			idr_remove(&allocated_ptys, index);
+-			up(&allocated_ptys_lock);
+-			return retval;
+-		}
+-
+-		set_bit(TTY_PTY_LOCK, &tty->flags); /* LOCK THE SLAVE */
+-		if (devpts_pty_new(tty->link))
+-			retval = -ENOMEM;
+-	} else
+-#endif
+-	{
+-		driver = get_tty_driver(device, &index);
+-		if (!driver)
+-			return -ENODEV;
++	driver = get_tty_driver(device, &index);
++	if (!driver)
++		return -ENODEV;
+ got_driver:
+-		retval = init_dev(driver, index, &tty);
+-		if (retval)
+-			return retval;
+-	}
++	retval = init_dev(driver, index, &tty);
++	if (retval)
++		return retval;
+ 
+ 	filp->private_data = tty;
+ 	file_move(filp, &tty->tty_files);
+@@ -1431,15 +1405,6 @@
+ 		printk(KERN_DEBUG "error %d in opening %s...", retval,
+ 		       tty->name);
+ #endif
+-
+-#ifdef CONFIG_UNIX98_PTYS
+-		if (index != -1) {
+-			down(&allocated_ptys_lock);
+-			idr_remove(&allocated_ptys, index);
+-			up(&allocated_ptys_lock);
+-		}
+-#endif
+-
+ 		release_dev(filp);
+ 		if (retval != -ERESTARTSYS)
+ 			return retval;
+@@ -1467,6 +1432,62 @@
+ 	return 0;
+ }
+ 
++#ifdef CONFIG_UNIX98_PTYS
++static int ptmx_open(struct inode * inode, struct file * filp)
++{
++	struct tty_struct *tty;
++	int retval;
++	int index;
++	int idr_ret;
++
++	nonseekable_open(inode, filp);
++
++	/* find a device that is not in use. */
++	down(&allocated_ptys_lock);
++	if (!idr_pre_get(&allocated_ptys, GFP_KERNEL)) {
++		up(&allocated_ptys_lock);
++		return -ENOMEM;
++	}
++	idr_ret = idr_get_new(&allocated_ptys, NULL, &index);
++	if (idr_ret < 0) {
++		up(&allocated_ptys_lock);
++		if (idr_ret == -EAGAIN)
++			return -ENOMEM;
++		return -EIO;
++	}
++	if (index >= pty_limit) {
++		idr_remove(&allocated_ptys, index);
++		up(&allocated_ptys_lock);
++		return -EIO;
++	}
++	up(&allocated_ptys_lock);
++
++	retval = init_dev(ptm_driver, index, &tty);
++	if (retval)
++		goto out;
++
++	set_bit(TTY_PTY_LOCK, &tty->flags); /* LOCK THE SLAVE */
++	filp->private_data = tty;
++	file_move(filp, &tty->tty_files);
++
++	retval = -ENOMEM;
++	if (devpts_pty_new(tty->link))
++		goto out1;
++
++	check_tty_count(tty, "tty_open");
++	retval = ptm_driver->open(tty, filp);
++	if (!retval)
++		return 0;
++out1:
++	release_dev(filp);
++out:
++	down(&allocated_ptys_lock);
++	idr_remove(&allocated_ptys, index);
++	up(&allocated_ptys_lock);
++	return retval;
++}
++#endif
++
+ static int tty_release(struct inode * inode, struct file * filp)
+ {
+ 	lock_kernel();
+@@ -2441,7 +2462,7 @@
+ 	class_simple_device_add(tty_class, MKDEV(TTYAUX_MAJOR, 1), NULL, "console");
+ 
+ #ifdef CONFIG_UNIX98_PTYS
+-	cdev_init(&ptmx_cdev, &tty_fops);
++	cdev_init(&ptmx_cdev, &ptmx_fops);
+ 	if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) ||
+ 	    register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0)
+ 		panic("Couldn't register /dev/ptmx driver\n");

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/qla1280-isp1040.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/qla1280-isp1040.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/qla1280-isp1040.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,3584 @@
+diff -Nur kernel-source-2.6.8-2.6.8.orig/drivers/scsi/Kconfig kernel-source-2.6.8-2.6.8/drivers/scsi/Kconfig
+--- kernel-source-2.6.8-2.6.8.orig/drivers/scsi/Kconfig	2004-08-14 05:37:41.000000000 +0000
++++ kernel-source-2.6.8-2.6.8/drivers/scsi/Kconfig	2005-01-08 14:40:16.000000000 +0000
+@@ -1221,7 +1221,7 @@
+ 	  module will be called qlogicfas.
+ 
+ config SCSI_QLOGIC_ISP
+-	tristate "Qlogic ISP SCSI support"
++	tristate "Qlogic ISP SCSI support (old driver)"
+ 	depends on PCI && SCSI
+ 	---help---
+ 	  This driver works for all QLogic PCI SCSI host adapters (IQ-PCI,
+@@ -1238,6 +1238,9 @@
+ 	  To compile this driver as a module, choose M here: the
+ 	  module will be called qlogicisp.
+ 
++	  These days the hardware is also supported by the more modern qla1280
++	  driver.  In doubt use that one instead of qlogicisp.
++
+ config SCSI_QLOGIC_FC
+ 	tristate "Qlogic ISP FC SCSI support"
+ 	depends on PCI && SCSI
+@@ -1256,14 +1259,22 @@
+ 	  qlogicfc driver. This is required on some platforms.
+ 
+ config SCSI_QLOGIC_1280
+-	tristate "Qlogic QLA 1280 SCSI support"
++	tristate "Qlogic QLA 1240/1x80/1x160 SCSI support"
+ 	depends on PCI && SCSI
+ 	help
+-	  Say Y if you have a QLogic ISP1x80/1x160 SCSI host adapter.
++	  Say Y if you have a QLogic ISP1240/1x80/1x160 SCSI host adapter.
+ 
+ 	  To compile this driver as a module, choose M here: the
+ 	  module will be called qla1280.
+ 
++config SCSI_QLOGIC_1280_1040
++	bool "Qlogic QLA 1020/1040 SCSI support"
++	depends on SCSI_QLOGIC_1280
++	help
++	  Say Y here if you have a QLogic ISP1020/1040 SCSI host adapter and
++	  do not want to use the old driver.  This option enables support in
++	  the qla1280 driver for those host adapters.
++
+ config SCSI_QLOGICPTI
+ 	tristate "PTI Qlogic, ISP Driver"
+ 	depends on SBUS && SCSI
+diff -Nur kernel-source-2.6.8-2.6.8.orig/drivers/scsi/ql1040_fw.h kernel-source-2.6.8-2.6.8/drivers/scsi/ql1040_fw.h
+--- kernel-source-2.6.8-2.6.8.orig/drivers/scsi/ql1040_fw.h	1970-01-01 00:00:00.000000000 +0000
++++ kernel-source-2.6.8-2.6.8/drivers/scsi/ql1040_fw.h	2005-01-08 14:39:38.000000000 +0000
+@@ -0,0 +1,2101 @@
++/**************************************************************************
++ *                  QLOGIC LINUX SOFTWARE
++ *
++ * Copyright (C) 2004 QLogic Corporation
++ * (www.qlogic.com)
++ *
++ * 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, or (at your option) any
++ * later version.
++ *
++ * This program 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.
++ *
++ *************************************************************************/
++
++/************************************************************************
++ *									*
++ * 	        --- ISP1040 Initiator/Target Firmware ---               *
++ *			    32 LUN Support				*
++ *									*
++ ************************************************************************
++ */
++
++/*
++ *	Firmware Version 7.65.00 (14:17 Jul 20, 1999)
++ */
++
++unsigned short risc_code_version = 7*1024+65;
++
++unsigned char firmware_version[] = {7,65,0};
++
++#define FW_VERSION_STRING "7.65.0"
++
++unsigned short risc_code_addr01 = 0x1000 ;
++
++unsigned short risc_code01[] = { 
++	0x0078, 0x103a, 0x0000, 0x4057, 0x0000, 0x2043, 0x4f50, 0x5952,
++	0x4947, 0x4854, 0x2031, 0x3939, 0x3520, 0x514c, 0x4f47, 0x4943,
++	0x2043, 0x4f52, 0x504f, 0x5241, 0x5449, 0x4f4e, 0x2049, 0x5350,
++	0x3130, 0x3230, 0x2049, 0x2f54, 0x2046, 0x6972, 0x6d77, 0x6172,
++	0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030, 0x372e, 0x3635,
++	0x2020, 0x2043, 0x7573, 0x746f, 0x6d65, 0x7220, 0x4e6f, 0x2e20,
++	0x3030, 0x2050, 0x726f, 0x6475, 0x6374, 0x204e, 0x6f2e, 0x2020,
++	0x3031, 0x2024, 0x2001, 0x04fd, 0x2004, 0xa082, 0x0005, 0x0048,
++	0x1045, 0x0038, 0x104b, 0x0078, 0x1047, 0x0028, 0x104b, 0x20b9,
++	0x1212, 0x0078, 0x104d, 0x20b9, 0x2222, 0x20c1, 0x0008, 0x2071,
++	0x0010, 0x70c3, 0x0004, 0x20c9, 0x77ff, 0x2089, 0x1186, 0x70c7,
++	0x4953, 0x70cb, 0x5020, 0x70cf, 0x2020, 0x70d3, 0x0007, 0x3f00,
++	0x70d6, 0x20c1, 0x0008, 0x2019, 0x0000, 0x2009, 0xfeff, 0x2100,
++	0x200b, 0xa5a5, 0xa1ec, 0x7fff, 0x2d64, 0x206b, 0x0a0a, 0xaddc,
++	0x3fff, 0x2b54, 0x205b, 0x5050, 0x2114, 0xa286, 0xa5a5, 0x0040,
++	0x10bf, 0xa386, 0x000f, 0x0040, 0x1085, 0x2c6a, 0x2a5a, 0x20c1,
++	0x0000, 0x2019, 0x000f, 0x0078, 0x1065, 0x2c6a, 0x2a5a, 0x20c1,
++	0x0008, 0x2009, 0x7fff, 0x2148, 0x2944, 0x204b, 0x0a0a, 0xa9bc,
++	0x3fff, 0x2734, 0x203b, 0x5050, 0x2114, 0xa286, 0x0a0a, 0x0040,
++	0x10a9, 0x284a, 0x263a, 0x20c1, 0x0004, 0x2009, 0x3fff, 0x2134,
++	0x200b, 0x5050, 0x2114, 0xa286, 0x5050, 0x0040, 0x10aa, 0x0078,
++	0x118e, 0x284a, 0x263a, 0x98c0, 0xa188, 0x1000, 0x212c, 0x200b,
++	0xa5a5, 0x2114, 0xa286, 0xa5a5, 0x0040, 0x10bc, 0x250a, 0xa18a,
++	0x1000, 0x98c1, 0x0078, 0x10c1, 0x250a, 0x0078, 0x10c1, 0x2c6a,
++	0x2a5a, 0x2130, 0xa18a, 0x0040, 0x2128, 0xa1a2, 0x5100, 0x8424,
++	0x8424, 0x8424, 0x8424, 0x8424, 0x8424, 0xa192, 0x7800, 0x2009,
++	0x0000, 0x2001, 0x0031, 0x1078, 0x1cba, 0x2218, 0x2079, 0x5100,
++	0x2fa0, 0x2408, 0x2011, 0x0000, 0x20a9, 0x0040, 0x42a4, 0x8109,
++	0x00c0, 0x10dc, 0x7ef2, 0x8528, 0x7de6, 0x7cea, 0x7bee, 0x7883,
++	0x0000, 0x2031, 0x0030, 0x78cf, 0x0101, 0x780b, 0x0002, 0x780f,
++	0x0002, 0x784f, 0x0003, 0x2069, 0x5140, 0x2001, 0x04fd, 0x2004,
++	0xa082, 0x0005, 0x0048, 0x1104, 0x0038, 0x1100, 0x0078, 0x1108,
++	0x681b, 0x003c, 0x0078, 0x110a, 0x00a8, 0x1108, 0x681b, 0x003c,
++	0x681b, 0x0028, 0x6807, 0x0007, 0x680b, 0x00fa, 0x680f, 0x0008,
++	0x6813, 0x0005, 0x6823, 0x0000, 0x6827, 0x0006, 0x6817, 0x0008,
++	0x682b, 0x0000, 0x681f, 0x0019, 0x2069, 0x5380, 0x2011, 0x0020,
++	0x2009, 0x0010, 0x680b, 0x080c, 0x680f, 0x0019, 0x6803, 0xfd00,
++	0x6807, 0x0018, 0x6a1a, 0x2d00, 0xa0e8, 0x0008, 0xa290, 0x0004,
++	0x8109, 0x00c0, 0x1122, 0x2069, 0x5400, 0x2009, 0x0002, 0x20a9,
++	0x0100, 0x6837, 0x0000, 0x680b, 0x0040, 0x7bf0, 0xa386, 0xfeff,
++	0x00c0, 0x1148, 0x6817, 0x0100, 0x681f, 0x0064, 0x0078, 0x114c,
++	0x6817, 0x0064, 0x681f, 0x0002, 0xade8, 0x0010, 0x0070, 0x1152,
++	0x0078, 0x1139, 0x8109, 0x00c0, 0x1137, 0x1078, 0x220a, 0x1078,
++	0x482c, 0x1078, 0x1963, 0x1078, 0x4d22, 0x3200, 0xa085, 0x000d,
++	0x2090, 0x70c3, 0x0000, 0x0090, 0x116c, 0x70c0, 0xa086, 0x0002,
++	0x00c0, 0x116c, 0x1078, 0x1284, 0x1078, 0x1196, 0x78cc, 0xa005,
++	0x00c0, 0x117a, 0x1078, 0x1ce3, 0x0010, 0x1180, 0x0068, 0x1180,
++	0x1078, 0x20e9, 0x0010, 0x1180, 0x0068, 0x1180, 0x1078, 0x1a48,
++	0x00e0, 0x116c, 0x1078, 0x4ba9, 0x0078, 0x116c, 0x118e, 0x1190,
++	0x240b, 0x240b, 0x48ad, 0x48ad, 0x240b, 0x240b, 0x0078, 0x118e,
++	0x0078, 0x1190, 0x0078, 0x1192, 0x0078, 0x1194, 0x0068, 0x1201,
++	0x2061, 0x0000, 0x6018, 0xa084, 0x0001, 0x00c0, 0x1201, 0x7814,
++	0xa005, 0x00c0, 0x11a7, 0x0010, 0x1202, 0x0078, 0x1201, 0x2009,
++	0x515b, 0x2104, 0xa005, 0x00c0, 0x1201, 0x2009, 0x5164, 0x200b,
++	0x0000, 0x7914, 0xa186, 0x0042, 0x00c0, 0x11cc, 0x7816, 0x2009,
++	0x5162, 0x2164, 0x200b, 0x0000, 0x6018, 0x70c6, 0x6014, 0x70ca,
++	0x611c, 0xa18c, 0xff00, 0x6020, 0xa084, 0x00ff, 0xa105, 0x70ce,
++	0x1078, 0x1948, 0x0078, 0x11ff, 0x7814, 0xa086, 0x0018, 0x00c0,
++	0x11d3, 0x1078, 0x165a, 0x7817, 0x0000, 0x2009, 0x5162, 0x2104,
++	0xa065, 0x0040, 0x11ef, 0x0c7e, 0x609c, 0x2060, 0x1078, 0x19b3,
++	0x0c7f, 0x609f, 0x0000, 0x1078, 0x1730, 0x2009, 0x000c, 0x6007,
++	0x0103, 0x1078, 0x1924, 0x00c0, 0x11fb, 0x1078, 0x1948, 0x2009,
++	0x5162, 0x200b, 0x0000, 0x2009, 0x515c, 0x2104, 0x200b, 0x0000,
++	0xa005, 0x0040, 0x11ff, 0x2001, 0x4005, 0x0078, 0x1286, 0x0078,
++	0x1284, 0x007c, 0x70c3, 0x0000, 0x70c7, 0x0000, 0x70cb, 0x0000,
++	0x70cf, 0x0000, 0x70c0, 0xa0bc, 0xffc0, 0x00c0, 0x1252, 0x2038,
++	0x0079, 0x1212, 0x1284, 0x12e5, 0x12a9, 0x12fe, 0x130d, 0x1313,
++	0x12a0, 0x1748, 0x1317, 0x1298, 0x12ad, 0x12af, 0x12b1, 0x12b3,
++	0x174d, 0x1298, 0x1329, 0x1360, 0x1672, 0x1742, 0x12b5, 0x1591,
++	0x15ad, 0x15c9, 0x15f4, 0x154a, 0x1558, 0x156c, 0x1580, 0x13df,
++	0x1298, 0x138d, 0x1393, 0x1398, 0x139d, 0x13a3, 0x13a8, 0x13ad,
++	0x13b2, 0x13b7, 0x13bb, 0x13d0, 0x13dc, 0x1298, 0x1298, 0x1298,
++	0x1298, 0x13eb, 0x13f4, 0x1403, 0x1429, 0x1433, 0x143a, 0x1480,
++	0x148f, 0x149e, 0x14b0, 0x152a, 0x153a, 0x1298, 0x1298, 0x1298,
++	0x1298, 0x153f, 0xa0bc, 0xffa0, 0x00c0, 0x1298, 0x2038, 0xa084,
++	0x001f, 0x0079, 0x125b, 0x1786, 0x1789, 0x1799, 0x1298, 0x1298,
++	0x18df, 0x18fc, 0x1298, 0x1298, 0x1298, 0x1900, 0x1908, 0x1298,
++	0x1298, 0x1298, 0x1298, 0x12db, 0x12f4, 0x131f, 0x1356, 0x1668,
++	0x1764, 0x1778, 0x1298, 0x1829, 0x190e, 0x18bb, 0x18c5, 0x18c9,
++	0x18d7, 0x1298, 0x1298, 0x72ca, 0x71c6, 0x2001, 0x4006, 0x0078,
++	0x1286, 0x73ce, 0x72ca, 0x71c6, 0x2001, 0x4000, 0x70c2, 0x0068,
++	0x1287, 0x2061, 0x0000, 0x601b, 0x0001, 0x2091, 0x5000, 0x00e0,
++	0x128f, 0x00e0, 0x1291, 0x0068, 0x1291, 0x2091, 0x4080, 0x007c,
++	0x70c3, 0x4001, 0x0078, 0x1287, 0x70c3, 0x4006, 0x0078, 0x1287,
++	0x2099, 0x0041, 0x20a1, 0x0041, 0x20a9, 0x0005, 0x53a3, 0x0078,
++	0x1284, 0x70c4, 0x70c3, 0x0004, 0x007a, 0x0078, 0x1284, 0x0078,
++	0x1284, 0x0078, 0x1284, 0x0078, 0x1284, 0x2091, 0x8000, 0x70c3,
++	0x0000, 0x70c7, 0x4953, 0x70cb, 0x5020, 0x70cf, 0x2020, 0x70d3,
++	0x0007, 0x3f00, 0x70d6, 0x2079, 0x0000, 0x781b, 0x0001, 0x2031,
++	0x0030, 0x2059, 0x1000, 0x2029, 0x0457, 0x2051, 0x0470, 0x2061,
++	0x0472, 0x20b9, 0xffff, 0x20c1, 0x0000, 0x2091, 0x5000, 0x2091,
++	0x4080, 0x0078, 0x0455, 0x1078, 0x1b53, 0x00c0, 0x129c, 0x75d8,
++	0x74dc, 0x75da, 0x74de, 0x0078, 0x12e8, 0x2029, 0x0000, 0x2520,
++	0x71d0, 0x73c8, 0x72cc, 0x70c4, 0x1078, 0x1a8d, 0x0040, 0x1284,
++	0x70c3, 0x4002, 0x0078, 0x1284, 0x1078, 0x1b53, 0x00c0, 0x129c,
++	0x75d8, 0x74dc, 0x75da, 0x74de, 0x0078, 0x1301, 0x2029, 0x0000,
++	0x2520, 0x71d0, 0x73c8, 0x72cc, 0x70c4, 0x1078, 0x1aed, 0x0040,
++	0x1284, 0x70c3, 0x4002, 0x0078, 0x1284, 0x71c4, 0x70c8, 0x2114,
++	0x200a, 0x0078, 0x1282, 0x71c4, 0x2114, 0x0078, 0x1282, 0x70c7,
++	0x0007, 0x70cb, 0x0041, 0x70cf, 0x0000, 0x0078, 0x1284, 0x1078,
++	0x1b53, 0x00c0, 0x129c, 0x75d8, 0x76dc, 0x75da, 0x76de, 0x0078,
++	0x132c, 0x2029, 0x0000, 0x2530, 0x70c4, 0x72c8, 0x73cc, 0x74d0,
++	0x70c6, 0x72ca, 0x73ce, 0x74d2, 0xa005, 0x0040, 0x1350, 0x8001,
++	0x7892, 0xa084, 0xfc00, 0x0040, 0x1345, 0x78cc, 0xa085, 0x0001,
++	0x78ce, 0x2001, 0x4005, 0x0078, 0x1286, 0x7a9a, 0x7b9e, 0x7da2,
++	0x7ea6, 0x7c96, 0x78cc, 0xa084, 0xfffc, 0x78ce, 0x0078, 0x1354,
++	0x78cc, 0xa085, 0x0001, 0x78ce, 0x0078, 0x1284, 0x1078, 0x1b53,
++	0x00c0, 0x129c, 0x75d8, 0x76dc, 0x75da, 0x76de, 0x0078, 0x1363,
++	0x2029, 0x0000, 0x2530, 0x70c4, 0x72c8, 0x73cc, 0x74d4, 0x70c6,
++	0x72ca, 0x73ce, 0x74d6, 0xa005, 0x0040, 0x1387, 0x8001, 0x78ae,
++	0xa084, 0xfc00, 0x0040, 0x137c, 0x78cc, 0xa085, 0x0100, 0x78ce,
++	0x2001, 0x4005, 0x0078, 0x1286, 0x7ab6, 0x7bba, 0x7dbe, 0x7ec2,
++	0x7cb2, 0x78cc, 0xa084, 0xfcff, 0x78ce, 0x0078, 0x138b, 0x78cc,
++	0xa085, 0x0100, 0x78ce, 0x0078, 0x1284, 0x2009, 0x5161, 0x210c,
++	0x7aec, 0x0078, 0x1282, 0x2009, 0x5141, 0x210c, 0x0078, 0x1283,
++	0x2009, 0x5142, 0x210c, 0x0078, 0x1283, 0x2061, 0x5140, 0x610c,
++	0x6210, 0x0078, 0x1282, 0x2009, 0x5145, 0x210c, 0x0078, 0x1283,
++	0x2009, 0x5146, 0x210c, 0x0078, 0x1283, 0x2009, 0x5148, 0x210c,
++	0x0078, 0x1283, 0x2009, 0x5149, 0x210c, 0x0078, 0x1283, 0x7908,
++	0x7a0c, 0x0078, 0x1282, 0x71c4, 0x8107, 0xa084, 0x000f, 0x8003,
++	0x8003, 0x8003, 0xa0e8, 0x5380, 0x6a00, 0x6804, 0xa084, 0x0008,
++	0x0040, 0x13cd, 0x6b08, 0x0078, 0x13ce, 0x6b0c, 0x0078, 0x1281,
++	0x77c4, 0x1078, 0x1973, 0x2091, 0x8000, 0x6b1c, 0x6a14, 0x2091,
++	0x8001, 0x2708, 0x0078, 0x1281, 0x794c, 0x0078, 0x1283, 0x77c4,
++	0x1078, 0x1973, 0x2091, 0x8000, 0x6908, 0x6a18, 0x6b10, 0x2091,
++	0x8001, 0x0078, 0x1281, 0x71c4, 0xa182, 0x0010, 0x00c8, 0x127c,
++	0x1078, 0x22e2, 0x0078, 0x1281, 0x71c4, 0xa182, 0x0010, 0x00c8,
++	0x127c, 0x2011, 0x5141, 0x2204, 0x007e, 0x2112, 0x1078, 0x229b,
++	0x017f, 0x0078, 0x1283, 0x71c4, 0x2011, 0x1421, 0x20a9, 0x0008,
++	0x2204, 0xa106, 0x0040, 0x1413, 0x8210, 0x0070, 0x1411, 0x0078,
++	0x1408, 0x0078, 0x127c, 0xa292, 0x1421, 0x027e, 0x2011, 0x5142,
++	0x2204, 0x2112, 0x017f, 0x007e, 0x1078, 0x22a7, 0x017f, 0x0078,
++	0x1283, 0x03e8, 0x00fa, 0x01f4, 0x02ee, 0x0064, 0x0019, 0x0032,
++	0x004b, 0x2061, 0x5140, 0x610c, 0x6210, 0x70c4, 0x600e, 0x70c8,
++	0x6012, 0x0078, 0x1282, 0x2061, 0x5140, 0x6114, 0x70c4, 0x6016,
++	0x0078, 0x1283, 0x2061, 0x5140, 0x71c4, 0x2011, 0x0004, 0x601f,
++	0x0019, 0x2019, 0x1212, 0xa186, 0x0028, 0x0040, 0x145b, 0x2011,
++	0x0005, 0x601f, 0x0019, 0x2019, 0x1212, 0xa186, 0x0032, 0x0040,
++	0x145b, 0x2011, 0x0006, 0x601f, 0x000c, 0x2019, 0x2222, 0xa186,
++	0x003c, 0x00c0, 0x127c, 0x6018, 0x007e, 0x611a, 0x7800, 0xa084,
++	0x0001, 0x00c0, 0x1476, 0x2001, 0x04fd, 0x2004, 0xa082, 0x0005,
++	0x0048, 0x146e, 0x0038, 0x1472, 0x0078, 0x1476, 0x0028, 0x1472,
++	0x0078, 0x1476, 0x2019, 0x2222, 0x0078, 0x1478, 0x2019, 0x1212,
++	0x23b8, 0x1078, 0x22b8, 0x1078, 0x4d22, 0x017f, 0x0078, 0x1283,
++	0x71c4, 0xa184, 0xffcf, 0x00c0, 0x127c, 0x2011, 0x5148, 0x2204,
++	0x2112, 0x007e, 0x1078, 0x22da, 0x017f, 0x0078, 0x1283, 0x71c4,
++	0xa182, 0x0010, 0x00c8, 0x127c, 0x2011, 0x5149, 0x2204, 0x007e,
++	0x2112, 0x1078, 0x22c9, 0x017f, 0x0078, 0x1283, 0x71c4, 0x72c8,
++	0xa184, 0xfffd, 0x00c0, 0x127b, 0xa284, 0xfffd, 0x00c0, 0x127b,
++	0x2100, 0x7908, 0x780a, 0x2200, 0x7a0c, 0x780e, 0x0078, 0x1282,
++	0x71c4, 0x8107, 0xa084, 0x000f, 0x8003, 0x8003, 0x8003, 0xa0e8,
++	0x5380, 0x2019, 0x0000, 0x72c8, 0xa284, 0x0080, 0x0040, 0x14c6,
++	0x6c14, 0x84ff, 0x00c0, 0x14c6, 0x6817, 0x0040, 0xa284, 0x0040,
++	0x0040, 0x14d0, 0x6c10, 0x84ff, 0x00c0, 0x14d0, 0x6813, 0x0001,
++	0x6800, 0x007e, 0xa226, 0x0040, 0x14f3, 0x6a02, 0xa484, 0x2000,
++	0x0040, 0x14dc, 0xa39d, 0x0010, 0xa484, 0x1000, 0x0040, 0x14e2,
++	0xa39d, 0x0008, 0xa484, 0x4000, 0x0040, 0x14f3, 0x810f, 0xa284,
++	0x4000, 0x0040, 0x14ef, 0x1078, 0x22fc, 0x0078, 0x14f3, 0x1078,
++	0x22ee, 0x0078, 0x14f3, 0x72cc, 0x6808, 0xa206, 0x0040, 0x1522,
++	0xa2a4, 0x00ff, 0x2061, 0x5140, 0x6118, 0xa186, 0x0028, 0x0040,
++	0x1509, 0xa186, 0x0032, 0x0040, 0x150f, 0xa186, 0x003c, 0x0040,
++	0x1515, 0xa482, 0x0064, 0x0048, 0x151f, 0x0078, 0x1519, 0xa482,
++	0x0050, 0x0048, 0x151f, 0x0078, 0x1519, 0xa482, 0x0043, 0x0048,
++	0x151f, 0x71c4, 0x71c6, 0x027f, 0x72ca, 0x0078, 0x127d, 0x6a0a,
++	0xa39d, 0x000a, 0x6804, 0xa305, 0x6806, 0x027f, 0x6b0c, 0x71c4,
++	0x0078, 0x1281, 0x77c4, 0x1078, 0x1973, 0x2091, 0x8000, 0x6a14,
++	0x6b1c, 0x2091, 0x8001, 0x70c8, 0x6816, 0x70cc, 0x681e, 0x2708,
++	0x0078, 0x1281, 0x70c4, 0x794c, 0x784e, 0x0078, 0x1283, 0x71c4,
++	0x72c8, 0x73cc, 0xa182, 0x0010, 0x00c8, 0x127c, 0x1078, 0x230a,
++	0x0078, 0x1281, 0x77c4, 0x1078, 0x1973, 0x2091, 0x8000, 0x6a08,
++	0xa295, 0x0002, 0x6a0a, 0x2091, 0x8001, 0x2708, 0x0078, 0x1282,
++	0x77c4, 0x1078, 0x1973, 0x2091, 0x8000, 0x6a08, 0xa294, 0xfff9,
++	0x6a0a, 0x6804, 0xa005, 0x0040, 0x1567, 0x1078, 0x21d2, 0x2091,
++	0x8001, 0x2708, 0x0078, 0x1282, 0x77c4, 0x1078, 0x1973, 0x2091,
++	0x8000, 0x6a08, 0xa295, 0x0004, 0x6a0a, 0x6804, 0xa005, 0x0040,
++	0x157b, 0x1078, 0x21d2, 0x2091, 0x8001, 0x2708, 0x0078, 0x1282,
++	0x77c4, 0x2041, 0x0001, 0x2049, 0x0005, 0x2051, 0x0020, 0x2091,
++	0x8000, 0x1078, 0x1980, 0x2091, 0x8001, 0x2708, 0x6a08, 0x0078,
++	0x1282, 0x77c4, 0x72c8, 0x73cc, 0x77c6, 0x72ca, 0x73ce, 0x1078,
++	0x19e1, 0x00c0, 0x15a9, 0x6818, 0xa005, 0x0040, 0x15a9, 0x2708,
++	0x1078, 0x231a, 0x00c0, 0x15a9, 0x7817, 0x0015, 0x2091, 0x8001,
++	0x007c, 0x2091, 0x8001, 0x0078, 0x1284, 0x77c4, 0x77c6, 0x2041,
++	0x0021, 0x2049, 0x0005, 0x2051, 0x0020, 0x2091, 0x8000, 0x1078,
++	0x1980, 0x2061, 0x5140, 0x606f, 0x0003, 0x6782, 0x6093, 0x000f,
++	0x6073, 0x0000, 0x7817, 0x0016, 0x1078, 0x21d2, 0x2091, 0x8001,
++	0x007c, 0x77c8, 0x77ca, 0x77c4, 0x77c6, 0xa7bc, 0xff00, 0x2091,
++	0x8000, 0x2061, 0x5140, 0x606f, 0x0002, 0x6073, 0x0000, 0x6782,
++	0x6093, 0x000f, 0x7817, 0x0017, 0x1078, 0x21d2, 0x2091, 0x8001,
++	0x2041, 0x0021, 0x2049, 0x0004, 0x2051, 0x0010, 0x2091, 0x8000,
++	0x1078, 0x1980, 0x70c8, 0x6836, 0x8738, 0xa784, 0x001f, 0x00c0,
++	0x15e8, 0x2091, 0x8001, 0x007c, 0x78cc, 0xa084, 0x0003, 0x00c0,
++	0x1618, 0x2039, 0x0000, 0x2041, 0x0021, 0x2049, 0x0004, 0x2051,
++	0x0008, 0x1078, 0x1973, 0x2091, 0x8000, 0x6808, 0xa80d, 0x690a,
++	0x2091, 0x8001, 0x8738, 0xa784, 0x001f, 0x00c0, 0x1601, 0xa7bc,
++	0xff00, 0x873f, 0x8738, 0x873f, 0xa784, 0x0f00, 0x00c0, 0x1601,
++	0x2091, 0x8000, 0x2069, 0x0100, 0x6830, 0xa084, 0x0040, 0x0040,
++	0x1641, 0x684b, 0x0004, 0x20a9, 0x0014, 0x6848, 0xa084, 0x0004,
++	0x0040, 0x162e, 0x0070, 0x162e, 0x0078, 0x1625, 0x684b, 0x0009,
++	0x20a9, 0x0014, 0x6848, 0xa084, 0x0001, 0x0040, 0x163b, 0x0070,
++	0x163b, 0x0078, 0x1632, 0x20a9, 0x00fa, 0x0070, 0x1641, 0x0078,
++	0x163d, 0x2079, 0x5100, 0x7817, 0x0018, 0x2061, 0x5140, 0x606f,
++	0x0001, 0x6073, 0x0000, 0x6093, 0x000f, 0x78cc, 0xa085, 0x0002,
++	0x78ce, 0x6808, 0xa084, 0xfffd, 0x680a, 0x681b, 0x0048, 0x2091,
++	0x8001, 0x007c, 0x78cc, 0xa084, 0xfffd, 0x78ce, 0xa084, 0x0001,
++	0x00c0, 0x1664, 0x1078, 0x1a2b, 0x71c4, 0x71c6, 0x794a, 0x007c,
++	0x1078, 0x1b53, 0x00c0, 0x129c, 0x75d8, 0x74dc, 0x75da, 0x74de,
++	0x0078, 0x1675, 0x2029, 0x0000, 0x2520, 0x71c4, 0x73c8, 0x72cc,
++	0x71c6, 0x73ca, 0x72ce, 0x2079, 0x5100, 0x2091, 0x8000, 0x1078,
++	0x192e, 0x2091, 0x8001, 0x0040, 0x172c, 0x20a9, 0x0005, 0x20a1,
++	0x5118, 0x2091, 0x8000, 0x41a1, 0x2091, 0x8001, 0x2009, 0x0020,
++	0x1078, 0x1929, 0x0040, 0x1698, 0x1078, 0x1948, 0x0078, 0x172c,
++	0x6004, 0xa084, 0xff00, 0x8007, 0x8009, 0x0040, 0x16fb, 0x0c7e,
++	0x2c68, 0x2091, 0x8000, 0x1078, 0x192e, 0x2091, 0x8001, 0x0040,
++	0x16cc, 0x2c00, 0x689e, 0x8109, 0x00c0, 0x16a0, 0x609f, 0x0000,
++	0x0c7f, 0x0c7e, 0x7218, 0x731c, 0x7420, 0x7524, 0x2c68, 0x689c,
++	0xa065, 0x0040, 0x16fa, 0x2009, 0x0020, 0x1078, 0x1929, 0x00c0,
++	0x16e3, 0x6004, 0xa084, 0x00ff, 0xa086, 0x0002, 0x00c0, 0x16cc,
++	0x2d00, 0x6002, 0x0078, 0x16b2, 0x0c7f, 0x0c7e, 0x609c, 0x2060,
++	0x1078, 0x19b3, 0x0c7f, 0x609f, 0x0000, 0x1078, 0x1730, 0x2009,
++	0x000c, 0x6008, 0xa085, 0x0200, 0x600a, 0x1078, 0x1924, 0x1078,
++	0x1948, 0x0078, 0x172c, 0x0c7f, 0x0c7e, 0x609c, 0x2060, 0x1078,
++	0x19b3, 0x0c7f, 0x609f, 0x0000, 0x1078, 0x1730, 0x2009, 0x000c,
++	0x6007, 0x0103, 0x601b, 0x0003, 0x1078, 0x1924, 0x1078, 0x1948,
++	0x0078, 0x172c, 0x0c7f, 0x74c4, 0x73c8, 0x72cc, 0x6014, 0x2091,
++	0x8000, 0x7817, 0x0012, 0x0e7e, 0x2071, 0x5140, 0x706f, 0x0005,
++	0x7073, 0x0000, 0x7376, 0x727a, 0x747e, 0x7082, 0x7087, 0x0000,
++	0x2c00, 0x708a, 0x708f, 0x0000, 0xa02e, 0x2530, 0x611c, 0x61a2,
++	0xa184, 0x0060, 0x0040, 0x171e, 0x1078, 0x47c2, 0x0e7f, 0x6596,
++	0x65a6, 0x669a, 0x66aa, 0x60af, 0x0000, 0x60b3, 0x0000, 0x1078,
++	0x21d2, 0x2091, 0x8001, 0x007c, 0x70c3, 0x4005, 0x0078, 0x1287,
++	0x20a9, 0x0005, 0x2099, 0x5118, 0x2091, 0x8000, 0x530a, 0x2091,
++	0x8001, 0x2100, 0xa210, 0xa399, 0x0000, 0xa4a1, 0x0000, 0xa5a9,
++	0x0000, 0x007c, 0x71c4, 0x70c7, 0x0000, 0x7906, 0x0078, 0x1284,
++	0x71c4, 0x71c6, 0x2168, 0x0078, 0x174f, 0x2069, 0x1000, 0x690c,
++	0xa016, 0x2d04, 0xa210, 0x8d68, 0x8109, 0x00c0, 0x1751, 0xa285,
++	0x0000, 0x00c0, 0x175f, 0x70c3, 0x4000, 0x0078, 0x1761, 0x70c3,
++	0x4003, 0x70ca, 0x0078, 0x1287, 0x2011, 0x5167, 0x220c, 0x70c4,
++	0x8003, 0x0048, 0x1771, 0x1078, 0x3b7f, 0xa184, 0x7fff, 0x0078,
++	0x1775, 0x1078, 0x3b72, 0xa185, 0x8000, 0x2012, 0x0078, 0x1283,
++	0x71c4, 0x1078, 0x3b69, 0x6100, 0x2001, 0x5167, 0x2004, 0xa084,
++	0x8000, 0xa10d, 0x6204, 0x6308, 0x0078, 0x1281, 0x79e4, 0x0078,
++	0x1283, 0x71c4, 0x71c6, 0x2198, 0x20a1, 0x0042, 0x20a9, 0x0004,
++	0x53a3, 0x21a0, 0x2099, 0x0042, 0x20a9, 0x0004, 0x53a3, 0x0078,
++	0x1284, 0x70c4, 0x2068, 0x2079, 0x5100, 0x2091, 0x8000, 0x1078,
++	0x192e, 0x2091, 0x8001, 0x0040, 0x1825, 0x6007, 0x0001, 0x600b,
++	0x0000, 0x602b, 0x0000, 0x601b, 0x0006, 0x6a10, 0xa28c, 0x000f,
++	0xa284, 0x00f0, 0x8003, 0x8003, 0x8003, 0x8003, 0xa105, 0x6016,
++	0xa284, 0x0800, 0x0040, 0x17c0, 0x601b, 0x000a, 0x0078, 0x17c6,
++	0xa284, 0x1000, 0x0040, 0x17c6, 0x601b, 0x000c, 0xa284, 0x0300,
++	0x0040, 0x17cf, 0x602b, 0x0001, 0x8004, 0x8004, 0x8004, 0xa085,
++	0x0001, 0x601e, 0x6023, 0x0000, 0x6027, 0x0000, 0xa284, 0x0400,
++	0x0040, 0x17dc, 0x602b, 0x0000, 0x20a9, 0x0006, 0xac80, 0x000b,
++	0x20a0, 0xad80, 0x0005, 0x2098, 0x53a3, 0xa284, 0x0300, 0x00c0,
++	0x17f1, 0x6046, 0x604a, 0x604e, 0x6052, 0x6096, 0x609a, 0x0078,
++	0x17fb, 0x6800, 0x6046, 0x6804, 0x604a, 0x6e08, 0x664e, 0x6d0c,
++	0x6552, 0x6596, 0x669a, 0x6014, 0x2091, 0x8000, 0x7817, 0x0042,
++	0x2c08, 0x2061, 0x5140, 0x606f, 0x0005, 0x6073, 0x0000, 0x6077,
++	0x0000, 0x607b, 0x0000, 0x607f, 0x0000, 0x6082, 0x618a, 0xa284,
++	0x0400, 0x608e, 0x2091, 0x8001, 0x0e7e, 0x2071, 0x0020, 0x7007,
++	0x000a, 0x7007, 0x0002, 0x7003, 0x0000, 0x0e7f, 0x2091, 0x8000,
++	0x1078, 0x21d2, 0x2091, 0x8001, 0x007c, 0x70c3, 0x4005, 0x0078,
++	0x1287, 0x0c7e, 0x0d7e, 0x0e7e, 0x0f7e, 0x2091, 0x8000, 0x2071,
++	0x5140, 0x2079, 0x0100, 0x2061, 0x0010, 0x70a0, 0xa06d, 0x0040,
++	0x18b1, 0x6a04, 0xa294, 0x00ff, 0xa286, 0x0007, 0x0040, 0x1844,
++	0xa286, 0x000f, 0x00c0, 0x18b1, 0x691c, 0xa184, 0x0080, 0x00c0,
++	0x18b1, 0x6824, 0xa18c, 0xff00, 0xa085, 0x0019, 0x6826, 0x71b0,
++	0x81ff, 0x0040, 0x1867, 0x0d7e, 0x2069, 0x0020, 0x6807, 0x0010,
++	0x6908, 0x6808, 0xa106, 0x00c0, 0x1858, 0x690c, 0x680c, 0xa106,
++	0x00c0, 0x185d, 0xa184, 0x00ff, 0x00c0, 0x185d, 0x0d7f, 0x78b8,
++	0xa084, 0x801f, 0x00c0, 0x1867, 0x7848, 0xa085, 0x000c, 0x784a,
++	0x71b0, 0x81ff, 0x0040, 0x188a, 0x70b3, 0x0000, 0x0d7e, 0x2069,
++	0x0020, 0x6807, 0x0018, 0x6804, 0xa084, 0x0008, 0x00c0, 0x187b,
++	0x6807, 0x0008, 0x6804, 0xa084, 0x0008, 0x00c0, 0x1882, 0x6807,
++	0x0002, 0x0d7f, 0x61c4, 0x62c8, 0x63cc, 0x61c6, 0x62ca, 0x63ce,
++	0x0e7e, 0x2071, 0x5100, 0x7266, 0x736a, 0xae80, 0x0019, 0x0e7f,
++	0x7848, 0xa084, 0x000c, 0x00c0, 0x1898, 0x1078, 0x46db, 0x78a3,
++	0x0000, 0x7858, 0xa084, 0xedff, 0x785a, 0x70b4, 0xa080, 0x00df,
++	0x781a, 0x0f7f, 0x0e7f, 0x0d7f, 0x0c7f, 0x2091, 0x8001, 0x0078,
++	0x1284, 0x0f7f, 0x0e7f, 0x0d7f, 0x0c7f, 0x2091, 0x8001, 0x2001,
++	0x4005, 0x0078, 0x1286, 0x7980, 0x71c6, 0x71c4, 0xa182, 0x0003,
++	0x00c8, 0x127c, 0x7982, 0x0078, 0x1284, 0x7980, 0x71c6, 0x0078,
++	0x1284, 0x7974, 0x71c6, 0x71c4, 0x7976, 0x7978, 0x71ca, 0x71c8,
++	0x797a, 0x797c, 0x71ce, 0x71cc, 0x797e, 0x0078, 0x1284, 0x7974,
++	0x71c6, 0x7978, 0x71ca, 0x797c, 0x71ce, 0x0078, 0x1284, 0x7900,
++	0x71c6, 0x71c4, 0x7902, 0x2001, 0x04fd, 0x2004, 0xa082, 0x0005,
++	0x0048, 0x18ee, 0x0038, 0x18f0, 0x0078, 0x18fa, 0x00a8, 0x18fa,
++	0xa18c, 0x0001, 0x00c0, 0x18f8, 0x20b9, 0x2222, 0x0078, 0x18fa,
++	0x20b9, 0x1212, 0x0078, 0x1284, 0x7900, 0x71c6, 0x0078, 0x1284,
++	0x2009, 0x5174, 0x2104, 0x70c6, 0x70c4, 0x200a, 0x0078, 0x1284,
++	0x2009, 0x5174, 0x2104, 0x70c6, 0x0078, 0x1284, 0x71c4, 0x8107,
++	0xa084, 0x000f, 0x8003, 0x8003, 0x8003, 0xa0e8, 0x5380, 0x6a14,
++	0xd2b4, 0x0040, 0x191f, 0x2011, 0x0001, 0x0078, 0x1921, 0x2011,
++	0x0000, 0x6b0c, 0x0078, 0x1281, 0xac80, 0x0001, 0x1078, 0x1b0f,
++	0x007c, 0xac80, 0x0001, 0x1078, 0x1aaf, 0x007c, 0x7850, 0xa065,
++	0x0040, 0x1936, 0x2c04, 0x7852, 0x2063, 0x0000, 0x007c, 0x0f7e,
++	0x2079, 0x5100, 0x7850, 0xa06d, 0x0040, 0x1946, 0x2d04, 0x7852,
++	0x6803, 0x0000, 0x6807, 0x0000, 0x680b, 0x0000, 0x0f7f, 0x007c,
++	0x2091, 0x8000, 0x0f7e, 0x2079, 0x5100, 0x7850, 0x2062, 0x2c00,
++	0xa005, 0x00c0, 0x1955, 0x1078, 0x23eb, 0x7852, 0x0f7f, 0x2091,
++	0x8001, 0x007c, 0x0f7e, 0x2079, 0x5100, 0x7850, 0x206a, 0x2d00,
++	0x7852, 0x0f7f, 0x007c, 0x2011, 0x7800, 0x7a52, 0x7bec, 0x8319,
++	0x0040, 0x1970, 0xa280, 0x0031, 0x2012, 0x2010, 0x0078, 0x1967,
++	0x2013, 0x0000, 0x007c, 0xa784, 0x0f00, 0x800b, 0xa784, 0x001f,
++	0x8003, 0x8003, 0x8003, 0x8003, 0xa105, 0xa0e8, 0x5400, 0x007c,
++	0x1078, 0x1973, 0x2900, 0x682a, 0x2a00, 0x682e, 0x6808, 0xa084,
++	0xffef, 0xa80d, 0x690a, 0x2009, 0x5152, 0x210c, 0x6804, 0xa005,
++	0x0040, 0x19b2, 0xa116, 0x00c0, 0x199d, 0x2060, 0x6000, 0x6806,
++	0x017e, 0x200b, 0x0000, 0x0078, 0x19a0, 0x2009, 0x0000, 0x017e,
++	0x6804, 0xa065, 0x0040, 0x19af, 0x6000, 0x6806, 0x1078, 0x19c0,
++	0x1078, 0x1c5f, 0x6810, 0x8001, 0x6812, 0x00c0, 0x19a0, 0x017f,
++	0x6902, 0x6906, 0x007c, 0xa065, 0x0040, 0x19bf, 0x609c, 0x609f,
++	0x0000, 0x2008, 0x1078, 0x1948, 0x2100, 0x0078, 0x19b3, 0x007c,
++	0x6007, 0x0103, 0x608f, 0x0000, 0x20a9, 0x001c, 0xac80, 0x0005,
++	0x20a0, 0x2001, 0x0000, 0x40a4, 0x6828, 0x601a, 0x682c, 0x6022,
++	0x007c, 0x0e7e, 0x2071, 0x5140, 0x704c, 0xa08c, 0x0200, 0x00c0,
++	0x19df, 0xa088, 0x5180, 0x2d0a, 0x8000, 0x704e, 0xa006, 0x0e7f,
++	0x007c, 0x1078, 0x1973, 0x2091, 0x8000, 0x6804, 0x781e, 0xa065,
++	0x0040, 0x1a2a, 0x0078, 0x19f2, 0x2c00, 0x781e, 0x6000, 0xa065,
++	0x0040, 0x1a2a, 0x600c, 0xa306, 0x00c0, 0x19ec, 0x6010, 0xa206,
++	0x00c0, 0x19ec, 0x2c28, 0x2001, 0x5152, 0x2004, 0xac06, 0x00c0,
++	0x1a03, 0x0078, 0x1a28, 0x6804, 0xac06, 0x00c0, 0x1a10, 0x6000,
++	0xa065, 0x6806, 0x00c0, 0x1a1a, 0x6803, 0x0000, 0x0078, 0x1a1a,
++	0x6400, 0x781c, 0x2060, 0x6402, 0xa486, 0x0000, 0x00c0, 0x1a1a,
++	0x2c00, 0x6802, 0x2560, 0x1078, 0x19c0, 0x601b, 0x0005, 0x6023,
++	0x0020, 0x1078, 0x1c5f, 0x6810, 0x8001, 0x1050, 0x23eb, 0x6812,
++	0xa085, 0xffff, 0x007c, 0x2039, 0x0000, 0x2041, 0x0021, 0x2049,
++	0x0004, 0x2051, 0x0008, 0x2091, 0x8000, 0x1078, 0x1980, 0x8738,
++	0xa784, 0x001f, 0x00c0, 0x1a35, 0xa7bc, 0xff00, 0x873f, 0x8738,
++	0x873f, 0xa784, 0x0f00, 0x00c0, 0x1a35, 0x2091, 0x8001, 0x007c,
++	0x2061, 0x0000, 0x6018, 0xa084, 0x0001, 0x00c0, 0x1a59, 0x2091,
++	0x8000, 0x78e0, 0x78e3, 0x0000, 0x2091, 0x8001, 0xa005, 0x00c0,
++	0x1a5a, 0x007c, 0xa08c, 0xfff0, 0x0040, 0x1a60, 0x1078, 0x23eb,
++	0x0079, 0x1a62, 0x1a72, 0x1a75, 0x1a7b, 0x1a7f, 0x1a73, 0x1a83,
++	0x1a89, 0x1a73, 0x1a73, 0x1c29, 0x1c4d, 0x1c51, 0x1a73, 0x1a73,
++	0x1a73, 0x1a73, 0x007c, 0x1078, 0x23eb, 0x1078, 0x1a2b, 0x2001,
++	0x8001, 0x0078, 0x1c57, 0x2001, 0x8003, 0x0078, 0x1c57, 0x2001,
++	0x8004, 0x0078, 0x1c57, 0x1078, 0x1a2b, 0x2001, 0x8006, 0x0078,
++	0x1c57, 0x2001, 0x8007, 0x0078, 0x1c57, 0x2030, 0x2138, 0xa782,
++	0x0021, 0x0048, 0x1a95, 0x2009, 0x0020, 0x2600, 0x1078, 0x1aaf,
++	0x00c0, 0x1aae, 0xa7ba, 0x0020, 0x0048, 0x1aad, 0x0040, 0x1aad,
++	0x2708, 0xa6b0, 0x0020, 0xa290, 0x0040, 0xa399, 0x0000, 0xa4a1,
++	0x0000, 0xa5a9, 0x0000, 0x0078, 0x1a8f, 0xa006, 0x007c, 0x81ff,
++	0x0040, 0x1aea, 0x2099, 0x0030, 0x20a0, 0x700c, 0xa084, 0x00ff,
++	0x0040, 0x1ac1, 0x7007, 0x0004, 0x7004, 0xa084, 0x0004, 0x00c0,
++	0x1abc, 0x21a8, 0x7017, 0x0000, 0x810b, 0x7112, 0x721a, 0x731e,
++	0x7422, 0x7526, 0x780c, 0xa085, 0x0001, 0x7002, 0x7007, 0x0001,
++	0x2001, 0x04fd, 0x2004, 0xa082, 0x0005, 0x00c8, 0x1ade, 0x2009,
++	0x0022, 0x2104, 0xa084, 0x4000, 0x00c0, 0x1ad0, 0x7008, 0x800b,
++	0x00c8, 0x1ad0, 0x7007, 0x0002, 0xa08c, 0x01e0, 0x00c0, 0x1aea,
++	0x53a5, 0xa006, 0x7003, 0x0000, 0x007c, 0x2030, 0x2138, 0xa782,
++	0x0021, 0x0048, 0x1af5, 0x2009, 0x0020, 0x2600, 0x1078, 0x1b0f,
++	0x00c0, 0x1b0e, 0xa7ba, 0x0020, 0x0048, 0x1b0d, 0x0040, 0x1b0d,
++	0x2708, 0xa6b0, 0x0020, 0xa290, 0x0040, 0xa399, 0x0000, 0xa4a1,
++	0x0000, 0xa5a9, 0x0000, 0x0078, 0x1aef, 0xa006, 0x007c, 0x81ff,
++	0x0040, 0x1b50, 0x2098, 0x20a1, 0x0030, 0x700c, 0xa084, 0x00ff,
++	0x0040, 0x1b21, 0x7007, 0x0004, 0x7004, 0xa084, 0x0004, 0x00c0,
++	0x1b1c, 0x21a8, 0x7017, 0x0000, 0x810b, 0x7112, 0x721a, 0x731e,
++	0x7422, 0x7526, 0x780c, 0xa085, 0x0000, 0x7002, 0x53a6, 0x7007,
++	0x0001, 0x2001, 0x04fd, 0x2004, 0xa082, 0x0005, 0x00c8, 0x1b3f,
++	0x2009, 0x0022, 0x2104, 0xa084, 0x4000, 0x00c0, 0x1b31, 0x7010,
++	0xa084, 0xf000, 0x0040, 0x1b48, 0x7007, 0x0008, 0x0078, 0x1b4c,
++	0x7108, 0x8103, 0x00c8, 0x1b31, 0x7007, 0x0002, 0xa184, 0x01e0,
++	0x7003, 0x0000, 0x007c, 0x2001, 0x04fd, 0x2004, 0xa082, 0x0004,
++	0x00c8, 0x1b5c, 0x0078, 0x1b5f, 0xa006, 0x0078, 0x1b61, 0xa085,
++	0x0001, 0x007c, 0x0e7e, 0x2071, 0x5100, 0x2d08, 0x7058, 0x6802,
++	0xa005, 0x00c0, 0x1b6c, 0x715e, 0x715a, 0x0e7f, 0x007c, 0x2c08,
++	0x7858, 0x6002, 0xa005, 0x00c0, 0x1b76, 0x795e, 0x795a, 0x007c,
++	0x2091, 0x8000, 0x6003, 0x0000, 0x2c08, 0x785c, 0xa065, 0x00c0,
++	0x1b84, 0x795a, 0x0078, 0x1b85, 0x6102, 0x795e, 0x2091, 0x8001,
++	0x1078, 0x21ef, 0x007c, 0x0e7e, 0x2071, 0x5100, 0x7058, 0xa06d,
++	0x0040, 0x1b99, 0x6800, 0x705a, 0xa005, 0x00c0, 0x1b98, 0x705e,
++	0x8dff, 0x0e7f, 0x007c, 0x0d7e, 0x0c7e, 0x0f7e, 0x2079, 0x5100,
++	0xaf80, 0x0016, 0x2060, 0x6000, 0xa005, 0x0040, 0x1bc9, 0x2068,
++	0x6814, 0xa306, 0x00c0, 0x1bb2, 0x6828, 0xa084, 0x00ff, 0xa406,
++	0x0040, 0x1bb5, 0x2d60, 0x0078, 0x1ba3, 0x6800, 0xa005, 0x6002,
++	0x00c0, 0x1bc1, 0xaf80, 0x0016, 0xac06, 0x0040, 0x1bc0, 0x2c00,
++	0x785e, 0x0d7e, 0x689c, 0xa005, 0x0040, 0x1bc8, 0x1078, 0x19b3,
++	0x007f, 0x0f7f, 0x0c7f, 0x0d7f, 0xa005, 0x007c, 0x0d7e, 0x0c7e,
++	0x0f7e, 0x2079, 0x5100, 0xaf80, 0x0016, 0x2060, 0x6000, 0xa005,
++	0x0040, 0x1bf8, 0x2068, 0x6814, 0xa084, 0x00ff, 0xa306, 0x0040,
++	0x1be4, 0x2d60, 0x0078, 0x1bd6, 0x6800, 0xa005, 0x6002, 0x00c0,
++	0x1bf0, 0xaf80, 0x0016, 0xac06, 0x0040, 0x1bef, 0x2c00, 0x785e,
++	0x0d7e, 0x689c, 0xa005, 0x0040, 0x1bf7, 0x1078, 0x19b3, 0x007f,
++	0x0f7f, 0x0c7f, 0x0d7f, 0xa005, 0x007c, 0x0d7e, 0x0c7e, 0x0f7e,
++	0x2079, 0x5100, 0xaf80, 0x0016, 0x2060, 0x6000, 0xa06d, 0x0040,
++	0x1c24, 0x6814, 0xa306, 0x0040, 0x1c10, 0x2d60, 0x0078, 0x1c05,
++	0x6800, 0xa005, 0x6002, 0x00c0, 0x1c1c, 0xaf80, 0x0016, 0xac06,
++	0x0040, 0x1c1b, 0x2c00, 0x785e, 0x0d7e, 0x689c, 0xa005, 0x0040,
++	0x1c23, 0x1078, 0x19b3, 0x007f, 0x0f7f, 0x0c7f, 0x0d7f, 0xa005,
++	0x007c, 0x2091, 0x8000, 0x2069, 0x5140, 0x6800, 0xa086, 0x0000,
++	0x0040, 0x1c37, 0x2091, 0x8001, 0x78e3, 0x0009, 0x007c, 0x6880,
++	0xa0bc, 0xff00, 0x2041, 0x0021, 0x2049, 0x0004, 0x2051, 0x0010,
++	0x1078, 0x1980, 0x8738, 0xa784, 0x001f, 0x00c0, 0x1c40, 0x2091,
++	0x8001, 0x2001, 0x800a, 0x0078, 0x1c57, 0x2001, 0x800c, 0x0078,
++	0x1c57, 0x1078, 0x1a2b, 0x2001, 0x800d, 0x0078, 0x1c57, 0x70c2,
++	0x2061, 0x0000, 0x601b, 0x0001, 0x2091, 0x4080, 0x007c, 0x6004,
++	0x2c08, 0x2063, 0x0000, 0x7884, 0x8000, 0x7886, 0x7888, 0xa005,
++	0x798a, 0x0040, 0x1c6e, 0x2c02, 0x0078, 0x1c6f, 0x798e, 0x007c,
++	0x6807, 0x0103, 0x0c7e, 0x2061, 0x5100, 0x2d08, 0x206b, 0x0000,
++	0x6084, 0x8000, 0x6086, 0x6088, 0xa005, 0x618a, 0x0040, 0x1c83,
++	0x2d02, 0x0078, 0x1c84, 0x618e, 0x0c7f, 0x007c, 0x1078, 0x1c97,
++	0x0040, 0x1c96, 0x0c7e, 0x609c, 0xa065, 0x0040, 0x1c91, 0x1078,
++	0x19b3, 0x0c7f, 0x609f, 0x0000, 0x1078, 0x1948, 0x007c, 0x788c,
++	0xa065, 0x0040, 0x1ca9, 0x2091, 0x8000, 0x7884, 0x8001, 0x7886,
++	0x2c04, 0x788e, 0xa005, 0x00c0, 0x1ca7, 0x788a, 0x8000, 0x2091,
++	0x8001, 0x007c, 0x20a9, 0x0010, 0xa006, 0x8004, 0x8086, 0x818e,
++	0x00c8, 0x1cb3, 0xa200, 0x0070, 0x1cb7, 0x0078, 0x1cae, 0x8086,
++	0x818e, 0x007c, 0x157e, 0x20a9, 0x0010, 0xa005, 0x0040, 0x1cdd,
++	0xa11a, 0x00c8, 0x1cdd, 0x8213, 0x818d, 0x0048, 0x1cce, 0xa11a,
++	0x00c8, 0x1ccf, 0x0070, 0x1cd5, 0x0078, 0x1cc3, 0xa11a, 0x2308,
++	0x8210, 0x0070, 0x1cd5, 0x0078, 0x1cc3, 0x007e, 0x3200, 0xa084,
++	0xf7ff, 0x2080, 0x007f, 0x157f, 0x007c, 0x007e, 0x3200, 0xa085,
++	0x0800, 0x0078, 0x1cd9, 0x7994, 0x70d0, 0xa106, 0x0040, 0x1d51,
++	0x2091, 0x8000, 0x2071, 0x0020, 0x7004, 0xa005, 0x00c0, 0x1d51,
++	0x7008, 0x7208, 0xa206, 0x00c0, 0x1d51, 0xa286, 0x0008, 0x00c0,
++	0x1d51, 0x2071, 0x0010, 0x1078, 0x192e, 0x0040, 0x1d51, 0x7a9c,
++	0x7b98, 0x7ca4, 0x7da0, 0xa184, 0xff00, 0x0040, 0x1d1f, 0x2031,
++	0x0000, 0x810b, 0x86b5, 0x810b, 0x86b5, 0x810b, 0x86b5, 0x810b,
++	0x86b5, 0x810b, 0x86b5, 0x810b, 0x86b5, 0x2100, 0xa210, 0x2600,
++	0xa319, 0xa4a1, 0x0000, 0xa5a9, 0x0000, 0x0078, 0x1d29, 0x8107,
++	0x8004, 0x8004, 0xa210, 0xa399, 0x0000, 0xa4a1, 0x0000, 0xa5a9,
++	0x0000, 0x2009, 0x0020, 0x1078, 0x1929, 0x2091, 0x8001, 0x0040,
++	0x1d48, 0x1078, 0x1948, 0x78a8, 0x8000, 0x78aa, 0xa086, 0x0002,
++	0x00c0, 0x1d51, 0x2091, 0x8000, 0x78e3, 0x0002, 0x78ab, 0x0000,
++	0x78cc, 0xa085, 0x0003, 0x78ce, 0x2091, 0x8001, 0x0078, 0x1d51,
++	0x78ab, 0x0000, 0x1078, 0x20ac, 0x6004, 0xa084, 0x000f, 0x0079,
++	0x1d56, 0x2071, 0x0010, 0x2091, 0x8001, 0x007c, 0x1d66, 0x1d88,
++	0x1dae, 0x1d66, 0x1dcb, 0x1d75, 0x1f2c, 0x1f47, 0x1d66, 0x1d82,
++	0x1da8, 0x1e13, 0x1e82, 0x1ed2, 0x1ee4, 0x1f43, 0x2039, 0x0400,
++	0x78dc, 0xa705, 0x78de, 0x6008, 0xa705, 0x600a, 0x1078, 0x1fc7,
++	0x609c, 0x78da, 0x1078, 0x2094, 0x007c, 0x78dc, 0xa084, 0x0100,
++	0x0040, 0x1d7c, 0x0078, 0x1d66, 0x601c, 0xa085, 0x0080, 0x601e,
++	0x0078, 0x1d8f, 0x1078, 0x1b53, 0x00c0, 0x1d66, 0x1078, 0x20c6,
++	0x78dc, 0xa084, 0x0100, 0x0040, 0x1d8f, 0x0078, 0x1d66, 0x78df,
++	0x0000, 0x6004, 0x8007, 0xa084, 0x00ff, 0x78d2, 0x8001, 0x609f,
++	0x0000, 0x0040, 0x1da5, 0x1078, 0x1fc7, 0x0040, 0x1da5, 0x78dc,
++	0xa085, 0x0100, 0x78de, 0x0078, 0x1da7, 0x1078, 0x1feb, 0x007c,
++	0x1078, 0x1b53, 0x00c0, 0x1d66, 0x1078, 0x20c2, 0x78dc, 0xa08c,
++	0x0e00, 0x00c0, 0x1db7, 0xa084, 0x0100, 0x00c0, 0x1db9, 0x0078,
++	0x1d66, 0x1078, 0x1fc7, 0x00c0, 0x1dca, 0x6104, 0xa18c, 0x00ff,
++	0xa186, 0x0007, 0x0040, 0x1f84, 0xa186, 0x000f, 0x0040, 0x1f84,
++	0x1078, 0x1feb, 0x007c, 0x78dc, 0xa084, 0x0100, 0x0040, 0x1dd2,
++	0x0078, 0x1d66, 0x78df, 0x0000, 0x6714, 0x2011, 0x0001, 0x20a9,
++	0x0001, 0x6018, 0xa084, 0x00ff, 0xa005, 0x0040, 0x1df5, 0x2011,
++	0x0001, 0xa7bc, 0xff00, 0x20a9, 0x0020, 0xa08e, 0x0001, 0x0040,
++	0x1df5, 0x2039, 0x0000, 0x2011, 0x0002, 0x20a9, 0x0100, 0xa08e,
++	0x0002, 0x0040, 0x1df5, 0x0078, 0x1e10, 0x1078, 0x1973, 0x2091,
++	0x8000, 0x682b, 0x0000, 0x682f, 0x0000, 0x6808, 0xa084, 0xffde,
++	0x680a, 0xade8, 0x0010, 0x2091, 0x8001, 0x0070, 0x1e09, 0x0078,
++	0x1df7, 0x8211, 0x0040, 0x1e10, 0x20a9, 0x0100, 0x0078, 0x1df7,
++	0x1078, 0x1948, 0x007c, 0x2001, 0x5167, 0x2004, 0xa084, 0x8000,
++	0x0040, 0x1fac, 0x6114, 0x1078, 0x20e3, 0x6900, 0xa184, 0x0001,
++	0x0040, 0x1e34, 0x6028, 0xa084, 0x00ff, 0x00c0, 0x1fa4, 0x6800,
++	0xa084, 0x0001, 0x0040, 0x1fac, 0x6803, 0x0000, 0x680b, 0x0000,
++	0x6807, 0x0000, 0x0078, 0x1fb4, 0x2011, 0x0001, 0x6020, 0xd0f4,
++	0x0040, 0x1e3c, 0xa295, 0x0002, 0xd0c4, 0x0040, 0x1e41, 0xa295,
++	0x0008, 0xd0cc, 0x0040, 0x1e46, 0xa295, 0x0400, 0x601c, 0xa084,
++	0x0002, 0x0040, 0x1e4d, 0xa295, 0x0004, 0x602c, 0xa08c, 0x00ff,
++	0xa182, 0x0002, 0x0048, 0x1fb0, 0xa182, 0x001b, 0x00c8, 0x1fb0,
++	0x0040, 0x1fb0, 0x690e, 0x602c, 0x8007, 0xa08c, 0x00ff, 0xa182,
++	0x0002, 0x0048, 0x1fb0, 0xa182, 0x001b, 0x00c8, 0x1fb0, 0x0040,
++	0x1fb0, 0x6912, 0x6030, 0xa005, 0x00c0, 0x1e70, 0x2001, 0x001e,
++	0x8000, 0x6816, 0x6028, 0xa084, 0x00ff, 0x0040, 0x1fac, 0x6806,
++	0x6028, 0x8007, 0xa084, 0x00ff, 0x0040, 0x1fac, 0x680a, 0x6a02,
++	0x0078, 0x1fb4, 0x2001, 0x5167, 0x2004, 0xa084, 0x8000, 0x0040,
++	0x1fac, 0x6114, 0x1078, 0x20e3, 0x2091, 0x8000, 0x6a04, 0x6b08,
++	0x6418, 0xa484, 0x0003, 0x0040, 0x1ea8, 0x6128, 0xa18c, 0x00ff,
++	0x8001, 0x00c0, 0x1ea1, 0x2100, 0xa210, 0x0048, 0x1ece, 0x0078,
++	0x1ea8, 0x8001, 0x00c0, 0x1ece, 0x2100, 0xa212, 0x0048, 0x1ece,
++	0xa484, 0x000c, 0x0040, 0x1ec2, 0x6128, 0x810f, 0xa18c, 0x00ff,
++	0xa082, 0x0004, 0x00c0, 0x1eba, 0x2100, 0xa318, 0x0048, 0x1ece,
++	0x0078, 0x1ec2, 0xa082, 0x0004, 0x00c0, 0x1ece, 0x2100, 0xa31a,
++	0x0048, 0x1ece, 0x6030, 0xa005, 0x0040, 0x1ec8, 0x8000, 0x6816,
++	0x6a06, 0x6b0a, 0x2091, 0x8001, 0x0078, 0x1fb4, 0x2091, 0x8001,
++	0x0078, 0x1fb0, 0x6114, 0x1078, 0x20e3, 0x2091, 0x8000, 0x6b08,
++	0x8318, 0x0048, 0x1ee0, 0x6b0a, 0x2091, 0x8001, 0x0078, 0x1fc3,
++	0x2091, 0x8001, 0x0078, 0x1fb0, 0x6024, 0x8007, 0xa084, 0x00ff,
++	0x0040, 0x1f02, 0xa086, 0x0080, 0x00c0, 0x1f2a, 0x20a9, 0x0008,
++	0x2069, 0x7510, 0x2091, 0x8000, 0x6800, 0xa084, 0xfcff, 0x6802,
++	0xade8, 0x0008, 0x0070, 0x1efe, 0x0078, 0x1ef4, 0x2091, 0x8001,
++	0x0078, 0x1fb4, 0x6028, 0xa015, 0x0040, 0x1f2a, 0x6114, 0x1078,
++	0x20e3, 0x0d7e, 0xade8, 0x0007, 0x2091, 0x8000, 0x6800, 0xa00d,
++	0x0040, 0x1f27, 0xa206, 0x0040, 0x1f18, 0x2168, 0x0078, 0x1f0e,
++	0x0c7e, 0x2160, 0x6000, 0x6802, 0x1078, 0x1948, 0x0c7f, 0x0d7f,
++	0x6808, 0x8000, 0x680a, 0x2091, 0x8001, 0x0078, 0x1fc3, 0x2091,
++	0x8001, 0x0d7f, 0x0078, 0x1fac, 0x6114, 0x1078, 0x20e3, 0x6800,
++	0xa084, 0x0001, 0x0040, 0x1f9c, 0x2091, 0x8000, 0x6a04, 0x8210,
++	0x0048, 0x1f3f, 0x6a06, 0x2091, 0x8001, 0x0078, 0x1fc3, 0x2091,
++	0x8001, 0x0078, 0x1fb0, 0x1078, 0x1b53, 0x00c0, 0x1d66, 0x6114,
++	0x1078, 0x20e3, 0x60be, 0x60bb, 0x0000, 0x6900, 0xa184, 0x0008,
++	0x0040, 0x1f56, 0x6020, 0xa085, 0x0100, 0x6022, 0xa184, 0x0001,
++	0x0040, 0x1fac, 0xa184, 0x0100, 0x00c0, 0x1f98, 0xa184, 0x0200,
++	0x00c0, 0x1f94, 0x681c, 0xa005, 0x00c0, 0x1fa0, 0x6004, 0xa084,
++	0x00ff, 0xa086, 0x000f, 0x00c0, 0x1f6f, 0x1078, 0x20c6, 0x78df,
++	0x0000, 0x6004, 0x8007, 0xa084, 0x00ff, 0x78d2, 0x8001, 0x609f,
++	0x0000, 0x0040, 0x1f84, 0x1078, 0x1fc7, 0x0040, 0x1f84, 0x78dc,
++	0xa085, 0x0100, 0x78de, 0x007c, 0x78d7, 0x0000, 0x78db, 0x0000,
++	0x6024, 0xa084, 0xff00, 0x6026, 0x1078, 0x39de, 0x0040, 0x1ce3,
++	0x1078, 0x1b78, 0x0078, 0x1ce3, 0x2009, 0x0017, 0x0078, 0x1fb6,
++	0x2009, 0x000e, 0x0078, 0x1fb6, 0x2009, 0x0007, 0x0078, 0x1fb6,
++	0x2009, 0x0035, 0x0078, 0x1fb6, 0x2009, 0x003e, 0x0078, 0x1fb6,
++	0x2009, 0x0004, 0x0078, 0x1fb6, 0x2009, 0x0006, 0x0078, 0x1fb6,
++	0x2009, 0x0016, 0x0078, 0x1fb6, 0x2009, 0x0001, 0x6024, 0xa084,
++	0xff00, 0xa105, 0x6026, 0x2091, 0x8000, 0x1078, 0x1c5f, 0x2091,
++	0x8001, 0x0078, 0x1ce3, 0x1078, 0x1948, 0x0078, 0x1ce3, 0x78d4,
++	0xa06d, 0x00c0, 0x1fd2, 0x2c00, 0x78d6, 0x78da, 0x609f, 0x0000,
++	0x0078, 0x1fde, 0x2c00, 0x689e, 0x609f, 0x0000, 0x78d6, 0x2d00,
++	0x6002, 0x78d8, 0xad06, 0x00c0, 0x1fde, 0x6002, 0x78d0, 0x8001,
++	0x78d2, 0x00c0, 0x1fea, 0x78dc, 0xa084, 0xfeff, 0x78de, 0x78d8,
++	0x2060, 0xa006, 0x007c, 0xa02e, 0x2530, 0x611c, 0x61a2, 0xa184,
++	0xe1ff, 0x601e, 0xa184, 0x0060, 0x0040, 0x1ffa, 0x0e7e, 0x1078,
++	0x47c2, 0x0e7f, 0x6596, 0x65a6, 0x669a, 0x66aa, 0x60af, 0x0000,
++	0x60b3, 0x0000, 0x6714, 0x1078, 0x1973, 0x2091, 0x8000, 0x60a0,
++	0xa084, 0x8000, 0x00c0, 0x2021, 0x6808, 0xa084, 0x0001, 0x0040,
++	0x2021, 0x2091, 0x8001, 0x1078, 0x19c0, 0x2091, 0x8000, 0x1078,
++	0x1c5f, 0x2091, 0x8001, 0x78d7, 0x0000, 0x78db, 0x0000, 0x0078,
++	0x2093, 0x6024, 0xa096, 0x0001, 0x00c0, 0x2028, 0x8000, 0x6026,
++	0x6a10, 0x6814, 0x2091, 0x8001, 0xa202, 0x0048, 0x2037, 0x0040,
++	0x2037, 0x2039, 0x0200, 0x1078, 0x2094, 0x0078, 0x2093, 0x2c08,
++	0x2091, 0x8000, 0x60a0, 0xa084, 0x8000, 0x0040, 0x2064, 0x6800,
++	0xa065, 0x0040, 0x2069, 0x6a04, 0x0e7e, 0x2071, 0x5140, 0x7000,
++	0xa084, 0x0001, 0x0040, 0x205e, 0x7048, 0xa206, 0x00c0, 0x205e,
++	0x6b04, 0x231c, 0x2160, 0x6302, 0x2300, 0xa005, 0x00c0, 0x2059,
++	0x6902, 0x2260, 0x6102, 0x0e7f, 0x0078, 0x2070, 0x2160, 0x6202,
++	0x6906, 0x0e7f, 0x0078, 0x2070, 0x6800, 0xa065, 0x0040, 0x2069,
++	0x6102, 0x6902, 0x00c0, 0x206d, 0x6906, 0x2160, 0x6003, 0x0000,
++	0x2160, 0x60a0, 0xa084, 0x8000, 0x0040, 0x207a, 0x6808, 0xa084,
++	0xfffc, 0x680a, 0x6810, 0x8000, 0x6812, 0x2091, 0x8001, 0x6808,
++	0xa08c, 0x0040, 0x0040, 0x2089, 0xa086, 0x0040, 0x680a, 0x1078,
++	0x19d1, 0x2091, 0x8000, 0x1078, 0x21d2, 0x2091, 0x8001, 0x78db,
++	0x0000, 0x78d7, 0x0000, 0x007c, 0x6008, 0xa705, 0x600a, 0x2091,
++	0x8000, 0x1078, 0x1c5f, 0x2091, 0x8001, 0x78d8, 0xa065, 0x0040,
++	0x20a7, 0x609c, 0x78da, 0x609f, 0x0000, 0x0078, 0x2097, 0x78d7,
++	0x0000, 0x78db, 0x0000, 0x007c, 0x7990, 0x7894, 0x8000, 0xa10a,
++	0x00c8, 0x20b3, 0xa006, 0x7896, 0x70d2, 0x7804, 0xa005, 0x0040,
++	0x20c1, 0x8001, 0x7806, 0x00c0, 0x20c1, 0x0068, 0x20c1, 0x2091,
++	0x4080, 0x007c, 0x2039, 0x20da, 0x0078, 0x20c8, 0x2039, 0x20e0,
++	0x2704, 0xa005, 0x0040, 0x20d9, 0xac00, 0x2068, 0x6b08, 0x6c0c,
++	0x6910, 0x6a14, 0x690a, 0x6a0e, 0x6b12, 0x6c16, 0x8738, 0x0078,
++	0x20c8, 0x007c, 0x0003, 0x0009, 0x000f, 0x0015, 0x001b, 0x0000,
++	0x0015, 0x001b, 0x0000, 0x0c7e, 0x1078, 0x3b69, 0x2c68, 0x0c7f,
++	0x007c, 0x0010, 0x215a, 0x0068, 0x215a, 0x2029, 0x0000, 0x78cb,
++	0x0000, 0x788c, 0xa065, 0x0040, 0x2153, 0x2009, 0x5174, 0x2104,
++	0xa084, 0x0001, 0x0040, 0x2121, 0x6004, 0xa086, 0x0103, 0x00c0,
++	0x2121, 0x6018, 0xa005, 0x00c0, 0x2121, 0x6014, 0xa005, 0x00c0,
++	0x2121, 0x0d7e, 0x2069, 0x0000, 0x6818, 0xa084, 0x0001, 0x00c0,
++	0x2120, 0x600c, 0x70c6, 0x6010, 0x70ca, 0x70c3, 0x8020, 0x681b,
++	0x0001, 0x2091, 0x4080, 0x0d7f, 0x1078, 0x1c86, 0x0078, 0x2158,
++	0x0d7f, 0x1078, 0x215b, 0x0040, 0x2153, 0x6204, 0xa294, 0x00ff,
++	0xa296, 0x0003, 0x0040, 0x2133, 0x6204, 0xa296, 0x0110, 0x00c0,
++	0x2141, 0x78cb, 0x0001, 0x6204, 0xa294, 0xff00, 0x8217, 0x8211,
++	0x0040, 0x2141, 0x85ff, 0x00c0, 0x2153, 0x8210, 0xa202, 0x00c8,
++	0x2153, 0x057e, 0x1078, 0x216a, 0x057f, 0x0040, 0x214e, 0x78e0,
++	0xa086, 0x0003, 0x0040, 0x2153, 0x0078, 0x2141, 0x8528, 0x78c8,
++	0xa005, 0x0040, 0x20f1, 0x85ff, 0x0040, 0x215a, 0x2091, 0x4080,
++	0x78b0, 0x70d6, 0x007c, 0x7bac, 0x79b0, 0x70d4, 0xa102, 0x00c0,
++	0x2164, 0x2300, 0xa005, 0x007c, 0x0048, 0x2168, 0xa302, 0x007c,
++	0x8002, 0x007c, 0x2001, 0x04fd, 0x2004, 0xa082, 0x0005, 0x00c8,
++	0x2184, 0x2091, 0x8000, 0x2071, 0x0020, 0x7004, 0xa005, 0x00c0,
++	0x21b9, 0x7008, 0x7208, 0xa206, 0x00c0, 0x21b9, 0xa286, 0x0008,
++	0x00c0, 0x21b9, 0x2071, 0x0010, 0x1078, 0x21be, 0x2009, 0x0020,
++	0x6004, 0xa086, 0x0103, 0x00c0, 0x2193, 0x6028, 0xa005, 0x00c0,
++	0x2193, 0x2009, 0x000c, 0x1078, 0x1924, 0x0040, 0x21ac, 0x78c4,
++	0x8000, 0x78c6, 0xa086, 0x0002, 0x00c0, 0x21b9, 0x2091, 0x8000,
++	0x78e3, 0x0003, 0x78c7, 0x0000, 0x78cc, 0xa085, 0x0300, 0x78ce,
++	0x2091, 0x8001, 0x0078, 0x21b9, 0x78c7, 0x0000, 0x1078, 0x1c86,
++	0x79ac, 0x78b0, 0x8000, 0xa10a, 0x00c8, 0x21b7, 0xa006, 0x78b2,
++	0xa006, 0x2071, 0x0010, 0x2091, 0x8001, 0x007c, 0x8107, 0x8004,
++	0x8004, 0x7ab8, 0x7bb4, 0x7cc0, 0x7dbc, 0xa210, 0xa399, 0x0000,
++	0xa4a1, 0x0000, 0xa5a9, 0x0000, 0x007c, 0x2009, 0x515b, 0x2091,
++	0x8000, 0x200a, 0x0f7e, 0x0e7e, 0x2071, 0x5140, 0x7000, 0xa086,
++	0x0000, 0x00c0, 0x21ec, 0x2009, 0x5112, 0x2104, 0xa005, 0x00c0,
++	0x21ec, 0x2079, 0x0100, 0x7830, 0xa084, 0x00c0, 0x00c0, 0x21ec,
++	0x0018, 0x21ec, 0x781b, 0x004b, 0x0e7f, 0x0f7f, 0x007c, 0x0f7e,
++	0x0e7e, 0x2071, 0x5140, 0x2091, 0x8000, 0x7000, 0xa086, 0x0000,
++	0x00c0, 0x2205, 0x2079, 0x0100, 0x7830, 0xa084, 0x00c0, 0x00c0,
++	0x2205, 0x0018, 0x2205, 0x781b, 0x004d, 0x2091, 0x8001, 0x0e7f,
++	0x0f7f, 0x007c, 0x127e, 0x2091, 0x2300, 0x2071, 0x5140, 0x2079,
++	0x0100, 0x784b, 0x000f, 0x0098, 0x2218, 0x7838, 0x0078, 0x2211,
++	0x20a9, 0x0040, 0x7800, 0xa082, 0x0004, 0x0048, 0x2221, 0x20a9,
++	0x0060, 0x789b, 0x0000, 0x78af, 0x0000, 0x78af, 0x0000, 0x0070,
++	0x222b, 0x0078, 0x2223, 0x7800, 0xa082, 0x0004, 0x0048, 0x223a,
++	0x70b7, 0x0096, 0x2019, 0x4ee7, 0x1078, 0x2276, 0x702f, 0x8001,
++	0x0078, 0x2246, 0x70b7, 0x0000, 0x2019, 0x4d5f, 0x1078, 0x2276,
++	0x2019, 0x4d9e, 0x1078, 0x2276, 0x702f, 0x8000, 0x7003, 0x0000,
++	0x1078, 0x237f, 0x7004, 0xa084, 0x000f, 0x017e, 0x2009, 0x04fd,
++	0x210c, 0xa18a, 0x0005, 0x0048, 0x225b, 0x0038, 0x2261, 0xa085,
++	0x6280, 0x0078, 0x2263, 0x0028, 0x2261, 0xa085, 0x6280, 0x0078,
++	0x2263, 0xa085, 0x62c0, 0x017f, 0x7806, 0x780f, 0xb204, 0x7843,
++	0x00d8, 0x7853, 0x0080, 0x780b, 0x0008, 0x7047, 0x0008, 0x7053,
++	0x517f, 0x704f, 0x0000, 0x127f, 0x2000, 0x007c, 0x137e, 0x147e,
++	0x157e, 0x047e, 0x20a1, 0x012b, 0x2304, 0xa005, 0x789a, 0x0040,
++	0x2296, 0x8318, 0x2324, 0x8318, 0x2398, 0x24a8, 0xa484, 0xff00,
++	0x0040, 0x228e, 0xa482, 0x0100, 0x20a9, 0x0100, 0x2020, 0x53a6,
++	0xa005, 0x00c0, 0x2285, 0x3318, 0x0078, 0x227c, 0x047f, 0x157f,
++	0x147f, 0x137f, 0x007c, 0xa18c, 0x000f, 0x2011, 0x0101, 0x2204,
++	0xa084, 0xfff0, 0xa105, 0x2012, 0x1078, 0x237f, 0x007c, 0x2011,
++	0x0101, 0x20a9, 0x0009, 0x810b, 0x0070, 0x22b0, 0x0078, 0x22ab,
++	0xa18c, 0x0e00, 0x2204, 0xa084, 0xf1ff, 0xa105, 0x2012, 0x007c,
++	0x2009, 0x0101, 0x20a9, 0x0005, 0x8213, 0x0070, 0x22c1, 0x0078,
++	0x22bc, 0xa294, 0x00e0, 0x2104, 0xa084, 0xff1f, 0xa205, 0x200a,
++	0x007c, 0x2011, 0x0101, 0x20a9, 0x000c, 0x810b, 0x0070, 0x22d2,
++	0x0078, 0x22cd, 0xa18c, 0xf000, 0x2204, 0xa084, 0x0fff, 0xa105,
++	0x2012, 0x007c, 0x2011, 0x0102, 0x2204, 0xa084, 0xffcf, 0xa105,
++	0x2012, 0x007c, 0x8103, 0x8003, 0xa080, 0x0020, 0x0c7e, 0x2061,
++	0x0100, 0x609a, 0x62ac, 0x63ac, 0x0c7f, 0x007c, 0x8103, 0x8003,
++	0xa080, 0x0022, 0x0c7e, 0x2061, 0x0100, 0x609a, 0x60a4, 0xa084,
++	0xffdf, 0x60ae, 0x0c7f, 0x007c, 0x8103, 0x8003, 0xa080, 0x0022,
++	0x0c7e, 0x2061, 0x0100, 0x609a, 0x60a4, 0xa085, 0x0020, 0x60ae,
++	0x0c7f, 0x007c, 0x8103, 0x8003, 0xa080, 0x0020, 0x0c7e, 0x2061,
++	0x0100, 0x609a, 0x60a4, 0x62ae, 0x2010, 0x60a4, 0x63ae, 0x2018,
++	0x0c7f, 0x007c, 0x2091, 0x8000, 0x0c7e, 0x0e7e, 0x6818, 0xa005,
++	0x0040, 0x235d, 0x2061, 0x7500, 0x1078, 0x2365, 0x0040, 0x2349,
++	0x20a9, 0x0000, 0x2061, 0x7400, 0x0c7e, 0x1078, 0x2365, 0x0040,
++	0x2339, 0x0c7f, 0x8c60, 0x0070, 0x2337, 0x0078, 0x232c, 0x0078,
++	0x235d, 0x007f, 0xa082, 0x7400, 0x2071, 0x5140, 0x7086, 0x7182,
++	0x2001, 0x0004, 0x706e, 0x7093, 0x000f, 0x1078, 0x21cd, 0x0078,
++	0x2359, 0x60c0, 0xa005, 0x00c0, 0x235d, 0x2071, 0x5140, 0x7182,
++	0x2c00, 0x708a, 0x2001, 0x0006, 0x706e, 0x7093, 0x000f, 0x1078,
++	0x21cd, 0x2001, 0x0000, 0x0078, 0x235f, 0x2001, 0x0001, 0x2091,
++	0x8001, 0xa005, 0x0e7f, 0x0c7f, 0x007c, 0x2c04, 0xa005, 0x0040,
++	0x237c, 0x2060, 0x600c, 0xa306, 0x00c0, 0x2379, 0x6010, 0xa206,
++	0x00c0, 0x2379, 0x6014, 0xa106, 0x00c0, 0x2379, 0xa006, 0x0078,
++	0x237e, 0x6000, 0x0078, 0x2366, 0xa085, 0x0001, 0x007c, 0x2011,
++	0x5141, 0x220c, 0xa18c, 0x000f, 0x2011, 0x013b, 0x2204, 0xa084,
++	0x0100, 0x0040, 0x2395, 0x2021, 0xff04, 0x2122, 0x810b, 0x810b,
++	0x810b, 0x810b, 0xa18d, 0x0f00, 0x2104, 0x007c, 0x0e7e, 0x68e4,
++	0xa08c, 0x0020, 0x0040, 0x23e9, 0xa084, 0x0006, 0x00c0, 0x23e9,
++	0x6014, 0x8007, 0xa084, 0x000f, 0x8003, 0x8003, 0x8003, 0xa0f0,
++	0x5380, 0x7004, 0xa084, 0x000a, 0x00c0, 0x23e9, 0x7108, 0xa194,
++	0xff00, 0x0040, 0x23e9, 0xa18c, 0x00ff, 0x2001, 0x000c, 0xa106,
++	0x0040, 0x23d0, 0x2001, 0x0012, 0xa106, 0x0040, 0x23d4, 0x2001,
++	0x0014, 0xa106, 0x0040, 0x23d8, 0x2001, 0x0019, 0xa106, 0x0040,
++	0x23dc, 0x2001, 0x0032, 0xa106, 0x0040, 0x23e0, 0x0078, 0x23e4,
++	0x2009, 0x0012, 0x0078, 0x23e6, 0x2009, 0x0014, 0x0078, 0x23e6,
++	0x2009, 0x0019, 0x0078, 0x23e6, 0x2009, 0x0020, 0x0078, 0x23e6,
++	0x2009, 0x003f, 0x0078, 0x23e6, 0x2011, 0x0000, 0x2100, 0xa205,
++	0x700a, 0x0e7f, 0x007c, 0x0068, 0x23eb, 0x2091, 0x8000, 0x2071,
++	0x0000, 0x007e, 0x7018, 0xa084, 0x0001, 0x00c0, 0x23f2, 0x007f,
++	0x2071, 0x0010, 0x70ca, 0x007f, 0x70c6, 0x70c3, 0x8002, 0x70db,
++	0x0741, 0x70df, 0x0000, 0x2071, 0x0000, 0x701b, 0x0001, 0x2091,
++	0x4080, 0x0078, 0x2409, 0x107e, 0x007e, 0x127e, 0x2091, 0x2300,
++	0x7f3c, 0x7e58, 0x7c30, 0x7d38, 0x77c2, 0x74c6, 0x76ca, 0x75ce,
++	0xa594, 0x003f, 0xa49c, 0x0003, 0xa484, 0x000f, 0x0079, 0x2420,
++	0x2432, 0x2432, 0x2432, 0x276c, 0x393b, 0x2430, 0x2461, 0x246b,
++	0x2430, 0x2430, 0x2430, 0x2430, 0x2430, 0x2430, 0x2430, 0x2430,
++	0x1078, 0x23eb, 0x8507, 0xa084, 0x001f, 0x0079, 0x2437, 0x2475,
++	0x276c, 0x2926, 0x2a23, 0x2a4b, 0x2ced, 0x2f98, 0x2fdb, 0x3026,
++	0x30ab, 0x3163, 0x320c, 0x2461, 0x2848, 0x2f6d, 0x2457, 0x3cc8,
++	0x3ce8, 0x3eae, 0x3eba, 0x3f8f, 0x2457, 0x2457, 0x4062, 0x4066,
++	0x3cc6, 0x2457, 0x3e19, 0x2457, 0x3b8c, 0x246b, 0x2457, 0x1078,
++	0x23eb, 0x0018, 0x2410, 0x127f, 0x2091, 0x8001, 0x007f, 0x107f,
++	0x007c, 0x2019, 0x4e3b, 0x1078, 0x2276, 0x702f, 0x0001, 0x781b,
++	0x004f, 0x0078, 0x2459, 0x2019, 0x4d9e, 0x1078, 0x2276, 0x702f,
++	0x8000, 0x781b, 0x00d0, 0x0078, 0x2459, 0x7242, 0x2009, 0x510f,
++	0x200b, 0x0000, 0xa584, 0x0001, 0x00c0, 0x3ba0, 0x0040, 0x2492,
++	0x1078, 0x23eb, 0x7003, 0x0000, 0x704b, 0x0000, 0x7043, 0x0000,
++	0x7037, 0x0000, 0x1078, 0x3912, 0x0018, 0x2410, 0x2009, 0x510f,
++	0x200b, 0x0000, 0x7068, 0xa005, 0x00c0, 0x255d, 0x706c, 0xa084,
++	0x0007, 0x0079, 0x249b, 0x2594, 0x24a3, 0x24af, 0x24cc, 0x24ee,
++	0x253b, 0x2514, 0x24a3, 0x1078, 0x38fa, 0x2009, 0x0048, 0x1078,
++	0x2e39, 0x00c0, 0x24ad, 0x7003, 0x0004, 0x0078, 0x2459, 0x1078,
++	0x38fa, 0x00c0, 0x24ca, 0x7080, 0x8007, 0x7882, 0x789b, 0x0010,
++	0x78ab, 0x000c, 0x789b, 0x0060, 0x78ab, 0x0001, 0x785b, 0x0004,
++	0x2009, 0x00e0, 0x1078, 0x2e2d, 0x00c0, 0x24ca, 0x7003, 0x0004,
++	0x7093, 0x000f, 0x0078, 0x2459, 0x1078, 0x38fa, 0x00c0, 0x24ec,
++	0x7180, 0x8107, 0x7882, 0x789b, 0x0010, 0xa18c, 0x001f, 0xa18d,
++	0x00c0, 0x79aa, 0x78ab, 0x0006, 0x789b, 0x0060, 0x78ab, 0x0002,
++	0x785b, 0x0004, 0x2009, 0x00e0, 0x1078, 0x2e2d, 0x00c0, 0x24ec,
++	0x7003, 0x0004, 0x7093, 0x000f, 0x0078, 0x2459, 0x1078, 0x38fa,
++	0x00c0, 0x2512, 0x7180, 0x8107, 0x7882, 0x789b, 0x0010, 0xa18c,
++	0x001f, 0xa18d, 0x00c0, 0x79aa, 0x78ab, 0x0020, 0x7184, 0x79aa,
++	0x78ab, 0x000d, 0x789b, 0x0060, 0x78ab, 0x0004, 0x785b, 0x0004,
++	0x2009, 0x00e0, 0x1078, 0x2e2d, 0x00c0, 0x2512, 0x7003, 0x0004,
++	0x7093, 0x000f, 0x0078, 0x2459, 0x1078, 0x38fa, 0x00c0, 0x2539,
++	0x7180, 0x8107, 0x7882, 0x789b, 0x0010, 0xa18c, 0x001f, 0xa18d,
++	0x00c0, 0x79aa, 0x78ab, 0x0006, 0x789b, 0x0060, 0x78ab, 0x0002,
++	0x785b, 0x0004, 0x2009, 0x00e0, 0x1078, 0x2e2d, 0x00c0, 0x2539,
++	0x7088, 0x708b, 0x0000, 0x2068, 0x704a, 0x7003, 0x0002, 0x7093,
++	0x000f, 0x0078, 0x2459, 0x1078, 0x38fa, 0x00c0, 0x2459, 0x7088,
++	0x2068, 0x6f14, 0x1078, 0x37ef, 0x2c50, 0x1078, 0x39ac, 0x789b,
++	0x0010, 0x6814, 0xa084, 0x001f, 0xa085, 0x0080, 0x78aa, 0x6e1c,
++	0x2041, 0x0001, 0x708c, 0xa084, 0x0400, 0x2001, 0x0004, 0x0040,
++	0x255b, 0x2001, 0x0006, 0x0078, 0x267c, 0x1078, 0x38fa, 0x00c0,
++	0x2459, 0x789b, 0x0010, 0x7068, 0x2068, 0x6f14, 0x1078, 0x37ef,
++	0x2c50, 0x1078, 0x39ac, 0x6008, 0xa085, 0x0010, 0x600a, 0x6824,
++	0xa005, 0x0040, 0x257b, 0xa082, 0x0006, 0x0048, 0x2579, 0x0078,
++	0x257b, 0x6827, 0x0005, 0x6b14, 0xa39c, 0x001f, 0xa39d, 0x00c0,
++	0x7058, 0xa084, 0x8000, 0x0040, 0x2589, 0xa684, 0x0001, 0x0040,
++	0x258b, 0xa39c, 0xffbf, 0x7baa, 0x2031, 0x0020, 0x2041, 0x0001,
++	0x2001, 0x0003, 0x0078, 0x267c, 0x0018, 0x2410, 0x744c, 0xa485,
++	0x0000, 0x0040, 0x25ae, 0xa080, 0x5180, 0x2030, 0x7150, 0x8108,
++	0xa12a, 0x0048, 0x25a5, 0x2009, 0x5180, 0x2164, 0x6504, 0x85ff,
++	0x00c0, 0x25bf, 0x8421, 0x00c0, 0x259f, 0x7152, 0x7003, 0x0000,
++	0x704b, 0x0000, 0x7040, 0xa005, 0x0040, 0x3ba0, 0x0078, 0x2459,
++	0x764c, 0xa6b0, 0x5180, 0x7150, 0x2600, 0x0078, 0x25aa, 0x7152,
++	0x2568, 0x2558, 0x754a, 0x2c50, 0x6034, 0xa085, 0x0000, 0x00c0,
++	0x25bc, 0x6708, 0x773a, 0xa784, 0x033f, 0x0040, 0x25f5, 0xa784,
++	0x0021, 0x00c0, 0x25bc, 0xa784, 0x0002, 0x0040, 0x25de, 0xa784,
++	0x0004, 0x0040, 0x25bc, 0xa7bc, 0xfffb, 0x670a, 0xa784, 0x0008,
++	0x00c0, 0x25bc, 0xa784, 0x0010, 0x00c0, 0x25bc, 0xa784, 0x0200,
++	0x00c0, 0x25bc, 0xa784, 0x0100, 0x0040, 0x25f5, 0x6018, 0xa005,
++	0x00c0, 0x25bc, 0xa7bc, 0xfeff, 0x670a, 0x6823, 0x0000, 0x6e1c,
++	0xa684, 0x000e, 0x6118, 0x0040, 0x2605, 0x601c, 0xa102, 0x0048,
++	0x2608, 0x0040, 0x2608, 0x0078, 0x25b8, 0x81ff, 0x00c0, 0x25b8,
++	0x68c3, 0x0000, 0xa784, 0x0080, 0x00c0, 0x2610, 0x700c, 0x6022,
++	0xa7bc, 0xff7f, 0x670a, 0x1078, 0x39ac, 0x0018, 0x2410, 0x789b,
++	0x0010, 0xa046, 0x1078, 0x38fa, 0x00c0, 0x2459, 0x6b14, 0xa39c,
++	0x001f, 0xa39d, 0x00c0, 0x7058, 0xa084, 0x8000, 0x0040, 0x262c,
++	0xa684, 0x0001, 0x0040, 0x262e, 0xa39c, 0xffbf, 0xa684, 0x0010,
++	0x0040, 0x2634, 0xa39d, 0x0020, 0x7baa, 0x8840, 0xa684, 0x000e,
++	0x00c0, 0x263f, 0xa7bd, 0x0010, 0x670a, 0x0078, 0x267a, 0x7158,
++	0xa18c, 0x0800, 0x0040, 0x3401, 0x2011, 0x0020, 0xa684, 0x0008,
++	0x00c0, 0x2650, 0x8210, 0xa684, 0x0002, 0x00c0, 0x2650, 0x8210,
++	0x7aaa, 0x8840, 0x1078, 0x3912, 0x6a14, 0x610c, 0x8108, 0xa18c,
++	0x00ff, 0xa1e0, 0x7400, 0x2c64, 0x8cff, 0x0040, 0x2671, 0x6014,
++	0xa206, 0x00c0, 0x265b, 0x60b8, 0x8001, 0x60ba, 0x00c0, 0x2656,
++	0x0c7e, 0x2a60, 0x6008, 0xa085, 0x0100, 0x600a, 0x0c7f, 0x0078,
++	0x2594, 0x1078, 0x38fa, 0x00c0, 0x2459, 0x2a60, 0x610e, 0x79aa,
++	0x8840, 0x7132, 0x2001, 0x0001, 0x007e, 0x715c, 0xa184, 0x0018,
++	0x0040, 0x2697, 0xa184, 0x0010, 0x0040, 0x268a, 0x1078, 0x3604,
++	0x00c0, 0x26ba, 0xa184, 0x0008, 0x0040, 0x2697, 0x69a0, 0xa184,
++	0x0600, 0x00c0, 0x2697, 0x1078, 0x34f1, 0x0078, 0x26ba, 0x69a0,
++	0xa184, 0x0800, 0x0040, 0x26ae, 0x0c7e, 0x027e, 0x2960, 0x6000,
++	0xa085, 0x2000, 0x6002, 0x6104, 0xa18d, 0x0010, 0x6106, 0x027f,
++	0x0c7f, 0x1078, 0x3604, 0x00c0, 0x26ba, 0x69a0, 0xa184, 0x0200,
++	0x0040, 0x26b6, 0x1078, 0x3540, 0x0078, 0x26ba, 0xa184, 0x0400,
++	0x00c0, 0x2693, 0x69a0, 0xa184, 0x1000, 0x0040, 0x26c5, 0x6914,
++	0xa18c, 0xff00, 0x810f, 0x1078, 0x22ee, 0x007f, 0x7002, 0xa68c,
++	0x00e0, 0xa684, 0x0060, 0x0040, 0x26d3, 0xa086, 0x0060, 0x00c0,
++	0x26d3, 0xa18d, 0x4000, 0x88ff, 0x0040, 0x26d8, 0xa18d, 0x0004,
++	0x795a, 0x69b6, 0x789b, 0x0060, 0x2800, 0x78aa, 0x789b, 0x0061,
++	0x6818, 0xa08d, 0x8000, 0xa084, 0x7fff, 0x691a, 0xa68c, 0x0080,
++	0x0040, 0x26f7, 0x7097, 0x0000, 0xa08a, 0x000d, 0x0050, 0x26f5,
++	0xa08a, 0x000c, 0x7196, 0x2001, 0x000c, 0x800c, 0x719a, 0x78aa,
++	0x8008, 0x810c, 0x0040, 0x3407, 0xa18c, 0x00f8, 0x00c0, 0x3407,
++	0x157e, 0x137e, 0x147e, 0x20a1, 0x012b, 0x789b, 0x0000, 0x8000,
++	0x80ac, 0xad80, 0x000b, 0x2098, 0x53a6, 0x147f, 0x137f, 0x157f,
++	0x6814, 0x8007, 0x7882, 0x6d94, 0x7dd6, 0x7dde, 0x6e98, 0x7ed2,
++	0x7eda, 0x1078, 0x38fa, 0x00c0, 0x272e, 0x702c, 0x8003, 0x0048,
++	0x2727, 0x2019, 0x4d9e, 0x1078, 0x2276, 0x702f, 0x8000, 0x7830,
++	0xa084, 0x00c0, 0x00c0, 0x272e, 0x0098, 0x2736, 0x6008, 0xa084,
++	0xffef, 0x600a, 0x1078, 0x3912, 0x0078, 0x2482, 0x7200, 0xa284,
++	0x0007, 0xa086, 0x0001, 0x00c0, 0x2743, 0x781b, 0x004f, 0x1078,
++	0x3912, 0x0078, 0x2754, 0x6ab4, 0xa295, 0x2000, 0x7a5a, 0x781b,
++	0x004f, 0x1078, 0x3912, 0x7200, 0x2500, 0xa605, 0x0040, 0x2754,
++	0xa284, 0x0007, 0x1079, 0x2762, 0xad80, 0x0009, 0x7036, 0xa284,
++	0x0007, 0xa086, 0x0001, 0x00c0, 0x2459, 0x6018, 0x8000, 0x601a,
++	0x0078, 0x2459, 0x276a, 0x4a3a, 0x4a3a, 0x4a29, 0x4a3a, 0x276a,
++	0x4a29, 0x276a, 0x1078, 0x23eb, 0x1078, 0x38fa, 0x0f7e, 0x2079,
++	0x5100, 0x78cc, 0x0f7f, 0xa084, 0x0001, 0x0040, 0x2790, 0x706c,
++	0xa086, 0x0001, 0x00c0, 0x277f, 0x706e, 0x0078, 0x2823, 0x706c,
++	0xa086, 0x0005, 0x00c0, 0x278e, 0x7088, 0x2068, 0x681b, 0x0004,
++	0x6817, 0x0000, 0x6820, 0xa085, 0x0008, 0x6822, 0x706f, 0x0000,
++	0x2011, 0x0004, 0x716c, 0xa186, 0x0001, 0x0040, 0x27b1, 0xa186,
++	0x0007, 0x00c0, 0x27a1, 0x2009, 0x5138, 0x200b, 0x0005, 0x0078,
++	0x27b1, 0x2009, 0x5113, 0x2104, 0x2009, 0x5112, 0x200a, 0x2009,
++	0x5138, 0x200b, 0x0001, 0x706f, 0x0000, 0x7073, 0x0001, 0x0078,
++	0x27b3, 0x706f, 0x0000, 0x1078, 0x4776, 0x157e, 0x20a9, 0x0010,
++	0x2039, 0x0000, 0x1078, 0x36e2, 0xa7b8, 0x0100, 0x0070, 0x27c2,
++	0x0078, 0x27ba, 0x157f, 0x7000, 0x0079, 0x27c6, 0x27f4, 0x27db,
++	0x27db, 0x27ce, 0x27f4, 0x27f4, 0x27f4, 0x27f4, 0x2021, 0x515a,
++	0x2404, 0xa005, 0x0040, 0x27f4, 0xad06, 0x00c0, 0x27db, 0x6800,
++	0x2022, 0x0078, 0x27eb, 0x6820, 0xa084, 0x0001, 0x00c0, 0x27e7,
++	0x6f14, 0x1078, 0x37ef, 0x1078, 0x33d8, 0x0078, 0x27eb, 0x7060,
++	0x2060, 0x6800, 0x6002, 0x6a1a, 0x6817, 0x0000, 0x6820, 0xa085,
++	0x0008, 0x6822, 0x1078, 0x1c70, 0x2021, 0x7500, 0x1078, 0x2830,
++	0x2021, 0x515a, 0x1078, 0x2830, 0x157e, 0x20a9, 0x0000, 0x2021,
++	0x7400, 0x1078, 0x2830, 0x8420, 0x0070, 0x2808, 0x0078, 0x2801,
++	0x2061, 0x5400, 0x2021, 0x0002, 0x20a9, 0x0100, 0x6018, 0x6110,
++	0x81ff, 0x0040, 0x2817, 0xa102, 0x0050, 0x2817, 0x6012, 0x601b,
++	0x0000, 0xace0, 0x0010, 0x0070, 0x281f, 0x0078, 0x280e, 0x8421,
++	0x00c0, 0x280c, 0x157f, 0x709c, 0xa084, 0x8000, 0x0040, 0x282a,
++	0x1078, 0x3a00, 0x7003, 0x0000, 0x704b, 0x0000, 0x0078, 0x2459,
++	0x047e, 0x2404, 0xa005, 0x0040, 0x2844, 0x2068, 0x6800, 0x007e,
++	0x6a1a, 0x6817, 0x0000, 0x6820, 0xa085, 0x0008, 0x6822, 0x1078,
++	0x1c70, 0x007f, 0x0078, 0x2832, 0x047f, 0x2023, 0x0000, 0x007c,
++	0xa282, 0x0003, 0x0050, 0x284e, 0x1078, 0x23eb, 0x2300, 0x0079,
++	0x2851, 0x2854, 0x28c7, 0x28e4, 0xa282, 0x0002, 0x0040, 0x285a,
++	0x1078, 0x23eb, 0x706c, 0x706f, 0x0000, 0x7093, 0x0000, 0x0079,
++	0x2861, 0x2869, 0x2869, 0x286b, 0x289f, 0x340d, 0x2869, 0x289f,
++	0x2869, 0x1078, 0x23eb, 0x7780, 0x1078, 0x36e2, 0x7780, 0xa7bc,
++	0x0f00, 0x1078, 0x37ef, 0x6018, 0xa005, 0x0040, 0x2896, 0x2021,
++	0x7500, 0x2009, 0x0004, 0x2011, 0x0010, 0x1078, 0x28ff, 0x0040,
++	0x2896, 0x157e, 0x20a9, 0x0000, 0x2021, 0x7400, 0x047e, 0x2009,
++	0x0004, 0x2011, 0x0010, 0x1078, 0x28ff, 0x047f, 0x0040, 0x2895,
++	0x8420, 0x0070, 0x2895, 0x0078, 0x2886, 0x157f, 0x8738, 0xa784,
++	0x001f, 0x00c0, 0x2871, 0x0078, 0x2482, 0x0078, 0x2482, 0x7780,
++	0x1078, 0x37ef, 0x6018, 0xa005, 0x0040, 0x28c5, 0x2021, 0x7500,
++	0x2009, 0x0005, 0x2011, 0x0020, 0x1078, 0x28ff, 0x0040, 0x28c5,
++	0x157e, 0x20a9, 0x0000, 0x2021, 0x7400, 0x047e, 0x2009, 0x0005,
++	0x2011, 0x0020, 0x1078, 0x28ff, 0x047f, 0x0040, 0x28c4, 0x8420,
++	0x0070, 0x28c4, 0x0078, 0x28b5, 0x157f, 0x0078, 0x2482, 0x2200,
++	0x0079, 0x28ca, 0x28cd, 0x28cf, 0x28cf, 0x1078, 0x23eb, 0x2009,
++	0x0012, 0x706c, 0xa086, 0x0002, 0x0040, 0x28d8, 0x2009, 0x000e,
++	0x6818, 0xa084, 0x8000, 0x0040, 0x28de, 0x691a, 0x706f, 0x0000,
++	0x7073, 0x0001, 0x0078, 0x3888, 0x2200, 0x0079, 0x28e7, 0x28ec,
++	0x28cf, 0x28ea, 0x1078, 0x23eb, 0x1078, 0x4776, 0x7000, 0xa086,
++	0x0001, 0x00c0, 0x339d, 0x1078, 0x33ee, 0x6008, 0xa084, 0xffef,
++	0x600a, 0x1078, 0x3390, 0x0040, 0x339d, 0x0078, 0x2594, 0x2404,
++	0xa005, 0x0040, 0x2922, 0x2068, 0x2d04, 0x007e, 0x6814, 0xa706,
++	0x0040, 0x290e, 0x2d20, 0x007f, 0x0078, 0x2900, 0x007f, 0x2022,
++	0x691a, 0x6817, 0x0000, 0x6820, 0xa205, 0x6822, 0x1078, 0x1c70,
++	0x6010, 0x8001, 0x6012, 0x6008, 0xa084, 0xffef, 0x600a, 0x1078,
++	0x33ee, 0x007c, 0xa085, 0x0001, 0x0078, 0x2921, 0x2300, 0x0079,
++	0x2929, 0x292e, 0x292c, 0x29c7, 0x1078, 0x23eb, 0x78ec, 0xa084,
++	0x0001, 0x00c0, 0x2942, 0x7000, 0xa086, 0x0004, 0x00c0, 0x293a,
++	0x0078, 0x2965, 0x1078, 0x33ee, 0x6008, 0xa084, 0xffef, 0x600a,
++	0x0078, 0x339d, 0x78e4, 0xa005, 0x00d0, 0x2965, 0x0018, 0x2459,
++	0x2008, 0xa084, 0x0030, 0x00c0, 0x2951, 0x781b, 0x004f, 0x0078,
++	0x2459, 0x78ec, 0xa084, 0x0003, 0x0040, 0x294d, 0x2100, 0xa084,
++	0x0007, 0x0079, 0x295b, 0x299e, 0x29a9, 0x298f, 0x2963, 0x38ed,
++	0x38ed, 0x2963, 0x29b8, 0x1078, 0x23eb, 0x7000, 0xa086, 0x0004,
++	0x00c0, 0x297f, 0x706c, 0xa086, 0x0002, 0x00c0, 0x2975, 0x2011,
++	0x0002, 0x2019, 0x0000, 0x0078, 0x2848, 0x706c, 0xa086, 0x0006,
++	0x0040, 0x296f, 0x706c, 0xa086, 0x0004, 0x0040, 0x296f, 0x79e4,
++	0xa184, 0x0030, 0x0040, 0x2989, 0x78ec, 0xa084, 0x0003, 0x00c0,
++	0x298b, 0x0078, 0x2f6d, 0x2001, 0x0003, 0x0078, 0x2d01, 0x6818,
++	0xa084, 0x8000, 0x0040, 0x2996, 0x681b, 0x001d, 0x1078, 0x36c1,
++	0x782b, 0x3008, 0x781b, 0x0056, 0x0078, 0x2459, 0x6818, 0xa084,
++	0x8000, 0x0040, 0x29a5, 0x681b, 0x001d, 0x1078, 0x36c1, 0x0078,
++	0x38b8, 0x6818, 0xa084, 0x8000, 0x0040, 0x29b0, 0x681b, 0x001d,
++	0x1078, 0x36c1, 0x782b, 0x3008, 0x781b, 0x00cd, 0x0078, 0x2459,
++	0x6818, 0xa084, 0x8000, 0x0040, 0x29bf, 0x681b, 0x001d, 0x1078,
++	0x36c1, 0x782b, 0x3008, 0x781b, 0x008e, 0x0078, 0x2459, 0xa584,
++	0x000f, 0x00c0, 0x29e4, 0x7000, 0x0079, 0x29ce, 0x2482, 0x29d8,
++	0x29d6, 0x339d, 0x339d, 0x339d, 0x339d, 0x29d6, 0x1078, 0x23eb,
++	0x1078, 0x33ee, 0x6008, 0xa084, 0xffef, 0x600a, 0x1078, 0x3390,
++	0x0040, 0x339d, 0x0078, 0x2594, 0x78e4, 0xa005, 0x00d0, 0x2965,
++	0x0018, 0x2965, 0x2008, 0xa084, 0x0030, 0x00c0, 0x29f3, 0x781b,
++	0x004f, 0x0078, 0x2459, 0x78ec, 0xa084, 0x0003, 0x0040, 0x29ef,
++	0x2100, 0xa184, 0x0007, 0x0079, 0x29fd, 0x2a0f, 0x2a13, 0x2a07,
++	0x2a05, 0x38ed, 0x38ed, 0x2a05, 0x38e3, 0x1078, 0x23eb, 0x1078,
++	0x36c9, 0x782b, 0x3008, 0x781b, 0x0056, 0x0078, 0x2459, 0x1078,
++	0x36c9, 0x0078, 0x38b8, 0x1078, 0x36c9, 0x782b, 0x3008, 0x781b,
++	0x00cd, 0x0078, 0x2459, 0x1078, 0x36c9, 0x782b, 0x3008, 0x781b,
++	0x008e, 0x0078, 0x2459, 0x2300, 0x0079, 0x2a26, 0x2a2b, 0x2a29,
++	0x2a2d, 0x1078, 0x23eb, 0x0078, 0x30ab, 0x681b, 0x0008, 0x78a3,
++	0x0000, 0x79e4, 0xa184, 0x0030, 0x0040, 0x30ab, 0x78ec, 0xa084,
++	0x0003, 0x0040, 0x30ab, 0xa184, 0x0007, 0x0079, 0x2a3f, 0x2a47,
++	0x2a13, 0x298f, 0x3888, 0x38ed, 0x38ed, 0x2a47, 0x38e3, 0x1078,
++	0x389c, 0x0078, 0x2459, 0xa282, 0x0005, 0x0050, 0x2a51, 0x1078,
++	0x23eb, 0x2300, 0x0079, 0x2a54, 0x2a57, 0x2cae, 0x2cbc, 0x2200,
++	0x0079, 0x2a5a, 0x2a74, 0x2a61, 0x2a74, 0x2a5f, 0x2c93, 0x1078,
++	0x23eb, 0x789b, 0x0018, 0x78a8, 0xa084, 0x00ff, 0xa082, 0x0020,
++	0x0048, 0x369d, 0xa08a, 0x0004, 0x00c8, 0x369d, 0x0079, 0x2a70,
++	0x369d, 0x369d, 0x369d, 0x364b, 0x789b, 0x0018, 0x79a8, 0xa184,
++	0x0080, 0x0040, 0x2a85, 0x0078, 0x369d, 0x7000, 0xa005, 0x00c0,
++	0x2a7b, 0x2011, 0x0004, 0x0078, 0x321f, 0xa184, 0x00ff, 0xa08a,
++	0x0010, 0x00c8, 0x369d, 0x0079, 0x2a8d, 0x2a9f, 0x2a9d, 0x2ab7,
++	0x2abb, 0x2b78, 0x369d, 0x369d, 0x2b7a, 0x369d, 0x369d, 0x2c8f,
++	0x2c8f, 0x369d, 0x369d, 0x369d, 0x2c91, 0x1078, 0x23eb, 0xa684,
++	0x1000, 0x0040, 0x2aac, 0x2001, 0x0500, 0x8000, 0x8000, 0x783a,
++	0x781b, 0x008c, 0x0078, 0x2459, 0x6818, 0xa084, 0x8000, 0x0040,
++	0x2ab5, 0x681b, 0x001d, 0x0078, 0x2aa3, 0x0078, 0x3888, 0x681b,
++	0x001d, 0x0078, 0x36ad, 0x6920, 0x6922, 0xa684, 0x1800, 0x00c0,
++	0x2afc, 0x6820, 0xa084, 0x0001, 0x00c0, 0x2b04, 0x6818, 0xa086,
++	0x0008, 0x00c0, 0x2acd, 0x681b, 0x0000, 0xa684, 0x0400, 0x0040,
++	0x2b74, 0xa684, 0x0080, 0x0040, 0x2af8, 0x7097, 0x0000, 0x6818,
++	0xa084, 0x003f, 0xa08a, 0x000d, 0x0050, 0x2af8, 0xa08a, 0x000c,
++	0x7196, 0x2001, 0x000c, 0x800c, 0x719a, 0x789b, 0x0061, 0x78aa,
++	0x157e, 0x137e, 0x147e, 0x20a1, 0x012b, 0x789b, 0x0000, 0x8000,
++	0x80ac, 0xad80, 0x000b, 0x2098, 0x53a6, 0x147f, 0x137f, 0x157f,
++	0x781b, 0x0058, 0x0078, 0x2459, 0xa684, 0x1000, 0x0040, 0x2b04,
++	0x781b, 0x0065, 0x0078, 0x2459, 0xa684, 0x0060, 0x0040, 0x2b70,
++	0xa684, 0x0800, 0x0040, 0x2b70, 0xa684, 0x8000, 0x00c0, 0x2b12,
++	0x0078, 0x2b2c, 0xa6b4, 0x7fff, 0x7e5a, 0x6eb6, 0x789b, 0x0076,
++	0x7aac, 0x79ac, 0x78ac, 0x801b, 0x00c8, 0x2b1f, 0x8000, 0xa084,
++	0x003f, 0xa108, 0xa291, 0x0000, 0x6b98, 0x2100, 0xa302, 0x68b2,
++	0x6b94, 0x2200, 0xa303, 0x68ae, 0xa684, 0x4000, 0x0040, 0x2b34,
++	0xa6b4, 0xbfff, 0x7e5a, 0x6eb6, 0x7000, 0xa086, 0x0003, 0x00c0,
++	0x2b41, 0x1078, 0x482c, 0x1078, 0x4a29, 0x781b, 0x0064, 0x0078,
++	0x2459, 0xa006, 0x1078, 0x4b30, 0x6ab0, 0x69ac, 0x6c98, 0x6b94,
++	0x2200, 0xa105, 0x0040, 0x2b50, 0x2200, 0xa422, 0x2100, 0xa31b,
++	0x6caa, 0x7cd2, 0x7cda, 0x6ba6, 0x7bd6, 0x7bde, 0x2300, 0xa405,
++	0x00c0, 0x2b62, 0xa6b5, 0x4000, 0x7e5a, 0x6eb6, 0x781b, 0x0064,
++	0x0078, 0x2459, 0x781b, 0x0064, 0x2200, 0xa115, 0x00c0, 0x2b6c,
++	0x1078, 0x4a3a, 0x0078, 0x2459, 0x1078, 0x4a85, 0x0078, 0x2459,
++	0x781b, 0x0065, 0x0078, 0x2459, 0x781b, 0x0058, 0x0078, 0x2459,
++	0x1078, 0x23eb, 0x0078, 0x2bdb, 0x6920, 0xa184, 0x0100, 0x0040,
++	0x2b92, 0xa18c, 0xfeff, 0x6922, 0x0c7e, 0x7054, 0x2060, 0x6000,
++	0xa084, 0xefff, 0x6002, 0x6004, 0xa084, 0xfff5, 0x6006, 0x0c7f,
++	0x0078, 0x2bca, 0xa184, 0x0200, 0x0040, 0x2bca, 0xa18c, 0xfdff,
++	0x6922, 0x0c7e, 0x7054, 0x2060, 0x6000, 0xa084, 0xdfff, 0x6002,
++	0x6004, 0xa084, 0xffef, 0x6006, 0x2008, 0x2c48, 0x0c7f, 0xa184,
++	0x0008, 0x0040, 0x2bca, 0x1078, 0x37eb, 0x1078, 0x34f1, 0x88ff,
++	0x0040, 0x2bca, 0x789b, 0x0060, 0x2800, 0x78aa, 0x7e58, 0xa6b5,
++	0x0004, 0x7e5a, 0xa684, 0x0400, 0x00c0, 0x2bc4, 0x782b, 0x3008,
++	0x781b, 0x0056, 0x0078, 0x2459, 0x782b, 0x3008, 0x781b, 0x0065,
++	0x0078, 0x2459, 0x7e58, 0xa684, 0x0400, 0x00c0, 0x2bd3, 0x781b,
++	0x0058, 0x0078, 0x2459, 0x781b, 0x0065, 0x0078, 0x2459, 0x0078,
++	0x36a5, 0x0078, 0x36a5, 0x2019, 0x0000, 0x7990, 0xa18c, 0x0007,
++	0x00c0, 0x2be9, 0x6820, 0xa084, 0x0100, 0x0040, 0x2bd9, 0x2009,
++	0x0008, 0x789b, 0x0010, 0x78a8, 0xa094, 0x00ff, 0xa286, 0x0001,
++	0x00c0, 0x2c20, 0x2300, 0x7ca8, 0xa400, 0x2018, 0xa102, 0x0040,
++	0x2c18, 0x0048, 0x2bfd, 0x0078, 0x2c1a, 0xa380, 0x0002, 0xa102,
++	0x00c8, 0x2c18, 0x6920, 0xa18c, 0xfcff, 0x6922, 0x0c7e, 0x7054,
++	0x2060, 0x6000, 0xa084, 0xefef, 0x6002, 0x6004, 0xa084, 0xffe5,
++	0x6006, 0x0c7f, 0x7e58, 0xa6b4, 0xfffb, 0x7e5a, 0x0078, 0x2bcb,
++	0x0078, 0x2b7c, 0x24a8, 0x7aa8, 0x00f0, 0x2c1a, 0x0078, 0x2beb,
++	0xa284, 0x00f0, 0xa086, 0x0020, 0x00c0, 0x2c80, 0x8318, 0x8318,
++	0x2300, 0xa102, 0x0040, 0x2c30, 0x0048, 0x2c30, 0x0078, 0x2c7d,
++	0xa286, 0x0023, 0x0040, 0x2bd9, 0x681c, 0xa084, 0xfff1, 0x681e,
++	0x7e58, 0xa684, 0xfff1, 0xa085, 0x0010, 0x2030, 0x7e5a, 0x6008,
++	0xa085, 0x0010, 0x600a, 0x0c7e, 0x7054, 0x2060, 0x6004, 0x2008,
++	0x2c48, 0x0c7f, 0xa184, 0x0010, 0x0040, 0x2c54, 0x1078, 0x37eb,
++	0x1078, 0x3604, 0x0078, 0x2c63, 0x0c7e, 0x7054, 0x2060, 0x6004,
++	0x2008, 0x2c48, 0x0c7f, 0xa184, 0x0008, 0x0040, 0x2bca, 0x1078,
++	0x37eb, 0x1078, 0x34f1, 0x88ff, 0x0040, 0x2bca, 0x789b, 0x0060,
++	0x2800, 0x78aa, 0xa6b5, 0x0004, 0x7e5a, 0xa684, 0x0400, 0x00c0,
++	0x2c77, 0x782b, 0x3008, 0x781b, 0x0056, 0x0078, 0x2459, 0x782b,
++	0x3008, 0x781b, 0x0065, 0x0078, 0x2459, 0x7aa8, 0x0078, 0x2beb,
++	0x8318, 0x2300, 0xa102, 0x0040, 0x2c89, 0x0048, 0x2c89, 0x0078,
++	0x2beb, 0xa284, 0x0080, 0x00c0, 0x36ad, 0x0078, 0x36a5, 0x0078,
++	0x36ad, 0x0078, 0x369d, 0x789b, 0x0018, 0x78a8, 0xa084, 0x00ff,
++	0xa08e, 0x0001, 0x0040, 0x2c9e, 0x1078, 0x23eb, 0x7aa8, 0xa294,
++	0x00ff, 0x78a8, 0xa084, 0x00ff, 0xa08a, 0x0004, 0x00c8, 0x369d,
++	0x0079, 0x2caa, 0x369d, 0x343e, 0x369d, 0x3599, 0xa282, 0x0000,
++	0x00c0, 0x2cb4, 0x1078, 0x23eb, 0x1078, 0x36c1, 0x782b, 0x3008,
++	0x781b, 0x0065, 0x0078, 0x2459, 0xa282, 0x0003, 0x00c0, 0x2cc2,
++	0x1078, 0x23eb, 0xa484, 0x8000, 0x00c0, 0x2ce5, 0x706c, 0xa005,
++	0x0040, 0x2ccc, 0x1078, 0x23eb, 0x6f14, 0x7782, 0xa7bc, 0x0f00,
++	0x1078, 0x37ef, 0x6008, 0xa085, 0x0021, 0x600a, 0x8738, 0xa784,
++	0x001f, 0x00c0, 0x2cd0, 0x1078, 0x36c5, 0x706f, 0x0002, 0x2009,
++	0x5138, 0x200b, 0x0009, 0x0078, 0x2ce7, 0x1078, 0x36d1, 0x782b,
++	0x3008, 0x781b, 0x0065, 0x0078, 0x2459, 0xa282, 0x0004, 0x0050,
++	0x2cf3, 0x1078, 0x23eb, 0x2300, 0x0079, 0x2cf6, 0x2cf9, 0x2de2,
++	0x2e15, 0xa286, 0x0003, 0x0040, 0x2cff, 0x1078, 0x23eb, 0x2001,
++	0x0000, 0x007e, 0x68c0, 0xa005, 0x0040, 0x2d08, 0x7003, 0x0003,
++	0x68a0, 0xa084, 0x2000, 0x0040, 0x2d11, 0x6008, 0xa085, 0x0002,
++	0x600a, 0x007f, 0x703e, 0x7000, 0xa084, 0x0007, 0x0079, 0x2d18,
++	0x2482, 0x2d22, 0x2d22, 0x2f17, 0x2f53, 0x2482, 0x2f53, 0x2d20,
++	0x1078, 0x23eb, 0xa684, 0x1000, 0x00c0, 0x2d2a, 0x1078, 0x4776,
++	0x0040, 0x2dbc, 0x7868, 0xa08c, 0x00ff, 0x0040, 0x2d72, 0xa186,
++	0x0008, 0x00c0, 0x2d41, 0x1078, 0x33ee, 0x6008, 0xa084, 0xffef,
++	0x600a, 0x1078, 0x3390, 0x0040, 0x2d72, 0x1078, 0x4776, 0x0078,
++	0x2d59, 0xa186, 0x0028, 0x00c0, 0x2d72, 0x1078, 0x4776, 0x6008,
++	0xa084, 0xffef, 0x600a, 0x6018, 0xa005, 0x0040, 0x2d59, 0x8001,
++	0x601a, 0xa005, 0x0040, 0x2d59, 0x8001, 0xa005, 0x0040, 0x2d59,
++	0x601e, 0x6820, 0xa084, 0x0001, 0x0040, 0x2482, 0x6820, 0xa084,
++	0xfffe, 0x6822, 0x7060, 0x0c7e, 0x2060, 0x6800, 0x6002, 0x0c7f,
++	0x6004, 0x6802, 0xa005, 0x2d00, 0x00c0, 0x2d6f, 0x6002, 0x6006,
++	0x0078, 0x2482, 0x017e, 0x1078, 0x2e46, 0x017f, 0xa684, 0xdf00,
++	0x681e, 0x682b, 0x0000, 0x6f14, 0x81ff, 0x0040, 0x2dbc, 0xa186,
++	0x0002, 0x00c0, 0x2dbc, 0xa684, 0x0800, 0x00c0, 0x2d8f, 0xa684,
++	0x0060, 0x0040, 0x2d8f, 0x78d8, 0x7adc, 0x682e, 0x6a32, 0x6820,
++	0xa084, 0x0800, 0x00c0, 0x2dbc, 0x8717, 0xa294, 0x000f, 0x8213,
++	0x8213, 0x8213, 0xa290, 0x5380, 0xa290, 0x0000, 0x221c, 0xa384,
++	0x0100, 0x00c0, 0x2da5, 0x0078, 0x2dab, 0x8210, 0x2204, 0xa085,
++	0x0018, 0x2012, 0x8211, 0xa384, 0x0400, 0x0040, 0x2db8, 0x68a0,
++	0xa084, 0x0100, 0x00c0, 0x2db8, 0x1078, 0x2eca, 0x0078, 0x2482,
++	0x6008, 0xa085, 0x0002, 0x600a, 0x6916, 0x6818, 0xa084, 0x8000,
++	0x0040, 0x2dc4, 0x703c, 0x681a, 0xa68c, 0xdf00, 0x691e, 0x1078,
++	0x33df, 0x1078, 0x33ee, 0x00c0, 0x2dd1, 0x6008, 0xa084, 0xffef,
++	0x600a, 0x6820, 0xa084, 0x0001, 0x00c0, 0x2dda, 0x1078, 0x33d8,
++	0x0078, 0x2dde, 0x7060, 0x2060, 0x6800, 0x6002, 0x1078, 0x1c70,
++	0x0078, 0x2482, 0xa282, 0x0004, 0x0048, 0x2de8, 0x1078, 0x23eb,
++	0x2200, 0x0079, 0x2deb, 0x2de6, 0x2def, 0x2dfc, 0x2def, 0x7000,
++	0xa086, 0x0005, 0x0040, 0x2df8, 0x1078, 0x36c1, 0x782b, 0x3008,
++	0x781b, 0x0065, 0x0078, 0x2459, 0x7890, 0x8007, 0x8001, 0xa084,
++	0x0007, 0xa080, 0x0018, 0x789a, 0x79a8, 0xa18c, 0x00ff, 0xa186,
++	0x0003, 0x0040, 0x2e11, 0xa186, 0x0000, 0x0040, 0x2e11, 0x0078,
++	0x369d, 0x781b, 0x0065, 0x0078, 0x2459, 0x6820, 0xa085, 0x0004,
++	0x6822, 0x82ff, 0x00c0, 0x2e20, 0x1078, 0x36c1, 0x0078, 0x2e27,
++	0x8211, 0x0040, 0x2e25, 0x1078, 0x23eb, 0x1078, 0x36d1, 0x782b,
++	0x3008, 0x781b, 0x0065, 0x0078, 0x2459, 0x702c, 0x8003, 0x0048,
++	0x2e37, 0x2019, 0x4d9e, 0x1078, 0x2276, 0x702f, 0x8000, 0x1078,
++	0x3912, 0x7830, 0xa084, 0x00c0, 0x00c0, 0x2e43, 0x0018, 0x2e43,
++	0x791a, 0xa006, 0x007c, 0xa085, 0x0001, 0x007c, 0xa684, 0x0060,
++	0x00c0, 0x2e50, 0x682f, 0x0000, 0x6833, 0x0000, 0x0078, 0x2ec9,
++	0xa684, 0x0800, 0x00c0, 0x2e72, 0x68b4, 0xa084, 0x4800, 0xa635,
++	0xa684, 0x0800, 0x00c0, 0x2e72, 0x6998, 0x6a94, 0x692e, 0x6a32,
++	0x703c, 0xa005, 0x00c0, 0x2e6a, 0x2200, 0xa105, 0x0040, 0x2e71,
++	0x703f, 0x0015, 0x7000, 0xa086, 0x0006, 0x0040, 0x2e71, 0x1078,
++	0x4776, 0x007c, 0xa684, 0x0020, 0x0040, 0x2e94, 0xa684, 0x4000,
++	0x0040, 0x2e80, 0x682f, 0x0000, 0x6833, 0x0000, 0x0078, 0x2e6a,
++	0x68b4, 0xa084, 0x4800, 0xa635, 0xa684, 0x4000, 0x00c0, 0x2e7a,
++	0x703c, 0xa005, 0x00c0, 0x2e8e, 0x703f, 0x0015, 0x79d8, 0x7adc,
++	0x692e, 0x6a32, 0x0078, 0x2e6a, 0xa684, 0x4000, 0x0040, 0x2e9e,
++	0x682f, 0x0000, 0x6833, 0x0000, 0x0078, 0x2e6a, 0x68b4, 0xa084,
++	0x4800, 0xa635, 0xa684, 0x4000, 0x00c0, 0x2e98, 0x703c, 0xa005,
++	0x00c0, 0x2eac, 0x703f, 0x0015, 0x79d8, 0x7adc, 0x78d0, 0x80fb,
++	0x00c8, 0x2eb3, 0x8000, 0xa084, 0x003f, 0xa108, 0xa291, 0x0000,
++	0x692e, 0x6a32, 0x2100, 0xa205, 0x00c0, 0x2ec0, 0x0078, 0x2e6a,
++	0x7000, 0xa086, 0x0006, 0x0040, 0x2ec9, 0x1078, 0x4b30, 0x0078,
++	0x2e6a, 0x007c, 0x6008, 0xa085, 0x0200, 0x600a, 0xa384, 0x0200,
++	0x0040, 0x2ed6, 0x6008, 0xa085, 0x0002, 0x600a, 0x681b, 0x0006,
++	0x688f, 0x0000, 0x6893, 0x0000, 0x6a30, 0x692c, 0x6a3e, 0x6942,
++	0x682f, 0x0003, 0x6833, 0x0000, 0x6837, 0x0020, 0x6897, 0x0000,
++	0x689b, 0x0020, 0x68b3, 0x0000, 0x68af, 0x0000, 0x7000, 0x0079,
++	0x2ef1, 0x2482, 0x2efb, 0x2f04, 0x2ef9, 0x2ef9, 0x2ef9, 0x2ef9,
++	0x2ef9, 0x1078, 0x23eb, 0x6820, 0xa084, 0x0001, 0x00c0, 0x2f04,
++	0x1078, 0x33d8, 0x0078, 0x2f0a, 0x7060, 0x2c50, 0x2060, 0x6800,
++	0x6002, 0x2a60, 0x2021, 0x515a, 0x2404, 0xa005, 0x0040, 0x2f13,
++	0x2020, 0x0078, 0x2f0c, 0x2d22, 0x206b, 0x0000, 0x007c, 0x1078,
++	0x33df, 0x1078, 0x33ee, 0x6008, 0xa084, 0xfdff, 0x600a, 0x682b,
++	0x0000, 0x789b, 0x000e, 0x6f14, 0x6817, 0x0002, 0x1078, 0x4b78,
++	0xa684, 0x0800, 0x0040, 0x2f30, 0x691c, 0xa18d, 0x2000, 0x691e,
++	0x6818, 0xa084, 0x8000, 0x0040, 0x2f40, 0x7868, 0xa08c, 0x00ff,
++	0x0040, 0x2f3e, 0x681b, 0x001e, 0x0078, 0x2f40, 0x681b, 0x0000,
++	0x2021, 0x515a, 0x2404, 0xad06, 0x0040, 0x2f47, 0x7460, 0x6800,
++	0x2022, 0x68c3, 0x0000, 0x6a3c, 0x6940, 0x6a32, 0x692e, 0x1078,
++	0x1c70, 0x0078, 0x2482, 0x1078, 0x2e46, 0x682b, 0x0000, 0x2001,
++	0x000e, 0x6f14, 0x1078, 0x3918, 0xa08c, 0x00ff, 0x6916, 0x6818,
++	0xa084, 0x8000, 0x0040, 0x2f66, 0x703c, 0x681a, 0xa68c, 0xdf00,
++	0x691e, 0x706f, 0x0000, 0x0078, 0x2482, 0x7000, 0xa005, 0x00c0,
++	0x2f73, 0x0078, 0x2482, 0xa006, 0x1078, 0x4776, 0x6817, 0x0000,
++	0x681b, 0x0014, 0xa68c, 0xdf00, 0x691e, 0x682b, 0x0000, 0x6820,
++	0xa085, 0x00ff, 0x6822, 0x7000, 0x0079, 0x2f86, 0x2482, 0x2f90,
++	0x2f90, 0x2f92, 0x2f92, 0x2f92, 0x2f92, 0x2f8e, 0x1078, 0x23eb,
++	0x1078, 0x33ee, 0x6008, 0xa084, 0xffef, 0x600a, 0x0078, 0x33a8,
++	0x2300, 0x0079, 0x2f9b, 0x2f9e, 0x2fa0, 0x2fd9, 0x1078, 0x23eb,
++	0x7000, 0x0079, 0x2fa3, 0x2482, 0x2fad, 0x2fad, 0x2fc8, 0x2fad,
++	0x2fd5, 0x2fc8, 0x2fab, 0x1078, 0x23eb, 0xa684, 0x0060, 0xa086,
++	0x0060, 0x00c0, 0x2fc4, 0xa6b4, 0xffdf, 0xa6b4, 0xbfff, 0xa6b5,
++	0x2000, 0x7e5a, 0x681c, 0xa084, 0xffdf, 0x681e, 0x1078, 0x4776,
++	0x1078, 0x4a3a, 0x0078, 0x3888, 0xa684, 0x2000, 0x0040, 0x2fb7,
++	0x6818, 0xa084, 0x8000, 0x0040, 0x2fd5, 0x681b, 0x0015, 0xa684,
++	0x4000, 0x0040, 0x2fd5, 0x681b, 0x0007, 0x1078, 0x389c, 0x0078,
++	0x2459, 0x1078, 0x23eb, 0x2300, 0x0079, 0x2fde, 0x2fe1, 0x2fe3,
++	0x3016, 0x1078, 0x23eb, 0x7000, 0x0079, 0x2fe6, 0x2482, 0x2ff0,
++	0x2ff0, 0x300b, 0x2ff0, 0x3012, 0x300b, 0x2fee, 0x1078, 0x23eb,
++	0xa684, 0x0060, 0xa086, 0x0060, 0x00c0, 0x3007, 0xa6b4, 0xffbf,
++	0xa6b4, 0xbfff, 0xa6b5, 0x2000, 0x7e5a, 0x681c, 0xa084, 0xffbf,
++	0x681e, 0x1078, 0x4776, 0x1078, 0x4a3a, 0x0078, 0x3888, 0xa684,
++	0x2000, 0x0040, 0x2ffa, 0x6818, 0xa084, 0x8000, 0x0040, 0x3012,
++	0x681b, 0x0007, 0x781b, 0x00cd, 0x0078, 0x2459, 0x6820, 0xa085,
++	0x0004, 0x6822, 0x1078, 0x3853, 0xa6b5, 0x0800, 0x1078, 0x36c1,
++	0x782b, 0x3008, 0x781b, 0x0065, 0x0078, 0x2459, 0x2300, 0x0079,
++	0x3029, 0x302c, 0x302e, 0x3030, 0x1078, 0x23eb, 0x0078, 0x36ad,
++	0xa684, 0x0400, 0x00c0, 0x3059, 0x79e4, 0xa184, 0x0020, 0x0040,
++	0x3040, 0x78ec, 0xa084, 0x0003, 0x0040, 0x3040, 0x782b, 0x3009,
++	0x789b, 0x0060, 0x78ab, 0x0000, 0xa684, 0xfffb, 0x785a, 0x79e4,
++	0xa184, 0x0020, 0x0040, 0x3051, 0x78ec, 0xa084, 0x0003, 0x00c0,
++	0x3055, 0x2001, 0x0014, 0x0078, 0x2d01, 0xa184, 0x0007, 0x0079,
++	0x3091, 0x7a90, 0xa294, 0x0007, 0x789b, 0x0060, 0x79a8, 0x81ff,
++	0x0040, 0x308f, 0x789b, 0x0010, 0x7ba8, 0xa384, 0x0001, 0x00c0,
++	0x3080, 0x7ba8, 0x7ba8, 0xa386, 0x0001, 0x00c0, 0x3073, 0x2009,
++	0xfff7, 0x0078, 0x3079, 0xa386, 0x0003, 0x00c0, 0x3080, 0x2009,
++	0xffef, 0x0c7e, 0x7054, 0x2060, 0x6004, 0xa104, 0x6006, 0x0c7f,
++	0x789b, 0x0060, 0x78ab, 0x0000, 0xa684, 0xfffb, 0x785a, 0x782b,
++	0x3009, 0x6920, 0xa18c, 0xfdff, 0xa18c, 0xfeff, 0x6922, 0x0078,
++	0x3888, 0x299e, 0x29a9, 0x309b, 0x30a3, 0x3099, 0x3099, 0x3888,
++	0x3888, 0x1078, 0x23eb, 0x6920, 0xa18c, 0xfdff, 0xa18c, 0xfeff,
++	0x6922, 0x0078, 0x3892, 0x6920, 0xa18c, 0xfdff, 0xa18c, 0xfeff,
++	0x6922, 0x0078, 0x3888, 0x79e4, 0xa184, 0x0030, 0x0040, 0x30b5,
++	0x78ec, 0xa084, 0x0003, 0x00c0, 0x30dc, 0x7000, 0xa086, 0x0004,
++	0x00c0, 0x30cf, 0x706c, 0xa086, 0x0002, 0x00c0, 0x30c5, 0x2011,
++	0x0002, 0x2019, 0x0000, 0x0078, 0x2848, 0x706c, 0xa086, 0x0006,
++	0x0040, 0x30bf, 0x706c, 0xa086, 0x0004, 0x0040, 0x30bf, 0x7000,
++	0xa086, 0x0000, 0x0040, 0x2459, 0x6818, 0xa085, 0x8000, 0x681a,
++	0x2001, 0x0014, 0x0078, 0x2d01, 0xa184, 0x0007, 0x0079, 0x30e0,
++	0x3888, 0x3888, 0x30e8, 0x3888, 0x38ed, 0x38ed, 0x3888, 0x3888,
++	0xa684, 0x0080, 0x0040, 0x3117, 0x7194, 0x81ff, 0x0040, 0x3117,
++	0xa182, 0x000d, 0x00d0, 0x30f8, 0x7097, 0x0000, 0x0078, 0x30fd,
++	0xa182, 0x000c, 0x7096, 0x2009, 0x000c, 0x789b, 0x0061, 0x79aa,
++	0x157e, 0x137e, 0x147e, 0x7098, 0x8114, 0xa210, 0x729a, 0xa080,
++	0x000b, 0xad00, 0x2098, 0x20a1, 0x012b, 0x789b, 0x0000, 0x8108,
++	0x81ac, 0x53a6, 0x147f, 0x137f, 0x157f, 0x0078, 0x3892, 0xa684,
++	0x0400, 0x00c0, 0x3158, 0x6820, 0xa084, 0x0001, 0x0040, 0x3892,
++	0xa68c, 0x0060, 0xa684, 0x0060, 0x0040, 0x312c, 0xa086, 0x0060,
++	0x00c0, 0x312c, 0xa18d, 0x4000, 0xa18c, 0xfffb, 0x795a, 0x69b6,
++	0x789b, 0x0060, 0x78ab, 0x0000, 0x789b, 0x0061, 0x6818, 0xa085,
++	0x8000, 0x681a, 0x78aa, 0x8008, 0x810c, 0x0040, 0x3407, 0xa18c,
++	0x00f8, 0x00c0, 0x3407, 0x157e, 0x137e, 0x147e, 0x20a1, 0x012b,
++	0x789b, 0x0000, 0x8000, 0x80ac, 0xad80, 0x000b, 0x2098, 0x53a6,
++	0x147f, 0x137f, 0x157f, 0x6814, 0x8007, 0x7882, 0x0078, 0x3892,
++	0x6818, 0xa084, 0x8000, 0x0040, 0x315f, 0x681b, 0x0008, 0x781b,
++	0x00c3, 0x0078, 0x2459, 0x2300, 0x0079, 0x3166, 0x316b, 0x320a,
++	0x3169, 0x1078, 0x23eb, 0x7000, 0xa084, 0x0007, 0x0079, 0x3170,
++	0x2482, 0x317a, 0x31af, 0x3185, 0x3178, 0x2482, 0x3178, 0x3178,
++	0x1078, 0x23eb, 0x681c, 0xa084, 0x2000, 0x0040, 0x3193, 0x6008,
++	0xa085, 0x0002, 0x600a, 0x0078, 0x3193, 0x68c0, 0xa005, 0x00c0,
++	0x31af, 0x6920, 0xa18d, 0x0001, 0x6922, 0x68c3, 0x0001, 0x6800,
++	0x706a, 0x0078, 0x31a9, 0x6920, 0xa18d, 0x0001, 0x6922, 0x6800,
++	0x6006, 0xa005, 0x00c0, 0x319d, 0x6002, 0x681c, 0xa084, 0x000e,
++	0x0040, 0x31a9, 0x7014, 0x68ba, 0x7130, 0xa188, 0x7400, 0x0078,
++	0x31ab, 0x2009, 0x7500, 0x2104, 0x6802, 0x2d0a, 0x7162, 0x6eb6,
++	0xa684, 0x0060, 0x0040, 0x3208, 0xa684, 0x0800, 0x00c0, 0x31c3,
++	0xa684, 0x7fff, 0x68b6, 0x6894, 0x68a6, 0x6898, 0x68aa, 0x1078,
++	0x4776, 0x0078, 0x3208, 0xa684, 0x0020, 0x0040, 0x31d8, 0x68c0,
++	0xa005, 0x0040, 0x31cf, 0x1078, 0x4b78, 0x0078, 0x31d2, 0xa006,
++	0x1078, 0x4b30, 0x79d8, 0x7adc, 0x69aa, 0x6aa6, 0x0078, 0x31de,
++	0x1078, 0x37fc, 0x69aa, 0x6aa6, 0x1078, 0x4b30, 0xa684, 0x8000,
++	0x0040, 0x3208, 0xa684, 0x7fff, 0x68b6, 0x2001, 0x0076, 0x1078,
++	0x3918, 0x2010, 0x2001, 0x0078, 0x1078, 0x3918, 0x2008, 0xa684,
++	0x0020, 0x00c0, 0x3200, 0x2001, 0x007a, 0x1078, 0x3918, 0x801b,
++	0x00c8, 0x31fb, 0x8000, 0xa084, 0x003f, 0xa108, 0xa291, 0x0000,
++	0x6b98, 0x2100, 0xa302, 0x68b2, 0x6b94, 0x2200, 0xa303, 0x68ae,
++	0x0078, 0x2482, 0x0078, 0x36ad, 0x7037, 0x0000, 0xa282, 0x0006,
++	0x0050, 0x3214, 0x1078, 0x23eb, 0x7000, 0xa084, 0x0007, 0x10c0,
++	0x39be, 0x2300, 0x0079, 0x321c, 0x321f, 0x3248, 0x325c, 0x2200,
++	0x0079, 0x3222, 0x3246, 0x36ad, 0x3228, 0x3246, 0x3278, 0x32ba,
++	0x7003, 0x0005, 0x2001, 0x7610, 0x2068, 0x704a, 0x157e, 0x20a9,
++	0x0031, 0x2003, 0x0000, 0x8000, 0x0070, 0x3238, 0x0078, 0x3231,
++	0x157f, 0xad80, 0x0009, 0x7036, 0x6817, 0x0000, 0x68b7, 0x0700,
++	0x6823, 0x0800, 0x6827, 0x0003, 0x0078, 0x369d, 0x1078, 0x23eb,
++	0x7003, 0x0005, 0x2001, 0x7610, 0x2068, 0x704a, 0xad80, 0x0009,
++	0x7036, 0x2200, 0x0079, 0x3254, 0x36ad, 0x325a, 0x325a, 0x3278,
++	0x325a, 0x36ad, 0x1078, 0x23eb, 0x7003, 0x0005, 0x2001, 0x7610,
++	0x2068, 0x704a, 0xad80, 0x0009, 0x7036, 0x2200, 0x0079, 0x3268,
++	0x3270, 0x326e, 0x326e, 0x3270, 0x326e, 0x3270, 0x1078, 0x23eb,
++	0x1078, 0x36d1, 0x782b, 0x3008, 0x781b, 0x0065, 0x0078, 0x2459,
++	0x7003, 0x0002, 0x7a80, 0xa294, 0x0f00, 0x789b, 0x0018, 0x7ca8,
++	0xa484, 0x001f, 0xa215, 0x2069, 0x7500, 0x2d04, 0x2d08, 0x7162,
++	0x2068, 0xa005, 0x0040, 0x3293, 0x6814, 0xa206, 0x0040, 0x32af,
++	0x6800, 0x0078, 0x3286, 0x7003, 0x0005, 0x2001, 0x7610, 0x2068,
++	0x704a, 0x7036, 0x157e, 0x20a9, 0x0031, 0x2003, 0x0000, 0x8000,
++	0x0070, 0x32a4, 0x0078, 0x329d, 0x157f, 0xad80, 0x0009, 0x7036,
++	0x6a16, 0x68b7, 0x0700, 0x6823, 0x0800, 0x6827, 0x0003, 0x6eb4,
++	0x7e5a, 0x6820, 0xa084, 0x0c00, 0x0040, 0x3309, 0x1078, 0x36c9,
++	0x0078, 0x3309, 0x7003, 0x0002, 0x7a80, 0xa294, 0x0f00, 0x789b,
++	0x0018, 0x7ca8, 0xa484, 0x001f, 0xa215, 0x79a8, 0x79a8, 0xa18c,
++	0x00ff, 0xa1e8, 0x7400, 0x2d04, 0x2d08, 0x7162, 0x2068, 0xa005,
++	0x0040, 0x32d9, 0x6814, 0xa206, 0x0040, 0x32f4, 0x6800, 0x0078,
++	0x32cc, 0x7003, 0x0005, 0x2001, 0x7610, 0x2068, 0x704a, 0x157e,
++	0x20a9, 0x0031, 0x2003, 0x0000, 0x8000, 0x0070, 0x32e9, 0x0078,
++	0x32e2, 0x157f, 0xad80, 0x0009, 0x7036, 0x6a16, 0x68b7, 0x0700,
++	0x6823, 0x0800, 0x6827, 0x0003, 0x6eb4, 0x7e5a, 0x6820, 0xa084,
++	0x0c00, 0x0040, 0x3309, 0xa084, 0x0800, 0x0040, 0x3303, 0x1078,
++	0x36cd, 0x0078, 0x3309, 0x1078, 0x36c9, 0x708b, 0x0000, 0x0078,
++	0x3309, 0x027e, 0x8207, 0xa084, 0x000f, 0x8003, 0x8003, 0x8003,
++	0xa080, 0x5380, 0x2060, 0x7056, 0x6000, 0x705a, 0x6004, 0x705e,
++	0xa684, 0x0060, 0x0040, 0x3361, 0x6b98, 0x6c94, 0x69ac, 0x68b0,
++	0xa105, 0x00c0, 0x3343, 0x7bd2, 0x7bda, 0x7cd6, 0x7cde, 0xa6b4,
++	0xb7ff, 0x7e5a, 0xa684, 0x0060, 0xa086, 0x0060, 0x0040, 0x3361,
++	0x68c0, 0xa005, 0x0040, 0x333c, 0x7003, 0x0003, 0x682b, 0x0000,
++	0x1078, 0x4a29, 0x0078, 0x333e, 0x1078, 0x4a3a, 0xa6b5, 0x2000,
++	0x7e5a, 0x0078, 0x3361, 0x68b0, 0xa31a, 0x2100, 0xa423, 0x2400,
++	0xa305, 0x0040, 0x3361, 0x7bd2, 0x7bda, 0x7cd6, 0x7cde, 0x68b0,
++	0xa6b4, 0xbfff, 0x7e5a, 0x007e, 0x68c0, 0xa005, 0x007f, 0x0040,
++	0x335f, 0x7003, 0x0003, 0x1078, 0x4a29, 0x0078, 0x3361, 0x1078,
++	0x4a85, 0x077f, 0x1078, 0x37ef, 0x2009, 0x0065, 0xa684, 0x0004,
++	0x0040, 0x3382, 0x78e4, 0xa084, 0x0030, 0x0040, 0x337a, 0x78ec,
++	0xa084, 0x0003, 0x0040, 0x337a, 0x782b, 0x3008, 0x2009, 0x0065,
++	0x0078, 0x3382, 0x0f7e, 0x2079, 0x5100, 0x1078, 0x4776, 0x0f7f,
++	0x0040, 0x2482, 0x791a, 0x2d00, 0x704a, 0x8207, 0xa084, 0x000f,
++	0x8003, 0x8003, 0x8003, 0xa080, 0x5380, 0x2048, 0x0078, 0x2459,
++	0x6020, 0xa005, 0x0040, 0x339c, 0x8001, 0x6022, 0x6008, 0xa085,
++	0x0008, 0x600a, 0x7010, 0x6026, 0x007c, 0xa006, 0x1078, 0x4776,
++	0x6817, 0x0000, 0x681b, 0x0001, 0x6823, 0x0040, 0x681f, 0x0100,
++	0x7000, 0xa084, 0x0007, 0x0079, 0x33ad, 0x2482, 0x33b7, 0x33b7,
++	0x33d4, 0x33bf, 0x33bd, 0x33bf, 0x33b5, 0x1078, 0x23eb, 0x1078,
++	0x33df, 0x1078, 0x33d8, 0x1078, 0x1c70, 0x0078, 0x2482, 0x706c,
++	0x706f, 0x0000, 0x7093, 0x0000, 0x0079, 0x33c6, 0x33d0, 0x33d0,
++	0x33ce, 0x33ce, 0x33ce, 0x33d0, 0x33ce, 0x33d0, 0x0079, 0x2861,
++	0x706f, 0x0000, 0x0078, 0x2482, 0x681b, 0x0000, 0x0078, 0x2f17,
++	0x6800, 0xa005, 0x00c0, 0x33dd, 0x6002, 0x6006, 0x007c, 0x6010,
++	0xa005, 0x0040, 0x33e8, 0x8001, 0x00d0, 0x33e8, 0x1078, 0x23eb,
++	0x6012, 0x6008, 0xa084, 0xffef, 0x600a, 0x007c, 0x6018, 0xa005,
++	0x0040, 0x33f4, 0x8001, 0x601a, 0x007c, 0x1078, 0x3912, 0x681b,
++	0x0018, 0x0078, 0x342b, 0x1078, 0x3912, 0x681b, 0x0019, 0x0078,
++	0x342b, 0x1078, 0x3912, 0x681b, 0x001a, 0x0078, 0x342b, 0x1078,
++	0x3912, 0x681b, 0x0003, 0x0078, 0x342b, 0x7780, 0x1078, 0x37ef,
++	0x7184, 0xa18c, 0x00ff, 0xa1e8, 0x7400, 0x2d04, 0x2d08, 0x2068,
++	0xa005, 0x00c0, 0x341d, 0x0078, 0x2482, 0x6814, 0x7280, 0xa206,
++	0x0040, 0x3425, 0x6800, 0x0078, 0x3416, 0x6800, 0x200a, 0x681b,
++	0x0005, 0x708b, 0x0000, 0x1078, 0x33df, 0x6820, 0xa084, 0x0001,
++	0x00c0, 0x3434, 0x1078, 0x33d8, 0x1078, 0x33ee, 0x681f, 0x0000,
++	0x6823, 0x0020, 0x1078, 0x1c70, 0x0078, 0x2482, 0xa282, 0x0003,
++	0x00c0, 0x369d, 0x7da8, 0xa5ac, 0x00ff, 0x7ca8, 0xa4a4, 0x00ff,
++	0x6920, 0xa18d, 0x0080, 0x6922, 0xa184, 0x0100, 0x0040, 0x34a2,
++	0xa18c, 0xfeff, 0x6922, 0xa4a4, 0x00ff, 0x0040, 0x348c, 0xa482,
++	0x000c, 0x0048, 0x345f, 0x0040, 0x345f, 0x2021, 0x000c, 0x852b,
++	0x852b, 0x1078, 0x3760, 0x0040, 0x3469, 0x1078, 0x355b, 0x0078,
++	0x3495, 0x1078, 0x371b, 0x0c7e, 0x2960, 0x6004, 0xa084, 0xfff5,
++	0x6006, 0x1078, 0x3586, 0x0c7f, 0x6920, 0xa18d, 0x0100, 0x6922,
++	0x7e58, 0xa6b5, 0x0004, 0x7e5a, 0xa684, 0x0400, 0x00c0, 0x3486,
++	0x782b, 0x3008, 0x781b, 0x0056, 0x0078, 0x2459, 0x782b, 0x3008,
++	0x781b, 0x0065, 0x0078, 0x2459, 0x0c7e, 0x2960, 0x6004, 0xa084,
++	0xfff5, 0x6006, 0x1078, 0x3586, 0x0c7f, 0x7e58, 0xa684, 0x0400,
++	0x00c0, 0x349e, 0x781b, 0x0058, 0x0078, 0x2459, 0x781b, 0x0065,
++	0x0078, 0x2459, 0x0c7e, 0x7054, 0x2060, 0x6100, 0xa18c, 0x1000,
++	0x0040, 0x34e2, 0x6208, 0x8217, 0xa294, 0x00ff, 0xa282, 0x000c,
++	0x0048, 0x34b6, 0x0040, 0x34b6, 0x2011, 0x000c, 0x2400, 0xa202,
++	0x00c8, 0x34bb, 0x2220, 0x6208, 0xa294, 0x00ff, 0x7018, 0xa086,
++	0x0028, 0x00c0, 0x34cb, 0xa282, 0x0019, 0x00c8, 0x34d1, 0x2011,
++	0x0019, 0x0078, 0x34d1, 0xa282, 0x000c, 0x00c8, 0x34d1, 0x2011,
++	0x000c, 0x2200, 0xa502, 0x00c8, 0x34d6, 0x2228, 0x1078, 0x371f,
++	0x852b, 0x852b, 0x1078, 0x3760, 0x0040, 0x34e2, 0x1078, 0x355b,
++	0x0078, 0x34e6, 0x1078, 0x371b, 0x1078, 0x3586, 0x7858, 0xa085,
++	0x0004, 0x785a, 0x0c7f, 0x782b, 0x3008, 0x781b, 0x0065, 0x0078,
++	0x2459, 0x0c7e, 0x2960, 0x6000, 0xa084, 0x1000, 0x00c0, 0x3509,
++	0x6010, 0xa084, 0x000f, 0x00c0, 0x3503, 0x6104, 0xa18c, 0xfff5,
++	0x6106, 0x0c7f, 0x007c, 0x2011, 0x0032, 0x2019, 0x0000, 0x0078,
++	0x3530, 0x68a0, 0xa084, 0x0200, 0x00c0, 0x3503, 0x6208, 0xa294,
++	0x00ff, 0x7018, 0xa086, 0x0028, 0x00c0, 0x351e, 0xa282, 0x0019,
++	0x00c8, 0x3524, 0x2011, 0x0019, 0x0078, 0x3524, 0xa282, 0x000c,
++	0x00c8, 0x3524, 0x2011, 0x000c, 0x6308, 0x831f, 0xa39c, 0x00ff,
++	0xa382, 0x000c, 0x0048, 0x3530, 0x0040, 0x3530, 0x2019, 0x000c,
++	0x78ab, 0x0001, 0x78ab, 0x0003, 0x78ab, 0x0001, 0x7aaa, 0x7baa,
++	0xa8c0, 0x0005, 0x6820, 0xa085, 0x0100, 0x6822, 0x0c7f, 0x007c,
++	0x0c7e, 0x2960, 0xa18c, 0xfff5, 0x6106, 0x2011, 0x0032, 0x2019,
++	0x0000, 0x0078, 0x354b, 0x78ab, 0x0001, 0x78ab, 0x0003, 0x78ab,
++	0x0001, 0x7aaa, 0x7baa, 0xa8c0, 0x0005, 0x6820, 0xa085, 0x0100,
++	0x6822, 0x0c7f, 0x007c, 0x0c7e, 0x7154, 0x2160, 0x1078, 0x3562,
++	0x0c7f, 0x007c, 0x2008, 0xa084, 0xfff0, 0xa425, 0x7c86, 0x6018,
++	0x789a, 0x7cae, 0x6412, 0x78a4, 0xa084, 0xfff8, 0xa18c, 0x0007,
++	0xa105, 0x78a6, 0x6016, 0x788a, 0xa4a4, 0x000f, 0x8427, 0x8204,
++	0x8004, 0xa084, 0x00ff, 0xa405, 0x600e, 0x78ec, 0xd08c, 0x00c0,
++	0x3585, 0x6004, 0xa084, 0xfff5, 0x6006, 0x007c, 0x0c7e, 0x7054,
++	0x2060, 0x1078, 0x358d, 0x0c7f, 0x007c, 0x6018, 0x789a, 0x78a4,
++	0xa084, 0xfff0, 0x78a6, 0x6012, 0x7884, 0xa084, 0xfff0, 0x7886,
++	0x007c, 0xa282, 0x0002, 0x00c0, 0x369d, 0x7aa8, 0x6920, 0xa18d,
++	0x0080, 0x6922, 0xa184, 0x0200, 0x0040, 0x35e2, 0xa18c, 0xfdff,
++	0x6922, 0xa294, 0x00ff, 0xa282, 0x0002, 0x00c8, 0x369d, 0x1078,
++	0x362b, 0x1078, 0x3586, 0xa980, 0x0001, 0x200c, 0x1078, 0x37eb,
++	0x1078, 0x34f1, 0x88ff, 0x0040, 0x35d5, 0x789b, 0x0060, 0x2800,
++	0x78aa, 0x7e58, 0xa6b5, 0x0004, 0x7e5a, 0xa684, 0x0400, 0x00c0,
++	0x35cf, 0x782b, 0x3008, 0x781b, 0x0056, 0x0078, 0x2459, 0x782b,
++	0x3008, 0x781b, 0x0065, 0x0078, 0x2459, 0x7e58, 0xa684, 0x0400,
++	0x00c0, 0x35de, 0x781b, 0x0058, 0x0078, 0x2459, 0x781b, 0x0065,
++	0x0078, 0x2459, 0xa282, 0x0002, 0x00c8, 0x35ea, 0xa284, 0x0001,
++	0x0040, 0x35f4, 0x7154, 0xa188, 0x0000, 0x210c, 0xa18c, 0x2000,
++	0x00c0, 0x35f4, 0x2011, 0x0000, 0x1078, 0x370d, 0x1078, 0x362b,
++	0x1078, 0x3586, 0x7858, 0xa085, 0x0004, 0x785a, 0x782b, 0x3008,
++	0x781b, 0x0065, 0x0078, 0x2459, 0x0c7e, 0x027e, 0x2960, 0x6000,
++	0x2011, 0x0001, 0xa084, 0x2000, 0x00c0, 0x361b, 0x6014, 0xa084,
++	0x0040, 0x00c0, 0x3619, 0xa18c, 0xffef, 0x6106, 0xa006, 0x0078,
++	0x3628, 0x2011, 0x0000, 0x78ab, 0x0001, 0x78ab, 0x0002, 0x78ab,
++	0x0003, 0x7aaa, 0xa8c0, 0x0004, 0x6820, 0xa085, 0x0200, 0x6822,
++	0x027f, 0x0c7f, 0x007c, 0x0c7e, 0x7054, 0x2060, 0x1078, 0x3632,
++	0x0c7f, 0x007c, 0x82ff, 0x0040, 0x3637, 0x2011, 0x0040, 0x6018,
++	0xa080, 0x0002, 0x789a, 0x78a4, 0xa084, 0xffbf, 0xa205, 0x78a6,
++	0x788a, 0x6016, 0x78ec, 0xd08c, 0x00c0, 0x364a, 0x6004, 0xa084,
++	0xffef, 0x6006, 0x007c, 0x007e, 0x7000, 0xa086, 0x0003, 0x0040,
++	0x3654, 0x007f, 0x0078, 0x3657, 0x007f, 0x0078, 0x3699, 0xa684,
++	0x0020, 0x0040, 0x3699, 0x7888, 0xa084, 0x0040, 0x0040, 0x3699,
++	0x7bb8, 0xa384, 0x003f, 0x831b, 0x00c8, 0x3667, 0x8000, 0xa005,
++	0x0040, 0x367d, 0x831b, 0x00c8, 0x3670, 0x8001, 0x0040, 0x3695,
++	0xa684, 0x4000, 0x0040, 0x367d, 0x78b8, 0x801b, 0x00c8, 0x3679,
++	0x8000, 0xa084, 0x003f, 0x00c0, 0x3695, 0xa6b4, 0xbfff, 0x7e5a,
++	0x79d8, 0x7adc, 0x2001, 0x0001, 0xa108, 0x00c8, 0x3689, 0xa291,
++	0x0000, 0x79d2, 0x79da, 0x7ad6, 0x7ade, 0x1078, 0x4b30, 0x781b,
++	0x0064, 0x1078, 0x49b5, 0x0078, 0x2459, 0x781b, 0x0064, 0x0078,
++	0x2459, 0x781b, 0x0065, 0x0078, 0x2459, 0x1078, 0x36d5, 0x782b,
++	0x3008, 0x781b, 0x0065, 0x0078, 0x2459, 0x1078, 0x36c1, 0x782b,
++	0x3008, 0x781b, 0x0065, 0x0078, 0x2459, 0x6827, 0x0002, 0x1078,
++	0x36c9, 0x78e4, 0xa084, 0x0030, 0x0040, 0x2482, 0x78ec, 0xa084,
++	0x0003, 0x0040, 0x2482, 0x782b, 0x3008, 0x781b, 0x0065, 0x0078,
++	0x2459, 0x2001, 0x0005, 0x0078, 0x36d7, 0x2001, 0x000c, 0x0078,
++	0x36d7, 0x2001, 0x0006, 0x0078, 0x36d7, 0x2001, 0x000d, 0x0078,
++	0x36d7, 0x2001, 0x0009, 0x0078, 0x36d7, 0x2001, 0x0007, 0x789b,
++	0x0010, 0x78aa, 0x789b, 0x0060, 0x78ab, 0x0001, 0xa6b5, 0x0004,
++	0x7e5a, 0x007c, 0x077e, 0x873f, 0xa7bc, 0x000f, 0x873b, 0x873b,
++	0x8703, 0xa0e0, 0x5380, 0xa7b8, 0x0020, 0x7f9a, 0x79a4, 0xa184,
++	0x000f, 0x0040, 0x36fb, 0xa184, 0xfff0, 0x78a6, 0x6012, 0x6004,
++	0xa085, 0x0008, 0x6006, 0x8738, 0x8738, 0x7f9a, 0x79a4, 0xa184,
++	0x0040, 0x0040, 0x370b, 0xa184, 0xffbf, 0x78a6, 0x6016, 0x6004,
++	0xa085, 0x0010, 0x6006, 0x077f, 0x007c, 0x789b, 0x0010, 0x78ab,
++	0x0001, 0x78ab, 0x0002, 0x78ab, 0x0003, 0x7aaa, 0x789b, 0x0060,
++	0x78ab, 0x0004, 0x007c, 0x2021, 0x0000, 0x2029, 0x0032, 0x789b,
++	0x0010, 0x78ab, 0x0001, 0x78ab, 0x0003, 0x78ab, 0x0001, 0x7daa,
++	0x7caa, 0x789b, 0x0060, 0x78ab, 0x0005, 0x007c, 0x157e, 0x8007,
++	0xa084, 0x00ff, 0x8003, 0x8003, 0xa080, 0x0020, 0x789a, 0x79a4,
++	0xa18c, 0xfff0, 0x2001, 0x5146, 0x2004, 0xa082, 0x0028, 0x0040,
++	0x3749, 0x2021, 0x37d2, 0x2019, 0x0014, 0x20a9, 0x000c, 0x0078,
++	0x374f, 0x2021, 0x37de, 0x2019, 0x0019, 0x20a9, 0x000d, 0x2011,
++	0x0064, 0x2404, 0xa084, 0xfff0, 0xa106, 0x0040, 0x375e, 0x8420,
++	0x2300, 0xa210, 0x0070, 0x375e, 0x0078, 0x3751, 0x157f, 0x007c,
++	0x157e, 0x2009, 0x5146, 0x210c, 0xa182, 0x0032, 0x0048, 0x3774,
++	0x0040, 0x3778, 0x2009, 0x37c4, 0x2019, 0x0011, 0x20a9, 0x000e,
++	0x2011, 0x0032, 0x0078, 0x378a, 0xa182, 0x0028, 0x0040, 0x3782,
++	0x2009, 0x37d2, 0x2019, 0x0014, 0x20a9, 0x000c, 0x2011, 0x0064,
++	0x0078, 0x378a, 0x2009, 0x37de, 0x2019, 0x0019, 0x20a9, 0x000d,
++	0x2011, 0x0064, 0x2200, 0xa502, 0x0040, 0x379a, 0x0048, 0x379a,
++	0x8108, 0x2300, 0xa210, 0x0070, 0x3797, 0x0078, 0x378a, 0x157f,
++	0xa006, 0x007c, 0x157f, 0xa582, 0x0064, 0x00c8, 0x37a9, 0x7808,
++	0xa085, 0x0070, 0x780a, 0x7044, 0xa085, 0x0070, 0x7046, 0x0078,
++	0x37a9, 0x78ec, 0xa084, 0x0300, 0x0040, 0x37b1, 0x2104, 0x0078,
++	0x37c2, 0x2104, 0xa09e, 0x1102, 0x00c0, 0x37c2, 0x2001, 0x04fd,
++	0x2004, 0xa082, 0x0005, 0x0048, 0x37c1, 0x2001, 0x1201, 0x0078,
++	0x37c2, 0x2104, 0xa005, 0x007c, 0x1102, 0x3002, 0x3202, 0x4203,
++	0x4403, 0x5404, 0x5604, 0x6605, 0x6805, 0x7806, 0x7a06, 0x0c07,
++	0x0c07, 0x0e07, 0x3202, 0x4202, 0x5202, 0x6202, 0x7202, 0x6605,
++	0x7605, 0x7805, 0x7a05, 0x7c05, 0x7e05, 0x7f05, 0x2202, 0x3202,
++	0x4202, 0x5202, 0x5404, 0x6404, 0x7404, 0x7604, 0x7804, 0x7a04,
++	0x7c04, 0x7e04, 0x7f04, 0x789b, 0x0010, 0xa046, 0x007c, 0xa784,
++	0x0f00, 0x800b, 0xa784, 0x001f, 0x8003, 0x8003, 0x8003, 0x8003,
++	0xa105, 0xa0e0, 0x5400, 0x007c, 0x79d8, 0x7adc, 0x78d0, 0x801b,
++	0x00c8, 0x3803, 0x8000, 0xa084, 0x003f, 0xa108, 0xa291, 0x0000,
++	0x007c, 0x0f7e, 0x2079, 0x0100, 0x2009, 0x5140, 0x2091, 0x8000,
++	0x2104, 0x0079, 0x3813, 0x3849, 0x381d, 0x381d, 0x381d, 0x381d,
++	0x381d, 0x381d, 0x384d, 0x1078, 0x23eb, 0x784b, 0x0004, 0x7848,
++	0xa084, 0x0004, 0x00c0, 0x381f, 0x784b, 0x0008, 0x7848, 0xa084,
++	0x0008, 0x00c0, 0x3826, 0x68b4, 0xa085, 0x4000, 0x68b6, 0x7858,
++	0xa085, 0x4000, 0x785a, 0x7830, 0xa084, 0x0080, 0x00c0, 0x3849,
++	0x0018, 0x3849, 0x681c, 0xa084, 0x0020, 0x00c0, 0x3847, 0x0e7e,
++	0x2071, 0x5140, 0x1078, 0x389c, 0x0e7f, 0x0078, 0x3849, 0x781b,
++	0x00cd, 0x2091, 0x8001, 0x0f7f, 0x007c, 0x70b3, 0x0000, 0x1078,
++	0x3a76, 0x0078, 0x3849, 0x0c7e, 0x6814, 0x8007, 0xa084, 0x000f,
++	0x8003, 0x8003, 0x8003, 0xa0e0, 0x5380, 0x6004, 0xa084, 0x000a,
++	0x00c0, 0x3886, 0x6108, 0xa194, 0xff00, 0x0040, 0x3886, 0xa18c,
++	0x00ff, 0x2001, 0x0019, 0xa106, 0x0040, 0x3875, 0x2001, 0x0032,
++	0xa106, 0x0040, 0x3879, 0x0078, 0x387d, 0x2009, 0x0020, 0x0078,
++	0x387f, 0x2009, 0x003f, 0x0078, 0x387f, 0x2011, 0x0000, 0x2100,
++	0xa205, 0x600a, 0x6004, 0xa085, 0x0002, 0x6006, 0x0c7f, 0x007c,
++	0x781b, 0x0065, 0x0078, 0x2459, 0x782b, 0x3008, 0x781b, 0x0065,
++	0x0078, 0x2459, 0x781b, 0x0058, 0x0078, 0x2459, 0x782b, 0x3008,
++	0x781b, 0x0056, 0x0078, 0x2459, 0x2009, 0x5120, 0x210c, 0xa186,
++	0x0000, 0x0040, 0x38b0, 0xa186, 0x0001, 0x0040, 0x38b3, 0x2009,
++	0x5138, 0x200b, 0x000b, 0x706f, 0x0001, 0x781b, 0x0048, 0x007c,
++	0x781b, 0x00c7, 0x007c, 0x2009, 0x5138, 0x200b, 0x000a, 0x007c,
++	0x2009, 0x5120, 0x210c, 0xa186, 0x0000, 0x0040, 0x38d3, 0xa186,
++	0x0001, 0x0040, 0x38cd, 0x2009, 0x5138, 0x200b, 0x000b, 0x706f,
++	0x0001, 0x781b, 0x0048, 0x0078, 0x2459, 0x2009, 0x5138, 0x200b,
++	0x000a, 0x0078, 0x2459, 0x782b, 0x3008, 0x781b, 0x00c7, 0x0078,
++	0x2459, 0x781b, 0x00cd, 0x0078, 0x2459, 0x782b, 0x3008, 0x781b,
++	0x00cd, 0x0078, 0x2459, 0x781b, 0x008e, 0x0078, 0x2459, 0x782b,
++	0x3008, 0x781b, 0x008e, 0x0078, 0x2459, 0x6818, 0xa084, 0x8000,
++	0x0040, 0x38f4, 0x681b, 0x001d, 0x706f, 0x0001, 0x781b, 0x0048,
++	0x0078, 0x2459, 0x007e, 0x7830, 0xa084, 0x00c0, 0x00c0, 0x3910,
++	0x7808, 0xa084, 0xfffc, 0x780a, 0x0005, 0x0005, 0x0005, 0x0005,
++	0x78ec, 0xa084, 0x0021, 0x0040, 0x3910, 0x7044, 0x780a, 0xa005,
++	0x007f, 0x007c, 0x7044, 0xa085, 0x0002, 0x7046, 0x780a, 0x007c,
++	0x007e, 0x7830, 0xa084, 0x0040, 0x00c0, 0x3919, 0x0098, 0x3924,
++	0x007f, 0x789a, 0x78ac, 0x007c, 0x7808, 0xa084, 0xfffd, 0x780a,
++	0x0005, 0x0005, 0x0005, 0x0005, 0x78ec, 0xa084, 0x0021, 0x0040,
++	0x3933, 0x0098, 0x3931, 0x007f, 0x789a, 0x78ac, 0x007e, 0x7044,
++	0x780a, 0x007f, 0x007c, 0x78ec, 0xa084, 0x0002, 0x00c0, 0x4760,
++	0xa784, 0x007d, 0x00c0, 0x3947, 0x2700, 0x1078, 0x23eb, 0xa784,
++	0x0001, 0x00c0, 0x2f6d, 0xa784, 0x0070, 0x0040, 0x3957, 0x0c7e,
++	0x2d60, 0x2f68, 0x1078, 0x2396, 0x2d78, 0x2c68, 0x0c7f, 0xa784,
++	0x0008, 0x0040, 0x3964, 0x784b, 0x0008, 0x78ec, 0xa084, 0x0003,
++	0x0040, 0x2482, 0x0078, 0x3888, 0xa784, 0x0004, 0x0040, 0x3997,
++	0x78b8, 0xa084, 0x4001, 0x0040, 0x3997, 0x784b, 0x0008, 0x78ec,
++	0xa084, 0x0003, 0x0040, 0x2482, 0x78e4, 0xa084, 0x0007, 0xa086,
++	0x0001, 0x00c0, 0x3997, 0x78c0, 0xa085, 0x4800, 0x2030, 0x7e5a,
++	0x781b, 0x00cd, 0x0078, 0x2459, 0x784b, 0x0008, 0x6818, 0xa084,
++	0x8000, 0x0040, 0x3993, 0x681b, 0x0015, 0xa684, 0x4000, 0x0040,
++	0x3993, 0x681b, 0x0007, 0x1078, 0x389c, 0x0078, 0x2459, 0x681b,
++	0x0003, 0x7858, 0xa084, 0x3f00, 0x681e, 0x682f, 0x0000, 0x6833,
++	0x0000, 0x784b, 0x0008, 0x78ec, 0xa084, 0x0003, 0x0040, 0x2965,
++	0x0018, 0x2459, 0x0078, 0x36a5, 0x6b14, 0x8307, 0xa084, 0x000f,
++	0x8003, 0x8003, 0x8003, 0xa080, 0x5380, 0x2060, 0x2048, 0x7056,
++	0x6000, 0x705a, 0x6004, 0x705e, 0x2a60, 0x007c, 0x0079, 0x39c0,
++	0x39c8, 0x39c9, 0x39c8, 0x39cb, 0x39c8, 0x39c8, 0x39c8, 0x39d0,
++	0x007c, 0x1078, 0x33ee, 0x1078, 0x4776, 0x7038, 0x600a, 0x007c,
++	0x70a0, 0xa005, 0x0040, 0x39dd, 0x2068, 0x1078, 0x1b62, 0x1078,
++	0x46f8, 0x1078, 0x46ff, 0x70a3, 0x0000, 0x007c, 0x0e7e, 0x2091,
++	0x8000, 0x2071, 0x5140, 0x7000, 0xa086, 0x0007, 0x00c0, 0x39f4,
++	0x6110, 0x70bc, 0xa106, 0x00c0, 0x39f4, 0x0e7f, 0x1078, 0x1b6f,
++	0x1078, 0x39fa, 0xa006, 0x007c, 0x2091, 0x8001, 0x0e7f, 0xa085,
++	0x0001, 0x007c, 0x0f7e, 0x0e7e, 0x2071, 0x5140, 0x0078, 0x21fa,
++	0x785b, 0x0000, 0x70af, 0x000e, 0x2009, 0x0100, 0x017e, 0x70a0,
++	0xa06d, 0x0040, 0x3a0f, 0x70a3, 0x0000, 0x0078, 0x3a15, 0x70b3,
++	0x0000, 0x1078, 0x1b8b, 0x0040, 0x3a1b, 0x70ac, 0x6826, 0x1078,
++	0x3af8, 0x0078, 0x3a0f, 0x017f, 0x157e, 0x0c7e, 0x0d7e, 0x20a9,
++	0x0008, 0x2061, 0x7510, 0x6000, 0xa105, 0x6002, 0x601c, 0xa06d,
++	0x0040, 0x3a33, 0x6800, 0x601e, 0x1078, 0x195a, 0x6008, 0x8000,
++	0x600a, 0x0078, 0x3a26, 0x6018, 0xa06d, 0x0040, 0x3a3d, 0x6800,
++	0x601a, 0x1078, 0x195a, 0x0078, 0x3a33, 0xace0, 0x0008, 0x0070,
++	0x3a43, 0x0078, 0x3a23, 0x709c, 0xa084, 0x8000, 0x0040, 0x3a4a,
++	0x1078, 0x3b72, 0x0d7f, 0x0c7f, 0x157f, 0x007c, 0x127e, 0x2091,
++	0x2300, 0x6804, 0xa084, 0x000f, 0x0079, 0x3a56, 0x3a66, 0x3a66,
++	0x3a66, 0x3a66, 0x3a66, 0x3a66, 0x3a68, 0x3a6e, 0x3a66, 0x3a66,
++	0x3a66, 0x3a66, 0x3a66, 0x3a70, 0x3a66, 0x3a68, 0x1078, 0x23eb,
++	0x1078, 0x44d0, 0x1078, 0x195a, 0x0078, 0x3a74, 0x6827, 0x000b,
++	0x1078, 0x44d0, 0x1078, 0x3af8, 0x127f, 0x007c, 0x127e, 0x2091,
++	0x2300, 0x0098, 0x3a92, 0x7830, 0xa084, 0x00c0, 0x00c0, 0x3a92,
++	0x0d7e, 0x1078, 0x4708, 0x2d00, 0x682e, 0x2009, 0x0004, 0x2001,
++	0x0000, 0x6827, 0x0084, 0x1078, 0x46c1, 0x1078, 0x3af8, 0x0d7f,
++	0x0078, 0x3ac6, 0x7948, 0xa185, 0x4000, 0x784a, 0x0098, 0x3a9b,
++	0x794a, 0x0078, 0x3a80, 0x7828, 0xa086, 0x1834, 0x00c0, 0x3aa4,
++	0xa185, 0x0004, 0x0078, 0x3aab, 0x7828, 0xa086, 0x1814, 0x00c0,
++	0x3a98, 0xa185, 0x000c, 0x784a, 0x789b, 0x000e, 0x78ab, 0x0002,
++	0x7858, 0xa084, 0x00ff, 0xa085, 0x0400, 0x785a, 0x70b4, 0xa080,
++	0x0091, 0x781a, 0x6827, 0x0284, 0x682c, 0x6836, 0x6830, 0x683a,
++	0x2009, 0x0004, 0x2001, 0x0000, 0x1078, 0x46c1, 0x127f, 0x007c,
++	0x0d7e, 0x6b14, 0x1078, 0x1bfd, 0x0040, 0x3ad5, 0x2068, 0x6827,
++	0x0002, 0x1078, 0x3af8, 0x0078, 0x3aca, 0x0d7f, 0x007c, 0x0d7e,
++	0x6b14, 0x6c28, 0xa4a4, 0x00ff, 0x1078, 0x1b9b, 0x0040, 0x3ae5,
++	0x2068, 0x6827, 0x0002, 0x1078, 0x3af8, 0x0d7f, 0x007c, 0x0d7e,
++	0x6b14, 0xa39c, 0x00ff, 0x1078, 0x1bce, 0x0040, 0x3af6, 0x2068,
++	0x6827, 0x0002, 0x1078, 0x3af8, 0x0078, 0x3aeb, 0x0d7f, 0x007c,
++	0x0c7e, 0x6914, 0x1078, 0x3b69, 0x6904, 0xa18c, 0x00ff, 0xa186,
++	0x0006, 0x0040, 0x3b13, 0xa186, 0x000d, 0x0040, 0x3b32, 0xa186,
++	0x0017, 0x00c0, 0x3b0f, 0x1078, 0x195a, 0x0078, 0x3b11, 0x1078,
++	0x1c72, 0x0c7f, 0x007c, 0x6004, 0x8001, 0x0048, 0x3b30, 0x6006,
++	0x2009, 0x0000, 0xa684, 0x0001, 0x00c0, 0x3b20, 0xa18d, 0x8000,
++	0xa684, 0x0004, 0x0040, 0x3b26, 0xa18d, 0x0002, 0x691e, 0x6823,
++	0x0000, 0x7104, 0x810f, 0x6818, 0xa105, 0x681a, 0x0078, 0x3b0f,
++	0x1078, 0x23eb, 0x6018, 0xa005, 0x00c0, 0x3b41, 0x6008, 0x8001,
++	0x0048, 0x3b41, 0x600a, 0x601c, 0x6802, 0x2d00, 0x601e, 0x0078,
++	0x3b57, 0xac88, 0x0006, 0x2104, 0xa005, 0x0040, 0x3b4a, 0x2008,
++	0x0078, 0x3b43, 0x6802, 0x2d0a, 0x6008, 0x8001, 0x0048, 0x3b11,
++	0x600a, 0x6018, 0x2068, 0x6800, 0x601a, 0x0078, 0x3b3b, 0x157e,
++	0x137e, 0x147e, 0x0c7e, 0x0d7e, 0x1078, 0x1937, 0x2da0, 0x137f,
++	0x20a9, 0x0031, 0x53a3, 0x0c7f, 0x147f, 0x137f, 0x157f, 0x0078,
++	0x3b0f, 0xa184, 0x001f, 0x8003, 0x8003, 0x8003, 0xa080, 0x7510,
++	0x2060, 0x007c, 0x2019, 0x5151, 0x2304, 0xa085, 0x0001, 0x201a,
++	0x2019, 0x0102, 0x2304, 0xa085, 0x0001, 0x201a, 0x007c, 0x2019,
++	0x5151, 0x2304, 0xa084, 0xfffe, 0x201a, 0x2019, 0x0102, 0x2304,
++	0xa084, 0xfffe, 0x201a, 0x007c, 0x7990, 0xa18c, 0xfff8, 0x7992,
++	0x70b4, 0xa080, 0x00dd, 0x781a, 0x0078, 0x2459, 0x70a3, 0x0000,
++	0x7003, 0x0000, 0x7043, 0x0001, 0x7037, 0x0000, 0x0018, 0x2410,
++	0x1078, 0x1b8b, 0x0040, 0x3bc7, 0x2009, 0x510f, 0x200b, 0x0000,
++	0x68bc, 0x2060, 0x6100, 0xa184, 0x0300, 0x0040, 0x3bbb, 0x6827,
++	0x000e, 0xa084, 0x0200, 0x0040, 0x3bb7, 0x6827, 0x0017, 0x1078,
++	0x3af8, 0x0078, 0x3b96, 0x7000, 0xa086, 0x0007, 0x00c0, 0x3c29,
++	0x2d00, 0x70a2, 0xad80, 0x000f, 0x7036, 0x0078, 0x3bce, 0x7040,
++	0xa086, 0x0001, 0x0040, 0x2492, 0x0078, 0x2459, 0x2031, 0x0000,
++	0x691c, 0xa184, 0x0002, 0x0040, 0x3bd7, 0xa6b5, 0x0004, 0xa184,
++	0x00c0, 0x8003, 0x8003, 0x8007, 0xa080, 0x3cc2, 0x2004, 0xa635,
++	0x6820, 0xa084, 0x0400, 0x0040, 0x3bef, 0x789b, 0x0018, 0x78ab,
++	0x0003, 0x789b, 0x0081, 0x78ab, 0x0001, 0xa6b5, 0x1000, 0x6820,
++	0xa084, 0x8000, 0x00c0, 0x3bfd, 0x681c, 0xa084, 0x8000, 0x00c0,
++	0x3c04, 0xa6b5, 0x0800, 0x0078, 0x3c04, 0xa6b5, 0x0400, 0x789b,
++	0x000e, 0x6824, 0x8007, 0x78aa, 0x6820, 0xa084, 0x0100, 0x0040,
++	0x3c0b, 0xa6b5, 0x4000, 0xa684, 0x0200, 0x0040, 0x3c25, 0x682c,
++	0x78d2, 0x6830, 0x78d6, 0xa684, 0x0100, 0x0040, 0x3c23, 0x682c,
++	0xa084, 0x0001, 0x0040, 0x3c23, 0x7888, 0xa084, 0x0040, 0x0040,
++	0x3c23, 0xa6b5, 0x8000, 0x1078, 0x46f0, 0x7e5a, 0x6eb6, 0x0078,
++	0x4727, 0x1078, 0x38fa, 0x00c0, 0x3cbc, 0x702c, 0x8004, 0x0048,
++	0x3c37, 0x2019, 0x4e3b, 0x1078, 0x2276, 0x702f, 0x0001, 0x2041,
++	0x0001, 0x2031, 0x1000, 0x789b, 0x0018, 0x6814, 0xa084, 0x001f,
++	0xa085, 0x0080, 0x78aa, 0x691c, 0xa184, 0x0002, 0x0040, 0x3c50,
++	0xa6b5, 0x0004, 0x78ab, 0x0020, 0x6828, 0x78aa, 0xa8c0, 0x0002,
++	0x681c, 0xd0f4, 0x0040, 0x3c59, 0x2c50, 0x1078, 0x39ac, 0x1078,
++	0x45ff, 0x6820, 0xa084, 0x8000, 0x0040, 0x3c67, 0xa6b5, 0x0400,
++	0x789b, 0x000e, 0x6824, 0x8007, 0x78aa, 0x0078, 0x3c6e, 0x681c,
++	0xa084, 0x8000, 0x00c0, 0x3c6e, 0xa6b5, 0x0800, 0x6820, 0xa084,
++	0x0100, 0x0040, 0x3c75, 0xa6b5, 0x4000, 0x681c, 0xa084, 0x00c0,
++	0x8003, 0x8003, 0x8007, 0xa080, 0x3cc2, 0x2004, 0xa635, 0xa684,
++	0x0100, 0x0040, 0x3c8f, 0x682c, 0xa084, 0x0001, 0x0040, 0x3c8f,
++	0x7888, 0xa084, 0x0040, 0x0040, 0x3c8f, 0xa6b5, 0x8000, 0x789b,
++	0x007e, 0x7eae, 0x6eb6, 0x6814, 0x8007, 0x78aa, 0x7882, 0x2810,
++	0x7aaa, 0x7830, 0xa084, 0x00c0, 0x00c0, 0x3cbc, 0x0018, 0x3cbc,
++	0x70b4, 0xa080, 0x00e2, 0x781a, 0x1078, 0x3912, 0xa684, 0x0200,
++	0x0040, 0x3cb0, 0x682c, 0x78d2, 0x6830, 0x78d6, 0x1078, 0x46f0,
++	0x2d00, 0x70a2, 0x704a, 0x6810, 0x70be, 0x7003, 0x0007, 0xad80,
++	0x000f, 0x7036, 0x0078, 0x2459, 0x1078, 0x1b62, 0x1078, 0x3912,
++	0x0078, 0x2459, 0x0000, 0x0300, 0x0200, 0x0000, 0x1078, 0x23eb,
++	0x2300, 0x0079, 0x3ccb, 0x3cce, 0x3cce, 0x3cd0, 0x1078, 0x23eb,
++	0x1078, 0x46ff, 0x6924, 0xa184, 0x00ff, 0xa086, 0x000a, 0x0040,
++	0x3ce2, 0xa184, 0xff00, 0xa085, 0x000a, 0x6826, 0x1078, 0x1b62,
++	0x0078, 0x3b96, 0x2001, 0x000a, 0x1078, 0x4691, 0x0078, 0x3b96,
++	0xa282, 0x0005, 0x0050, 0x3cee, 0x1078, 0x23eb, 0x7000, 0xa084,
++	0x0007, 0x10c0, 0x39be, 0x1078, 0x1937, 0x00c0, 0x3d0d, 0xa684,
++	0x0004, 0x0040, 0x3cff, 0x2001, 0x2800, 0x0078, 0x3d01, 0x2001,
++	0x0800, 0x71b4, 0xa188, 0x0091, 0x789b, 0x000e, 0x78aa, 0x2031,
++	0x0400, 0x7e5a, 0x791a, 0x0078, 0x2459, 0x6807, 0x0106, 0x680b,
++	0x0000, 0x689f, 0x0000, 0x6827, 0x0000, 0xa386, 0x0002, 0x00c0,
++	0x3d2e, 0xa286, 0x0002, 0x00c0, 0x3d2e, 0x78a0, 0xa005, 0x00c0,
++	0x3d2e, 0xa484, 0x8000, 0x00c0, 0x3d2e, 0x78e4, 0xa084, 0x0008,
++	0x0040, 0x3d2e, 0xa6b5, 0x0008, 0x2019, 0x0000, 0x1078, 0x411e,
++	0x2d00, 0x70a2, 0x704a, 0x7003, 0x0007, 0x7037, 0x0000, 0x6824,
++	0xa084, 0x0080, 0x0040, 0x3d40, 0x1078, 0x41d0, 0x0078, 0x2459,
++	0x2300, 0x0079, 0x3d43, 0x3d46, 0x3dc7, 0x3de6, 0x2200, 0x0079,
++	0x3d49, 0x3d4e, 0x3d5e, 0x3d84, 0x3d90, 0x3db3, 0x2029, 0x0001,
++	0xa026, 0x2011, 0x0000, 0x1078, 0x42f1, 0x0079, 0x3d57, 0x3d5c,
++	0x2459, 0x3b96, 0x3d5c, 0x3d5c, 0x1078, 0x23eb, 0x7990, 0xa18c,
++	0x0007, 0x00c0, 0x3d65, 0x2009, 0x0008, 0x2011, 0x0001, 0xa684,
++	0x0004, 0x0040, 0x3d6d, 0x2011, 0x0003, 0x2220, 0xa12a, 0x2011,
++	0x0001, 0x1078, 0x42f1, 0x0079, 0x3d75, 0x3d7a, 0x2459, 0x3b96,
++	0x3d82, 0x3d7c, 0x0078, 0x472d, 0x70ab, 0x3d80, 0x0078, 0x2459,
++	0x0078, 0x3d7a, 0x1078, 0x23eb, 0xa684, 0x0010, 0x0040, 0x3d8e,
++	0x1078, 0x419f, 0x0040, 0x3d8e, 0x0078, 0x2459, 0x0078, 0x420c,
++	0x6000, 0xa084, 0x0002, 0x0040, 0x3dad, 0x70b4, 0xa080, 0x00d2,
++	0x781a, 0x0d7e, 0x1078, 0x4708, 0x2d00, 0x682e, 0x6827, 0x0000,
++	0x1078, 0x3af8, 0x0d7f, 0x1078, 0x195a, 0x7003, 0x0000, 0x7037,
++	0x0000, 0x704b, 0x0000, 0x0078, 0x3b96, 0xa684, 0x0004, 0x00c0,
++	0x3db3, 0x0078, 0x472d, 0x6000, 0xa084, 0x0004, 0x00c0, 0x3dc5,
++	0x6000, 0xa084, 0x0001, 0x0040, 0x3dc5, 0x70ab, 0x3dc5, 0x2001,
++	0x0007, 0x1078, 0x4689, 0x0078, 0x4733, 0x0078, 0x472d, 0x2200,
++	0x0079, 0x3dca, 0x3dcf, 0x3dcf, 0x3dcf, 0x3dd1, 0x3dcf, 0x1078,
++	0x23eb, 0x70a7, 0x3dd5, 0x0078, 0x4739, 0x2011, 0x0018, 0x1078,
++	0x42eb, 0x0079, 0x3ddb, 0x3de0, 0x2459, 0x3b96, 0x3de2, 0x3de4,
++	0x1078, 0x23eb, 0x1078, 0x23eb, 0x1078, 0x23eb, 0x2200, 0x0079,
++	0x3de9, 0x3dee, 0x3df0, 0x3df0, 0x3dee, 0x3dee, 0x1078, 0x23eb,
++	0x78e4, 0xa084, 0x0008, 0x0040, 0x3e05, 0x70a7, 0x3df9, 0x0078,
++	0x4739, 0x2011, 0x0004, 0x1078, 0x42eb, 0x0079, 0x3dff, 0x3e05,
++	0x2459, 0x3b96, 0x3e05, 0x3e0f, 0x3e13, 0x70ab, 0x3e0d, 0x2001,
++	0x0003, 0x1078, 0x4689, 0x0078, 0x4733, 0x0078, 0x472d, 0x70ab,
++	0x3e05, 0x0078, 0x2459, 0x70ab, 0x3e17, 0x0078, 0x2459, 0x0078,
++	0x3e0d, 0xa282, 0x0003, 0x0050, 0x3e1f, 0x1078, 0x23eb, 0xa386,
++	0x0002, 0x00c0, 0x3e38, 0xa286, 0x0002, 0x00c0, 0x3e3e, 0x78a0,
++	0xa005, 0x00c0, 0x3e3e, 0xa484, 0x8000, 0x00c0, 0x3e3e, 0x78e4,
++	0xa084, 0x0008, 0x0040, 0x3e38, 0xa6b5, 0x0008, 0x2019, 0x0000,
++	0xa684, 0x0008, 0x0040, 0x3e3e, 0x1078, 0x417c, 0x6810, 0x70be,
++	0x7003, 0x0007, 0x2300, 0x0079, 0x3e45, 0x3e48, 0x3e75, 0x3e7d,
++	0x2200, 0x0079, 0x3e4b, 0x3e50, 0x3e4e, 0x3e69, 0x1078, 0x23eb,
++	0x7990, 0xa1ac, 0x0007, 0xa026, 0x2011, 0x0001, 0x1078, 0x42f1,
++	0x0079, 0x3e5a, 0x3e5f, 0x2459, 0x3b96, 0x3e67, 0x3e61, 0x0078,
++	0x472d, 0x70ab, 0x3e65, 0x0078, 0x2459, 0x0078, 0x3e5f, 0x1078,
++	0x23eb, 0xa684, 0x0010, 0x0040, 0x3e73, 0x1078, 0x419f, 0x0040,
++	0x3e73, 0x0078, 0x2459, 0x0078, 0x420c, 0x2200, 0x0079, 0x3e78,
++	0x3e7b, 0x3e7b, 0x3e7b, 0x1078, 0x23eb, 0x2200, 0x0079, 0x3e80,
++	0x3e83, 0x3e85, 0x3e85, 0x1078, 0x23eb, 0x78e4, 0xa084, 0x0008,
++	0x0040, 0x3e9a, 0x70a7, 0x3e8e, 0x0078, 0x4739, 0x2011, 0x0004,
++	0x1078, 0x42eb, 0x0079, 0x3e94, 0x3e9a, 0x2459, 0x3b96, 0x3e9a,
++	0x3ea4, 0x3ea8, 0x70ab, 0x3ea2, 0x2001, 0x0003, 0x1078, 0x4689,
++	0x0078, 0x4733, 0x0078, 0x472d, 0x70ab, 0x3e9a, 0x0078, 0x2459,
++	0x70ab, 0x3eac, 0x0078, 0x2459, 0x0078, 0x3ea2, 0x2300, 0x0079,
++	0x3eb1, 0x3eb6, 0x3eb8, 0x3eb4, 0x1078, 0x23eb, 0x70a4, 0x007a,
++	0x70a4, 0x007a, 0xa282, 0x0002, 0x0050, 0x3ec0, 0x1078, 0x23eb,
++	0xa684, 0x0200, 0x0040, 0x3eca, 0x1078, 0x46f8, 0x1078, 0x42d3,
++	0x1078, 0x46ff, 0x2300, 0x0079, 0x3ecd, 0x3ed0, 0x3ef4, 0x3f5a,
++	0xa286, 0x0001, 0x0040, 0x3ed6, 0x1078, 0x23eb, 0xa684, 0x0200,
++	0x0040, 0x3ede, 0x1078, 0x46f8, 0x1078, 0x46ff, 0x2001, 0x0001,
++	0x1078, 0x4691, 0x78b8, 0xa084, 0xc001, 0x0040, 0x3ef0, 0x7848,
++	0xa085, 0x0008, 0x784a, 0x7848, 0xa084, 0x0008, 0x00c0, 0x3eeb,
++	0x7003, 0x0000, 0x0078, 0x3b96, 0x2200, 0x0079, 0x3ef7, 0x3ef9,
++	0x3f2a, 0x70a7, 0x3efd, 0x0078, 0x4739, 0x2011, 0x000d, 0x1078,
++	0x42eb, 0x0079, 0x3f03, 0x3f0a, 0x2459, 0x3b96, 0x3f12, 0x3f1a,
++	0x3f20, 0x3f22, 0xa6b4, 0x00ff, 0xa6b5, 0x0400, 0x6eb6, 0x7e5a,
++	0x0078, 0x4727, 0xa6b4, 0x00ff, 0xa6b5, 0x0400, 0x6eb6, 0x7e5a,
++	0x0078, 0x4727, 0x70ab, 0x3f1e, 0x0078, 0x2459, 0x0078, 0x3f0a,
++	0x1078, 0x23eb, 0x70ab, 0x3f26, 0x0078, 0x2459, 0x1078, 0x473f,
++	0x0078, 0x2459, 0x70a7, 0x3f2e, 0x0078, 0x4739, 0x2011, 0x0012,
++	0x1078, 0x42eb, 0x0079, 0x3f34, 0x3f3a, 0x2459, 0x3b96, 0x3f46,
++	0x3f4e, 0x3f54, 0xa6b4, 0x00ff, 0xa6b5, 0x0400, 0x6eb6, 0x7e5a,
++	0x70b4, 0xa080, 0x00a6, 0x781a, 0x0078, 0x2459, 0xa6b4, 0x00ff,
++	0xa6b5, 0x0400, 0x6eb6, 0x7e5a, 0x0078, 0x4727, 0x70ab, 0x3f52,
++	0x0078, 0x2459, 0x0078, 0x3f3a, 0x70ab, 0x3f58, 0x0078, 0x2459,
++	0x0078, 0x3f46, 0xa286, 0x0001, 0x0040, 0x3f60, 0x1078, 0x23eb,
++	0x70a7, 0x3f64, 0x0078, 0x4739, 0x2011, 0x0015, 0x1078, 0x42eb,
++	0x0079, 0x3f6a, 0x3f6f, 0x2459, 0x3b96, 0x3f7d, 0x3f89, 0xa6b4,
++	0x00ff, 0xa6b5, 0x0400, 0x6eb6, 0x7e5a, 0x783b, 0x1301, 0x70b4,
++	0xa080, 0x00b4, 0x781a, 0x0078, 0x2459, 0xa6b4, 0x00ff, 0xa6b5,
++	0x0400, 0x6eb6, 0x7e5a, 0x70b4, 0xa080, 0x00a6, 0x781a, 0x0078,
++	0x2459, 0x70ab, 0x3f8d, 0x0078, 0x2459, 0x0078, 0x3f6f, 0xa282,
++	0x0003, 0x0050, 0x3f95, 0x1078, 0x23eb, 0x2300, 0x0079, 0x3f98,
++	0x3f9b, 0x3fd2, 0x402d, 0xa286, 0x0001, 0x0040, 0x3fa1, 0x1078,
++	0x23eb, 0x6804, 0xa084, 0x00ff, 0xa086, 0x0006, 0x00c0, 0x3fae,
++	0x1078, 0x3af8, 0x7003, 0x0000, 0x0078, 0x3b96, 0x683b, 0x0000,
++	0x6837, 0x0000, 0xa684, 0x0200, 0x0040, 0x3fbc, 0x1078, 0x46f8,
++	0x1078, 0x42d3, 0x1078, 0x46ff, 0x2001, 0x0001, 0x1078, 0x4691,
++	0x78b8, 0xa084, 0xc001, 0x0040, 0x3fce, 0x7848, 0xa085, 0x0008,
++	0x784a, 0x7848, 0xa084, 0x0008, 0x00c0, 0x3fc9, 0x7003, 0x0000,
++	0x0078, 0x3b96, 0x2200, 0x0079, 0x3fd5, 0x3fd7, 0x4008, 0x70a7,
++	0x3fdb, 0x0078, 0x4739, 0x2011, 0x000d, 0x1078, 0x42eb, 0x0079,
++	0x3fe1, 0x3fe8, 0x2459, 0x3b96, 0x3ff0, 0x3ff8, 0x3ffe, 0x4000,
++	0xa6b4, 0x00ff, 0xa6b5, 0x0800, 0x6eb6, 0x7e5a, 0x0078, 0x4727,
++	0xa6b4, 0x00ff, 0xa6b5, 0x0800, 0x6eb6, 0x7e5a, 0x0078, 0x4727,
++	0x70ab, 0x3ffc, 0x0078, 0x2459, 0x0078, 0x3fe8, 0x1078, 0x23eb,
++	0x70ab, 0x4004, 0x0078, 0x2459, 0x1078, 0x473f, 0x0078, 0x2459,
++	0x70a7, 0x400c, 0x0078, 0x4739, 0x2011, 0x0005, 0x1078, 0x42eb,
++	0x0079, 0x4012, 0x4017, 0x2459, 0x3b96, 0x401f, 0x4027, 0xa6b4,
++	0x00ff, 0xa6b5, 0x0800, 0x6eb6, 0x7e5a, 0x0078, 0x4727, 0xa6b4,
++	0x00ff, 0xa6b5, 0x0800, 0x6eb6, 0x7e5a, 0x0078, 0x4727, 0x70ab,
++	0x402b, 0x0078, 0x2459, 0x0078, 0x4017, 0xa286, 0x0001, 0x0040,
++	0x4033, 0x1078, 0x23eb, 0x70a7, 0x4037, 0x0078, 0x4739, 0x2011,
++	0x0006, 0x1078, 0x42eb, 0x0079, 0x403d, 0x4042, 0x2459, 0x3b96,
++	0x4048, 0x4052, 0xa6b5, 0x0800, 0x6eb6, 0x7e5a, 0x0078, 0x4727,
++	0xa6b4, 0x00ff, 0xa6b5, 0x0800, 0x6eb6, 0xa6b5, 0x4000, 0x7e5a,
++	0x0078, 0x4727, 0x70ab, 0x4056, 0x0078, 0x2459, 0x0078, 0x4042,
++	0x2300, 0x0079, 0x405b, 0x4060, 0x405e, 0x405e, 0x1078, 0x23eb,
++	0x1078, 0x23eb, 0x2300, 0x71a8, 0xa005, 0x017a, 0x6810, 0x70be,
++	0xa282, 0x0003, 0x0050, 0x406e, 0x1078, 0x23eb, 0x2300, 0x0079,
++	0x4071, 0x4074, 0x4082, 0x40a4, 0xa684, 0x0200, 0x0040, 0x407c,
++	0x1078, 0x46f8, 0x1078, 0x46ff, 0x2001, 0x0001, 0x1078, 0x4691,
++	0x0078, 0x2459, 0xa296, 0x0002, 0x0040, 0x408b, 0x82ff, 0x0040,
++	0x408b, 0x1078, 0x23eb, 0x70a7, 0x408f, 0x0078, 0x4739, 0x2011,
++	0x0018, 0x1078, 0x42eb, 0x0079, 0x4095, 0x409a, 0x2459, 0x3b96,
++	0x409c, 0x409e, 0x0078, 0x4727, 0x0078, 0x4727, 0x70ab, 0x40a2,
++	0x0078, 0x2459, 0x0078, 0x409a, 0x2200, 0x0079, 0x40a7, 0x40a9,
++	0x40c2, 0x70a7, 0x40ad, 0x0078, 0x4739, 0x2011, 0x0017, 0x1078,
++	0x42eb, 0x0079, 0x40b3, 0x40b8, 0x2459, 0x3b96, 0x40ba, 0x40bc,
++	0x0078, 0x4727, 0x0078, 0x4727, 0x70ab, 0x40c0, 0x0078, 0x2459,
++	0x0078, 0x40b8, 0xa484, 0x8000, 0x00c0, 0x410c, 0xa684, 0x0100,
++	0x0040, 0x40d6, 0x1078, 0x46f8, 0x1078, 0x42d3, 0x1078, 0x46ff,
++	0x7848, 0xa085, 0x000c, 0x784a, 0x0078, 0x40da, 0x78d8, 0x78d2,
++	0x78dc, 0x78d6, 0xa6b4, 0xefff, 0x7e5a, 0x70a7, 0x40e1, 0x0078,
++	0x4739, 0x2011, 0x000d, 0x1078, 0x42eb, 0x0079, 0x40e7, 0x40ee,
++	0x2459, 0x3b96, 0x40ee, 0x40fc, 0x4102, 0x4104, 0xa684, 0x0100,
++	0x0040, 0x40fa, 0x1078, 0x46b6, 0x682c, 0x78d2, 0x6830, 0x78d6,
++	0x1078, 0x46f0, 0x0078, 0x4727, 0x70ab, 0x4100, 0x0078, 0x2459,
++	0x0078, 0x40ee, 0x1078, 0x23eb, 0x70ab, 0x4108, 0x0078, 0x2459,
++	0x1078, 0x473f, 0x0078, 0x2459, 0x1078, 0x46ff, 0x70ab, 0x4116,
++	0x2001, 0x0003, 0x1078, 0x4689, 0x0078, 0x4733, 0x1078, 0x46f0,
++	0x682c, 0x78d2, 0x6830, 0x78d6, 0x0078, 0x4727, 0x70b8, 0x6812,
++	0x70be, 0x8000, 0x70ba, 0x681b, 0x0000, 0xa684, 0x0008, 0x0040,
++	0x4141, 0x157e, 0x137e, 0x147e, 0x7890, 0x8004, 0x8004, 0x8004,
++	0x8004, 0xa084, 0x000f, 0x681a, 0x80ac, 0x789b, 0x0000, 0xaf80,
++	0x002b, 0x2098, 0xad80, 0x000b, 0x20a0, 0x53a5, 0x147f, 0x137f,
++	0x157f, 0xa6c4, 0x0f00, 0xa684, 0x0002, 0x00c0, 0x4150, 0x692c,
++	0x810d, 0x810d, 0x810d, 0xa184, 0x0007, 0x2008, 0x0078, 0x415f,
++	0x789b, 0x0010, 0x79ac, 0xa184, 0x0020, 0x0040, 0x415f, 0x017e,
++	0x2009, 0x0005, 0x2001, 0x3d00, 0x1078, 0x46c1, 0x017f, 0xa184,
++	0x001f, 0xa805, 0x6816, 0x1078, 0x3b69, 0x68be, 0xa684, 0x0004,
++	0x0040, 0x4170, 0xa18c, 0xff00, 0x78a8, 0xa084, 0x00ff, 0xa105,
++	0x682a, 0xa6b4, 0x00ff, 0x6000, 0xa084, 0x0008, 0x0040, 0x417a,
++	0xa6b5, 0x4000, 0x6eb6, 0x007c, 0x157e, 0x137e, 0x147e, 0x6918,
++	0x7890, 0x8004, 0x8004, 0x8004, 0x8004, 0xa084, 0x000f, 0x007e,
++	0xa100, 0x681a, 0x007f, 0x8000, 0x8004, 0x0040, 0x419b, 0x20a8,
++	0x8104, 0xa080, 0x000b, 0xad00, 0x20a0, 0x789b, 0x0000, 0xaf80,
++	0x002b, 0x2098, 0x53a5, 0x147f, 0x137f, 0x157f, 0x007c, 0x682c,
++	0xa084, 0x0020, 0x00c0, 0x41a7, 0x620c, 0x0078, 0x41a8, 0x6210,
++	0x6b18, 0x2300, 0xa202, 0x0040, 0x41c8, 0x2018, 0xa382, 0x000e,
++	0x0048, 0x41b8, 0x0040, 0x41b8, 0x2019, 0x000e, 0x0078, 0x41bc,
++	0x7858, 0xa084, 0xffef, 0x785a, 0x783b, 0x1b01, 0x7893, 0x0000,
++	0x7ba2, 0x70b4, 0xa080, 0x008e, 0x781a, 0xa085, 0x0001, 0x007c,
++	0x7858, 0xa084, 0xffef, 0x785a, 0x7893, 0x0000, 0xa006, 0x007c,
++	0x6904, 0xa18c, 0x00ff, 0xa196, 0x0007, 0x0040, 0x41dd, 0xa196,
++	0x000f, 0x0040, 0x41dd, 0x6807, 0x0117, 0x6914, 0x1078, 0x3b69,
++	0x6100, 0x8104, 0x00c8, 0x41f8, 0x601c, 0xa005, 0x0040, 0x41ec,
++	0x2001, 0x0800, 0x0078, 0x41fa, 0x0d7e, 0x6824, 0x007e, 0x1078,
++	0x4708, 0x007f, 0x6826, 0x2d00, 0x682e, 0x1078, 0x3af8, 0x0d7f,
++	0x2001, 0x0200, 0x6826, 0x8007, 0x789b, 0x000e, 0x78aa, 0x6820,
++	0xa085, 0x8000, 0x6822, 0x2031, 0x0400, 0x6eb6, 0x7e5a, 0x71b4,
++	0xa188, 0x0091, 0x791a, 0x007c, 0xa6c4, 0x0f00, 0xa684, 0x0002,
++	0x00c0, 0x4220, 0x692c, 0x810d, 0x810d, 0x810d, 0xa184, 0x0007,
++	0x2008, 0xa805, 0x6816, 0x1078, 0x3b69, 0x68be, 0x0078, 0x4223,
++	0x6914, 0x1078, 0x3b69, 0x6100, 0x8104, 0x00c8, 0x4280, 0xa184,
++	0x0300, 0x0040, 0x422f, 0x6807, 0x0117, 0x0078, 0x424d, 0x6004,
++	0xa005, 0x00c0, 0x4256, 0x6807, 0x0117, 0x601c, 0xa005, 0x00c0,
++	0x4243, 0x0d7e, 0x1078, 0x4708, 0x6827, 0x0034, 0x2d00, 0x682e,
++	0x1078, 0x3af8, 0x0d7f, 0xa684, 0x0004, 0x0040, 0x424d, 0x2031,
++	0x0400, 0x2001, 0x2800, 0x0078, 0x4251, 0x2031, 0x0400, 0x2001,
++	0x0800, 0x71b4, 0xa188, 0x0091, 0x0078, 0x42ae, 0x6018, 0xa005,
++	0x00c0, 0x4243, 0x601c, 0xa005, 0x00c0, 0x4243, 0x689f, 0x0000,
++	0x6827, 0x003d, 0xa684, 0x0001, 0x0040, 0x42bc, 0xd694, 0x00c0,
++	0x4279, 0x6100, 0xd1d4, 0x0040, 0x4279, 0x692c, 0x81ff, 0x0040,
++	0x42bc, 0xa186, 0x0003, 0x0040, 0x42bc, 0xa186, 0x0012, 0x0040,
++	0x42bc, 0xa6b5, 0x0800, 0x71b4, 0xa188, 0x00af, 0x0078, 0x42b7,
++	0x6807, 0x0117, 0x2031, 0x0400, 0x692c, 0xa18c, 0x00ff, 0xa186,
++	0x0012, 0x00c0, 0x4291, 0x2001, 0x42c9, 0x2009, 0x0001, 0x0078,
++	0x42a2, 0xa186, 0x0003, 0x00c0, 0x429b, 0x2001, 0x42ca, 0x2009,
++	0x0012, 0x0078, 0x42a2, 0x2001, 0x0200, 0x71b4, 0xa188, 0x0091,
++	0x0078, 0x42ae, 0x1078, 0x46db, 0x78a3, 0x0000, 0x681c, 0xa085,
++	0x0040, 0x681e, 0x71b4, 0xa188, 0x00df, 0xa006, 0x6826, 0x8007,
++	0x789b, 0x000e, 0x78aa, 0x6820, 0xa085, 0x8000, 0x6822, 0x6eb6,
++	0x7e5a, 0x791a, 0x0078, 0x2459, 0x6eb6, 0x1078, 0x3af8, 0x6810,
++	0x70be, 0x7003, 0x0007, 0x70a3, 0x0000, 0x704b, 0x0000, 0x0078,
++	0x2459, 0x0023, 0x0070, 0x0005, 0x0000, 0x0a00, 0x0000, 0x0000,
++	0x0025, 0x0000, 0x0000, 0x683b, 0x0000, 0x6837, 0x0000, 0xa684,
++	0x0200, 0x0040, 0x42ea, 0x78b8, 0xa08c, 0x001f, 0xa084, 0x8000,
++	0x0040, 0x42e3, 0x8108, 0x78d8, 0xa100, 0x6836, 0x78dc, 0xa081,
++	0x0000, 0x683a, 0x007c, 0x7990, 0x810f, 0xa5ac, 0x0007, 0x2021,
++	0x0000, 0xa480, 0x0010, 0x789a, 0x79a8, 0xa18c, 0x00ff, 0xa184,
++	0x0080, 0x00c0, 0x4319, 0xa182, 0x0020, 0x00c8, 0x4337, 0xa182,
++	0x0012, 0x00c8, 0x467b, 0x2100, 0x1079, 0x4307, 0x007c, 0x467b,
++	0x44e8, 0x467b, 0x467b, 0x4344, 0x4347, 0x4381, 0x43b7, 0x43eb,
++	0x43ee, 0x467b, 0x467b, 0x43a2, 0x4412, 0x444c, 0x467b, 0x467b,
++	0x4473, 0xa184, 0x0020, 0x00c0, 0x44a7, 0xa18c, 0x001f, 0x6814,
++	0xa084, 0x001f, 0xa106, 0x0040, 0x4334, 0x70b4, 0xa080, 0x00d2,
++	0x781a, 0x2001, 0x0014, 0x1078, 0x4691, 0x1078, 0x46ff, 0x7003,
++	0x0000, 0x2001, 0x0002, 0x007c, 0x2001, 0x0000, 0x007c, 0xa182,
++	0x0024, 0x00c8, 0x467b, 0xa184, 0x0003, 0x1079, 0x4307, 0x007c,
++	0x467b, 0x467b, 0x467b, 0x467b, 0x1078, 0x467b, 0x007c, 0x2200,
++	0x0079, 0x434a, 0x4476, 0x4476, 0x436e, 0x436e, 0x436e, 0x436e,
++	0x436e, 0x436e, 0x436e, 0x436e, 0x436c, 0x436e, 0x4363, 0x436e,
++	0x436e, 0x436e, 0x436e, 0x436e, 0x4376, 0x4379, 0x4476, 0x4379,
++	0x436e, 0x436e, 0x436e, 0x0c7e, 0x077e, 0x6f14, 0x1078, 0x36e2,
++	0x077f, 0x0c7f, 0x0078, 0x436e, 0x1078, 0x458b, 0x6827, 0x02b3,
++	0x2009, 0x000b, 0x2001, 0x4800, 0x0078, 0x44aa, 0x1078, 0x4670,
++	0x007c, 0x6827, 0x0093, 0x2009, 0x000b, 0x2001, 0x4800, 0x0078,
++	0x4492, 0x2d58, 0x6804, 0xa084, 0x00ff, 0xa086, 0x0006, 0x00c0,
++	0x438b, 0x6807, 0x0117, 0x6827, 0x0002, 0x1078, 0x4708, 0x6827,
++	0x0036, 0x6932, 0x2d00, 0x682e, 0x0d7e, 0x1078, 0x3ac8, 0x1078,
++	0x44d0, 0x2b68, 0x1078, 0x3af8, 0x0d7f, 0x1078, 0x3af8, 0x2001,
++	0x0002, 0x007c, 0x1078, 0x44d0, 0x2001, 0x0017, 0x1078, 0x4691,
++	0x70a3, 0x0000, 0x2009, 0x5138, 0x200b, 0x0006, 0x70af, 0x0017,
++	0x2009, 0x0200, 0x1078, 0x3a06, 0x2001, 0x0001, 0x007c, 0x2200,
++	0x0079, 0x43ba, 0x4476, 0x44a7, 0x44a7, 0x44a7, 0x43db, 0x44b7,
++	0x43e3, 0x44b7, 0x44b7, 0x44ba, 0x44ba, 0x44bf, 0x44bf, 0x43d3,
++	0x43d3, 0x44a7, 0x44a7, 0x44b7, 0x44a7, 0x43e3, 0x4476, 0x43e3,
++	0x43e3, 0x43e3, 0x43e3, 0x6827, 0x0084, 0x2009, 0x000b, 0x2001,
++	0x4300, 0x0078, 0x44c9, 0x6827, 0x000d, 0x2009, 0x000b, 0x2001,
++	0x4300, 0x0078, 0x44aa, 0x6827, 0x0093, 0x2009, 0x000b, 0x2001,
++	0x4300, 0x0078, 0x4492, 0x2001, 0x0000, 0x007c, 0x2200, 0x0079,
++	0x43f1, 0x4476, 0x440a, 0x440a, 0x440a, 0x440a, 0x44b7, 0x44b7,
++	0x44b7, 0x44b7, 0x44b7, 0x44b7, 0x44b7, 0x44b7, 0x440a, 0x440a,
++	0x440a, 0x440a, 0x44b7, 0x440a, 0x440a, 0x44b7, 0x44b7, 0x44b7,
++	0x44b7, 0x4476, 0x6827, 0x0093, 0x2009, 0x000b, 0x2001, 0x4300,
++	0x0078, 0x4492, 0xa684, 0x0004, 0x00c0, 0x4426, 0x6804, 0xa084,
++	0x00ff, 0xa086, 0x0006, 0x00c0, 0x467b, 0x1078, 0x44d0, 0x6807,
++	0x0117, 0x1078, 0x3af8, 0x2001, 0x0002, 0x007c, 0x6000, 0xa084,
++	0x0004, 0x0040, 0x467b, 0x2d58, 0x6804, 0xa084, 0x00ff, 0xa086,
++	0x0006, 0x00c0, 0x4435, 0x6807, 0x0117, 0x6827, 0x0002, 0x1078,
++	0x4708, 0x6827, 0x0036, 0x6932, 0x2d00, 0x682e, 0x0d7e, 0x1078,
++	0x3ad7, 0x1078, 0x44d0, 0x2b68, 0x1078, 0x3af8, 0x0d7f, 0x1078,
++	0x3af8, 0x2001, 0x0002, 0x007c, 0x6000, 0xa084, 0x0004, 0x0040,
++	0x467b, 0x2d58, 0x6a04, 0xa294, 0x00ff, 0xa286, 0x0006, 0x00c0,
++	0x445b, 0x6807, 0x0117, 0x6827, 0x0002, 0x2d58, 0x1078, 0x4708,
++	0x6827, 0x0036, 0x6932, 0x2d00, 0x682e, 0x0d7e, 0x1078, 0x3ae7,
++	0x1078, 0x44d0, 0x2b68, 0x1078, 0x3af8, 0x0d7f, 0x1078, 0x3af8,
++	0x2001, 0x0002, 0x007c, 0x1078, 0x467b, 0x007c, 0x70b4, 0xa080,
++	0x00d2, 0x781a, 0x2001, 0x0001, 0x1078, 0x4691, 0x1078, 0x46ff,
++	0x7003, 0x0000, 0x2001, 0x0002, 0x007c, 0x1078, 0x46c1, 0x1078,
++	0x46f8, 0x1078, 0x42d3, 0x1078, 0x41d0, 0x1078, 0x46ff, 0x2001,
++	0x0001, 0x007c, 0x1078, 0x46c1, 0x1078, 0x46f8, 0x1078, 0x42d3,
++	0x70b4, 0xa080, 0x00d2, 0x781a, 0x2001, 0x0013, 0x1078, 0x4691,
++	0x1078, 0x46ff, 0x7003, 0x0000, 0x2001, 0x0002, 0x007c, 0x1078,
++	0x467b, 0x007c, 0x1078, 0x46c1, 0x1078, 0x46f8, 0x1078, 0x42d3,
++	0x1078, 0x41d0, 0x1078, 0x46ff, 0x2001, 0x0001, 0x007c, 0x2001,
++	0x0003, 0x007c, 0x1078, 0x458b, 0x2001, 0x0000, 0x007c, 0x0c7e,
++	0x077e, 0x6f14, 0x1078, 0x36e2, 0x077f, 0x0c7f, 0x2001, 0x0000,
++	0x007c, 0x1078, 0x46c1, 0x1078, 0x467b, 0x2001, 0x0006, 0x007c,
++	0x6904, 0xa18c, 0x00ff, 0xa186, 0x0007, 0x0040, 0x44db, 0xa186,
++	0x000f, 0x00c0, 0x44df, 0x1078, 0x46f8, 0x1078, 0x42d3, 0x70b4,
++	0xa080, 0x00d2, 0x781a, 0x1078, 0x46ff, 0x7003, 0x0000, 0x007c,
++	0x7aa8, 0xa294, 0x00ff, 0x78a8, 0xa084, 0x00ff, 0xa08a, 0x0004,
++	0x00c8, 0x467b, 0x1079, 0x44f5, 0x007c, 0x467b, 0x44f9, 0x467b,
++	0x4592, 0xa282, 0x0003, 0x0040, 0x4500, 0x1078, 0x467b, 0x007c,
++	0x7da8, 0xa5ac, 0x00ff, 0x7ca8, 0xa4a4, 0x00ff, 0x69b8, 0xa184,
++	0x0100, 0x0040, 0x453f, 0xa18c, 0xfeff, 0x69ba, 0x78a0, 0xa005,
++	0x00c0, 0x453f, 0xa4a4, 0x00ff, 0x0040, 0x4533, 0xa482, 0x000c,
++	0x0040, 0x451c, 0x00c8, 0x4526, 0x852b, 0x852b, 0x1078, 0x3760,
++	0x0040, 0x4526, 0x1078, 0x355b, 0x0078, 0x4535, 0x1078, 0x465d,
++	0x1078, 0x3586, 0x69b8, 0xa18d, 0x0100, 0x69ba, 0xa6b5, 0x1000,
++	0x7e5a, 0x0078, 0x4538, 0x1078, 0x3586, 0xa6b4, 0xefff, 0x7e5a,
++	0x70b4, 0xa080, 0x0091, 0x781a, 0x2001, 0x0001, 0x007c, 0x0c7e,
++	0x1078, 0x457f, 0x6200, 0xd2e4, 0x0040, 0x4570, 0x6208, 0x8217,
++	0xa294, 0x00ff, 0xa282, 0x000c, 0x0048, 0x4552, 0x0040, 0x4552,
++	0x2011, 0x000c, 0x2400, 0xa202, 0x00c8, 0x4557, 0x2220, 0x6208,
++	0xa294, 0x00ff, 0x701c, 0xa202, 0x00c8, 0x455f, 0x721c, 0x2200,
++	0xa502, 0x00c8, 0x4564, 0x2228, 0x1078, 0x4661, 0x852b, 0x852b,
++	0x1078, 0x3760, 0x0040, 0x4570, 0x1078, 0x3562, 0x0078, 0x4574,
++	0x1078, 0x465d, 0x1078, 0x358d, 0xa6b5, 0x1000, 0x7e5a, 0x70b4,
++	0xa080, 0x00be, 0x781a, 0x2001, 0x0004, 0x0c7f, 0x007c, 0x007e,
++	0x6814, 0x8007, 0xa084, 0x000f, 0x8003, 0x8003, 0x8003, 0xa0e0,
++	0x5380, 0x007f, 0x007c, 0x0c7e, 0x1078, 0x457f, 0x1078, 0x358d,
++	0x0c7f, 0x007c, 0xa282, 0x0002, 0x00c0, 0x467b, 0x7aa8, 0xa294,
++	0x00ff, 0x69b8, 0xa184, 0x0200, 0x0040, 0x45c9, 0xa18c, 0xfdff,
++	0x69ba, 0x78a0, 0xa005, 0x00c0, 0x45c9, 0xa282, 0x0002, 0x00c8,
++	0x369d, 0x1078, 0x4627, 0x1078, 0x362b, 0x1078, 0x3586, 0xa684,
++	0x0100, 0x0040, 0x45bf, 0x682c, 0xa084, 0x0001, 0x0040, 0x45bf,
++	0xc6fc, 0x7888, 0xa084, 0x0040, 0x0040, 0x45bf, 0xc6fd, 0xa6b5,
++	0x1000, 0x7e5a, 0x70b4, 0xa080, 0x0091, 0x781a, 0x2001, 0x0001,
++	0x007c, 0x0c7e, 0x1078, 0x457f, 0xa284, 0xfffe, 0x0040, 0x45d4,
++	0x2011, 0x0001, 0x0078, 0x45d8, 0xa284, 0x0001, 0x0040, 0x45de,
++	0x6100, 0xd1ec, 0x00c0, 0x45de, 0x2011, 0x0000, 0x1078, 0x4619,
++	0x1078, 0x3632, 0x1078, 0x358d, 0xa684, 0x0100, 0x0040, 0x45f4,
++	0x682c, 0xa084, 0x0001, 0x0040, 0x45f4, 0xc6fc, 0x7888, 0xa084,
++	0x0040, 0x0040, 0x45f4, 0xc6fd, 0xa6b5, 0x1000, 0x7e5a, 0x70b4,
++	0xa080, 0x00be, 0x781a, 0x2001, 0x0004, 0x0c7f, 0x007c, 0x0c7e,
++	0x2960, 0x6000, 0x2011, 0x0001, 0xa084, 0x2000, 0x00c0, 0x460a,
++	0x2011, 0x0000, 0x78ab, 0x0001, 0x78ab, 0x0002, 0x78ab, 0x0003,
++	0x7aaa, 0xa8c0, 0x0004, 0x68b8, 0xa085, 0x0200, 0x68ba, 0x0c7f,
++	0x007c, 0x789b, 0x0018, 0x78ab, 0x0001, 0x78ab, 0x0002, 0x78ab,
++	0x0003, 0x7aaa, 0x789b, 0x0081, 0x78ab, 0x0004, 0x007c, 0x0c7e,
++	0x7054, 0x2060, 0x6000, 0xa084, 0x1000, 0x00c0, 0x4635, 0x2029,
++	0x0032, 0x2021, 0x0000, 0x0078, 0x4655, 0x6508, 0xa5ac, 0x00ff,
++	0x7018, 0xa086, 0x0028, 0x00c0, 0x4645, 0xa582, 0x0019, 0x00c8,
++	0x464b, 0x2029, 0x0019, 0x0078, 0x464b, 0xa582, 0x000c, 0x00c8,
++	0x464b, 0x2029, 0x000c, 0x6408, 0x8427, 0xa4a4, 0x00ff, 0xa482,
++	0x000c, 0x0048, 0x4655, 0x2021, 0x000c, 0x1078, 0x4661, 0x68b8,
++	0xa085, 0x0100, 0x68ba, 0x0c7f, 0x007c, 0x2021, 0x0000, 0x2029,
++	0x0032, 0x789b, 0x0018, 0x78ab, 0x0001, 0x78ab, 0x0003, 0x78ab,
++	0x0001, 0x7daa, 0x7caa, 0x789b, 0x0081, 0x78ab, 0x0005, 0x007c,
++	0x2001, 0x0003, 0x1078, 0x4689, 0x70b4, 0xa080, 0x00be, 0x781a,
++	0x2001, 0x0005, 0x007c, 0x2001, 0x0007, 0x1078, 0x4689, 0xa6b5,
++	0x1000, 0x7e5a, 0x70b4, 0xa080, 0x00be, 0x781a, 0x2001, 0x0004,
++	0x007c, 0x789b, 0x0018, 0x78aa, 0x789b, 0x0081, 0x78ab, 0x0001,
++	0x007c, 0x6904, 0xa18c, 0x00ff, 0xa196, 0x0007, 0x0040, 0x469f,
++	0xa196, 0x000f, 0x0040, 0x469f, 0x1078, 0x195a, 0x007c, 0x6924,
++	0xa194, 0x003f, 0x00c0, 0x46a8, 0xa18c, 0xffc0, 0xa105, 0x6826,
++	0x1078, 0x3af8, 0x691c, 0xa184, 0x0100, 0x0040, 0x46b5, 0x6914,
++	0x1078, 0x3b69, 0x6204, 0x8210, 0x6206, 0x007c, 0x692c, 0x6834,
++	0x682e, 0xa112, 0x6930, 0x6838, 0x6832, 0xa11b, 0xa200, 0xa301,
++	0x007c, 0x0c7e, 0xade0, 0x0018, 0x6003, 0x0070, 0x6106, 0x600b,
++	0x0000, 0x600f, 0x0a00, 0x6013, 0x0000, 0x6017, 0x0000, 0x8007,
++	0x601a, 0x601f, 0x0000, 0x6023, 0x0000, 0x0c7f, 0x6824, 0xa085,
++	0x0080, 0x6826, 0x007c, 0x157e, 0x137e, 0x147e, 0x2098, 0xaf80,
++	0x002d, 0x20a0, 0x81ac, 0x0040, 0x46e6, 0x53a6, 0xa184, 0x0001,
++	0x0040, 0x46ec, 0x3304, 0x78be, 0x147f, 0x137f, 0x157f, 0x007c,
++	0x70b0, 0xa005, 0x10c0, 0x23eb, 0x70b3, 0x8000, 0x0078, 0x4a3a,
++	0x71b0, 0x81ff, 0x0040, 0x46fe, 0x1078, 0x4b30, 0x007c, 0x71b0,
++	0x81ff, 0x0040, 0x4707, 0x70b3, 0x0000, 0x1078, 0x4776, 0x007c,
++	0x0c7e, 0x0d7e, 0x1078, 0x1937, 0x0c7f, 0x157e, 0x137e, 0x147e,
++	0x2da0, 0x2c98, 0x20a9, 0x0031, 0x53a3, 0x147f, 0x137f, 0x157f,
++	0x6807, 0x010d, 0x680b, 0x0000, 0x7004, 0x8007, 0x681a, 0x6823,
++	0x0000, 0x681f, 0x0000, 0x689f, 0x0000, 0x0c7f, 0x007c, 0x70b4,
++	0xa080, 0x0091, 0x781a, 0x0078, 0x2459, 0x70b4, 0xa080, 0x0081,
++	0x781a, 0x0078, 0x2459, 0x70b4, 0xa080, 0x00be, 0x781a, 0x0078,
++	0x2459, 0x70b4, 0xa080, 0x00c8, 0x781a, 0x0078, 0x2459, 0x6904,
++	0xa18c, 0x00ff, 0xa196, 0x0007, 0x0040, 0x474c, 0xa196, 0x000f,
++	0x0040, 0x474c, 0x6807, 0x0117, 0x2001, 0x0200, 0x6826, 0x8007,
++	0x789b, 0x000e, 0x78aa, 0x6820, 0xa085, 0x8000, 0x6822, 0x2031,
++	0x0400, 0x6eb6, 0x7e5a, 0x71b4, 0xa188, 0x0091, 0x791a, 0x007c,
++	0x1078, 0x46ff, 0x7848, 0xa085, 0x000c, 0x784a, 0x70b4, 0xa080,
++	0x00d2, 0x781a, 0x2009, 0x000b, 0x2001, 0x4400, 0x1078, 0x46c1,
++	0x2001, 0x0013, 0x1078, 0x4691, 0x0078, 0x3b96, 0x127e, 0x2091,
++	0x2200, 0x2049, 0x4776, 0x7000, 0x7204, 0xa205, 0x720c, 0xa215,
++	0x7008, 0xa084, 0xfff7, 0xa205, 0x0040, 0x4788, 0x0078, 0x478d,
++	0x7003, 0x0000, 0x127f, 0x2000, 0x007c, 0x7000, 0xa084, 0x0001,
++	0x00c0, 0x47bb, 0x7108, 0x8103, 0x00c8, 0x479a, 0x1078, 0x48bd,
++	0x0078, 0x4792, 0x700c, 0xa08c, 0x00ff, 0x0040, 0x47bb, 0x7004,
++	0x8004, 0x00c8, 0x47b2, 0x7014, 0xa005, 0x00c0, 0x47ae, 0x7010,
++	0xa005, 0x0040, 0x47b2, 0xa102, 0x00c8, 0x4792, 0x7007, 0x0010,
++	0x0078, 0x47bb, 0x8aff, 0x0040, 0x47bb, 0x1078, 0x4b07, 0x00c0,
++	0x47b5, 0x0040, 0x4792, 0x1078, 0x4846, 0x7003, 0x0000, 0x127f,
++	0x2000, 0x007c, 0x017e, 0x6104, 0xa18c, 0x00ff, 0xa186, 0x0007,
++	0x0040, 0x47ce, 0xa18e, 0x000f, 0x00c0, 0x47d1, 0x6040, 0x0078,
++	0x47d2, 0x6428, 0x017f, 0x84ff, 0x0040, 0x47fc, 0x2c70, 0x7004,
++	0xa0bc, 0x000f, 0xa7b8, 0x480c, 0x273c, 0x87fb, 0x00c0, 0x47ea,
++	0x0048, 0x47e4, 0x1078, 0x23eb, 0x609c, 0xa075, 0x0040, 0x47fc,
++	0x0078, 0x47d7, 0x2704, 0xae68, 0x6808, 0xa630, 0x680c, 0xa529,
++	0x8421, 0x0040, 0x47fc, 0x8738, 0x2704, 0xa005, 0x00c0, 0x47eb,
++	0x709c, 0xa075, 0x00c0, 0x47d7, 0x007c, 0x0000, 0x0005, 0x0009,
++	0x000d, 0x0011, 0x0015, 0x0019, 0x001d, 0x0000, 0x0003, 0x0009,
++	0x000f, 0x0015, 0x001b, 0x0000, 0x0000, 0x4801, 0x47fe, 0x0000,
++	0x0000, 0x8000, 0x0000, 0x4801, 0x0000, 0x4809, 0x4806, 0x0000,
++	0x0000, 0x0000, 0x0000, 0x4809, 0x0000, 0x4804, 0x4804, 0x0000,
++	0x0000, 0x8000, 0x0000, 0x4804, 0x0000, 0x480a, 0x480a, 0x0000,
++	0x0000, 0x0000, 0x0000, 0x480a, 0x127e, 0x2091, 0x2200, 0x2079,
++	0x5100, 0x2071, 0x0010, 0x7007, 0x000a, 0x7007, 0x0002, 0x7003,
++	0x0000, 0x2071, 0x0020, 0x7007, 0x000a, 0x7007, 0x0002, 0x7003,
++	0x0000, 0x2049, 0x0000, 0x127f, 0x2000, 0x007c, 0x2049, 0x4846,
++	0x2019, 0x0000, 0x7004, 0x8004, 0x00c8, 0x4899, 0x7007, 0x0012,
++	0x7108, 0x7008, 0xa106, 0x00c0, 0x4850, 0xa184, 0x01e0, 0x0040,
++	0x485b, 0x1078, 0x23eb, 0x2001, 0x04fd, 0x2004, 0xa082, 0x0005,
++	0x00c8, 0x4866, 0xa184, 0x4000, 0x00c0, 0x4850, 0xa19c, 0x300c,
++	0xa386, 0x2004, 0x0040, 0x4874, 0xa386, 0x0008, 0x0040, 0x487f,
++	0xa386, 0x200c, 0x00c0, 0x4850, 0x7200, 0x8204, 0x0048, 0x487f,
++	0x730c, 0xa384, 0x00ff, 0x0040, 0x487f, 0x1078, 0x23eb, 0x7007,
++	0x0012, 0x7000, 0xa084, 0x0001, 0x00c0, 0x4899, 0x7008, 0xa084,
++	0x01e0, 0x00c0, 0x4899, 0x7310, 0x7014, 0xa305, 0x0040, 0x4899,
++	0x710c, 0xa184, 0x0300, 0x00c0, 0x4899, 0xa184, 0x00ff, 0x00c0,
++	0x4846, 0x7007, 0x0012, 0x7007, 0x0008, 0x7004, 0xa084, 0x0008,
++	0x00c0, 0x489d, 0x7007, 0x0012, 0x7108, 0x8103, 0x0048, 0x48a2,
++	0x7003, 0x0000, 0x2049, 0x0000, 0x007c, 0x107e, 0x007e, 0x127e,
++	0x157e, 0x2091, 0x2200, 0x7108, 0x1078, 0x48bd, 0x157f, 0x127f,
++	0x2091, 0x8001, 0x007f, 0x107f, 0x007c, 0x7204, 0x7500, 0x730c,
++	0xa384, 0x0300, 0x00c0, 0x48e4, 0xa184, 0x01e0, 0x00c0, 0x4908,
++	0x7108, 0xa184, 0x01e0, 0x00c0, 0x4908, 0x2001, 0x04fd, 0x2004,
++	0xa082, 0x0005, 0x00c8, 0x48d8, 0xa184, 0x4000, 0x00c0, 0x48c8,
++	0xa184, 0x0007, 0x0079, 0x48dc, 0x48e6, 0x48f8, 0x48e4, 0x48f8,
++	0x48e4, 0x4944, 0x48e4, 0x4942, 0x1078, 0x23eb, 0x7004, 0xa084,
++	0x0010, 0xa085, 0x0002, 0x7006, 0x8aff, 0x00c0, 0x48f3, 0x2049,
++	0x0000, 0x0078, 0x48f7, 0x1078, 0x4b07, 0x00c0, 0x48f3, 0x007c,
++	0x7004, 0xa084, 0x0010, 0xa085, 0x0002, 0x7006, 0x8aff, 0x00c0,
++	0x4903, 0x0078, 0x4907, 0x1078, 0x4b07, 0x00c0, 0x4903, 0x007c,
++	0x7007, 0x0012, 0x7108, 0x00e0, 0x490b, 0x2091, 0x6000, 0x00e0,
++	0x490f, 0x2091, 0x6000, 0x7007, 0x0012, 0x7007, 0x0008, 0x7004,
++	0xa084, 0x0008, 0x00c0, 0x4917, 0x7007, 0x0012, 0x7108, 0x8103,
++	0x0048, 0x491c, 0x7003, 0x0000, 0x7000, 0xa005, 0x00c0, 0x4930,
++	0x7004, 0xa005, 0x00c0, 0x4930, 0x700c, 0xa005, 0x0040, 0x4932,
++	0x0078, 0x4913, 0x2049, 0x0000, 0x1078, 0x3809, 0x6818, 0xa084,
++	0x8000, 0x0040, 0x493d, 0x681b, 0x0002, 0x007c, 0x1078, 0x23eb,
++	0x1078, 0x23eb, 0x1078, 0x49a0, 0x7210, 0x7114, 0x700c, 0xa09c,
++	0x00ff, 0x2800, 0xa300, 0xa211, 0xa189, 0x0000, 0x1078, 0x49a0,
++	0x2704, 0x2c58, 0xac60, 0x6308, 0x2200, 0xa322, 0x630c, 0x2100,
++	0xa31b, 0x2400, 0xa305, 0x0040, 0x4967, 0x00c8, 0x4967, 0x8412,
++	0x8210, 0x830a, 0xa189, 0x0000, 0x2b60, 0x0078, 0x494e, 0x2b60,
++	0x8a07, 0x007e, 0x6004, 0xa084, 0x0008, 0x0040, 0x4973, 0xa7ba,
++	0x4806, 0x0078, 0x4975, 0xa7ba, 0x47fe, 0x007f, 0xa73d, 0x2c00,
++	0x6886, 0x6f8a, 0x6c92, 0x6b8e, 0x7007, 0x0012, 0x1078, 0x4846,
++	0x007c, 0x8738, 0x2704, 0xa005, 0x00c0, 0x4994, 0x609c, 0xa005,
++	0x0040, 0x499d, 0x2060, 0x6004, 0xa084, 0x000f, 0xa080, 0x480c,
++	0x203c, 0x87fb, 0x1040, 0x23eb, 0x8a51, 0x0040, 0x499c, 0x7008,
++	0xa084, 0x0003, 0xa086, 0x0003, 0x007c, 0x2051, 0x0000, 0x007c,
++	0x8a50, 0x8739, 0x2704, 0xa004, 0x00c0, 0x49b4, 0x6000, 0xa064,
++	0x00c0, 0x49ab, 0x2d60, 0x6004, 0xa084, 0x000f, 0xa080, 0x481c,
++	0x203c, 0x87fb, 0x1040, 0x23eb, 0x007c, 0x127e, 0x0d7e, 0x2091,
++	0x2200, 0x0d7f, 0x6884, 0x2060, 0x6888, 0x6b8c, 0x6c90, 0x8057,
++	0xaad4, 0x00ff, 0xa084, 0x00ff, 0x007e, 0x6804, 0xa084, 0x0008,
++	0x007f, 0x0040, 0x49cf, 0xa0b8, 0x4806, 0x0078, 0x49d1, 0xa0b8,
++	0x47fe, 0x7e08, 0xa6b5, 0x000c, 0x6904, 0xa18c, 0x00ff, 0xa186,
++	0x0007, 0x0040, 0x49df, 0xa18e, 0x000f, 0x00c0, 0x49e8, 0x681c,
++	0xa084, 0x0040, 0x0040, 0x49ef, 0xa6b5, 0x0001, 0x0078, 0x49ef,
++	0x681c, 0xa084, 0x0040, 0x0040, 0x49ef, 0xa6b5, 0x0001, 0x7007,
++	0x0004, 0x7004, 0xa084, 0x0004, 0x00c0, 0x49f1, 0x2400, 0xa305,
++	0x00c0, 0x49fc, 0x0078, 0x4a22, 0x2c58, 0x2704, 0x6104, 0xac60,
++	0x6000, 0xa400, 0x701a, 0x6004, 0xa301, 0x701e, 0xa184, 0x0008,
++	0x0040, 0x4a12, 0x6010, 0xa081, 0x0000, 0x7022, 0x6014, 0xa081,
++	0x0000, 0x7026, 0x6208, 0x2400, 0xa202, 0x7012, 0x620c, 0x2300,
++	0xa203, 0x7016, 0x7602, 0x7007, 0x0001, 0x2b60, 0x1078, 0x4981,
++	0x0078, 0x4a24, 0x1078, 0x4b07, 0x00c0, 0x4a22, 0x127f, 0x2000,
++	0x007c, 0x127e, 0x0d7e, 0x2091, 0x2200, 0x0d7f, 0x7007, 0x0004,
++	0x7004, 0xa084, 0x0004, 0x00c0, 0x4a30, 0x7003, 0x0008, 0x127f,
++	0x2000, 0x007c, 0x127e, 0x0d7e, 0x2091, 0x2200, 0x0d7f, 0x2049,
++	0x4a3a, 0x7007, 0x0004, 0x7004, 0xa084, 0x0004, 0x00c0, 0x4a43,
++	0x7e08, 0xa6b5, 0x000c, 0x6904, 0xa18c, 0x00ff, 0xa186, 0x0007,
++	0x0040, 0x4a56, 0xa18e, 0x000f, 0x00c0, 0x4a61, 0x681c, 0xa084,
++	0x0040, 0x0040, 0x4a5d, 0xa6b5, 0x0001, 0x6840, 0x2050, 0x0078,
++	0x4a6a, 0x681c, 0xa084, 0x0020, 0x00c0, 0x4a68, 0xa6b5, 0x0001,
++	0x6828, 0x2050, 0x2d60, 0x6004, 0xa0bc, 0x000f, 0xa7b8, 0x480c,
++	0x273c, 0x87fb, 0x00c0, 0x4a7e, 0x0048, 0x4a78, 0x1078, 0x23eb,
++	0x689c, 0xa065, 0x0040, 0x4a82, 0x0078, 0x4a6b, 0x1078, 0x4b07,
++	0x00c0, 0x4a7e, 0x127f, 0x2000, 0x007c, 0x127e, 0x007e, 0x017e,
++	0x0d7e, 0x2091, 0x2200, 0x0d7f, 0x037f, 0x047f, 0x7e08, 0xa6b5,
++	0x000c, 0x6904, 0xa18c, 0x00ff, 0xa186, 0x0007, 0x0040, 0x4a9c,
++	0xa18e, 0x000f, 0x00c0, 0x4aa5, 0x681c, 0xa084, 0x0040, 0x0040,
++	0x4aac, 0xa6b5, 0x0001, 0x0078, 0x4aac, 0x681c, 0xa084, 0x0040,
++	0x0040, 0x4aac, 0xa6b5, 0x0001, 0x2049, 0x4a85, 0x017e, 0x6904,
++	0xa18c, 0x00ff, 0xa186, 0x0007, 0x0040, 0x4aba, 0xa18e, 0x000f,
++	0x00c0, 0x4abd, 0x6840, 0x0078, 0x4abe, 0x6828, 0x017f, 0xa055,
++	0x0040, 0x4b04, 0x2d70, 0x2e60, 0x7004, 0xa0bc, 0x000f, 0xa7b8,
++	0x480c, 0x273c, 0x87fb, 0x00c0, 0x4ad8, 0x0048, 0x4ad1, 0x1078,
++	0x23eb, 0x709c, 0xa075, 0x2060, 0x0040, 0x4b04, 0x0078, 0x4ac4,
++	0x2704, 0xae68, 0x6808, 0xa422, 0x680c, 0xa31b, 0x0048, 0x4af1,
++	0x8a51, 0x00c0, 0x4ae5, 0x1078, 0x23eb, 0x8738, 0x2704, 0xa005,
++	0x00c0, 0x4ad9, 0x709c, 0xa075, 0x2060, 0x0040, 0x4b04, 0x0078,
++	0x4ac4, 0x8422, 0x8420, 0x831a, 0xa399, 0x0000, 0x6908, 0x2400,
++	0xa122, 0x690c, 0x2300, 0xa11b, 0x00c8, 0x4b00, 0x1078, 0x23eb,
++	0x2071, 0x0020, 0x0078, 0x49ef, 0x127f, 0x2000, 0x007c, 0x7008,
++	0xa084, 0x0003, 0xa086, 0x0003, 0x0040, 0x4b2f, 0x2704, 0xac08,
++	0x2104, 0x701a, 0x8108, 0x2104, 0x701e, 0x8108, 0x2104, 0x7012,
++	0x8108, 0x2104, 0x7016, 0x6004, 0xa084, 0x0008, 0x0040, 0x4b26,
++	0x8108, 0x2104, 0x7022, 0x8108, 0x2104, 0x7026, 0x7602, 0x7004,
++	0xa084, 0x0010, 0xa085, 0x0001, 0x7006, 0x1078, 0x4981, 0x007c,
++	0x127e, 0x007e, 0x0d7e, 0x2091, 0x2200, 0x2049, 0x4b30, 0x0d7f,
++	0x087f, 0x7108, 0xa184, 0x0003, 0x00c0, 0x4b5a, 0x017e, 0x6904,
++	0xa18c, 0x00ff, 0xa186, 0x0007, 0x0040, 0x4b4a, 0xa18e, 0x000f,
++	0x00c0, 0x4b4d, 0x6840, 0x0078, 0x4b4e, 0x6828, 0x017f, 0xa005,
++	0x0040, 0x4b68, 0x0078, 0x478d, 0x0020, 0x4b5a, 0x1078, 0x4944,
++	0x0078, 0x4b68, 0x00a0, 0x4b61, 0x7108, 0x1078, 0x48bd, 0x0078,
++	0x4b39, 0x7007, 0x0010, 0x00a0, 0x4b63, 0x7108, 0x1078, 0x48bd,
++	0x7008, 0xa086, 0x0008, 0x00c0, 0x4b39, 0x7000, 0xa005, 0x00c0,
++	0x4b39, 0x7003, 0x0000, 0x2049, 0x0000, 0x127f, 0x2000, 0x007c,
++	0x127e, 0x147e, 0x137e, 0x157e, 0x0c7e, 0x0d7e, 0x2091, 0x2200,
++	0x0d7f, 0x2049, 0x4b78, 0xad80, 0x0011, 0x20a0, 0x2099, 0x0031,
++	0x700c, 0xa084, 0x00ff, 0x682a, 0x7007, 0x0008, 0x7007, 0x0002,
++	0x7003, 0x0001, 0x0040, 0x4b97, 0x8000, 0x80ac, 0x53a5, 0x7007,
++	0x0004, 0x7004, 0xa084, 0x0004, 0x00c0, 0x4b99, 0x0c7f, 0x2049,
++	0x0000, 0x7003, 0x0000, 0x157f, 0x137f, 0x147f, 0x127f, 0x2000,
++	0x007c, 0x2091, 0x6000, 0x2091, 0x8000, 0x78cc, 0xa005, 0x0040,
++	0x4bc0, 0x7994, 0x70d0, 0xa106, 0x00c0, 0x4bc0, 0x7804, 0xa005,
++	0x0040, 0x4bc0, 0x7807, 0x0000, 0x0068, 0x4bc0, 0x2091, 0x4080,
++	0x7820, 0x8001, 0x7822, 0x00c0, 0x4c1b, 0x7824, 0x7822, 0x2069,
++	0x5140, 0x6800, 0xa084, 0x0007, 0x0040, 0x4bde, 0xa086, 0x0002,
++	0x0040, 0x4bde, 0x6834, 0xa00d, 0x0040, 0x4bde, 0x2104, 0xa005,
++	0x0040, 0x4bde, 0x8001, 0x200a, 0x0040, 0x4cc3, 0x7848, 0xa005,
++	0x0040, 0x4bec, 0x8001, 0x784a, 0x00c0, 0x4bec, 0x2009, 0x0102,
++	0x6844, 0x200a, 0x1078, 0x21d2, 0x6890, 0xa005, 0x0040, 0x4bf8,
++	0x8001, 0x6892, 0x00c0, 0x4bf8, 0x686f, 0x0000, 0x6873, 0x0001,
++	0x2061, 0x5400, 0x20a9, 0x0100, 0x2009, 0x0002, 0x6034, 0xa005,
++	0x0040, 0x4c0e, 0x8001, 0x6036, 0x00c0, 0x4c0e, 0x6010, 0xa005,
++	0x0040, 0x4c0e, 0x017e, 0x1078, 0x21d2, 0x017f, 0xace0, 0x0010,
++	0x0070, 0x4c14, 0x0078, 0x4bfe, 0x8109, 0x0040, 0x4c1b, 0x20a9,
++	0x0100, 0x0078, 0x4bfe, 0x1078, 0x4c28, 0x1078, 0x4c4d, 0x2009,
++	0x5151, 0x2104, 0x2009, 0x0102, 0x200a, 0x2091, 0x8001, 0x007c,
++	0x7834, 0x8001, 0x7836, 0x00c0, 0x4c4c, 0x7838, 0x7836, 0x2091,
++	0x8000, 0x7844, 0xa005, 0x00c0, 0x4c37, 0x2001, 0x0101, 0x8001,
++	0x7846, 0xa080, 0x7400, 0x2040, 0x2004, 0xa065, 0x0040, 0x4c4c,
++	0x6024, 0xa005, 0x0040, 0x4c48, 0x8001, 0x6026, 0x0040, 0x4c7c,
++	0x6000, 0x2c40, 0x0078, 0x4c3d, 0x007c, 0x7828, 0x8001, 0x782a,
++	0x00c0, 0x4c7b, 0x782c, 0x782a, 0x7830, 0xa005, 0x00c0, 0x4c5a,
++	0x2001, 0x0200, 0x8001, 0x7832, 0x8003, 0x8003, 0x8003, 0x8003,
++	0xa090, 0x5400, 0xa298, 0x0002, 0x2304, 0xa084, 0x0008, 0x0040,
++	0x4c7b, 0xa290, 0x0009, 0x2204, 0xa005, 0x0040, 0x4c73, 0x8001,
++	0x2012, 0x00c0, 0x4c7b, 0x2304, 0xa084, 0xfff7, 0xa085, 0x0080,
++	0x201a, 0x1078, 0x21d2, 0x007c, 0x2069, 0x5140, 0x6800, 0xa005,
++	0x0040, 0x4c86, 0x6848, 0xac06, 0x0040, 0x4cc3, 0x601b, 0x0006,
++	0x60b4, 0xa084, 0x3f00, 0x601e, 0x6020, 0xa084, 0x00ff, 0xa085,
++	0x0060, 0x6022, 0x6000, 0x2042, 0x6714, 0x6f82, 0x1078, 0x1973,
++	0x6818, 0xa005, 0x0040, 0x4c9e, 0x8001, 0x681a, 0x6808, 0xa084,
++	0xffef, 0x680a, 0x6810, 0x8001, 0x00d0, 0x4ca8, 0x1078, 0x23eb,
++	0x6812, 0x602f, 0x0000, 0x6033, 0x0000, 0x2c68, 0x1078, 0x1c70,
++	0x2069, 0x5140, 0x7944, 0xa184, 0x0100, 0x2001, 0x0006, 0x686e,
++	0x00c0, 0x4cbe, 0x6986, 0x2001, 0x0004, 0x686e, 0x1078, 0x21cd,
++	0x2091, 0x8001, 0x007c, 0x2069, 0x0100, 0x2009, 0x5140, 0x2104,
++	0xa084, 0x0007, 0x0040, 0x4d1f, 0xa086, 0x0007, 0x00c0, 0x4cd9,
++	0x0d7e, 0x2009, 0x5152, 0x216c, 0x1078, 0x3a4e, 0x0d7f, 0x0078,
++	0x4d1f, 0x2009, 0x5152, 0x2164, 0x1078, 0x2396, 0x601b, 0x0006,
++	0x6858, 0xa084, 0x3f00, 0x601e, 0x6020, 0xa084, 0x00ff, 0xa085,
++	0x0048, 0x6022, 0x602f, 0x0000, 0x6033, 0x0000, 0x6830, 0xa084,
++	0x0040, 0x0040, 0x4d13, 0x684b, 0x0004, 0x20a9, 0x0014, 0x6848,
++	0xa084, 0x0004, 0x0040, 0x4d00, 0x0070, 0x4d00, 0x0078, 0x4cf7,
++	0x684b, 0x0009, 0x20a9, 0x0014, 0x6848, 0xa084, 0x0001, 0x0040,
++	0x4d0d, 0x0070, 0x4d0d, 0x0078, 0x4d04, 0x20a9, 0x00fa, 0x0070,
++	0x4d13, 0x0078, 0x4d0f, 0x6808, 0xa084, 0xfffd, 0x680a, 0x681b,
++	0x0048, 0x2009, 0x515b, 0x200b, 0x0007, 0x784c, 0x784a, 0x2091,
++	0x8001, 0x007c, 0x2079, 0x5100, 0x1078, 0x4d4d, 0x1078, 0x4d31,
++	0x1078, 0x4d3f, 0x7833, 0x0000, 0x7847, 0x0000, 0x784b, 0x0000,
++	0x007c, 0x2019, 0x0003, 0x2011, 0x5146, 0x2204, 0xa086, 0x003c,
++	0x0040, 0x4d3c, 0x2019, 0x0002, 0x7b2a, 0x7b2e, 0x007c, 0x2019,
++	0x0039, 0x2011, 0x5146, 0x2204, 0xa086, 0x003c, 0x0040, 0x4d4a,
++	0x2019, 0x0027, 0x7b36, 0x7b3a, 0x007c, 0x2019, 0x3971, 0x2011,
++	0x5146, 0x2204, 0xa086, 0x003c, 0x0040, 0x4d58, 0x2019, 0x2626,
++	0x7b22, 0x7b26, 0x783f, 0x0000, 0x7843, 0x000a, 0x007c, 0x0020,
++	0x002b, 0x0000, 0x0020, 0x0000, 0x0020, 0x0000, 0x0020, 0x0000,
++	0x0020, 0x0000, 0x0020, 0x0000, 0x0020, 0x0000, 0x0020, 0x0000,
++	0x0020, 0x0000, 0x0020, 0x0000, 0x0020, 0x0000, 0x0020, 0x0000,
++	0x0020, 0x0000, 0x0020, 0x0000, 0x0020, 0x0000, 0x0020, 0x0000,
++	0x0020, 0x0000, 0x0014, 0x0014, 0x9849, 0x0014, 0x0014, 0x0014,
++	0x0014, 0x0014, 0x0014, 0x0014, 0x0080, 0x000f, 0x0000, 0x0201,
++	0x0604, 0x0c08, 0x2120, 0x4022, 0xf880, 0x0018, 0x300b, 0xa201,
++	0x0014, 0xa200, 0x0014, 0xa200, 0x0214, 0x0000, 0x006c, 0x0002,
++	0x0014, 0x98d0, 0x009e, 0x0096, 0xa202, 0x8838, 0x3806, 0x8839,
++	0x20c3, 0x0864, 0x9884, 0x28c1, 0x9cb1, 0xa203, 0x300c, 0x2846,
++	0x8161, 0x846a, 0x8300, 0x1856, 0x883a, 0x9865, 0x28f2, 0x9c90,
++	0x9858, 0x300c, 0x28e1, 0x9c90, 0x2802, 0xa206, 0x64c3, 0x282d,
++	0xa207, 0x64a0, 0x67a0, 0x6fc0, 0x1814, 0x883b, 0x7824, 0x68c1,
++	0x7864, 0x883e, 0x9878, 0x8576, 0x8677, 0x206b, 0x28c1, 0x9cb1,
++	0x2044, 0x2103, 0x20a2, 0x2081, 0x9865, 0xa209, 0x2901, 0x988c,
++	0x0014, 0xa205, 0xa300, 0x1872, 0x879a, 0x883c, 0x1fe2, 0xc601,
++	0xa20a, 0x856e, 0x0704, 0x9c90, 0x0014, 0xa204, 0xa300, 0x3009,
++	0x19e2, 0xf868, 0x8176, 0x86eb, 0x85eb, 0x872e, 0x87a9, 0x883f,
++	0x08e6, 0x9890, 0xf881, 0x988b, 0xc801, 0x0014, 0xf8c1, 0x0016,
++	0x85b2, 0x80f0, 0x9532, 0xfb02, 0x1de2, 0x0014, 0x8532, 0xf241,
++	0x0014, 0x1de2, 0x84a8, 0xd7a0, 0x1fe6, 0x0014, 0xa208, 0x6043,
++	0x8008, 0x1dc1, 0x0016, 0x8300, 0x8160, 0x842a, 0xf041, 0x3008,
++	0x84a8, 0x11d6, 0x7042, 0x20dd, 0x0011, 0x20d5, 0x8822, 0x0016,
++	0x8000, 0x2847, 0x1011, 0x98c3, 0x8000, 0xa000, 0x2802, 0x1011,
++	0x98c9, 0x9865, 0x283e, 0x1011, 0x98cd, 0xa20b, 0x0017, 0x300c,
++	0xa300, 0x1de2, 0xdb81, 0x0014, 0x0210, 0x98da, 0x0014, 0x26e0,
++	0x873a, 0xfb02, 0x19f2, 0x1fe2, 0x0014, 0xa20d, 0x3806, 0x0210,
++	0x9cb6, 0x0704, 0x0000, 0x006c, 0x0002, 0x984f, 0x0014, 0x009e,
++	0x00a5, 0x0017, 0x60ff, 0x300c, 0x8720, 0xa211, 0x9cd5, 0x8772,
++	0x8837, 0x2101, 0x987a, 0x10d2, 0x78e2, 0x9cd8, 0x9859, 0xd984,
++	0xf0e2, 0xf0a1, 0x98d2, 0x0014, 0x8831, 0xd166, 0x8830, 0x800f,
++	0x9401, 0xb520, 0xc802, 0x8820, 0x987a, 0x2301, 0x987a, 0x10d2,
++	0x78e4, 0x9cd8, 0x8821, 0x8820, 0x9859, 0xf123, 0xf142, 0xf101,
++	0x98cb, 0x10d2, 0x70f6, 0x8832, 0x8203, 0x870c, 0xd99e, 0x6001,
++	0x0014, 0x6845, 0x0214, 0xa21b, 0x9cd5, 0x2001, 0x98ca, 0x8201,
++	0x1852, 0xd184, 0xd163, 0x8834, 0x8001, 0x988d, 0x3027, 0x84a8,
++	0x1a56, 0x8833, 0x0014, 0xa218, 0x6981, 0x9cc1, 0x692a, 0x6902,
++	0x1834, 0x989d, 0x1a14, 0x8010, 0x8592, 0x8026, 0x84b9, 0x7021,
++	0x0014, 0xa300, 0x69e1, 0x9caa, 0x694c, 0xa213, 0x9cba, 0x1462,
++	0xa213, 0x8000, 0x16e1, 0x98b4, 0x8023, 0x16e1, 0x8001, 0x10f1,
++	0x0016, 0x6968, 0xa214, 0x9cba, 0x8004, 0x16e1, 0x0101, 0x300a,
++	0x8827, 0x0014, 0x9cba, 0x0014, 0x61c2, 0x8002, 0x14e1, 0x0016,
++	0xa217, 0x9cc1, 0x0014, 0xa300, 0x8181, 0x842a, 0x84a8, 0x1ce6,
++	0x882c, 0x0016, 0xa212, 0x9cd5, 0x10d2, 0x70e4, 0x0004, 0x8007,
++	0x9424, 0xcc1a, 0x9cd8, 0x98ca, 0x8827, 0x300a, 0x0013, 0x8000,
++	0x84a4, 0x0016, 0x11c2, 0x211e, 0x870e, 0xa21d, 0x0014, 0x878e,
++	0x0016, 0xa21c, 0x1035, 0x9891, 0xa210, 0xa000, 0x8010, 0x8592,
++	0x853b, 0xd044, 0x8022, 0x3807, 0x84bb, 0x98ef, 0x8021, 0x3807,
++	0x84b9, 0x300c, 0x817e, 0x872b, 0x8772, 0x9891, 0x0000, 0x0020,
++	0x002b, 0x0000, 0x0020, 0x0000, 0x0020, 0x0000, 0x0020, 0x0000,
++	0x0020, 0x0000, 0x0020, 0x0000, 0x0020, 0x0000, 0x0020, 0x0000,
++	0x0020, 0x0000, 0x0020, 0x0000, 0x0020, 0x0000, 0x0020, 0x0000,
++	0x0020, 0x0000, 0x0020, 0x0000, 0x0020, 0x0000, 0x0020, 0x0000,
++	0x0020, 0x0000, 0x0014, 0x0014, 0x9849, 0x0014, 0x0014, 0x98e5,
++	0x98d0, 0x0014, 0x0014, 0x0014, 0x0080, 0x013f, 0x0000, 0x0201,
++	0x0604, 0x0c08, 0x2120, 0x4022, 0xf880, 0x0018, 0x300b, 0xa201,
++	0x0014, 0xa200, 0x0014, 0xa200, 0x0214, 0xa202, 0x8838, 0x3806,
++	0x8839, 0x20c3, 0x0864, 0xa82e, 0x28c1, 0x9cb1, 0xa203, 0x300c,
++	0x2846, 0x8161, 0x846a, 0x8300, 0x1856, 0x883a, 0xa804, 0x28f2,
++	0x9c90, 0xa8f4, 0x300c, 0x28e1, 0x9c90, 0x2802, 0xa206, 0x64c3,
++	0x282d, 0xa207, 0x64a0, 0x67a0, 0x6fc0, 0x1814, 0x883b, 0x7824,
++	0x68c1, 0x7864, 0x883e, 0xa802, 0x8576, 0x8677, 0x206b, 0x28c1,
++	0x9cb1, 0x2044, 0x2103, 0x20a2, 0x2081, 0xa8e5, 0xa209, 0x2901,
++	0xa809, 0x0014, 0xa205, 0xa300, 0x1872, 0x879a, 0x883c, 0x1fe2,
++	0xc601, 0xa20a, 0x856e, 0x0704, 0x9c90, 0x0014, 0xa204, 0xa300,
++	0x3009, 0x19e2, 0xf868, 0x8176, 0x86eb, 0x85eb, 0x872e, 0x87a9,
++	0x883f, 0x08e6, 0xa8f3, 0xf881, 0xa8ec, 0xc801, 0x0014, 0xf8c1,
++	0x0016, 0x85b2, 0x80f0, 0x9532, 0xfb02, 0x1de2, 0x0014, 0x8532,
++	0xf241, 0x0014, 0x1de2, 0x84a8, 0xd7a0, 0x1fe6, 0x0014, 0xa208,
++	0x6043, 0x8008, 0x1dc1, 0x0016, 0x8300, 0x8160, 0x842a, 0xf041,
++	0x3008, 0x84a8, 0x11d6, 0x7042, 0x20dd, 0x0011, 0x20d5, 0x8822,
++	0x0016, 0x8000, 0x2847, 0x1011, 0xa8fc, 0x8000, 0xa000, 0x2802,
++	0x1011, 0xa8fd, 0xa898, 0x283e, 0x1011, 0xa8fd, 0xa20b, 0x0017,
++	0x300c, 0xa300, 0x1de2, 0xdb81, 0x0014, 0x0210, 0xa801, 0x0014,
++	0x26e0, 0x873a, 0xfb02, 0x19f2, 0x1fe2, 0x0014, 0xa20d, 0x3806,
++	0x0210, 0x9cb6, 0x0704, 0x0017, 0x60ff, 0x300c, 0x8720, 0xa211,
++	0x9d6b, 0x8772, 0x8837, 0x2101, 0xa821, 0x10d2, 0x78e2, 0x9d6e,
++	0xa8fc, 0xd984, 0xf0e2, 0xf0a1, 0xa871, 0x0014, 0x8831, 0xd166,
++	0x8830, 0x800f, 0x9401, 0xb520, 0xc802, 0x8820, 0xa80f, 0x2301,
++	0xa80d, 0x10d2, 0x78e4, 0x9d6e, 0x8821, 0x8820, 0xa8e6, 0xf123,
++	0xf142, 0xf101, 0xa854, 0x10d2, 0x70f6, 0x8832, 0x8203, 0x870c,
++	0xd99e, 0x6001, 0x0014, 0x6845, 0x0214, 0xa21b, 0x9d6b, 0x2001,
++	0xa845, 0x8201, 0x1852, 0xd184, 0xd163, 0x8834, 0x8001, 0xa801,
++	0x3027, 0x84a8, 0x1a56, 0x8833, 0x0014, 0xa218, 0x6981, 0x9d57,
++	0x692a, 0x6902, 0x1834, 0xa805, 0x1a14, 0x8010, 0x8592, 0x8026,
++	0x84b9, 0x7021, 0x0014, 0xa300, 0x69e1, 0x9d40, 0x694c, 0xa213,
++	0x9d50, 0x1462, 0xa213, 0x8000, 0x16e1, 0xa80a, 0x8023, 0x16e1,
++	0x8001, 0x10f1, 0x0016, 0x6968, 0xa214, 0x9d50, 0x8004, 0x16e1,
++	0x0101, 0x300a, 0x8827, 0x0014, 0x9d50, 0x0014, 0x61c2, 0x8002,
++	0x14e1, 0x0016, 0xa217, 0x9d57, 0x0014, 0xa300, 0x8181, 0x842a,
++	0x84a8, 0x1ce6, 0x882c, 0x0016, 0xa212, 0x9d6b, 0x10d2, 0x70e4,
++	0x0004, 0x8007, 0x9424, 0xcc1a, 0x9d6e, 0xa8f8, 0x8827, 0x300a,
++	0x0013, 0x8000, 0x84a4, 0x0016, 0x11c2, 0x211e, 0x870e, 0xa21d,
++	0x0014, 0x878e, 0x0016, 0xa21c, 0x1035, 0xa8af, 0xa210, 0x3807,
++	0x300c, 0x817e, 0x872b, 0x8772, 0xa8a8, 0x0000, 0xdf21
++};
++unsigned short   risc_code_length01 = 0x4057;
++
+diff -Nur kernel-source-2.6.8-2.6.8.orig/drivers/scsi/qla1280.c kernel-source-2.6.8-2.6.8/drivers/scsi/qla1280.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/scsi/qla1280.c	2004-08-14 05:38:10.000000000 +0000
++++ kernel-source-2.6.8-2.6.8/drivers/scsi/qla1280.c	2005-01-08 14:39:38.000000000 +0000
+@@ -4,7 +4,7 @@
+ * QLogic  QLA1280 (Ultra2)  and  QLA12160 (Ultra3) SCSI driver
+ * Copyright (C) 2000 Qlogic Corporation (www.qlogic.com)
+ * Copyright (C) 2001-2004 Jes Sorensen, Wild Open Source Inc.
+-* Copyright (C) 2003 Christoph Hellwig
++* Copyright (C) 2003-2004 Christoph Hellwig
+ *
+ * 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
+@@ -17,9 +17,12 @@
+ * General Public License for more details.
+ *
+ ******************************************************************************/
+-#define QLA1280_VERSION      "3.24.3"
++#define QLA1280_VERSION      "3.25"
+ /*****************************************************************************
+     Revision History:
++    Rev  3.25 March 21, 2004, Christoph Hellwig
++    	- Add support for ISP1020/1040.
++	- Lots of cleanups.
+     Rev  3.24.3 January 19, 2004, Jes Sorensen
+ 	- Handle PCI DMA mask settings correctly
+ 	- Correct order of error handling in probe_one, free_irq should not
+@@ -353,7 +356,6 @@
+ #include <scsi/scsi_device.h>
+ #include <scsi/scsi_host.h>
+ #include <scsi/scsi_tcq.h>
+-#include "scsi.h"
+ #else
+ #include <linux/blk.h>
+ #include "scsi.h"
+@@ -376,8 +378,10 @@
+ 
+ /*
+  * The SGI VISWS is broken and doesn't support MMIO ;-(
++ *
++ * The Origin PCI subsystem isn't ready for MMIO yet, later..
+  */
+-#ifdef CONFIG_X86_VISWS
++#if defined(CONFIG_X86_VISWS) || defined(CONFIG_SGI_IP27)
+ #define	MEMORY_MAPPED_IO	0
+ #else
+ #define	MEMORY_MAPPED_IO	1
+@@ -387,6 +391,7 @@
+ #include "qla1280.h"
+ #include "ql12160_fw.h"		/* ISP RISC codes */
+ #include "ql1280_fw.h"
++#include "ql1040_fw.h"
+ 
+ 
+ /*
+@@ -485,6 +490,13 @@
+ #define ia64_platform_is(foo)		(!strcmp(x, platform_name))
+ #endif
+ 
++#define IS_ISP1040(ha)	(ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP1020)
++#define IS_ISP1x40(ha)	(ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP1020 || \
++			 ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP1240)
++#define IS_ISP1x160(ha)	(ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP10160 || \
++			 ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP12160)
++
++
+ static int qla1280_probe_one(struct pci_dev *, const struct pci_device_id *);
+ static void qla1280_remove_one(struct pci_dev *);
+ 
+@@ -501,9 +513,7 @@
+ /*
+  *  QLogic ISP1280 Hardware Support Function Prototypes.
+  */
+-static int qla1280_isp_firmware(struct scsi_qla_host *);
+-static int qla1280_chip_diag(struct scsi_qla_host *);
+-static int qla1280_setup_chip(struct scsi_qla_host *);
++static int qla1280_load_firmware(struct scsi_qla_host *);
+ static int qla1280_init_rings(struct scsi_qla_host *);
+ static int qla1280_nvram_config(struct scsi_qla_host *);
+ static int qla1280_mailbox_command(struct scsi_qla_host *,
+@@ -627,14 +637,16 @@
+ static struct pci_device_id qla1280_pci_tbl[] = {
+ 	{PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP12160,
+ 		PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+-	{PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP1080,
++	{PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP1020,
+ 		PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
+-	{PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP1240,
++	{PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP1080,
+ 		PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
+-	{PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP1280,
++	{PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP1240,
+ 		PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3},
+-	{PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP10160,
++	{PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP1280,
+ 		PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4},
++	{PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP10160,
++		PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5},
+ 	{0,}
+ };
+ MODULE_DEVICE_TABLE(pci, qla1280_pci_tbl);
+@@ -643,6 +655,8 @@
+ 	/* Name ,  Number of ports, FW details */
+ 	{"QLA12160", 2, &fw12160i_code01[0], &fw12160i_length01,
+ 	 &fw12160i_addr01, &fw12160i_version_str[0]},
++	{"QLA1040", 1, &risc_code01[0], &risc_code_length01,
++	 &risc_code_addr01, &firmware_version[0]},
+ 	{"QLA1080", 1, &fw1280ei_code01[0], &fw1280ei_length01,
+ 	 &fw1280ei_addr01, &fw1280ei_version_str[0]},
+ 	{"QLA1240", 2, &fw1280ei_code01[0], &fw1280ei_length01,
+@@ -1381,48 +1395,37 @@
+ static int
+ qla1280_set_target_parameters(struct scsi_qla_host *ha, int bus, int target)
+ {
+-	uint8_t mr;
+ 	uint16_t mb[MAILBOX_REGISTER_COUNT];
+-	struct nvram *nv;
+-	int is1x160, status;
+-
+-	nv = &ha->nvram;
+-
+-	if (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP12160 ||
+-	    ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP10160)
+-		is1x160 = 1;
+-	else
+-		is1x160 = 0;
+-
+-	mr = BIT_3 | BIT_2 | BIT_1 | BIT_0;
++	uint8_t mr = BIT_3 | BIT_2 | BIT_1 | BIT_0;
++	struct nvram *nv = &ha->nvram;
++	int err;
+ 
+ 	/* Set Target Parameters. */
+ 	mb[0] = MBC_SET_TARGET_PARAMETERS;
+ 	mb[1] = (uint16_t) (bus ? target | BIT_7 : target);
+ 	mb[1] <<= 8;
+ 
+-	mb[2] = (nv->bus[bus].target[target].parameter.c << 8);
+-
+-	if (is1x160)
+-		mb[3] =	nv->bus[bus].target[target].flags.flags1x160.sync_offset << 8;
+-	else
+-		mb[3] =	nv->bus[bus].target[target].flags.flags1x80.sync_offset << 8;
+-	mb[3] |= nv->bus[bus].target[target].sync_period;
+-
+-	if (is1x160) {
+-		mb[2] |= nv->bus[bus].target[target].ppr_1x160.flags.enable_ppr << 5;
+-		mb[6] =	nv->bus[bus].target[target].ppr_1x160.flags.ppr_options << 8;
+-		mb[6] |= nv->bus[bus].target[target].ppr_1x160.flags.ppr_bus_width;
++	if (IS_ISP1x160(ha)) {
++		mb[2] = nv->bus[bus].target[target].parameter.c << 8 |
++			nv->bus[bus].target[target].ppr_1x160.flags.enable_ppr << 5;
++		mb[3] =	nv->bus[bus].target[target].flags.flags1x160.sync_offset << 8 |
++			nv->bus[bus].target[target].sync_period;
++		mb[6] =	nv->bus[bus].target[target].ppr_1x160.flags.ppr_options << 8 |
++			nv->bus[bus].target[target].ppr_1x160.flags.ppr_bus_width;
+ 		mr |= BIT_6;
++	} else {
++		mb[2] = nv->bus[bus].target[target].parameter.c << 8;
++		mb[3] =	nv->bus[bus].target[target].flags.flags1x80.sync_offset << 8 |
++			nv->bus[bus].target[target].sync_period;
+ 	}
+ 
+-	status = qla1280_mailbox_command(ha, mr, &mb[0]);
+-
+-	if (status)
++	err = qla1280_mailbox_command(ha, mr, &mb[0]);
++	if (err) {
+ 		printk(KERN_WARNING "scsi(%ld:%i:%i): "
+ 		       "qla1280_set_target_parameters() failed\n",
+ 		       ha->host_no, bus, target);
+-	return status;
++	}
++	return err;
+ }
+ 
+ 
+@@ -1476,8 +1479,7 @@
+ 	    (driver_setup.wide_mask &&
+ 	     (~driver_setup.wide_mask & (1 << target))))
+ 		nv->bus[bus].target[target].parameter.f.enable_wide = 0;
+-	if (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP12160 ||
+-	    ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP10160) {
++	if (IS_ISP1x160(ha)) {
+ 		if (driver_setup.no_ppr ||
+ 		    (driver_setup.ppr_mask &&
+ 		     (~driver_setup.ppr_mask & (1 << target))))
+@@ -1777,6 +1779,20 @@
+ 		driver_setup.no_nvram = 1;
+ 	}
+ #endif
++#if defined(CONFIG_SGI_IP27)
++	/*
++	 * No support for Option ROMs on Origins.
++	 */
++	driver_setup.no_nvram = 1;
++#endif
++
++	/* TODO: implement support for the 1040 nvram format */
++	if (IS_ISP1040(ha))
++		driver_setup.no_nvram = 1;
++
++	/* TODO: implement support for the 1040 nvram format */
++	if (IS_ISP1040(ha))
++		driver_setup.no_nvram = 1;
+ 
+ 	dprintk(1, "Configure PCI space for adapter...\n");
+ 
+@@ -1802,17 +1818,8 @@
+ 	 */
+ 	spin_lock_irqsave(HOST_LOCK, flags);
+ #endif
+-	/* If firmware needs to be loaded */
+-	if (qla1280_isp_firmware(ha)) {
+-		if (!(status = qla1280_chip_diag(ha))) {
+-			status = qla1280_setup_chip(ha);
+-		}
+-	} else {
+-		printk(KERN_ERR "scsi(%li): isp_firmware() failed!\n",
+-		       ha->host_no);
+-		status = 1;
+-	}
+ 
++	status = qla1280_load_firmware(ha);
+ 	if (status) {
+ 		printk(KERN_ERR "scsi(%li): initialize: pci probe failed!\n",
+ 		       ha->host_no);
+@@ -1823,36 +1830,24 @@
+ 	dprintk(1, "scsi(%ld): Configure NVRAM parameters\n", ha->host_no);
+ 	qla1280_nvram_config(ha);
+ 
+-	if (!ha->flags.disable_host_adapter && !qla1280_init_rings(ha)) {
+-		/* Issue SCSI reset. */
+-		/* dg 03/13 if we can't reset twice then bus is dead */
+-		for (bus = 0; bus < ha->ports; bus++) {
+-			if (!ha->bus_settings[bus].disable_scsi_reset){
+-				if (qla1280_bus_reset(ha, bus)) {
+-					if (qla1280_bus_reset(ha, bus)) {
+-						ha->bus_settings[bus].scsi_bus_dead = 1;
+-					}
+-				}
+-			}
+-		}
++	if (ha->flags.disable_host_adapter) {
++		status = 1;
++		goto out;
++	}
+ 
+-		/*
+-		 * qla1280_bus_reset() will take care of issueing markers,
+-		 * no need to do that here as well!
+-		 */
+-#if 0
+-		/* Issue marker command. */
+-		ha->flags.reset_marker = 0;
+-		for (bus = 0; bus < ha->ports; bus++) {
+-			ha->bus_settings[bus].reset_marker = 0;
+-			qla1280_marker(ha, bus, 0, 0, MK_SYNC_ALL);
+-		}
+-#endif
++	status = qla1280_init_rings(ha);
++	if (status)
++		goto out;
+ 
+-		ha->flags.online = 1;
+-	} else
+-		status = 1;
++	/* Issue SCSI reset, if we can't reset twice then bus is dead */
++	for (bus = 0; bus < ha->ports; bus++) {
++		if (!ha->bus_settings[bus].disable_scsi_reset &&
++		    qla1280_bus_reset(ha, bus) &&
++		    qla1280_bus_reset(ha, bus))
++			ha->bus_settings[bus].scsi_bus_dead = 1;
++	}
+ 
++	ha->flags.online = 1;
+  out:
+ #if LINUX_VERSION_CODE >= 0x020500
+ 	spin_unlock_irqrestore(HOST_LOCK, flags);
+@@ -1945,13 +1940,13 @@
+ 	int status = 0;
+ 	int cnt;
+ 	uint16_t data;
+-
+ 	dprintk(3, "qla1280_chip_diag: testing device at 0x%p \n", &reg->id_l);
+ 
+ 	dprintk(1, "scsi(%ld): Verifying chip\n", ha->host_no);
+ 
+ 	/* Soft reset chip and wait for it to finish. */
+ 	WRT_REG_WORD(&reg->ictrl, ISP_RESET);
++
+ 	/*
+ 	 * We can't do a traditional PCI write flush here by reading
+ 	 * back the register. The card will not respond once the reset
+@@ -1969,145 +1964,138 @@
+ 		data = RD_REG_WORD(&reg->ictrl);
+ 	}
+ 
+-	if (cnt) {
+-		/* Reset register cleared by chip reset. */
+-		dprintk(3, "qla1280_chip_diag: reset register cleared by "
+-			"chip reset\n");
++	if (!cnt)
++		goto fail;
+ 
+-		WRT_REG_WORD(&reg->cfg_1, 0);
++	/* Reset register cleared by chip reset. */
++	dprintk(3, "qla1280_chip_diag: reset register cleared by chip reset\n");
+ 
+-		/* Reset RISC and disable BIOS which
+-		   allows RISC to execute out of RAM. */
+-#if 0
+-		WRT_REG_WORD(&reg->host_cmd, HC_RESET_RISC);
+-		RD_REG_WORD(&reg->id_l);	/* Flush PCI write */
+-		WRT_REG_WORD(&reg->host_cmd, HC_RELEASE_RISC);
+-		RD_REG_WORD(&reg->id_l);	/* Flush PCI write */
+-		WRT_REG_WORD(&reg->host_cmd, HC_DISABLE_BIOS);
+-#else
+-		WRT_REG_WORD(&reg->host_cmd, HC_RESET_RISC |
+-			     HC_RELEASE_RISC | HC_DISABLE_BIOS);
+-#endif
+-		RD_REG_WORD(&reg->id_l);	/* Flush PCI write */
+-		data = qla1280_debounce_register(&reg->mailbox0);
+-		/*
+-		 * I *LOVE* this code!
+-		 */
+-		for (cnt = 1000000; cnt && data == MBS_BUSY; cnt--) {
+-			udelay(5);
+-			data = RD_REG_WORD(&reg->mailbox0);
+-		}
++	WRT_REG_WORD(&reg->cfg_1, 0);
+ 
+-		if (cnt) {
+-			/* Check product ID of chip */
+-			dprintk(3, "qla1280_chip_diag: Checking product "
+-				"ID of chip\n");
+-
+-			if (RD_REG_WORD(&reg->mailbox1) != PROD_ID_1 ||
+-			    (RD_REG_WORD(&reg->mailbox2) != PROD_ID_2 &&
+-			     RD_REG_WORD(&reg->mailbox2) != PROD_ID_2a) ||
+-			    RD_REG_WORD(&reg->mailbox3) != PROD_ID_3 ||
+-			    RD_REG_WORD(&reg->mailbox4) != PROD_ID_4) {
+-				printk(KERN_INFO "qla1280: Wrong product ID = "
+-				       "0x%x,0x%x,0x%x,0x%x\n",
+-				       RD_REG_WORD(&reg->mailbox1),
+-				       RD_REG_WORD(&reg->mailbox2),
+-				       RD_REG_WORD(&reg->mailbox3),
+-				       RD_REG_WORD(&reg->mailbox4));
+-				status = 1;
+-			} else {
+-				/*
+-				 * Enable ints early!!!
+-				 */
+-				qla1280_enable_intrs(ha);
+-
+-				dprintk(1, "qla1280_chip_diag: Checking "
+-					"mailboxes of chip\n");
+-				/* Wrap Incoming Mailboxes Test. */
+-				mb[0] = MBC_MAILBOX_REGISTER_TEST;
+-				mb[1] = 0xAAAA;
+-				mb[2] = 0x5555;
+-				mb[3] = 0xAA55;
+-				mb[4] = 0x55AA;
+-				mb[5] = 0xA5A5;
+-				mb[6] = 0x5A5A;
+-				mb[7] = 0x2525;
+-				if (!(status = qla1280_mailbox_command(ha,
+-								       0xff,
+-								       &mb
+-								       [0]))) {
+-					if (mb[1] != 0xAAAA ||
+-					    mb[2] != 0x5555 ||
+-					    mb[3] != 0xAA55 ||
+-					    mb[4] != 0x55AA ||
+-					    mb[5] != 0xA5A5 ||
+-					    mb[6] != 0x5A5A ||
+-					    mb[7] != 0x2525) {
+-						status = 1;
+-						printk(KERN_INFO "qla1280: "
+-						       "Failed mbox check\n");
+-					}
+-				}
+-			}
+-		} else
+-			status = 1;
+-	} else
+-		status = 1;
++	/* Reset RISC and disable BIOS which
++	   allows RISC to execute out of RAM. */
++	WRT_REG_WORD(&reg->host_cmd, HC_RESET_RISC |
++		     HC_RELEASE_RISC | HC_DISABLE_BIOS);
++
++	RD_REG_WORD(&reg->id_l);	/* Flush PCI write */
++	data = qla1280_debounce_register(&reg->mailbox0);
++
++	/*
++	 * I *LOVE* this code!
++	 */
++	for (cnt = 1000000; cnt && data == MBS_BUSY; cnt--) {
++		udelay(5);
++		data = RD_REG_WORD(&reg->mailbox0);
++	}
++
++	if (!cnt)
++		goto fail;
++
++	/* Check product ID of chip */
++	dprintk(3, "qla1280_chip_diag: Checking product ID of chip\n");
++
++	if (RD_REG_WORD(&reg->mailbox1) != PROD_ID_1 ||
++	    (RD_REG_WORD(&reg->mailbox2) != PROD_ID_2 &&
++	     RD_REG_WORD(&reg->mailbox2) != PROD_ID_2a) ||
++	    RD_REG_WORD(&reg->mailbox3) != PROD_ID_3 ||
++	    RD_REG_WORD(&reg->mailbox4) != PROD_ID_4) {
++		printk(KERN_INFO "qla1280: Wrong product ID = "
++		       "0x%x,0x%x,0x%x,0x%x\n",
++		       RD_REG_WORD(&reg->mailbox1),
++		       RD_REG_WORD(&reg->mailbox2),
++		       RD_REG_WORD(&reg->mailbox3),
++		       RD_REG_WORD(&reg->mailbox4));
++		goto fail;
++	}
++
++	/*
++	 * Enable ints early!!!
++	 */
++	qla1280_enable_intrs(ha);
+ 
++	dprintk(1, "qla1280_chip_diag: Checking mailboxes of chip\n");
++	/* Wrap Incoming Mailboxes Test. */
++	mb[0] = MBC_MAILBOX_REGISTER_TEST;
++	mb[1] = 0xAAAA;
++	mb[2] = 0x5555;
++	mb[3] = 0xAA55;
++	mb[4] = 0x55AA;
++	mb[5] = 0xA5A5;
++	mb[6] = 0x5A5A;
++	mb[7] = 0x2525;
++
++	status = qla1280_mailbox_command(ha, 0xff, mb);
+ 	if (status)
+-		dprintk(2, "qla1280_chip_diag: **** FAILED ****\n");
+-	else
+-		dprintk(3, "qla1280_chip_diag: exiting normally\n");
++		goto fail;
++
++	if (mb[1] != 0xAAAA || mb[2] != 0x5555 || mb[3] != 0xAA55 ||
++	    mb[4] != 0x55AA || mb[5] != 0xA5A5 || mb[6] != 0x5A5A ||
++	    mb[7] != 0x2525) {
++		printk(KERN_INFO "qla1280: Failed mbox check\n");
++		goto fail;
++	}
+ 
++	dprintk(3, "qla1280_chip_diag: exiting normally\n");
++	return 0;
++ fail:
++	dprintk(2, "qla1280_chip_diag: **** FAILED ****\n");
+ 	return status;
+ }
+ 
+-/*
+- * Setup chip
+- *      Load and start RISC firmware.
+- *
+- * Input:
+- *      ha = adapter block pointer.
+- *
+- * Returns:
+- *      0 = success.
+- */
+-#define DUMP_IT_BACK 0		/* for debug of RISC loading */
+ static int
+-qla1280_setup_chip(struct scsi_qla_host *ha)
++qla1280_load_firmware_pio(struct scsi_qla_host *ha)
+ {
+-	int status = 0;
+-	uint16_t risc_address;
+-	uint16_t *risc_code_address;
+-	int risc_code_size;
+-	uint16_t mb[MAILBOX_REGISTER_COUNT];
+-	uint16_t cnt;
+-	int num, i;
+-#if DUMP_IT_BACK
+-	uint8_t *sp;
+-	uint8_t *tbuf;
+-	dma_addr_t p_tbuf;
+-#endif
++	uint16_t risc_address, *risc_code_address, risc_code_size;
++	uint16_t mb[MAILBOX_REGISTER_COUNT], i;
++	int err;
++
++	/* Load RISC code. */
++	risc_address = *ql1280_board_tbl[ha->devnum].fwstart;
++	risc_code_address = ql1280_board_tbl[ha->devnum].fwcode;
++	risc_code_size = *ql1280_board_tbl[ha->devnum].fwlen;
+ 
+-	ENTER("qla1280_setup_chip");
++	for (i = 0; i < risc_code_size; i++) {
++		mb[0] = MBC_WRITE_RAM_WORD;
++		mb[1] = risc_address + i;
++		mb[2] = risc_code_address[i];
++
++		err = qla1280_mailbox_command(ha, BIT_0 | BIT_1 | BIT_2, mb);
++		if (err) {
++			printk(KERN_ERR "scsi(%li): Failed to load firmware\n",
++					ha->host_no);
++			return err;
++		}
++	}
+ 
+-	dprintk(1, "scsi(%ld): Setup chip\n", ha->host_no);
++	return 0;
++}
+ 
++#define DUMP_IT_BACK 0		/* for debug of RISC loading */
++static int
++qla1280_load_firmware_dma(struct scsi_qla_host *ha)
++{
++	uint16_t risc_address, *risc_code_address, risc_code_size;
++	uint16_t mb[MAILBOX_REGISTER_COUNT], cnt;
++	int err = 0, num, i;
+ #if DUMP_IT_BACK
+-	/* get consistent memory allocated for setup_chip */
++	uint8_t *sp, *tbuf;
++	dma_addr_t p_tbuf;
++
+ 	tbuf = pci_alloc_consistent(ha->pdev, 8000, &p_tbuf);
++	if (!tbuf)
++		return -ENOMEM;
+ #endif
+ 
+ 	/* Load RISC code. */
+ 	risc_address = *ql1280_board_tbl[ha->devnum].fwstart;
+ 	risc_code_address = ql1280_board_tbl[ha->devnum].fwcode;
+-	risc_code_size = (int) *ql1280_board_tbl[ha->devnum].fwlen;
++	risc_code_size = *ql1280_board_tbl[ha->devnum].fwlen;
+ 
+-	dprintk(1, "qla1280_setup_chip: DMA RISC code (%i) words\n",
+-		risc_code_size);
++	dprintk(1, "%s: DMA RISC code (%i) words\n",
++			__FUNCTION__, risc_code_size);
+ 
+ 	num = 0;
+-	while (risc_code_size > 0 && !status) {
++	while (risc_code_size > 0) {
+ 		int warn __attribute__((unused)) = 0;
+ 
+ 		cnt = 2000 >> 1;
+@@ -2129,15 +2117,16 @@
+ 		mb[2] = (ha->request_dma >> 16) & 0xffff;
+ 		mb[7] = pci_dma_hi32(ha->request_dma) & 0xffff;
+ 		mb[6] = pci_dma_hi32(ha->request_dma) >> 16;
+-		dprintk(2, "qla1280_setup_chip: op=%d  0x%p = 0x%4x,0x%4x,"
+-			"0x%4x,0x%4x\n", mb[0], (void *)(long)ha->request_dma,
+-			mb[6], mb[7], mb[2], mb[3]);
+-		if ((status = qla1280_mailbox_command(ha, BIT_4 | BIT_3 |
+-						      BIT_2 | BIT_1 | BIT_0,
+-						      &mb[0]))) {
++		dprintk(2, "%s: op=%d  0x%p = 0x%4x,0x%4x,0x%4x,0x%4x\n",
++				__FUNCTION__, mb[0],
++				(void *)(long)ha->request_dma,
++				mb[6], mb[7], mb[2], mb[3]);
++		err = qla1280_mailbox_command(ha, BIT_4 | BIT_3 | BIT_2 |
++				BIT_1 | BIT_0, mb);
++		if (err) {
+ 			printk(KERN_ERR "scsi(%li): Failed to load partial "
+ 			       "segment of f\n", ha->host_no);
+-			break;
++			goto out;
+ 		}
+ 
+ #if DUMP_IT_BACK
+@@ -2149,22 +2138,22 @@
+ 		mb[7] = pci_dma_hi32(p_tbuf) & 0xffff;
+ 		mb[6] = pci_dma_hi32(p_tbuf) >> 16;
+ 
+-		if ((status = qla1280_mailbox_command(ha,
+-						      BIT_4 | BIT_3 | BIT_2 |
+-						      BIT_1 | BIT_0,
+-						      &mb[0]))) {
++		err = qla1280_mailbox_command(ha, BIT_4 | BIT_3 | BIT_2 |
++				BIT_1 | BIT_0, mb);
++		if (err) {
+ 			printk(KERN_ERR
+ 			       "Failed to dump partial segment of f/w\n");
+-			break;
++			goto out;
+ 		}
+ 		sp = (uint8_t *)ha->request_ring;
+ 		for (i = 0; i < (cnt << 1); i++) {
+ 			if (tbuf[i] != sp[i] && warn++ < 10) {
+-				printk(KERN_ERR "qla1280_setup_chip: FW "
+-				       "compare error @ byte(0x%x) loop#=%x\n",
+-				       i, num);
+-				printk(KERN_ERR "setup_chip: FWbyte=%x  "
+-				       "FWfromChip=%x\n", sp[i], tbuf[i]);
++				printk(KERN_ERR "%s: FW compare error @ "
++						"byte(0x%x) loop#=%x\n",
++						__FUNCTION__, i, num);
++				printk(KERN_ERR "%s: FWbyte=%x  "
++						"FWfromChip=%x\n",
++						__FUNCTION__, sp[i], tbuf[i]);
+ 				/*break; */
+ 			}
+ 		}
+@@ -2175,37 +2164,69 @@
+ 		num++;
+ 	}
+ 
+-	/* Verify checksum of loaded RISC code. */
+-	if (!status) {
+-		dprintk(1, "qla1280_setup_chip: Verifying checksum of "
+-			"loaded RISC code.\n");
+-		mb[0] = MBC_VERIFY_CHECKSUM;
+-		/* mb[1] = ql12_risc_code_addr01; */
+-		mb[1] = *ql1280_board_tbl[ha->devnum].fwstart;
+-
+-		if (!(status =
+-		      qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]))) {
+-			/* Start firmware execution. */
+-			dprintk(1,
+-				"qla1280_setup_chip: start firmware running.\n");
+-			mb[0] = MBC_EXECUTE_FIRMWARE;
+-			mb[1] = *ql1280_board_tbl[ha->devnum].fwstart;
+-			qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]);
+-		} else
+-			printk(KERN_ERR "scsi(%li): qla1280_setup_chip: "
+-			       "Failed checksum\n", ha->host_no);
+-	}
+-
++ out:
+ #if DUMP_IT_BACK
+-	/* free consistent memory allocated for setup_chip */
+ 	pci_free_consistent(ha->pdev, 8000, tbuf, p_tbuf);
+ #endif
++	return err;
++}
+ 
+-	if (status)
+-		dprintk(2, "qla1280_setup_chip: **** FAILED ****\n");
++static int
++qla1280_start_firmware(struct scsi_qla_host *ha)
++{
++	uint16_t mb[MAILBOX_REGISTER_COUNT];
++	int err;
+ 
+-	LEAVE("qla1280_setup_chip");
+-	return status;
++	dprintk(1, "%s: Verifying checksum of loaded RISC code.\n",
++			__FUNCTION__);
++
++	/* Verify checksum of loaded RISC code. */
++	mb[0] = MBC_VERIFY_CHECKSUM;
++	/* mb[1] = ql12_risc_code_addr01; */
++	mb[1] = *ql1280_board_tbl[ha->devnum].fwstart;
++	err = qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb);
++	if (err) {
++		printk(KERN_ERR "scsi(%li): Failed checksum\n", ha->host_no);
++		return err;
++	}
++
++	/* Start firmware execution. */
++	dprintk(1, "%s: start firmware running.\n", __FUNCTION__);
++	mb[0] = MBC_EXECUTE_FIRMWARE;
++	mb[1] = *ql1280_board_tbl[ha->devnum].fwstart;
++	err = qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]);
++	if (err) {
++		printk(KERN_ERR "scsi(%li): Failed to start firmware\n",
++				ha->host_no);
++	}
++
++	return err;
++}
++
++static int
++qla1280_load_firmware(struct scsi_qla_host *ha)
++{
++	int err = -ENODEV;
++
++	/* If firmware needs to be loaded */
++	if (!qla1280_isp_firmware(ha)) {
++		printk(KERN_ERR "scsi(%li): isp_firmware() failed!\n",
++				ha->host_no);
++		goto out;
++	}
++
++	err = qla1280_chip_diag(ha);
++	if (err)
++		goto out;
++	if (IS_ISP1040(ha))
++		err = qla1280_load_firmware_pio(ha);
++	else
++		err = qla1280_load_firmware_dma(ha);
++	if (err)
++		goto out;
++	err = qla1280_start_firmware(ha);
++ out:
++	return err;
+ }
+ 
+ /*
+@@ -2271,123 +2292,9 @@
+ 	return status;
+ }
+ 
+-/*
+- * NVRAM configuration.
+- *
+- * Input:
+- *      ha                = adapter block pointer.
+- *      ha->request_ring  = request ring virtual address
+- *
+- * Output:
+- *      host adapters parameters in host adapter block
+- *
+- * Returns:
+- *      0 = success.
+- */
+-static int
+-qla1280_nvram_config(struct scsi_qla_host *ha)
++static void
++qla1280_print_settings(struct nvram *nv)
+ {
+-	struct device_reg *reg = ha->iobase;
+-	struct nvram *nv;
+-	int is1x160, status = 0;
+-	int bus, target, lun;
+-	uint16_t mb[MAILBOX_REGISTER_COUNT];
+-	uint16_t mask;
+-
+-	ENTER("qla1280_nvram_config");
+-
+-	if (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP12160 ||
+-	    ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP10160)
+-		is1x160 = 1;
+-	else
+-		is1x160 = 0;
+-
+-	nv = &ha->nvram;
+-	if (!ha->nvram_valid) {
+-		dprintk(1, "Using defaults for NVRAM: \n");
+-		memset(nv, 0, sizeof(struct nvram));
+-
+-		/* nv->cntr_flags_1.disable_loading_risc_code = 1; */
+-		nv->firmware_feature.f.enable_fast_posting = 1;
+-		nv->firmware_feature.f.disable_synchronous_backoff = 1;
+-
+-		nv->termination.f.scsi_bus_0_control = 3;
+-		nv->termination.f.scsi_bus_1_control = 3;
+-		nv->termination.f.auto_term_support = 1;
+-
+-		/*
+-		 * Set default FIFO magic - What appropriate values
+-		 * would be here is unknown. This is what I have found
+-		 * testing with 12160s.
+-		 * Now, I would love the magic decoder ring for this one,
+-		 * the header file provided by QLogic seems to be bogus
+-		 * or incomplete at best.
+-		 */
+-		nv->isp_config.c = 0x44;
+-
+-		if (is1x160)
+-			nv->isp_parameter = 0x01;
+-
+-		for (bus = 0; bus < MAX_BUSES; bus++) {
+-			nv->bus[bus].config_1.initiator_id = 7;
+-			nv->bus[bus].bus_reset_delay = 5;
+-			/* 8 = 5.0 clocks */
+-			nv->bus[bus].config_2.async_data_setup_time = 8;
+-			nv->bus[bus].config_2.req_ack_active_negation = 1;
+-			nv->bus[bus].config_2.data_line_active_negation = 1;
+-			nv->bus[bus].selection_timeout = 250;
+-			nv->bus[bus].max_queue_depth = 256;
+-
+-			for (target = 0; target < MAX_TARGETS; target++) {
+-				nv->bus[bus].target[target].parameter.f.
+-					renegotiate_on_error = 1;
+-				nv->bus[bus].target[target].parameter.f.
+-					auto_request_sense = 1;
+-				nv->bus[bus].target[target].parameter.f.
+-					tag_queuing = 1;
+-				nv->bus[bus].target[target].parameter.f.
+-					enable_sync = 1;
+-#if 1	/* Some SCSI Processors do not seem to like this */
+-				nv->bus[bus].target[target].parameter.f.
+-					enable_wide = 1;
+-#endif
+-				nv->bus[bus].target[target].parameter.f.
+-					parity_checking = 1;
+-				nv->bus[bus].target[target].parameter.f.
+-					disconnect_allowed = 1;
+-				nv->bus[bus].target[target].execution_throttle=
+-					nv->bus[bus].max_queue_depth - 1;
+-				if (is1x160) {
+-					nv->bus[bus].target[target].flags.
+-						flags1x160.device_enable = 1;
+-					nv->bus[bus].target[target].flags.
+-						flags1x160.sync_offset = 0x0e;
+-					nv->bus[bus].target[target].
+-						sync_period = 9;
+-					nv->bus[bus].target[target].
+-						ppr_1x160.flags.enable_ppr = 1;
+-					nv->bus[bus].target[target].ppr_1x160.
+-						flags.ppr_options = 2;
+-					nv->bus[bus].target[target].ppr_1x160.
+-						flags.ppr_bus_width = 1;
+-				} else {
+-					nv->bus[bus].target[target].flags.
+-						flags1x80.device_enable = 1;
+-					nv->bus[bus].target[target].flags.
+-						flags1x80.sync_offset = 0x8;
+-					nv->bus[bus].target[target].
+-						sync_period = 10;
+-				}
+-			}
+-		}
+-	} else {
+-		/* Always force AUTO sense for LINUX SCSI */
+-		for (bus = 0; bus < MAX_BUSES; bus++)
+-			for (target = 0; target < MAX_TARGETS; target++) {
+-				nv->bus[bus].target[target].parameter.f.
+-					auto_request_sense = 1;
+-			}
+-	}
+ 	dprintk(1, "qla1280 : initiator scsi id bus[0]=%d\n",
+ 		nv->bus[0].config_1.initiator_id);
+ 	dprintk(1, "qla1280 : initiator scsi id bus[1]=%d\n",
+@@ -2433,36 +2340,262 @@
+ 		nv->bus[0].max_queue_depth);
+ 	dprintk(1, "qla1280 : max queue depth[1]=%d\n",
+ 		nv->bus[1].max_queue_depth);
++}
++
++static void
++qla1280_set_target_defaults(struct scsi_qla_host *ha, int bus, int target)
++{
++	struct nvram *nv = &ha->nvram;
++
++	nv->bus[bus].target[target].parameter.f.renegotiate_on_error = 1;
++	nv->bus[bus].target[target].parameter.f.auto_request_sense = 1;
++	nv->bus[bus].target[target].parameter.f.tag_queuing = 1;
++	nv->bus[bus].target[target].parameter.f.enable_sync = 1;
++#if 1	/* Some SCSI Processors do not seem to like this */
++	nv->bus[bus].target[target].parameter.f.enable_wide = 1;
++#endif
++	nv->bus[bus].target[target].parameter.f.parity_checking = 1;
++	nv->bus[bus].target[target].parameter.f.disconnect_allowed = 1;
++	nv->bus[bus].target[target].execution_throttle =
++		nv->bus[bus].max_queue_depth - 1;
++
++	if (IS_ISP1x160(ha)) {
++		nv->bus[bus].target[target].flags.flags1x160.device_enable = 1;
++		nv->bus[bus].target[target].flags.flags1x160.sync_offset = 0x0e;
++		nv->bus[bus].target[target].sync_period = 9;
++		nv->bus[bus].target[target].ppr_1x160.flags.enable_ppr = 1;
++		nv->bus[bus].target[target].ppr_1x160.flags.ppr_options = 2;
++		nv->bus[bus].target[target].ppr_1x160.flags.ppr_bus_width = 1;
++	} else {
++		nv->bus[bus].target[target].flags.flags1x80.device_enable = 1;
++		nv->bus[bus].target[target].flags.flags1x80.sync_offset = 12;
++		nv->bus[bus].target[target].sync_period = 10;
++	}
++}
++
++static void
++qla1280_set_defaults(struct scsi_qla_host *ha)
++{
++	struct nvram *nv = &ha->nvram;
++	int bus, target;
++
++	dprintk(1, "Using defaults for NVRAM: \n");
++	memset(nv, 0, sizeof(struct nvram));
++
++	/* nv->cntr_flags_1.disable_loading_risc_code = 1; */
++	nv->firmware_feature.f.enable_fast_posting = 1;
++	nv->firmware_feature.f.disable_synchronous_backoff = 1;
++	nv->termination.f.scsi_bus_0_control = 3;
++	nv->termination.f.scsi_bus_1_control = 3;
++	nv->termination.f.auto_term_support = 1;
++
++	/*
++	 * Set default FIFO magic - What appropriate values would be here
++	 * is unknown. This is what I have found testing with 12160s.
++	 *
++	 * Now, I would love the magic decoder ring for this one, the
++	 * header file provided by QLogic seems to be bogus or incomplete
++	 * at best.
++	 */
++	nv->isp_config.c = ISP_CFG1_BENAB|ISP_CFG1_F128;
++	if (IS_ISP1x160(ha))
++		nv->isp_parameter = 0x01; /* fast memory enable */
++
++	for (bus = 0; bus < MAX_BUSES; bus++) {
++		nv->bus[bus].config_1.initiator_id = 7;
++		nv->bus[bus].config_2.req_ack_active_negation = 1;
++		nv->bus[bus].config_2.data_line_active_negation = 1;
++		nv->bus[bus].selection_timeout = 250;
++		nv->bus[bus].max_queue_depth = 256;
++
++		if (IS_ISP1040(ha)) {
++			nv->bus[bus].bus_reset_delay = 3;
++			nv->bus[bus].config_2.async_data_setup_time = 6;
++			nv->bus[bus].retry_delay = 1;
++		} else {
++			nv->bus[bus].bus_reset_delay = 5;
++			nv->bus[bus].config_2.async_data_setup_time = 8;
++		}
++
++		for (target = 0; target < MAX_TARGETS; target++)
++			qla1280_set_target_defaults(ha, bus, target);
++	}
++}
++
++static int
++qla1280_config_target(struct scsi_qla_host *ha, int bus, int target)
++{
++	struct nvram *nv = &ha->nvram;
++	uint16_t mb[MAILBOX_REGISTER_COUNT];
++	int status, lun;
++
++	/* Set Target Parameters. */
++	mb[0] = MBC_SET_TARGET_PARAMETERS;
++	mb[1] = (uint16_t) (bus ? target | BIT_7 : target);
++	mb[1] <<= 8;
++
++	/*
++	 * Do not enable wide, sync, and ppr for the initial
++	 * INQUIRY run. We enable this later if we determine
++	 * the target actually supports it.
++	 */
++	nv->bus[bus].target[target].parameter.f.
++		auto_request_sense = 1;
++	nv->bus[bus].target[target].parameter.f.
++		stop_queue_on_check = 0;
++
++	if (IS_ISP1x160(ha))
++		nv->bus[bus].target[target].ppr_1x160.
++			flags.enable_ppr = 0;
++
++	/*
++	 * No sync, wide, etc. while probing
++	 */
++	mb[2] = (nv->bus[bus].target[target].parameter.c << 8) &
++		~(TP_SYNC /*| TP_WIDE | TP_PPR*/);
++
++	if (IS_ISP1x160(ha))
++		mb[3] =	nv->bus[bus].target[target].flags.flags1x160.sync_offset << 8;
++	else
++		mb[3] =	nv->bus[bus].target[target].flags.flags1x80.sync_offset << 8;
++	mb[3] |= nv->bus[bus].target[target].sync_period;
++
++	status = qla1280_mailbox_command(ha, BIT_3 | BIT_2 | BIT_1 | BIT_0, &mb[0]);
++
++	/* Save Tag queuing enable flag. */
++	mb[0] = BIT_0 << target;
++	if (nv->bus[bus].target[target].parameter.f.tag_queuing)
++		ha->bus_settings[bus].qtag_enables |= mb[0];
++
++	/* Save Device enable flag. */
++	if (IS_ISP1x160(ha)) {
++		if (nv->bus[bus].target[target].flags.flags1x160.device_enable)
++			ha->bus_settings[bus].device_enables |= mb[0];
++		ha->bus_settings[bus].lun_disables |= 0;
++	} else {
++		if (nv->bus[bus].target[target].flags.flags1x80.device_enable)
++			ha->bus_settings[bus].device_enables |= mb[0];
++		/* Save LUN disable flag. */
++		if (nv->bus[bus].target[target].flags.flags1x80.lun_disable)
++			ha->bus_settings[bus].lun_disables |= mb[0];
++	}
++
++	/* Set Device Queue Parameters. */
++	for (lun = 0; lun < MAX_LUNS; lun++) {
++		mb[0] = MBC_SET_DEVICE_QUEUE;
++		mb[1] = (uint16_t)(bus ? target | BIT_7 : target);
++		mb[1] = mb[1] << 8 | lun;
++		mb[2] = nv->bus[bus].max_queue_depth;
++		mb[3] = nv->bus[bus].target[target].execution_throttle;
++		status |= qla1280_mailbox_command(ha, 0x0f, &mb[0]);
++	}
++
++	return status;
++}
++
++static int
++qla1280_config_bus(struct scsi_qla_host *ha, int bus)
++{
++	struct nvram *nv = &ha->nvram;
++	uint16_t mb[MAILBOX_REGISTER_COUNT];
++	int target, status;
++
++	/* SCSI Reset Disable. */
++	ha->bus_settings[bus].disable_scsi_reset =
++		nv->bus[bus].config_1.scsi_reset_disable;
++
++	/* Initiator ID. */
++	ha->bus_settings[bus].id = nv->bus[bus].config_1.initiator_id;
++	mb[0] = MBC_SET_INITIATOR_ID;
++	mb[1] = bus ? ha->bus_settings[bus].id | BIT_7 :
++		ha->bus_settings[bus].id;
++	status = qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]);
++
++	/* Reset Delay. */
++	ha->bus_settings[bus].bus_reset_delay =
++		nv->bus[bus].bus_reset_delay;
++
++	/* Command queue depth per device. */
++	ha->bus_settings[bus].hiwat = nv->bus[bus].max_queue_depth - 1;
++
++	/* Set target parameters. */
++	for (target = 0; target < MAX_TARGETS; target++)
++		status |= qla1280_config_target(ha, bus, target);
++
++	return status;
++}
++
++static int
++qla1280_nvram_config(struct scsi_qla_host *ha)
++{
++	struct device_reg *reg = ha->iobase;
++	struct nvram *nv = &ha->nvram;
++	int bus, target, status = 0;
++	uint16_t mb[MAILBOX_REGISTER_COUNT];
++	uint16_t mask;
++
++	ENTER("qla1280_nvram_config");
++
++	if (ha->nvram_valid) {
++		/* Always force AUTO sense for LINUX SCSI */
++		for (bus = 0; bus < MAX_BUSES; bus++)
++			for (target = 0; target < MAX_TARGETS; target++) {
++				nv->bus[bus].target[target].parameter.f.
++					auto_request_sense = 1;
++			}
++	} else {
++		qla1280_set_defaults(ha);
++	}
++
++	qla1280_print_settings(nv);
+ 
+ 	/* Disable RISC load of firmware. */
+ 	ha->flags.disable_risc_code_load =
+ 		nv->cntr_flags_1.disable_loading_risc_code;
+ 
+-	/* Set ISP hardware DMA burst */
+-	mb[0] = nv->isp_config.c;
+-	/* Enable DMA arbitration on dual channel controllers */
+-	if (ha->ports > 1)
+-		mb[0] |= BIT_13;
+-	WRT_REG_WORD(&reg->cfg_1, mb[0]);
+-
+-#if 1	/* Is this safe? */
+-	/* Set SCSI termination. */
+-	WRT_REG_WORD(&reg->gpio_enable, (BIT_3 + BIT_2 + BIT_1 + BIT_0));
+-	mb[0] = nv->termination.c & (BIT_3 + BIT_2 + BIT_1 + BIT_0);
+-	WRT_REG_WORD(&reg->gpio_data, mb[0]);
+-#endif
++	if (IS_ISP1040(ha)) {
++		uint16_t hwrev, cfg1, cdma_conf, ddma_conf;
++
++		hwrev = RD_REG_WORD(&reg->cfg_0) & ISP_CFG0_HWMSK;
++
++		cfg1 = RD_REG_WORD(&reg->cfg_1);
++		cdma_conf = RD_REG_WORD(&reg->cdma_cfg);
++		ddma_conf = RD_REG_WORD(&reg->ddma_cfg);
++
++		/* Busted fifo, says mjacob. */
++		if (hwrev == ISP_CFG0_1040A)
++			WRT_REG_WORD(&reg->cfg_1, cfg1 | ISP_CFG1_F64);
++		else
++			WRT_REG_WORD(&reg->cfg_1, cfg1 | ISP_CFG1_F64 | ISP_CFG1_BENAB);
++
++		WRT_REG_WORD(&reg->cdma_cfg, cdma_conf | CDMA_CONF_BENAB);
++		WRT_REG_WORD(&reg->ddma_cfg, cdma_conf | DDMA_CONF_BENAB);
++	} else {
++		/* Set ISP hardware DMA burst */
++		mb[0] = nv->isp_config.c;
++		/* Enable DMA arbitration on dual channel controllers */
++		if (ha->ports > 1)
++			mb[0] |= BIT_13;
++		WRT_REG_WORD(&reg->cfg_1, mb[0]);
++
++		/* Set SCSI termination. */
++		WRT_REG_WORD(&reg->gpio_enable, (BIT_3 + BIT_2 + BIT_1 + BIT_0));
++		mb[0] = nv->termination.c & (BIT_3 + BIT_2 + BIT_1 + BIT_0);
++		WRT_REG_WORD(&reg->gpio_data, mb[0]);
++	}
+ 
+ 	/* ISP parameter word. */
+ 	mb[0] = MBC_SET_SYSTEM_PARAMETER;
+ 	mb[1] = nv->isp_parameter;
+ 	status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]);
+ 
+-#if 0
+-	/* clock rate - for qla1240 and older, only */
+-	mb[0] = MBC_SET_CLOCK_RATE;
+-	mb[1] = 0x50;
+- 	status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]);
+-#endif
++	if (IS_ISP1x40(ha)) {
++		/* clock rate - for qla1240 and older, only */
++		mb[0] = MBC_SET_CLOCK_RATE;
++		mb[1] = 40;
++	 	status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb);
++	}
++
+ 	/* Firmware feature word. */
+ 	mb[0] = MBC_SET_FIRMWARE_FEATURES;
+ 	mask = BIT_5 | BIT_1 | BIT_0;
+@@ -2515,112 +2648,18 @@
+ 	mb[2] = 2;	/* Command DMA Channel Burst Enable */
+ 	status |= qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, &mb[0]);
+ 
++	mb[0] = MBC_SET_TAG_AGE_LIMIT;
++	mb[1] = 8;
++	status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]);
++
+ 	/* Selection timeout. */
+ 	mb[0] = MBC_SET_SELECTION_TIMEOUT;
+ 	mb[1] = nv->bus[0].selection_timeout;
+ 	mb[2] = nv->bus[1].selection_timeout;
+ 	status |= qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, &mb[0]);
+ 
+-	for (bus = 0; bus < ha->ports; bus++) {
+-		/* SCSI Reset Disable. */
+-		ha->bus_settings[bus].disable_scsi_reset =
+-			nv->bus[bus].config_1.scsi_reset_disable;
+-
+-		/* Initiator ID. */
+-		ha->bus_settings[bus].id = nv->bus[bus].config_1.initiator_id;
+-		mb[0] = MBC_SET_INITIATOR_ID;
+-		mb[1] = bus ? ha->bus_settings[bus].id | BIT_7 :
+-			ha->bus_settings[bus].id;
+-		status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]);
+-
+-		/* Reset Delay. */
+-		ha->bus_settings[bus].bus_reset_delay =
+-			nv->bus[bus].bus_reset_delay;
+-
+-		/* Command queue depth per device. */
+-		ha->bus_settings[bus].hiwat = nv->bus[bus].max_queue_depth - 1;
+-
+-		/* Set target parameters. */
+-		for (target = 0; target < MAX_TARGETS; target++) {
+-			uint8_t mr = BIT_2 | BIT_1 | BIT_0;
+-
+-			/* Set Target Parameters. */
+-			mb[0] = MBC_SET_TARGET_PARAMETERS;
+-			mb[1] = (uint16_t) (bus ? target | BIT_7 : target);
+-			mb[1] <<= 8;
+-			/*
+-			 * Do not enable wide, sync, and ppr for the initial
+-			 * INQUIRY run. We enable this later if we determine
+-			 * the target actually supports it.
+-			 */
+-			nv->bus[bus].target[target].parameter.f.
+-				auto_request_sense = 1;
+-			nv->bus[bus].target[target].parameter.f.
+-				stop_queue_on_check = 0;
+-
+-			if (is1x160)
+-				nv->bus[bus].target[target].ppr_1x160.
+-					flags.enable_ppr = 0;
+-			/*
+-			 * No sync, wide, etc. while probing
+-			 */
+-			mb[2] = (nv->bus[bus].target[target].parameter.c << 8)&
+-				~(TP_SYNC /*| TP_WIDE | TP_PPR*/);
+-
+-			if (is1x160)
+-				mb[3] =	nv->bus[bus].target[target].flags.flags1x160.sync_offset << 8;
+-			else
+-				mb[3] =	nv->bus[bus].target[target].flags.flags1x80.sync_offset << 8;
+-			mb[3] |= nv->bus[bus].target[target].sync_period;
+-			mr |= BIT_3;
+-
+-			/*
+-			 * We don't want to enable ppr etc. before we have 
+-			 * determined that the target actually supports it
+-			 */
+-#if 0
+-			if (is1x160) {
+-				mb[2] |= nv->bus[bus].target[target].ppr_1x160.flags.enable_ppr << 5;
+-
+-				mb[6] =	nv->bus[bus].target[target].ppr_1x160.flags.ppr_options << 8;
+-				mb[6] |= nv->bus[bus].target[target].ppr_1x160.flags.ppr_bus_width;
+-				mr |= BIT_6;
+-			}
+-#endif
+-
+-			status = qla1280_mailbox_command(ha, mr, &mb[0]);
+-
+-			/* Save Tag queuing enable flag. */
+-			mb[0] = BIT_0 << target;
+-			if (nv->bus[bus].target[target].parameter.f.tag_queuing)
+-				ha->bus_settings[bus].qtag_enables |= mb[0];
+-
+-			/* Save Device enable flag. */
+-			if (is1x160) {
+-				if (nv->bus[bus].target[target].flags.flags1x160.device_enable)
+-					ha->bus_settings[bus].device_enables |= mb[0];
+-				ha->bus_settings[bus].lun_disables |= 0;
+-			} else {
+-				if (nv->bus[bus].target[target].flags.flags1x80.device_enable)
+-					ha->bus_settings[bus].device_enables |= mb[0];
+-				/* Save LUN disable flag. */
+-				if (nv->bus[bus].target[target].flags.flags1x80.lun_disable)
+-				ha->bus_settings[bus].lun_disables |= mb[0];
+-			}
+-
+-
+-			/* Set Device Queue Parameters. */
+-			for (lun = 0; lun < MAX_LUNS; lun++) {
+-				mb[0] = MBC_SET_DEVICE_QUEUE;
+-				mb[1] = (uint16_t)(bus ? target | BIT_7 : target);
+-				mb[1] = mb[1] << 8 | lun;
+-				mb[2] = nv->bus[bus].max_queue_depth;
+-				mb[3] = nv->bus[bus].target[target].execution_throttle;
+-				status |= qla1280_mailbox_command(ha, 0x0f,
+-								  &mb[0]);
+-			}
+-		}
+-	}
++	for (bus = 0; bus < ha->ports; bus++)
++		status |= qla1280_config_bus(ha, bus);
+ 
+ 	if (status)
+ 		dprintk(2, "qla1280_nvram_config: **** FAILED ****\n");
+@@ -4231,6 +4270,7 @@
+ static int
+ qla1280_abort_isp(struct scsi_qla_host *ha)
+ {
++	struct device_reg *reg = ha->iobase;
+ 	struct srb *sp;
+ 	int status = 0;
+ 	int cnt;
+@@ -4238,69 +4278,53 @@
+ 
+ 	ENTER("qla1280_abort_isp");
+ 
+-	if (!ha->flags.abort_isp_active && ha->flags.online) {
+-		struct device_reg *reg = ha->iobase;
+-		ha->flags.abort_isp_active = 1;
++	if (ha->flags.abort_isp_active || !ha->flags.online)
++		goto out;
++	
++	ha->flags.abort_isp_active = 1;
+ 
+-		/* Disable ISP interrupts. */
+-		qla1280_disable_intrs(ha);
+-		WRT_REG_WORD(&reg->host_cmd, HC_PAUSE_RISC);
+-		RD_REG_WORD(&reg->id_l);
++	/* Disable ISP interrupts. */
++	qla1280_disable_intrs(ha);
++	WRT_REG_WORD(&reg->host_cmd, HC_PAUSE_RISC);
++	RD_REG_WORD(&reg->id_l);
+ 
+-		printk(KERN_INFO "scsi(%li): dequeuing outstanding commands\n",
+-		       ha->host_no);
+-		/* Dequeue all commands in outstanding command list. */
+-		for (cnt = 0; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) {
+-			struct scsi_cmnd *cmd;
+-			sp = ha->outstanding_cmds[cnt];
+-			if (sp) {
++	printk(KERN_INFO "scsi(%li): dequeuing outstanding commands\n",
++	       ha->host_no);
++	/* Dequeue all commands in outstanding command list. */
++	for (cnt = 0; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) {
++		struct scsi_cmnd *cmd;
++		sp = ha->outstanding_cmds[cnt];
++		if (sp) {
+ 
+-				cmd = sp->cmd;
+-				CMD_RESULT(cmd) = DID_RESET << 16;
++			cmd = sp->cmd;
++			CMD_RESULT(cmd) = DID_RESET << 16;
+ 
+-				sp->cmd = NULL;
+-				ha->outstanding_cmds[cnt] = NULL;
++			sp->cmd = NULL;
++			ha->outstanding_cmds[cnt] = NULL;
+ 
+-				(*cmd->scsi_done)(cmd);
++			(*cmd->scsi_done)(cmd);
+ 
+-				sp->flags = 0;
+-			}
++			sp->flags = 0;
+ 		}
++	}
+ 
+-		/* If firmware needs to be loaded */
+-		if (qla1280_isp_firmware (ha)) {
+-			if (!(status = qla1280_chip_diag(ha)))
+-				status = qla1280_setup_chip(ha);
+-		}
++	status = qla1280_load_firmware(ha);
++	if (status)
++		goto out;
+ 
+-		if (!status) {
+-			/* Setup adapter based on NVRAM parameters. */
+-			qla1280_nvram_config (ha);
+-
+-			if (!(status = qla1280_init_rings(ha))) {
+-				/* Issue SCSI reset. */
+-				for (bus = 0; bus < ha->ports; bus++) {
+-					qla1280_bus_reset(ha, bus);
+-				}
+-				/*
+-				 * qla1280_bus_reset() will do the marker
+-				 * dance - no reason to repeat here!
+-				 */
+-#if  0
+-				/* Issue marker command. */
+-				ha->flags.reset_marker = 0;
+-				for (bus = 0; bus < ha->ports; bus++) {
+-					ha->bus_settings[bus].
+-						reset_marker = 0;
+-					qla1280_marker(ha, bus, 0, 0,
+-						       MK_SYNC_ALL);
+-				}
+-#endif
+-				ha->flags.abort_isp_active = 0;
+-			}
+-		}
+-	}
++	/* Setup adapter based on NVRAM parameters. */
++	qla1280_nvram_config (ha);
+ 
++	status = qla1280_init_rings(ha);
++	if (status)
++		goto out;
++		
++	/* Issue SCSI reset. */
++	for (bus = 0; bus < ha->ports; bus++)
++		qla1280_bus_reset(ha, bus);
++		
++	ha->flags.abort_isp_active = 0;
++ out:
+ 	if (status) {
+ 		printk(KERN_WARNING
+ 		       "qla1280: ISP error recovery failed, board disabled");
+diff -Nur kernel-source-2.6.8-2.6.8.orig/drivers/scsi/qla1280.h kernel-source-2.6.8-2.6.8/drivers/scsi/qla1280.h
+--- kernel-source-2.6.8-2.6.8.orig/drivers/scsi/qla1280.h	2004-08-14 05:38:09.000000000 +0000
++++ kernel-source-2.6.8-2.6.8/drivers/scsi/qla1280.h	2005-01-08 14:39:38.000000000 +0000
+@@ -126,7 +126,20 @@
+ 	uint16_t id_l;		/* ID low */
+ 	uint16_t id_h;		/* ID high */
+ 	uint16_t cfg_0;		/* Configuration 0 */
++#define ISP_CFG0_HWMSK   0x000f	/* Hardware revision mask */
++#define ISP_CFG0_1020    BIT_0	/* ISP1020 */
++#define ISP_CFG0_1020A	 BIT_1	/* ISP1020A */
++#define ISP_CFG0_1040	 BIT_2	/* ISP1040 */
++#define ISP_CFG0_1040A	 BIT_3	/* ISP1040A */
++#define ISP_CFG0_1040B	 BIT_4	/* ISP1040B */
++#define ISP_CFG0_1040C	 BIT_5	/* ISP1040C */
+ 	uint16_t cfg_1;		/* Configuration 1 */
++#define ISP_CFG1_F128    BIT_6  /* 128-byte FIFO threshold */
++#define ISP_CFG1_F64     BIT_4|BIT_5 /* 128-byte FIFO threshold */
++#define ISP_CFG1_F32     BIT_5  /* 128-byte FIFO threshold */
++#define ISP_CFG1_F16     BIT_4  /* 128-byte FIFO threshold */
++#define ISP_CFG1_BENAB   BIT_2  /* Global Bus burst enable */
++#define ISP_CFG1_SXP     BIT_0  /* SXP register select */
+ 	uint16_t ictrl;		/* Interface control */
+ #define ISP_RESET        BIT_0	/* ISP soft reset */
+ #define ISP_EN_INT       BIT_1	/* ISP enable interrupts. */
+@@ -147,7 +160,42 @@
+ 	uint16_t flash_data;	/* Flash BIOS data */
+ 	uint16_t flash_address;	/* Flash BIOS address */
+ 
+-	uint16_t unused_1[0x2e];	/* 0x14-0x6f Gap */
++	uint16_t unused_1[0x06];
++	
++	/* cdma_* and ddma_* are 1040 only */
++	uint16_t cdma_cfg;
++#define CDMA_CONF_SENAB  BIT_3	/* SXP to DMA Data enable */
++#define CDMA_CONF_RIRQ   BIT_2	/* RISC interrupt enable */
++#define CDMA_CONF_BENAB  BIT_1	/* Bus burst enable */
++#define CDMA_CONF_DIR    BIT_0	/* DMA direction (0=fifo->host 1=host->fifo) */
++	uint16_t cdma_ctrl; 
++	uint16_t cdma_status;   
++	uint16_t cdma_fifo_status;
++	uint16_t cdma_count;
++	uint16_t cdma_reserved;
++	uint16_t cdma_address_count_0;
++	uint16_t cdma_address_count_1;
++	uint16_t cdma_address_count_2;
++	uint16_t cdma_address_count_3;
++
++	uint16_t unused_2[0x06];
++
++	uint16_t ddma_cfg;
++#define DDMA_CONF_SENAB  BIT_3	/* SXP to DMA Data enable */
++#define DDMA_CONF_RIRQ   BIT_2	/* RISC interrupt enable */
++#define DDMA_CONF_BENAB  BIT_1	/* Bus burst enable */
++#define DDMA_CONF_DIR    BIT_0	/* DMA direction (0=fifo->host 1=host->fifo) */
++	uint16_t ddma_ctrl;
++	uint16_t ddma_status; 
++	uint16_t ddma_fifo_status;
++	uint16_t ddma_xfer_count_low;
++	uint16_t ddma_xfer_count_high;
++	uint16_t ddma_addr_count_0;
++	uint16_t ddma_addr_count_1;
++	uint16_t ddma_addr_count_2;
++	uint16_t ddma_addr_count_3; 
++
++	uint16_t unused_3[0x0e];
+ 
+ 	uint16_t mailbox0;	/* Mailbox 0 */
+ 	uint16_t mailbox1;	/* Mailbox 1 */
+@@ -158,18 +206,18 @@
+ 	uint16_t mailbox6;	/* Mailbox 6 */
+ 	uint16_t mailbox7;	/* Mailbox 7 */
+ 
+-	uint16_t unused_2[0x20];/* 0x80-0xbf Gap */
++	uint16_t unused_4[0x20];/* 0x80-0xbf Gap */
+ 
+ 	uint16_t host_cmd;	/* Host command and control */
+ #define HOST_INT      BIT_7	/* host interrupt bit */
+ #define BIOS_ENABLE   BIT_0
+ 
+-	uint16_t unused_6[0x5];	/* 0xc2-0xcb Gap */
++	uint16_t unused_5[0x5];	/* 0xc2-0xcb Gap */
+ 
+ 	uint16_t gpio_data;
+ 	uint16_t gpio_enable;
+ 
+-	uint16_t unused_7[0x11];	/* d0-f0 */
++	uint16_t unused_6[0x11];	/* d0-f0 */
+ 	uint16_t scsiControlPins;	/* f2 */
+ };
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-sucks-0.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-sucks-0.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-sucks-0.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,384 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: ReiserFS: Cleanup internal use of bh macros
+## DP: Patch author: Jeff Mahoney <jeffm at novell.com>
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/18 23:07:20-07:00 jeffm at novell.com 
+#   [PATCH] ReiserFS: Cleanup internal use of bh macros
+#   
+#   This patch cleans up ReiserFS's use of buffer head flags.  All direct
+#   access of BH_* are made into macro calls, and all reiserfs-specific BH_*
+#   macro implementations have been removed and replaced with the BUFFER_FNS
+#   implementations found in linux/buffer_head.h
+#   
+#   Signed-off-by: Jeff Mahoney <jeffm at novell.com>
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# fs/reiserfs/do_balan.c
+#   2004/10/18 22:26:48-07:00 jeffm at novell.com +1 -1
+#   ReiserFS: Cleanup internal use of bh macros
+# 
+# fs/reiserfs/fix_node.c
+#   2004/10/18 22:26:48-07:00 jeffm at novell.com +1 -1
+#   ReiserFS: Cleanup internal use of bh macros
+# 
+# fs/reiserfs/journal.c
+#   2004/10/18 22:28:08-07:00 jeffm at novell.com +31 -63
+#   ReiserFS: Cleanup internal use of bh macros
+# 
+# fs/reiserfs/namei.c
+#   2004/10/18 22:28:07-07:00 jeffm at novell.com +1 -1
+#   ReiserFS: Cleanup internal use of bh macros
+# 
+# include/linux/reiserfs_fs.h
+#   2004/10/18 22:28:07-07:00 jeffm at novell.com +17 -31
+#   ReiserFS: Cleanup internal use of bh macros
+# 
+diff -Nru a/fs/reiserfs/do_balan.c b/fs/reiserfs/do_balan.c
+--- a/fs/reiserfs/do_balan.c	2004-12-23 02:13:30 -08:00
++++ b/fs/reiserfs/do_balan.c	2004-12-23 02:13:30 -08:00
+@@ -1341,7 +1341,7 @@
+ 
+ static int locked_or_not_in_tree (struct buffer_head * bh, char * which)
+ {
+-  if ( (!reiserfs_buffer_prepared(bh) && buffer_locked (bh)) ||
++  if ( (!buffer_journal_prepared (bh) && buffer_locked (bh)) ||
+         !B_IS_IN_TREE (bh) ) {
+     reiserfs_warning (NULL, "vs-12339: locked_or_not_in_tree: %s (%b)",
+                       which, bh);
+diff -Nru a/fs/reiserfs/fix_node.c b/fs/reiserfs/fix_node.c
+--- a/fs/reiserfs/fix_node.c	2004-12-23 02:13:30 -08:00
++++ b/fs/reiserfs/fix_node.c	2004-12-23 02:13:30 -08:00
+@@ -820,7 +820,7 @@
+     RFALSE (p_s_tb->FEB[p_s_tb->cur_blknum],
+ 	    "PAP-8141: busy slot for new buffer");
+ 
+-    mark_buffer_journal_new(p_s_new_bh) ;
++    set_buffer_journal_new (p_s_new_bh);
+     p_s_tb->FEB[p_s_tb->cur_blknum++] = p_s_new_bh;
+   }
+ 
+diff -Nru a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
+--- a/fs/reiserfs/journal.c	2004-12-23 02:13:30 -08:00
++++ b/fs/reiserfs/journal.c	2004-12-23 02:13:30 -08:00
+@@ -122,7 +122,7 @@
+ static int reiserfs_clean_and_file_buffer(struct buffer_head *bh) {
+   if (bh) {
+     clear_buffer_dirty(bh);
+-    clear_bit(BH_JTest, &bh->b_state);
++    clear_buffer_journal_test(bh);
+   }
+   return 0 ;
+ }
+@@ -388,41 +388,9 @@
+   SB_JOURNAL(p_s_sb)->j_cnode_free_list = cn ;
+ }
+ 
+-static int clear_prepared_bits(struct buffer_head *bh) {
+-  clear_bit(BH_JPrepared, &bh->b_state) ;
+-  clear_bit(BH_JRestore_dirty, &bh->b_state) ;
+-  return 0 ;
+-}
+-
+-/* buffer is in current transaction */
+-inline int buffer_journaled(const struct buffer_head *bh) {
+-  if (bh)
+-    return test_bit(BH_JDirty, &bh->b_state) ;
+-  else
+-    return 0 ;
+-}
+-
+-/* disk block was taken off free list before being in a finished transation, or written to disk
+-** journal_new blocks can be reused immediately, for any purpose
+-*/ 
+-inline int buffer_journal_new(const struct buffer_head *bh) {
+-  if (bh) 
+-    return test_bit(BH_JNew, &bh->b_state) ;
+-  else
+-    return 0 ;
+-}
+-
+-inline int mark_buffer_journal_new(struct buffer_head *bh) {
+-  if (bh) {
+-    set_bit(BH_JNew, &bh->b_state) ;
+-  }
+-  return 0 ;
+-}
+-
+-inline int mark_buffer_not_journaled(struct buffer_head *bh) {
+-  if (bh) 
+-    clear_bit(BH_JDirty, &bh->b_state) ;
+-  return 0 ;
++static void clear_prepared_bits(struct buffer_head *bh) {
++  clear_buffer_journal_prepared (bh);
++  clear_buffer_journal_restore_dirty (bh);
+ }
+ 
+ /* utility function to force a BUG if it is called without the big
+@@ -628,9 +596,9 @@
+ static void submit_logged_buffer(struct buffer_head *bh) {
+     get_bh(bh) ;
+     bh->b_end_io = reiserfs_end_buffer_io_sync ;
+-    mark_buffer_notjournal_new(bh) ;
++    clear_buffer_journal_new (bh);
+     clear_buffer_dirty(bh) ;
+-    if (!test_and_clear_bit(BH_JTest, &bh->b_state))
++    if (!test_clear_buffer_journal_test (bh))
+         BUG();
+     if (!buffer_uptodate(bh))
+         BUG();
+@@ -1383,7 +1351,7 @@
+ 	/* note, we must clear the JDirty_wait bit after the up to date
+ 	** check, otherwise we race against our flushpage routine
+ 	*/
+-	if (!test_and_clear_bit(BH_JDirty_wait, &cn->bh->b_state))
++        if (!test_clear_buffer_journal_dirty (cn->bh))
+ 	    BUG();
+ 
+         /* undo the inc from journal_mark_dirty */
+@@ -1476,7 +1444,7 @@
+ 	    lock_buffer(tmp_bh);
+ 	    if (cn->bh && can_dirty(cn) && buffer_dirty(tmp_bh)) {
+ 		if (!buffer_journal_dirty(tmp_bh) ||
+-		    reiserfs_buffer_prepared(tmp_bh))
++		    buffer_journal_prepared(tmp_bh))
+ 		    BUG();
+ 		add_to_chunk(chunk, tmp_bh, NULL, write_chunk);
+ 		ret++;
+@@ -1517,11 +1485,11 @@
+ 	     * or restored.  If restored, we need to make sure
+ 	     * it actually gets marked dirty
+ 	     */
+-	    mark_buffer_notjournal_new(cn->bh) ;
+-	    if (test_bit(BH_JPrepared, &cn->bh->b_state)) {
+-	        set_bit(BH_JRestore_dirty, &cn->bh->b_state);
++            clear_buffer_journal_new (cn->bh);
++            if (buffer_journal_prepared (cn->bh)) {
++                set_buffer_journal_restore_dirty (cn->bh);
+ 	    } else {
+-	        set_bit(BH_JTest, &cn->bh->b_state);
++                set_buffer_journal_test (cn->bh);
+ 	        mark_buffer_dirty(cn->bh);
+ 	    }
+         } 
+@@ -2777,8 +2745,8 @@
+   }
+   p_s_sb->s_dirt = 1;
+ 
+-  prepared = test_and_clear_bit(BH_JPrepared, &bh->b_state) ;
+-  clear_bit(BH_JRestore_dirty, &bh->b_state);
++  prepared = test_clear_buffer_journal_prepared (bh);
++  clear_buffer_journal_restore_dirty (bh);
+   /* already in this transaction, we are done */
+   if (buffer_journaled(bh)) {
+     PROC_INFO_INC( p_s_sb, journal.mark_dirty_already );
+@@ -2812,14 +2780,14 @@
+   if (buffer_journal_dirty(bh)) {
+     count_already_incd = 1 ;
+     PROC_INFO_INC( p_s_sb, journal.mark_dirty_notjournal );
+-    mark_buffer_notjournal_dirty(bh) ;
++    clear_buffer_journal_dirty (bh);
+   }
+ 
+   if (SB_JOURNAL(p_s_sb)->j_len > SB_JOURNAL(p_s_sb)->j_len_alloc) {
+     SB_JOURNAL(p_s_sb)->j_len_alloc = SB_JOURNAL(p_s_sb)->j_len + JOURNAL_PER_BALANCE_CNT ;
+   }
+ 
+-  set_bit(BH_JDirty, &bh->b_state) ;
++  set_buffer_journaled (bh);
+ 
+   /* now put this guy on the end */
+   if (!cn) {
+@@ -2913,10 +2881,10 @@
+   }
+   if (bh)
+ 	remove_journal_hash(p_s_sb, SB_JOURNAL(p_s_sb)->j_hash_table, NULL, bh->b_blocknr, 0) ; 
+-  mark_buffer_not_journaled(bh) ; /* don't log this one */
++  clear_buffer_journaled  (bh); /* don't log this one */
+ 
+   if (!already_cleaned) {
+-    mark_buffer_notjournal_dirty(bh) ; 
++    clear_buffer_journal_dirty (bh);
+     put_bh(bh) ;
+     if (atomic_read(&(bh->b_count)) < 0) {
+       reiserfs_warning (p_s_sb, "journal-1752: remove from trans, b_count < 0");
+@@ -3183,7 +3151,7 @@
+   }
+   /* if it is journal new, we just remove it from this transaction */
+   if (bh && buffer_journal_new(bh)) {
+-    mark_buffer_notjournal_new(bh) ;
++    clear_buffer_journal_new (bh);
+     clear_prepared_bits(bh) ;
+     reiserfs_clean_and_file_buffer(bh) ;
+     cleaned = remove_from_transaction(p_s_sb, blocknr, cleaned) ;
+@@ -3213,7 +3181,7 @@
+ 	    /* remove_from_transaction will brelse the buffer if it was 
+ 	    ** in the current trans
+ 	    */
+-	    mark_buffer_notjournal_dirty(cn->bh) ;
++            clear_buffer_journal_dirty (cn->bh);
+ 	    cleaned = 1 ;
+ 	    put_bh(cn->bh) ;
+ 	    if (atomic_read(&(cn->bh->b_count)) < 0) {
+@@ -3320,18 +3288,18 @@
+     if (!bh) {
+ 	return ;
+     }
+-    if (test_and_clear_bit(BH_JRestore_dirty, &bh->b_state) &&
++    if (test_clear_buffer_journal_restore_dirty (bh) &&
+ 	buffer_journal_dirty(bh)) {
+ 	struct reiserfs_journal_cnode *cn;
+ 	cn = get_journal_hash_dev(p_s_sb,
+ 	                          SB_JOURNAL(p_s_sb)->j_list_hash_table,
+ 				  bh->b_blocknr);
+ 	if (cn && can_dirty(cn)) {
+-	    set_bit(BH_JTest, &bh->b_state);
++            set_buffer_journal_test (bh);
+ 	    mark_buffer_dirty(bh);
+         }
+     }
+-    clear_bit(BH_JPrepared, &bh->b_state) ;
++    clear_buffer_journal_prepared (bh);
+ }
+ 
+ extern struct tree_balance *cur_tb ;
+@@ -3351,10 +3319,10 @@
+ 	    return 0;
+ 	lock_buffer(bh);
+     }
+-    set_bit(BH_JPrepared, &bh->b_state);
++    set_buffer_journal_prepared (bh);
+     if (test_clear_buffer_dirty(bh) && buffer_journal_dirty(bh))  {
+-	clear_bit(BH_JTest, &bh->b_state);
+-	set_bit(BH_JRestore_dirty, &bh->b_state);
++        clear_buffer_journal_test (bh);
++        set_buffer_journal_restore_dirty (bh);
+     }
+     unlock_buffer(bh);
+     return 1;
+@@ -3499,7 +3467,7 @@
+   */
+   trans_half = journal_trans_half(p_s_sb->s_blocksize);
+   for (i = 0, cn = SB_JOURNAL(p_s_sb)->j_first ; cn ; cn = cn->next, i++) {
+-    if (test_bit(BH_JDirty, &cn->bh->b_state) ) {
++    if (buffer_journaled (cn->bh)) {
+       jl_cn = get_cnode(p_s_sb) ;
+       if (!jl_cn) {
+         reiserfs_panic(p_s_sb, "journal-1676, get_cnode returned NULL\n") ;
+@@ -3555,9 +3523,9 @@
+   cn = SB_JOURNAL(p_s_sb)->j_first ;
+   jindex = 1 ; /* start at one so we don't get the desc again */
+   while(cn) {
+-    clear_bit(BH_JNew, &(cn->bh->b_state)) ;
++    clear_buffer_journal_new (cn->bh);
+     /* copy all the real blocks into log area.  dirty log blocks */
+-    if (test_bit(BH_JDirty, &cn->bh->b_state)) {
++    if (buffer_journaled (cn->bh)) {
+       struct buffer_head *tmp_bh ;
+       char *addr;
+       struct page *page;
+@@ -3571,8 +3539,8 @@
+       kunmap(page);
+       mark_buffer_dirty(tmp_bh);
+       jindex++ ;
+-      set_bit(BH_JDirty_wait, &(cn->bh->b_state)) ; 
+-      clear_bit(BH_JDirty, &(cn->bh->b_state)) ;
++      set_buffer_journal_dirty (cn->bh);
++      clear_buffer_journaled (cn->bh);
+     } else {
+       /* JDirty cleared sometime during transaction.  don't log this one */
+       reiserfs_warning(p_s_sb, "journal-2048: do_journal_end: BAD, buffer in journal hash, but not JDirty!") ;
+diff -Nru a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
+--- a/fs/reiserfs/namei.c	2004-12-23 02:13:30 -08:00
++++ b/fs/reiserfs/namei.c	2004-12-23 02:13:30 -08:00
+@@ -1289,7 +1289,7 @@
+ 	}
+ 
+ 	RFALSE( S_ISDIR(old_inode_mode) && 
+-		 !reiserfs_buffer_prepared(dot_dot_de.de_bh), "" );
++		 !buffer_journal_prepared(dot_dot_de.de_bh), "" );
+ 
+ 	break;
+     }
+diff -Nru a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
+--- a/include/linux/reiserfs_fs.h	2004-12-23 02:13:30 -08:00
++++ b/include/linux/reiserfs_fs.h	2004-12-23 02:13:30 -08:00
+@@ -1711,14 +1711,29 @@
+ #define journal_bread(s, block) __bread(SB_JOURNAL(s)->j_dev_bd, block, s->s_blocksize)
+ 
+ enum reiserfs_bh_state_bits {
+-    BH_JDirty = BH_PrivateStart,
++    BH_JDirty = BH_PrivateStart, /* buffer is in current transaction */
+     BH_JDirty_wait,
+-    BH_JNew,
++    BH_JNew,                     /* disk block was taken off free list before
++                                  * being in a finished transaction, or
++                                  * written to disk. Can be reused immed. */
+     BH_JPrepared,
+     BH_JRestore_dirty,
+     BH_JTest, // debugging only will go away
+ };
+ 
++BUFFER_FNS(JDirty, journaled);
++TAS_BUFFER_FNS(JDirty, journaled);
++BUFFER_FNS(JDirty_wait, journal_dirty);
++TAS_BUFFER_FNS(JDirty_wait, journal_dirty);
++BUFFER_FNS(JNew, journal_new);
++TAS_BUFFER_FNS(JNew, journal_new);
++BUFFER_FNS(JPrepared, journal_prepared);
++TAS_BUFFER_FNS(JPrepared, journal_prepared);
++BUFFER_FNS(JRestore_dirty, journal_restore_dirty);
++TAS_BUFFER_FNS(JRestore_dirty, journal_restore_dirty);
++BUFFER_FNS(JTest, journal_test);
++TAS_BUFFER_FNS(JTest, journal_test);
++
+ /*
+ ** transaction handle which is passed around for all journal calls
+ */
+@@ -1796,36 +1811,7 @@
+ int reiserfs_in_journal(struct super_block *p_s_sb, int bmap_nr, int bit_nr, int searchall, b_blocknr_t *next) ;
+ int journal_begin(struct reiserfs_transaction_handle *, struct super_block *p_s_sb, unsigned long) ;
+ 
+-int buffer_journaled(const struct buffer_head *bh) ;
+-int mark_buffer_journal_new(struct buffer_head *bh) ;
+ int reiserfs_allocate_list_bitmaps(struct super_block *s, struct reiserfs_list_bitmap *, int) ;
+-
+-				/* why is this kerplunked right here? */
+-static inline int reiserfs_buffer_prepared(const struct buffer_head *bh) {
+-  if (bh && test_bit(BH_JPrepared, &bh->b_state))
+-    return 1 ;
+-  else
+-    return 0 ;
+-}
+-
+-/* buffer was journaled, waiting to get to disk */
+-static inline int buffer_journal_dirty(const struct buffer_head *bh) {
+-  if (bh)
+-    return test_bit(BH_JDirty_wait, &bh->b_state) ;
+-  else
+-    return 0 ;
+-}
+-static inline int mark_buffer_notjournal_dirty(struct buffer_head *bh) {
+-  if (bh)
+-    clear_bit(BH_JDirty_wait, &bh->b_state) ;
+-  return 0 ;
+-}
+-static inline int mark_buffer_notjournal_new(struct buffer_head *bh) {
+-  if (bh) {
+-    clear_bit(BH_JNew, &bh->b_state) ;
+-  }
+-  return 0 ;
+-}
+ 
+ void add_save_link (struct reiserfs_transaction_handle * th,
+ 					struct inode * inode, int truncate);

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-sucks-1.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-sucks-1.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-sucks-1.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,1802 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: ReiserFS: Cleanup access of journal (cosmetic)
+## DP: Patch author: Jeff Mahoney <jeffm at novell.com>
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/18 23:07:32-07:00 jeffm at novell.com 
+#   [PATCH] ReiserFS: Cleanup access of journal (cosmetic)
+#   
+#   This patch cleans up fs/reiserfs/journal.c such that repeated uses of
+#   SB_JOURNAL(p_s_sb) are removed in favor of a local journal variable.  The
+#   compiler won't care, and it makes the code much easier to read.
+#   
+#   Signed-off-by: Jeff Mahoney <jeffm at novell.com>
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# fs/reiserfs/journal.c
+#   2004/10/18 22:28:07-07:00 jeffm at novell.com +375 -335
+#   ReiserFS: Cleanup access of journal (cosmetic)
+# 
+# fs/reiserfs/procfs.c
+#   2004/10/18 22:26:49-07:00 jeffm at novell.com +1 -1
+#   ReiserFS: Cleanup access of journal (cosmetic)
+# 
+# fs/reiserfs/super.c
+#   2004/10/18 22:28:07-07:00 jeffm at novell.com +5 -4
+#   ReiserFS: Cleanup access of journal (cosmetic)
+# 
+# include/linux/reiserfs_fs_sb.h
+#   2004/10/18 22:28:07-07:00 jeffm at novell.com +5 -11
+#   ReiserFS: Cleanup access of journal (cosmetic)
+# 
+diff -Nru a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
+--- a/fs/reiserfs/journal.c	2004-12-23 01:01:06 -08:00
++++ b/fs/reiserfs/journal.c	2004-12-23 01:01:06 -08:00
+@@ -111,7 +111,8 @@
+ static void flush_async_commits(void *p);
+ 
+ static void init_journal_hash(struct super_block *p_s_sb) {
+-  memset(SB_JOURNAL(p_s_sb)->j_hash_table, 0, JOURNAL_HASH_SIZE * sizeof(struct reiserfs_journal_cnode *)) ;
++  struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
++  memset(journal->j_hash_table, 0, JOURNAL_HASH_SIZE * sizeof(struct reiserfs_journal_cnode *)) ;
+ }
+ 
+ /*
+@@ -155,17 +156,18 @@
+ 
+ static struct reiserfs_bitmap_node *
+ get_bitmap_node(struct super_block *p_s_sb) {
++  struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
+   struct reiserfs_bitmap_node *bn = NULL;
+-  struct list_head *entry = SB_JOURNAL(p_s_sb)->j_bitmap_nodes.next ;
++  struct list_head *entry = journal->j_bitmap_nodes.next ;
+ 
+-  SB_JOURNAL(p_s_sb)->j_used_bitmap_nodes++ ;
++  journal->j_used_bitmap_nodes++ ;
+ repeat:
+ 
+-  if(entry != &SB_JOURNAL(p_s_sb)->j_bitmap_nodes) {
++  if(entry != &journal->j_bitmap_nodes) {
+     bn = list_entry(entry, struct reiserfs_bitmap_node, list) ;
+     list_del(entry) ;
+     memset(bn->data, 0, p_s_sb->s_blocksize) ;
+-    SB_JOURNAL(p_s_sb)->j_free_bitmap_nodes-- ;
++    journal->j_free_bitmap_nodes-- ;
+     return bn ;
+   }
+   bn = allocate_bitmap_node(p_s_sb) ;
+@@ -177,24 +179,26 @@
+ }
+ static inline void free_bitmap_node(struct super_block *p_s_sb,
+                                     struct reiserfs_bitmap_node *bn) {
+-  SB_JOURNAL(p_s_sb)->j_used_bitmap_nodes-- ;
+-  if (SB_JOURNAL(p_s_sb)->j_free_bitmap_nodes > REISERFS_MAX_BITMAP_NODES) {
++  struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
++  journal->j_used_bitmap_nodes-- ;
++  if (journal->j_free_bitmap_nodes > REISERFS_MAX_BITMAP_NODES) {
+     reiserfs_kfree(bn->data, p_s_sb->s_blocksize, p_s_sb) ;
+     reiserfs_kfree(bn, sizeof(struct reiserfs_bitmap_node), p_s_sb) ;
+   } else {
+-    list_add(&bn->list, &SB_JOURNAL(p_s_sb)->j_bitmap_nodes) ;
+-    SB_JOURNAL(p_s_sb)->j_free_bitmap_nodes++ ;
++    list_add(&bn->list, &journal->j_bitmap_nodes) ;
++    journal->j_free_bitmap_nodes++ ;
+   }
+ }
+ 
+ static void allocate_bitmap_nodes(struct super_block *p_s_sb) {
+   int i ;
++  struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
+   struct reiserfs_bitmap_node *bn = NULL ;
+   for (i = 0 ; i < REISERFS_MIN_BITMAP_NODES ; i++) {
+     bn = allocate_bitmap_node(p_s_sb) ;
+     if (bn) {
+-      list_add(&bn->list, &SB_JOURNAL(p_s_sb)->j_bitmap_nodes) ;
+-      SB_JOURNAL(p_s_sb)->j_free_bitmap_nodes++ ;
++      list_add(&bn->list, &journal->j_bitmap_nodes) ;
++      journal->j_free_bitmap_nodes++ ;
+     } else {
+       break ; // this is ok, we'll try again when more are needed 
+     }
+@@ -245,16 +249,17 @@
+ }
+ 
+ static int free_bitmap_nodes(struct super_block *p_s_sb) {
+-  struct list_head *next = SB_JOURNAL(p_s_sb)->j_bitmap_nodes.next ;
++  struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
++  struct list_head *next = journal->j_bitmap_nodes.next ;
+   struct reiserfs_bitmap_node *bn ;
+ 
+-  while(next != &SB_JOURNAL(p_s_sb)->j_bitmap_nodes) {
++  while(next != &journal->j_bitmap_nodes) {
+     bn = list_entry(next, struct reiserfs_bitmap_node, list) ;
+     list_del(next) ;
+     reiserfs_kfree(bn->data, p_s_sb->s_blocksize, p_s_sb) ;
+     reiserfs_kfree(bn, sizeof(struct reiserfs_bitmap_node), p_s_sb) ;
+-    next = SB_JOURNAL(p_s_sb)->j_bitmap_nodes.next ;
+-    SB_JOURNAL(p_s_sb)->j_free_bitmap_nodes-- ;
++    next = journal->j_bitmap_nodes.next ;
++    journal->j_free_bitmap_nodes-- ;
+   }
+ 
+   return 0 ;
+@@ -297,15 +302,16 @@
+ static struct reiserfs_list_bitmap *
+ get_list_bitmap(struct super_block *p_s_sb, struct reiserfs_journal_list *jl) {
+   int i,j ; 
++  struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
+   struct reiserfs_list_bitmap *jb = NULL ;
+ 
+   for (j = 0 ; j < (JOURNAL_NUM_BITMAPS * 3) ; j++) {
+-    i = SB_JOURNAL(p_s_sb)->j_list_bitmap_index ;
+-    SB_JOURNAL(p_s_sb)->j_list_bitmap_index = (i + 1) % JOURNAL_NUM_BITMAPS ;
+-    jb = SB_JOURNAL(p_s_sb)->j_list_bitmap + i ;
+-    if (SB_JOURNAL(p_s_sb)->j_list_bitmap[i].journal_list) {
+-      flush_commit_list(p_s_sb, SB_JOURNAL(p_s_sb)->j_list_bitmap[i].journal_list, 1) ;
+-      if (!SB_JOURNAL(p_s_sb)->j_list_bitmap[i].journal_list) {
++    i = journal->j_list_bitmap_index ;
++    journal->j_list_bitmap_index = (i + 1) % JOURNAL_NUM_BITMAPS ;
++    jb = journal->j_list_bitmap + i ;
++    if (journal->j_list_bitmap[i].journal_list) {
++      flush_commit_list(p_s_sb, journal->j_list_bitmap[i].journal_list, 1) ;
++      if (!journal->j_list_bitmap[i].journal_list) {
+ 	break ;
+       }
+     } else {
+@@ -350,22 +356,23 @@
+ */
+ static struct reiserfs_journal_cnode *get_cnode(struct super_block *p_s_sb) {
+   struct reiserfs_journal_cnode *cn ;
++  struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
+ 
+   reiserfs_check_lock_depth(p_s_sb, "get_cnode") ;
+ 
+-  if (SB_JOURNAL(p_s_sb)->j_cnode_free <= 0) {
++  if (journal->j_cnode_free <= 0) {
+     return NULL ;
+   }
+-  SB_JOURNAL(p_s_sb)->j_cnode_used++ ;
+-  SB_JOURNAL(p_s_sb)->j_cnode_free-- ;
+-  cn = SB_JOURNAL(p_s_sb)->j_cnode_free_list ;
++  journal->j_cnode_used++ ;
++  journal->j_cnode_free-- ;
++  cn = journal->j_cnode_free_list ;
+   if (!cn) {
+     return cn ;
+   }
+   if (cn->next) {
+     cn->next->prev = NULL ;
+   }
+-  SB_JOURNAL(p_s_sb)->j_cnode_free_list = cn->next ;
++  journal->j_cnode_free_list = cn->next ;
+   memset(cn, 0, sizeof(struct reiserfs_journal_cnode)) ;
+   return cn ;
+ }
+@@ -374,18 +381,19 @@
+ ** returns a cnode to the free list 
+ */
+ static void free_cnode(struct super_block *p_s_sb, struct reiserfs_journal_cnode *cn) {
++  struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
+ 
+   reiserfs_check_lock_depth(p_s_sb, "free_cnode") ;
+ 
+-  SB_JOURNAL(p_s_sb)->j_cnode_used-- ;
+-  SB_JOURNAL(p_s_sb)->j_cnode_free++ ;
++  journal->j_cnode_used-- ;
++  journal->j_cnode_free++ ;
+   /* memset(cn, 0, sizeof(struct reiserfs_journal_cnode)) ; */
+-  cn->next = SB_JOURNAL(p_s_sb)->j_cnode_free_list ;
+-  if (SB_JOURNAL(p_s_sb)->j_cnode_free_list) {
+-    SB_JOURNAL(p_s_sb)->j_cnode_free_list->prev = cn ;
++  cn->next = journal->j_cnode_free_list ;
++  if (journal->j_cnode_free_list) {
++    journal->j_cnode_free_list->prev = cn ;
+   }
+   cn->prev = NULL ; /* not needed with the memset, but I might kill the memset, and forget to do this */
+-  SB_JOURNAL(p_s_sb)->j_cnode_free_list = cn ;
++  journal->j_cnode_free_list = cn ;
+ }
+ 
+ static void clear_prepared_bits(struct buffer_head *bh) {
+@@ -424,9 +432,10 @@
+ 
+ /* returns a cnode with same size, block number and dev as bh in the current transaction hash.  NULL if not found */
+ static inline struct reiserfs_journal_cnode *get_journal_hash(struct super_block *p_s_sb, struct buffer_head *bh) {
++  struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
+   struct reiserfs_journal_cnode *cn ;
+   if (bh) {
+-    cn =  get_journal_hash_dev(p_s_sb, SB_JOURNAL(p_s_sb)->j_hash_table, bh->b_blocknr);
++    cn =  get_journal_hash_dev(p_s_sb, journal->j_hash_table, bh->b_blocknr);
+   }
+   else {
+     return (struct reiserfs_journal_cnode *)0 ;
+@@ -455,6 +464,7 @@
+ int reiserfs_in_journal(struct super_block *p_s_sb,
+                         int bmap_nr, int bit_nr, int search_all, 
+ 			b_blocknr_t *next_zero_bit) {
++  struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
+   struct reiserfs_journal_cnode *cn ;
+   struct reiserfs_list_bitmap *jb ;
+   int i ;
+@@ -470,7 +480,7 @@
+   if (search_all) {
+     for (i = 0 ; i < JOURNAL_NUM_BITMAPS ; i++) {
+       PROC_INFO_INC( p_s_sb, journal.in_journal_bitmap );
+-      jb = SB_JOURNAL(p_s_sb)->j_list_bitmap + i ;
++      jb = journal->j_list_bitmap + i ;
+       if (jb->journal_list && jb->bitmaps[bmap_nr] &&
+           test_bit(bit_nr, (unsigned long *)jb->bitmaps[bmap_nr]->data)) {
+ 	*next_zero_bit = find_next_zero_bit((unsigned long *)
+@@ -483,12 +493,12 @@
+ 
+   bl = bmap_nr * (p_s_sb->s_blocksize << 3) + bit_nr;
+   /* is it in any old transactions? */
+-  if (search_all && (cn = get_journal_hash_dev(p_s_sb, SB_JOURNAL(p_s_sb)->j_list_hash_table, bl))) {
++  if (search_all && (cn = get_journal_hash_dev(p_s_sb, journal->j_list_hash_table, bl))) {
+     return 1; 
+   }
+ 
+   /* is it in the current transaction.  This should never happen */
+-  if ((cn = get_journal_hash_dev(p_s_sb, SB_JOURNAL(p_s_sb)->j_hash_table, bl))) {
++  if ((cn = get_journal_hash_dev(p_s_sb, journal->j_hash_table, bl))) {
+     BUG();
+     return 1; 
+   }
+@@ -557,7 +567,8 @@
+ static int journal_list_still_alive(struct super_block *s,
+                                     unsigned long trans_id)
+ {
+-    struct list_head *entry = &SB_JOURNAL(s)->j_journal_list;
++    struct reiserfs_journal *journal = SB_JOURNAL (s);
++    struct list_head *entry = &journal->j_journal_list;
+     struct reiserfs_journal_list *jl;
+ 
+     if (!list_empty(entry)) {
+@@ -823,6 +834,7 @@
+ }
+ 
+ static int flush_older_commits(struct super_block *s, struct reiserfs_journal_list *jl) {
++    struct reiserfs_journal *journal = SB_JOURNAL (s);
+     struct reiserfs_journal_list *other_jl;
+     struct reiserfs_journal_list *first_jl;
+     struct list_head *entry;
+@@ -838,7 +850,7 @@
+     entry = jl->j_list.prev;
+     while(1) {
+ 	other_jl = JOURNAL_LIST_ENTRY(entry);
+-	if (entry == &SB_JOURNAL(s)->j_journal_list ||
++	if (entry == &journal->j_journal_list ||
+ 	    atomic_read(&other_jl->j_older_commits_done))
+ 	    break;
+ 
+@@ -875,7 +887,7 @@
+ 		}
+ 	    }
+ 	    entry = entry->next;
+-	    if (entry == &SB_JOURNAL(s)->j_journal_list)
++	    if (entry == &journal->j_journal_list)
+ 		return 0;
+ 	} else {
+ 	    return 0;
+@@ -903,6 +915,7 @@
+   int bn ;
+   struct buffer_head *tbh = NULL ;
+   unsigned long trans_id = jl->j_trans_id;
++  struct reiserfs_journal *journal = SB_JOURNAL (s);
+ 
+   reiserfs_check_lock_depth(s, "flush_commit_list") ;
+
+@@ -916,7 +929,7 @@
+   */
+   if (jl->j_len <= 0)
+     BUG();
+-  if (trans_id == SB_JOURNAL(s)->j_trans_id)
++  if (trans_id == journal->j_trans_id)
+     BUG();
+ 
+   get_journal_list(jl);
+@@ -947,8 +960,8 @@
+ 
+   if (!list_empty(&jl->j_bh_list)) {
+       unlock_kernel();
+-      write_ordered_buffers(&SB_JOURNAL(s)->j_dirty_buffers_lock,
+-                            SB_JOURNAL(s), jl, &jl->j_bh_list);
++      write_ordered_buffers(&journal->j_dirty_buffers_lock,
++                            journal, jl, &jl->j_bh_list);
+       lock_kernel();
+   }
+   if (!list_empty(&jl->j_bh_list))
+@@ -957,7 +970,7 @@
+    * for the description block and all the log blocks, submit any buffers
+    * that haven't already reached the disk
+    */
+-  atomic_inc(&SB_JOURNAL(s)->j_async_throttle);
++  atomic_inc(&journal->j_async_throttle);
+   for (i = 0 ; i < (jl->j_len + 1) ; i++) {
+     bn = SB_ONDISK_JOURNAL_1st_BLOCK(s) + (jl->j_start+i) %
+          SB_ONDISK_JOURNAL_SIZE(s);
+@@ -966,7 +979,7 @@
+ 	ll_rw_block(WRITE, 1, &tbh) ;
+     put_bh(tbh) ;
+   }
+-  atomic_dec(&SB_JOURNAL(s)->j_async_throttle);
++  atomic_dec(&journal->j_async_throttle);
+ 
+   /* wait on everything written so far before writing the commit
+    * if we are in barrier mode, send the commit down now
+@@ -1016,13 +1029,13 @@
+     reiserfs_panic(s, "journal-615: buffer write failed\n") ;
+   }
+   bforget(jl->j_commit_bh) ;
+-  if (SB_JOURNAL(s)->j_last_commit_id != 0 &&
+-     (jl->j_trans_id - SB_JOURNAL(s)->j_last_commit_id) != 1) {
++  if (journal->j_last_commit_id != 0 &&
++     (jl->j_trans_id - journal->j_last_commit_id) != 1) {
+       reiserfs_warning(s, "clm-2200: last commit %lu, current %lu",
+-                       SB_JOURNAL(s)->j_last_commit_id,
++                       journal->j_last_commit_id,
+ 		       jl->j_trans_id);
+   }
+-  SB_JOURNAL(s)->j_last_commit_id = jl->j_trans_id;
++  journal->j_last_commit_id = jl->j_trans_id;
+ 
+   /* now, every commit block is on the disk.  It is safe to allow blocks freed during this transaction to be reallocated */
+   cleanup_freed_for_journal_list(s, jl) ;
+@@ -1067,6 +1080,7 @@
+ ** block to be reallocated for data blocks if it had been deleted.
+ */
+ static void remove_all_from_journal_list(struct super_block *p_s_sb, struct reiserfs_journal_list *jl, int debug) {
++  struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
+   struct reiserfs_journal_cnode *cn, *last ;
+   cn = jl->j_realblock ;
+ 
+@@ -1080,7 +1094,7 @@
+                          cn->bh ? 1: 0, cn->state) ;
+       }
+       cn->state = 0 ;
+-      remove_journal_hash(p_s_sb, SB_JOURNAL(p_s_sb)->j_list_hash_table, jl, cn->blocknr, 1) ;
++      remove_journal_hash(p_s_sb, journal->j_list_hash_table, jl, cn->blocknr, 1) ;
+     }
+     last = cn ;
+     cn = cn->next ;
+@@ -1098,22 +1112,23 @@
+ */
+ static int _update_journal_header_block(struct super_block *p_s_sb, unsigned long offset, unsigned long trans_id) {
+   struct reiserfs_journal_header *jh ;
+-  if (trans_id >= SB_JOURNAL(p_s_sb)->j_last_flush_trans_id) {
+-    if (buffer_locked((SB_JOURNAL(p_s_sb)->j_header_bh)))  {
+-      wait_on_buffer((SB_JOURNAL(p_s_sb)->j_header_bh)) ;
+-      if (!buffer_uptodate(SB_JOURNAL(p_s_sb)->j_header_bh)) {
++  struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
++  if (trans_id >= journal->j_last_flush_trans_id) {
++    if (buffer_locked((journal->j_header_bh)))  {
++      wait_on_buffer((journal->j_header_bh)) ;
++      if (!buffer_uptodate(journal->j_header_bh)) {
+         reiserfs_panic(p_s_sb, "journal-699: buffer write failed\n") ;
+       }
+     }
+-    SB_JOURNAL(p_s_sb)->j_last_flush_trans_id = trans_id ;
+-    SB_JOURNAL(p_s_sb)->j_first_unflushed_offset = offset ;
+-    jh = (struct reiserfs_journal_header *)(SB_JOURNAL(p_s_sb)->j_header_bh->b_data) ;
++    journal->j_last_flush_trans_id = trans_id ;
++    journal->j_first_unflushed_offset = offset ;
++    jh = (struct reiserfs_journal_header *)(journal->j_header_bh->b_data) ;
+     jh->j_last_flush_trans_id = cpu_to_le32(trans_id) ;
+     jh->j_first_unflushed_offset = cpu_to_le32(offset) ;
+-    jh->j_mount_id = cpu_to_le32(SB_JOURNAL(p_s_sb)->j_mount_id) ;
++    jh->j_mount_id = cpu_to_le32(journal->j_mount_id) ;
+-    set_buffer_dirty(SB_JOURNAL(p_s_sb)->j_header_bh) ;
+-    sync_dirty_buffer(SB_JOURNAL(p_s_sb)->j_header_bh) ;
++    set_buffer_dirty(journal->j_header_bh) ;
++    sync_dirty_buffer(journal->j_header_bh) ;
+-    if (!buffer_uptodate(SB_JOURNAL(p_s_sb)->j_header_bh)) {
++    if (!buffer_uptodate(journal->j_header_bh)) {
+       reiserfs_warning (p_s_sb, "journal-837: IO error during journal replay");
+       return -EIO ;
+     }
+@@ -1153,13 +1168,14 @@
+ {
+     struct list_head *entry;
+     struct reiserfs_journal_list *other_jl ;
++    struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
+     unsigned long trans_id = jl->j_trans_id;
+ 
+     /* we know we are the only ones flushing things, no extra race
+      * protection is required.
+      */
+ restart:
+-    entry = SB_JOURNAL(p_s_sb)->j_journal_list.next;
++    entry = journal->j_journal_list.next;
+     other_jl = JOURNAL_LIST_ENTRY(entry);
+     if (other_jl->j_trans_id < trans_id) {
+ 	/* do not flush all */
+@@ -1173,9 +1189,10 @@
+ 
+ static void del_from_work_list(struct super_block *s,
+                                struct reiserfs_journal_list *jl) {
++    struct reiserfs_journal *journal = SB_JOURNAL (s);
+     if (!list_empty(&jl->j_working_list)) {
+ 	list_del_init(&jl->j_working_list);
+-	SB_JOURNAL(s)->j_num_work_lists--;
++	journal->j_num_work_lists--;
+     }
+ }
+ 
+@@ -1197,27 +1214,28 @@
+   int was_dirty = 0 ;
+   struct buffer_head *saved_bh ; 
+   unsigned long j_len_saved = jl->j_len ;
++  struct reiserfs_journal *journal = SB_JOURNAL (s);
+ 
+   if (j_len_saved <= 0) {
+     BUG();
+   }
+ 
+-  if (atomic_read(&SB_JOURNAL(s)->j_wcount) != 0) {
++  if (atomic_read(&journal->j_wcount) != 0) {
+     reiserfs_warning(s, "clm-2048: flush_journal_list called with wcount %d",
+-                      atomic_read(&SB_JOURNAL(s)->j_wcount)) ;
++                      atomic_read(&journal->j_wcount)) ;
+   }
+   if (jl->j_trans_id == 0)
+     BUG();
+ 
+   /* if flushall == 0, the lock is already held */
+   if (flushall) {
+-      down(&SB_JOURNAL(s)->j_flush_sem);
+-  } else if (!down_trylock(&SB_JOURNAL(s)->j_flush_sem)) {
++      down(&journal->j_flush_sem);
++  } else if (!down_trylock(&journal->j_flush_sem)) {
+       BUG();
+   }
+ 
+   count = 0 ;
+-  if (j_len_saved > SB_JOURNAL_TRANS_MAX(s)) {
++  if (j_len_saved > journal->j_trans_max) {
+     reiserfs_panic(s, "journal-715: flush_journal_list, length is %lu, trans id %lu\n", j_len_saved, jl->j_trans_id);
+     return 0 ;
+   }
+@@ -1245,7 +1263,7 @@
+   /* loop through each cnode, see if we need to write it, 
+   ** or wait on a more recent transaction, or just ignore it 
+   */
+-  if (atomic_read(&(SB_JOURNAL(s)->j_wcount)) != 0) {
++  if (atomic_read(&(journal->j_wcount)) != 0) {
+     reiserfs_panic(s, "journal-844: panic journal list is flushing, wcount is not 0\n") ;
+   }
+   cn = jl->j_realblock ;
+@@ -1385,16 +1403,16 @@
+   }
+   remove_all_from_journal_list(s, jl, 0) ;
+   list_del(&jl->j_list);
+-  SB_JOURNAL(s)->j_num_lists--;
++  journal->j_num_lists--;
+   del_from_work_list(s, jl);
+ 
+-  if (SB_JOURNAL(s)->j_last_flush_id != 0 &&
+-     (jl->j_trans_id - SB_JOURNAL(s)->j_last_flush_id) != 1) {
++  if (journal->j_last_flush_id != 0 &&
++     (jl->j_trans_id - journal->j_last_flush_id) != 1) {
+       reiserfs_warning(s, "clm-2201: last flush %lu, current %lu",
+-                       SB_JOURNAL(s)->j_last_flush_id,
++                       journal->j_last_flush_id,
+ 		       jl->j_trans_id);
+   }
+-  SB_JOURNAL(s)->j_last_flush_id = jl->j_trans_id;
++  journal->j_last_flush_id = jl->j_trans_id;
+ 
+   /* not strictly required since we are freeing the list, but it should
+    * help find code using dead lists later on
+@@ -1408,7 +1426,7 @@
+   jl->j_state = 0;
+   put_journal_list(s, jl);
+   if (flushall)
+-    up(&SB_JOURNAL(s)->j_flush_sem);
++    up(&journal->j_flush_sem);
+   return 0 ;
+ } 
+ 
+@@ -1510,9 +1528,10 @@
+     unsigned long orig_trans_id = jl->j_trans_id;
+     struct buffer_chunk chunk;
+     struct list_head *entry;
++    struct reiserfs_journal *journal = SB_JOURNAL (s);
+     chunk.nr = 0;
+ 
+-    down(&SB_JOURNAL(s)->j_flush_sem);
++    down(&journal->j_flush_sem);
+     if (!journal_list_still_alive(s, orig_trans_id)) {
+ 	goto done;
+     }
+@@ -1538,7 +1557,7 @@
+ 	entry = jl->j_list.next;
+ 
+ 	/* did we wrap? */
+-	if (entry == &SB_JOURNAL(s)->j_journal_list) {
++	if (entry == &journal->j_journal_list) {
+ 	    break;
+         }
+ 	jl = JOURNAL_LIST_ENTRY(entry);
+@@ -1552,7 +1571,7 @@
+     }
+ 
+ done:
+-    up(&SB_JOURNAL(s)->j_flush_sem);
++    up(&journal->j_flush_sem);
+     return ret;
+ }
+ 
+@@ -1575,6 +1594,7 @@
+     struct reiserfs_journal_list *tjl;
+     struct reiserfs_journal_list *flush_jl;
+     unsigned long trans_id;
++    struct reiserfs_journal *journal = SB_JOURNAL (s);
+ 
+     flush_jl = tjl = jl;
+ 
+@@ -1593,7 +1613,7 @@
+ 	}
+ 	len += cur_len;
+ 	flush_jl = tjl;
+-	if (tjl->j_list.next == &SB_JOURNAL(s)->j_journal_list)
++	if (tjl->j_list.next == &journal->j_journal_list)
+ 	    break;
+ 	tjl = JOURNAL_LIST_ENTRY(tjl->j_list.next);
+     }
+@@ -1649,21 +1669,22 @@
+ }
+ 
+ static void free_journal_ram(struct super_block *p_s_sb) {
+-  reiserfs_kfree(SB_JOURNAL(p_s_sb)->j_current_jl,
++  struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
++  reiserfs_kfree(journal->j_current_jl,
+                  sizeof(struct reiserfs_journal_list), p_s_sb);
+-  SB_JOURNAL(p_s_sb)->j_num_lists--;
++  journal->j_num_lists--;
+ 
+-  vfree(SB_JOURNAL(p_s_sb)->j_cnode_free_orig) ;
+-  free_list_bitmaps(p_s_sb, SB_JOURNAL(p_s_sb)->j_list_bitmap) ;
++  vfree(journal->j_cnode_free_orig) ;
++  free_list_bitmaps(p_s_sb, journal->j_list_bitmap) ;
+   free_bitmap_nodes(p_s_sb) ; /* must be after free_list_bitmaps */
+-  if (SB_JOURNAL(p_s_sb)->j_header_bh) {
+-    brelse(SB_JOURNAL(p_s_sb)->j_header_bh) ;
++  if (journal->j_header_bh) {
++    brelse(journal->j_header_bh) ;
+   }
+   /* j_header_bh is on the journal dev, make sure not to release the journal
+    * dev until we brelse j_header_bh
+    */
+-  release_journal_dev(p_s_sb, SB_JOURNAL(p_s_sb));
+-  vfree(SB_JOURNAL(p_s_sb)) ;
++  release_journal_dev(p_s_sb, journal);
++  vfree(journal) ;
+ }
+ 
+ /*
+@@ -1718,7 +1739,7 @@
+ 			               struct reiserfs_journal_commit *commit) {
+   if (get_commit_trans_id (commit) != get_desc_trans_id (desc) || 
+       get_commit_trans_len (commit) != get_desc_trans_len (desc) || 
+-      get_commit_trans_len (commit) > SB_JOURNAL_TRANS_MAX(p_s_sb) || 
++      get_commit_trans_len (commit) > SB_JOURNAL(p_s_sb)->j_trans_max ||
+       get_commit_trans_len (commit) <= 0 
+   ) {
+     return 1 ;
+@@ -1754,7 +1775,7 @@
+ 		     *newest_mount_id) ;
+       return -1 ;
+     }
+-    if ( get_desc_trans_len(desc) > SB_JOURNAL_TRANS_MAX(p_s_sb) ) {
++    if ( get_desc_trans_len(desc) > SB_JOURNAL(p_s_sb)->j_trans_max ) {
+       reiserfs_warning(p_s_sb, "journal-2018: Bad transaction length %d encountered, ignoring transaction", get_desc_trans_len(desc));
+       return -1 ;
+     }
+@@ -1807,6 +1828,7 @@
+ */
+ static int journal_read_transaction(struct super_block *p_s_sb, unsigned long cur_dblock, unsigned long oldest_start, 
+ 				    unsigned long oldest_trans_id, unsigned long newest_mount_id) {
++  struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
+   struct reiserfs_journal_desc *desc ;
+   struct reiserfs_journal_commit *commit ;
+   unsigned long trans_id = 0 ;
+@@ -1939,9 +1961,9 @@
+ 		 cur_dblock -  SB_ONDISK_JOURNAL_1st_BLOCK(p_s_sb)) ;
+   
+   /* init starting values for the first transaction, in case this is the last transaction to be replayed. */
+-  SB_JOURNAL(p_s_sb)->j_start = cur_dblock - SB_ONDISK_JOURNAL_1st_BLOCK(p_s_sb) ;
+-  SB_JOURNAL(p_s_sb)->j_last_flush_trans_id = trans_id ;
+-  SB_JOURNAL(p_s_sb)->j_trans_id = trans_id + 1;
++  journal->j_start = cur_dblock - SB_ONDISK_JOURNAL_1st_BLOCK(p_s_sb) ;
++  journal->j_last_flush_trans_id = trans_id ;
++  journal->j_trans_id = trans_id + 1;
+   brelse(c_bh) ;
+   brelse(d_bh) ;
+   reiserfs_kfree(log_blocks, le32_to_cpu(desc->j_len) * sizeof(struct buffer_head *), p_s_sb) ;
+@@ -2001,6 +2023,7 @@
+ ** On exit, it sets things up so the first transaction will work correctly.
+ */
+ static int journal_read(struct super_block *p_s_sb) {
++  struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
+   struct reiserfs_journal_desc *desc ;
+   unsigned long oldest_trans_id = 0;
+   unsigned long oldest_invalid_trans_id = 0 ;
+@@ -2018,20 +2041,20 @@
+ 
+   cur_dblock = SB_ONDISK_JOURNAL_1st_BLOCK(p_s_sb) ;
+   reiserfs_info (p_s_sb, "checking transaction log (%s)\n",
+-	 bdevname(SB_JOURNAL(p_s_sb)->j_dev_bd, b));
++	 bdevname(journal->j_dev_bd, b));
+   start = get_seconds();
+ 
+   /* step 1, read in the journal header block.  Check the transaction it says 
+   ** is the first unflushed, and if that transaction is not valid, 
+   ** replay is done
+   */
+-  SB_JOURNAL(p_s_sb)->j_header_bh = journal_bread(p_s_sb,
++  journal->j_header_bh = journal_bread(p_s_sb,
+ 					   SB_ONDISK_JOURNAL_1st_BLOCK(p_s_sb) + 
+ 					   SB_ONDISK_JOURNAL_SIZE(p_s_sb));
+-  if (!SB_JOURNAL(p_s_sb)->j_header_bh) {
++  if (!journal->j_header_bh) {
+     return 1 ;
+   }
+-  jh = (struct reiserfs_journal_header *)(SB_JOURNAL(p_s_sb)->j_header_bh->b_data) ;
++  jh = (struct reiserfs_journal_header *)(journal->j_header_bh->b_data) ;
+   if (le32_to_cpu(jh->j_first_unflushed_offset) >= 0 && 
+       le32_to_cpu(jh->j_first_unflushed_offset) < SB_ONDISK_JOURNAL_SIZE(p_s_sb) && 
+       le32_to_cpu(jh->j_last_flush_trans_id) > 0) {
+@@ -2070,7 +2093,7 @@
+   while(continue_replay && cur_dblock < (SB_ONDISK_JOURNAL_1st_BLOCK(p_s_sb) + SB_ONDISK_JOURNAL_SIZE(p_s_sb))) {
+     /* Note that it is required for blocksize of primary fs device and journal
+        device to be the same */
+-    d_bh = reiserfs_breada(SB_JOURNAL(p_s_sb)->j_dev_bd, cur_dblock, p_s_sb->s_blocksize,
++    d_bh = reiserfs_breada(journal->j_dev_bd, cur_dblock, p_s_sb->s_blocksize,
+ 			   SB_ONDISK_JOURNAL_1st_BLOCK(p_s_sb) + SB_ONDISK_JOURNAL_SIZE(p_s_sb)) ;
+     ret = journal_transaction_is_valid(p_s_sb, d_bh, &oldest_invalid_trans_id, &newest_mount_id) ;
+     if (ret == 1) {
+@@ -2121,7 +2144,7 @@
+     } else if (ret != 0) {
+       break ;
+     }
+-    cur_dblock = SB_ONDISK_JOURNAL_1st_BLOCK(p_s_sb) + SB_JOURNAL(p_s_sb)->j_start ;
++    cur_dblock = SB_ONDISK_JOURNAL_1st_BLOCK(p_s_sb) + journal->j_start ;
+     replay_count++ ;
+    if (cur_dblock == oldest_start)
+         break;
+@@ -2136,23 +2159,23 @@
+   ** copy the trans_id from the header
+   */
+   if (valid_journal_header && replay_count == 0) { 
+-    SB_JOURNAL(p_s_sb)->j_start = le32_to_cpu(jh->j_first_unflushed_offset) ;
+-    SB_JOURNAL(p_s_sb)->j_trans_id = le32_to_cpu(jh->j_last_flush_trans_id) + 1;
+-    SB_JOURNAL(p_s_sb)->j_last_flush_trans_id = le32_to_cpu(jh->j_last_flush_trans_id) ;
+-    SB_JOURNAL(p_s_sb)->j_mount_id = le32_to_cpu(jh->j_mount_id) + 1;
++    journal->j_start = le32_to_cpu(jh->j_first_unflushed_offset) ;
++    journal->j_trans_id = le32_to_cpu(jh->j_last_flush_trans_id) + 1;
++    journal->j_last_flush_trans_id = le32_to_cpu(jh->j_last_flush_trans_id) ;
++    journal->j_mount_id = le32_to_cpu(jh->j_mount_id) + 1;
+   } else {
+-    SB_JOURNAL(p_s_sb)->j_mount_id = newest_mount_id + 1 ;
++    journal->j_mount_id = newest_mount_id + 1 ;
+   }
+   reiserfs_debug(p_s_sb, REISERFS_DEBUG_CODE, "journal-1299: Setting "
+-                 "newest_mount_id to %lu", SB_JOURNAL(p_s_sb)->j_mount_id) ;
+-  SB_JOURNAL(p_s_sb)->j_first_unflushed_offset = SB_JOURNAL(p_s_sb)->j_start ; 
++                 "newest_mount_id to %lu", journal->j_mount_id) ;
++  journal->j_first_unflushed_offset = journal->j_start ;
+   if (replay_count > 0) {
+     reiserfs_info (p_s_sb, "replayed %d transactions in %lu seconds\n",
+ 		   replay_count, get_seconds() - start) ;
+   }
+   if (!bdev_read_only(p_s_sb->s_bdev) && 
+-       _update_journal_header_block(p_s_sb, SB_JOURNAL(p_s_sb)->j_start, 
+-                                   SB_JOURNAL(p_s_sb)->j_last_flush_trans_id))
++       _update_journal_header_block(p_s_sb, journal->j_start,
++                                   journal->j_last_flush_trans_id))
+   {
+       /* replay failed, caller must call free_journal_ram and abort
+       ** the mount
+@@ -2287,12 +2310,12 @@
+ 	return 1 ;
+     }
+     memset(journal, 0, sizeof(struct reiserfs_journal)) ;
+-    INIT_LIST_HEAD(&SB_JOURNAL(p_s_sb)->j_bitmap_nodes) ;
+-    INIT_LIST_HEAD (&SB_JOURNAL(p_s_sb)->j_prealloc_list);
+-    INIT_LIST_HEAD(&SB_JOURNAL(p_s_sb)->j_working_list);
+-    INIT_LIST_HEAD(&SB_JOURNAL(p_s_sb)->j_journal_list);
++    INIT_LIST_HEAD(&journal->j_bitmap_nodes) ;
++    INIT_LIST_HEAD (&journal->j_prealloc_list);
++    INIT_LIST_HEAD(&journal->j_working_list);
++    INIT_LIST_HEAD(&journal->j_journal_list);
+     if (reiserfs_allocate_list_bitmaps(p_s_sb,
+-				       SB_JOURNAL(p_s_sb)->j_list_bitmap,
++				       journal->j_list_bitmap,
+  				       SB_BMAP_NR(p_s_sb)))
+ 	goto free_and_return ;
+     allocate_bitmap_nodes(p_s_sb) ;
+@@ -2337,108 +2360,108 @@
+ 			   "(device %s) does not match to magic found in super "
+ 			   "block %x",
+ 			   jh->jh_journal.jp_journal_magic,
+-			   bdevname( SB_JOURNAL(p_s_sb)->j_dev_bd, b),
++			   bdevname( journal->j_dev_bd, b),
+ 			   sb_jp_journal_magic(rs));
+ 	 brelse (bhjh);
+ 	 goto free_and_return;
+   }
+      
+-  SB_JOURNAL_TRANS_MAX(p_s_sb)      = le32_to_cpu (jh->jh_journal.jp_journal_trans_max);
+-  SB_JOURNAL_MAX_BATCH(p_s_sb)      = le32_to_cpu (jh->jh_journal.jp_journal_max_batch);
+-  SB_JOURNAL_MAX_COMMIT_AGE(p_s_sb) = le32_to_cpu (jh->jh_journal.jp_journal_max_commit_age);
+-  SB_JOURNAL_MAX_TRANS_AGE(p_s_sb)  = JOURNAL_MAX_TRANS_AGE;
++  journal->j_trans_max      = le32_to_cpu (jh->jh_journal.jp_journal_trans_max);
++  journal->j_max_batch      = le32_to_cpu (jh->jh_journal.jp_journal_max_batch);
++  journal->j_max_commit_age = le32_to_cpu (jh->jh_journal.jp_journal_max_commit_age);
++  journal->j_max_trans_age = JOURNAL_MAX_TRANS_AGE;
+ 
+-  if (SB_JOURNAL_TRANS_MAX(p_s_sb)) {
++  if (journal->j_trans_max) {
+     /* make sure these parameters are available, assign it if they are not */
+-    __u32 initial = SB_JOURNAL_TRANS_MAX(p_s_sb);
++    __u32 initial = journal->j_trans_max;
+     __u32 ratio = 1;
+     
+     if (p_s_sb->s_blocksize < 4096)
+       ratio = 4096 / p_s_sb->s_blocksize;
+     
+-    if (SB_ONDISK_JOURNAL_SIZE(p_s_sb)/SB_JOURNAL_TRANS_MAX(p_s_sb) < JOURNAL_MIN_RATIO)
+-      SB_JOURNAL_TRANS_MAX(p_s_sb) = SB_ONDISK_JOURNAL_SIZE(p_s_sb) / JOURNAL_MIN_RATIO;
+-    if (SB_JOURNAL_TRANS_MAX(p_s_sb) > JOURNAL_TRANS_MAX_DEFAULT / ratio)
+-      SB_JOURNAL_TRANS_MAX(p_s_sb) = JOURNAL_TRANS_MAX_DEFAULT / ratio;
+-    if (SB_JOURNAL_TRANS_MAX(p_s_sb) < JOURNAL_TRANS_MIN_DEFAULT / ratio)
+-      SB_JOURNAL_TRANS_MAX(p_s_sb) = JOURNAL_TRANS_MIN_DEFAULT / ratio;
++    if (SB_ONDISK_JOURNAL_SIZE(p_s_sb)/journal->j_trans_max < JOURNAL_MIN_RATIO)
++      journal->j_trans_max = SB_ONDISK_JOURNAL_SIZE(p_s_sb) / JOURNAL_MIN_RATIO;
++    if (journal->j_trans_max > JOURNAL_TRANS_MAX_DEFAULT / ratio)
++      journal->j_trans_max = JOURNAL_TRANS_MAX_DEFAULT / ratio;
++    if (journal->j_trans_max < JOURNAL_TRANS_MIN_DEFAULT / ratio)
++      journal->j_trans_max = JOURNAL_TRANS_MIN_DEFAULT / ratio;
+     
+-    if (SB_JOURNAL_TRANS_MAX(p_s_sb) != initial)
++    if (journal->j_trans_max != initial)
+       reiserfs_warning (p_s_sb, "sh-461: journal_init: wrong transaction max size (%u). Changed to %u",
+-	      initial, SB_JOURNAL_TRANS_MAX(p_s_sb));
++	      initial, journal->j_trans_max);
+ 
+-    SB_JOURNAL_MAX_BATCH(p_s_sb) = SB_JOURNAL_TRANS_MAX(p_s_sb)*
++    journal->j_max_batch = journal->j_trans_max*
+       JOURNAL_MAX_BATCH_DEFAULT/JOURNAL_TRANS_MAX_DEFAULT;
+   }  
+   
+-  if (!SB_JOURNAL_TRANS_MAX(p_s_sb)) {
++  if (!journal->j_trans_max) {
+     /*we have the file system was created by old version of mkreiserfs 
+       so this field contains zero value */
+-    SB_JOURNAL_TRANS_MAX(p_s_sb)      = JOURNAL_TRANS_MAX_DEFAULT ;
+-    SB_JOURNAL_MAX_BATCH(p_s_sb)      = JOURNAL_MAX_BATCH_DEFAULT ;  
+-    SB_JOURNAL_MAX_COMMIT_AGE(p_s_sb) = JOURNAL_MAX_COMMIT_AGE ;
++    journal->j_trans_max      = JOURNAL_TRANS_MAX_DEFAULT ;
++    journal->j_max_batch      = JOURNAL_MAX_BATCH_DEFAULT ;
++    journal->j_max_commit_age = JOURNAL_MAX_COMMIT_AGE ;
+     
+     /* for blocksize >= 4096 - max transaction size is 1024. For block size < 4096
+        trans max size is decreased proportionally */
+     if (p_s_sb->s_blocksize < 4096) {
+-      SB_JOURNAL_TRANS_MAX(p_s_sb) /= (4096 / p_s_sb->s_blocksize) ;
+-      SB_JOURNAL_MAX_BATCH(p_s_sb) = (SB_JOURNAL_TRANS_MAX(p_s_sb)) * 9 / 10 ;
++      journal->j_trans_max /= (4096 / p_s_sb->s_blocksize) ;
++      journal->j_max_batch = (journal->j_trans_max) * 9 / 10 ;
+     }
+   }
+ 
+-  SB_JOURNAL_DEFAULT_MAX_COMMIT_AGE(p_s_sb) = SB_JOURNAL_MAX_COMMIT_AGE(p_s_sb);
++  journal->j_default_max_commit_age = journal->j_max_commit_age;
+ 
+   if (commit_max_age != 0) {
+-      SB_JOURNAL_MAX_COMMIT_AGE(p_s_sb) = commit_max_age;
+-      SB_JOURNAL_MAX_TRANS_AGE(p_s_sb) = commit_max_age;
++      journal->j_max_commit_age = commit_max_age;
++      journal->j_max_trans_age = commit_max_age;
+   }
+ 
+   reiserfs_info (p_s_sb, "journal params: device %s, size %u, "
+ 		 "journal first block %u, max trans len %u, max batch %u, "
+ 		 "max commit age %u, max trans age %u\n",
+-		 bdevname( SB_JOURNAL(p_s_sb)->j_dev_bd, b),
++		 bdevname( journal->j_dev_bd, b),
+ 		 SB_ONDISK_JOURNAL_SIZE(p_s_sb),
+ 		 SB_ONDISK_JOURNAL_1st_BLOCK(p_s_sb),
+-		 SB_JOURNAL_TRANS_MAX(p_s_sb),
+-		 SB_JOURNAL_MAX_BATCH(p_s_sb),
+-		 SB_JOURNAL_MAX_COMMIT_AGE(p_s_sb),
+-		 SB_JOURNAL_MAX_TRANS_AGE(p_s_sb));
++		 journal->j_trans_max,
++		 journal->j_max_batch,
++		 journal->j_max_commit_age,
++		 journal->j_max_trans_age);
+ 
+   brelse (bhjh);
+      
+-  SB_JOURNAL(p_s_sb)->j_list_bitmap_index = 0 ;
++  journal->j_list_bitmap_index = 0 ;
+   journal_list_init(p_s_sb) ;
+ 
+-  memset(SB_JOURNAL(p_s_sb)->j_list_hash_table, 0, JOURNAL_HASH_SIZE * sizeof(struct reiserfs_journal_cnode *)) ;
++  memset(journal->j_list_hash_table, 0, JOURNAL_HASH_SIZE * sizeof(struct reiserfs_journal_cnode *)) ;
+ 
+-  INIT_LIST_HEAD(&SB_JOURNAL(p_s_sb)->j_dirty_buffers) ;
+-  spin_lock_init(&SB_JOURNAL(p_s_sb)->j_dirty_buffers_lock) ;
++  INIT_LIST_HEAD(&journal->j_dirty_buffers) ;
++  spin_lock_init(&journal->j_dirty_buffers_lock) ;
+ 
+-  SB_JOURNAL(p_s_sb)->j_start = 0 ;
+-  SB_JOURNAL(p_s_sb)->j_len = 0 ;
+-  SB_JOURNAL(p_s_sb)->j_len_alloc = 0 ;
+-  atomic_set(&(SB_JOURNAL(p_s_sb)->j_wcount), 0) ;
+-  atomic_set(&(SB_JOURNAL(p_s_sb)->j_async_throttle), 0) ;
+-  SB_JOURNAL(p_s_sb)->j_bcount = 0 ;	  
+-  SB_JOURNAL(p_s_sb)->j_trans_start_time = 0 ;	  
+-  SB_JOURNAL(p_s_sb)->j_last = NULL ;	  
+-  SB_JOURNAL(p_s_sb)->j_first = NULL ;     
+-  init_waitqueue_head(&(SB_JOURNAL(p_s_sb)->j_join_wait)) ;
+-  sema_init(&SB_JOURNAL(p_s_sb)->j_lock, 1);
+-  sema_init(&SB_JOURNAL(p_s_sb)->j_flush_sem, 1);
+-
+-  SB_JOURNAL(p_s_sb)->j_trans_id = 10 ;  
+-  SB_JOURNAL(p_s_sb)->j_mount_id = 10 ; 
+-  SB_JOURNAL(p_s_sb)->j_state = 0 ;
+-  atomic_set(&(SB_JOURNAL(p_s_sb)->j_jlock), 0) ;
+-  SB_JOURNAL(p_s_sb)->j_cnode_free_list = allocate_cnodes(num_cnodes) ;
+-  SB_JOURNAL(p_s_sb)->j_cnode_free_orig = SB_JOURNAL(p_s_sb)->j_cnode_free_list ;
+-  SB_JOURNAL(p_s_sb)->j_cnode_free = SB_JOURNAL(p_s_sb)->j_cnode_free_list ? num_cnodes : 0 ;
+-  SB_JOURNAL(p_s_sb)->j_cnode_used = 0 ;
+-  SB_JOURNAL(p_s_sb)->j_must_wait = 0 ;
++  journal->j_start = 0 ;
++  journal->j_len = 0 ;
++  journal->j_len_alloc = 0 ;
++  atomic_set(&(journal->j_wcount), 0) ;
++  atomic_set(&(journal->j_async_throttle), 0) ;
++  journal->j_bcount = 0 ;
++  journal->j_trans_start_time = 0 ;
++  journal->j_last = NULL ;
++  journal->j_first = NULL ;
++  init_waitqueue_head(&(journal->j_join_wait)) ;
++  sema_init(&journal->j_lock, 1);
++  sema_init(&journal->j_flush_sem, 1);
++
++  journal->j_trans_id = 10 ;
++  journal->j_mount_id = 10 ;
++  journal->j_state = 0 ;
++  atomic_set(&(journal->j_jlock), 0) ;
++  journal->j_cnode_free_list = allocate_cnodes(num_cnodes) ;
++  journal->j_cnode_free_orig = journal->j_cnode_free_list ;
++  journal->j_cnode_free = journal->j_cnode_free_list ? num_cnodes : 0 ;
++  journal->j_cnode_used = 0 ;
++  journal->j_must_wait = 0 ;
+ 
+   init_journal_hash(p_s_sb) ;
+-  jl = SB_JOURNAL(p_s_sb)->j_current_jl;
++  jl = journal->j_current_jl;
+   jl->j_list_bitmap = get_list_bitmap(p_s_sb, jl);
+   if (!jl->j_list_bitmap) {
+     reiserfs_warning(p_s_sb, "journal-2005, get_list_bitmap failed for journal list 0") ;
+@@ -2466,15 +2489,16 @@
+ ** transaction
+ */
+ int journal_transaction_should_end(struct reiserfs_transaction_handle *th, int new_alloc) {
++  struct reiserfs_journal *journal = SB_JOURNAL (th->t_super);
+   time_t now = get_seconds() ;
+   /* cannot restart while nested */
+   if (th->t_refcount > 1)
+     return 0 ;
+-  if ( SB_JOURNAL(th->t_super)->j_must_wait > 0 ||
+-       (SB_JOURNAL(th->t_super)->j_len_alloc + new_alloc) >= SB_JOURNAL_MAX_BATCH(th->t_super) || 
+-       atomic_read(&(SB_JOURNAL(th->t_super)->j_jlock)) ||
+-      (now - SB_JOURNAL(th->t_super)->j_trans_start_time) > SB_JOURNAL_MAX_TRANS_AGE(th->t_super) ||
+-       SB_JOURNAL(th->t_super)->j_cnode_free < (SB_JOURNAL_TRANS_MAX(th->t_super) * 3)) { 
++  if ( journal->j_must_wait > 0 ||
++       (journal->j_len_alloc + new_alloc) >= journal->j_max_batch ||
++       atomic_read(&(journal->j_jlock)) ||
++      (now - journal->j_trans_start_time) > journal->j_max_trans_age ||
++       journal->j_cnode_free < (journal->j_trans_max * 3)) {
+     return 1 ;
+   }
+   return 0 ;
+@@ -2484,9 +2508,9 @@
+ ** kernel_lock to be held
+ */
+ void reiserfs_block_writes(struct reiserfs_transaction_handle *th) {
+-    struct super_block *s = th->t_super ;
+-    SB_JOURNAL(s)->j_must_wait = 1 ;
+-    set_bit(WRITERS_BLOCKED, &SB_JOURNAL(s)->j_state) ;
++    struct reiserfs_journal *journal = SB_JOURNAL (th->t_super);
++    journal->j_must_wait = 1 ;
++    set_bit(WRITERS_BLOCKED, &journal->j_state) ;
+     return ;
+ }
+ 
+@@ -2494,58 +2518,63 @@
+ ** require BKL
+ */
+ void reiserfs_allow_writes(struct super_block *s) {
+-    clear_bit(WRITERS_BLOCKED, &SB_JOURNAL(s)->j_state) ;
+-    wake_up(&SB_JOURNAL(s)->j_join_wait) ;
++    struct reiserfs_journal *journal = SB_JOURNAL (s);
++    clear_bit(WRITERS_BLOCKED, &journal->j_state) ;
++    wake_up(&journal->j_join_wait) ;
+ }
+ 
+ /* this must be called without a transaction started, and does not
+ ** require BKL
+ */
+ void reiserfs_wait_on_write_block(struct super_block *s) {
+-    wait_event(SB_JOURNAL(s)->j_join_wait, 
+-               !test_bit(WRITERS_BLOCKED, &SB_JOURNAL(s)->j_state)) ;
++    struct reiserfs_journal *journal = SB_JOURNAL (s);
++    wait_event(journal->j_join_wait,
++               !test_bit(WRITERS_BLOCKED, &journal->j_state)) ;
+ }
+ 
+ static void queue_log_writer(struct super_block *s) {
+     wait_queue_t wait;
+-    set_bit(WRITERS_QUEUED, &SB_JOURNAL(s)->j_state);
++    struct reiserfs_journal *journal = SB_JOURNAL (s);
++    set_bit(WRITERS_QUEUED, &journal->j_state);
+ 
+     /*
+      * we don't want to use wait_event here because
+      * we only want to wait once.
+      */
+     init_waitqueue_entry(&wait, current);
+-    add_wait_queue(&SB_JOURNAL(s)->j_join_wait, &wait);
++    add_wait_queue(&journal->j_join_wait, &wait);
+     set_current_state(TASK_UNINTERRUPTIBLE);
+-    if (test_bit(WRITERS_QUEUED, &SB_JOURNAL(s)->j_state))
++    if (test_bit(WRITERS_QUEUED, &journal->j_state))
+         schedule();
+     current->state = TASK_RUNNING;
+-    remove_wait_queue(&SB_JOURNAL(s)->j_join_wait, &wait);
++    remove_wait_queue(&journal->j_join_wait, &wait);
+ }
+ 
+ static void wake_queued_writers(struct super_block *s) {
+-    if (test_and_clear_bit(WRITERS_QUEUED, &SB_JOURNAL(s)->j_state))
+-        wake_up(&SB_JOURNAL(s)->j_join_wait);
++    struct reiserfs_journal *journal = SB_JOURNAL (s);
++    if (test_and_clear_bit(WRITERS_QUEUED, &journal->j_state))
++        wake_up(&journal->j_join_wait);
+ }
+ 
+ static void let_transaction_grow(struct super_block *sb,
+                                  unsigned long trans_id)
+ {
+-    unsigned long bcount = SB_JOURNAL(sb)->j_bcount;
++    struct reiserfs_journal *journal = SB_JOURNAL (sb);
++    unsigned long bcount = journal->j_bcount;
+     while(1) {
+ 	set_current_state(TASK_UNINTERRUPTIBLE);
+ 	schedule_timeout(1);
+-	SB_JOURNAL(sb)->j_current_jl->j_state |= LIST_COMMIT_PENDING;
+-        while ((atomic_read(&SB_JOURNAL(sb)->j_wcount) > 0 ||
+-	        atomic_read(&SB_JOURNAL(sb)->j_jlock)) &&
+-	       SB_JOURNAL(sb)->j_trans_id == trans_id) {
++	journal->j_current_jl->j_state |= LIST_COMMIT_PENDING;
++        while ((atomic_read(&journal->j_wcount) > 0 ||
++	        atomic_read(&journal->j_jlock)) &&
++	       journal->j_trans_id == trans_id) {
+ 	    queue_log_writer(sb);
+ 	}
+-	if (SB_JOURNAL(sb)->j_trans_id != trans_id)
++	if (journal->j_trans_id != trans_id)
+ 	    break;
+-	if (bcount == SB_JOURNAL(sb)->j_bcount)
++	if (bcount == journal->j_bcount)
+ 	    break;
+-	bcount = SB_JOURNAL(sb)->j_bcount;
++	bcount = journal->j_bcount;
+     }
+ }
+ 
+@@ -2589,17 +2618,17 @@
+   */
+ 
+   if ( (!join && journal->j_must_wait > 0) ||
+-     ( !join && (journal->j_len_alloc + nblocks + 2) >= SB_JOURNAL_MAX_BATCH(p_s_sb)) ||
++     ( !join && (journal->j_len_alloc + nblocks + 2) >= journal->j_max_batch) ||
+      (!join && atomic_read(&journal->j_wcount) > 0 && journal->j_trans_start_time > 0 &&
+-      (now - journal->j_trans_start_time) > SB_JOURNAL_MAX_TRANS_AGE(p_s_sb)) ||
++      (now - journal->j_trans_start_time) > journal->j_max_trans_age) ||
+      (!join && atomic_read(&journal->j_jlock)) ||
+-     (!join && journal->j_cnode_free < (SB_JOURNAL_TRANS_MAX(p_s_sb) * 3))) {
++     (!join && journal->j_cnode_free < (journal->j_trans_max * 3))) {
+ 
+     old_trans_id = journal->j_trans_id;
+     unlock_journal(p_s_sb) ; /* allow others to finish this transaction */
+ 
+     if (!join && (journal->j_len_alloc + nblocks + 2) >=
+-        SB_JOURNAL_MAX_BATCH(p_s_sb) &&
++        journal->j_max_batch &&
+ 	((journal->j_len + nblocks + 2) * 100) < (journal->j_len_alloc * 75))
+     {
+ 	if (atomic_read(&journal->j_wcount) > 10) {
+@@ -2621,7 +2650,7 @@
+     journal_join(&myth, p_s_sb, 1) ;
+ 
+     /* someone might have ended the transaction while we joined */
+-    if (old_trans_id != SB_JOURNAL(p_s_sb)->j_trans_id) {
++    if (old_trans_id != journal->j_trans_id) {
+         do_journal_end(&myth, p_s_sb, 1, 0) ;
+     } else {
+         do_journal_end(&myth, p_s_sb, 1, COMMIT_NOW) ;
+@@ -2734,14 +2763,15 @@
+ ** if j_len, is bigger than j_len_alloc, it pushes j_len_alloc to 10 + j_len.
+ */
+ int journal_mark_dirty(struct reiserfs_transaction_handle *th, struct super_block *p_s_sb, struct buffer_head *bh) {
++  struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
+   struct reiserfs_journal_cnode *cn = NULL;
+   int count_already_incd = 0 ;
+   int prepared = 0 ;
+ 
+   PROC_INFO_INC( p_s_sb, journal.mark_dirty );
+-  if (th->t_trans_id != SB_JOURNAL(p_s_sb)->j_trans_id) {
++  if (th->t_trans_id != journal->j_trans_id) {
+     reiserfs_panic(th->t_super, "journal-1577: handle trans id %ld != current trans id %ld\n", 
+-                   th->t_trans_id, SB_JOURNAL(p_s_sb)->j_trans_id);
++                   th->t_trans_id, journal->j_trans_id);
+   }
+   p_s_sb->s_dirt = 1;
+ 
+@@ -2766,15 +2796,15 @@
+ 			    buffer_journal_dirty(bh) ? ' ' : '!') ;
+   }
+ 
+-  if (atomic_read(&(SB_JOURNAL(p_s_sb)->j_wcount)) <= 0) {
+-    reiserfs_warning (p_s_sb, "journal-1409: journal_mark_dirty returning because j_wcount was %d", atomic_read(&(SB_JOURNAL(p_s_sb)->j_wcount))) ;
++  if (atomic_read(&(journal->j_wcount)) <= 0) {
++    reiserfs_warning (p_s_sb, "journal-1409: journal_mark_dirty returning because j_wcount was %d", atomic_read(&(journal->j_wcount))) ;
+     return 1 ;
+   }
+   /* this error means I've screwed up, and we've overflowed the transaction.  
+   ** Nothing can be done here, except make the FS readonly or panic.
+   */ 
+-  if (SB_JOURNAL(p_s_sb)->j_len >= SB_JOURNAL_TRANS_MAX(p_s_sb)) { 
+-    reiserfs_panic(th->t_super, "journal-1413: journal_mark_dirty: j_len (%lu) is too big\n", SB_JOURNAL(p_s_sb)->j_len) ;
++  if (journal->j_len >= journal->j_trans_max) {
++    reiserfs_panic(th->t_super, "journal-1413: journal_mark_dirty: j_len (%lu) is too big\n", journal->j_len) ;
+   }
+ 
+   if (buffer_journal_dirty(bh)) {
+@@ -2783,8 +2813,8 @@
+     clear_buffer_journal_dirty (bh);
+   }
+ 
+-  if (SB_JOURNAL(p_s_sb)->j_len > SB_JOURNAL(p_s_sb)->j_len_alloc) {
+-    SB_JOURNAL(p_s_sb)->j_len_alloc = SB_JOURNAL(p_s_sb)->j_len + JOURNAL_PER_BALANCE_CNT ;
++  if (journal->j_len > journal->j_len_alloc) {
++    journal->j_len_alloc = journal->j_len + JOURNAL_PER_BALANCE_CNT ;
+   }
+ 
+   set_buffer_journaled (bh);
+@@ -2798,29 +2828,29 @@
+ 
+     if (th->t_blocks_logged == th->t_blocks_allocated) {
+       th->t_blocks_allocated += JOURNAL_PER_BALANCE_CNT ;
+-      SB_JOURNAL(p_s_sb)->j_len_alloc += JOURNAL_PER_BALANCE_CNT ;
++      journal->j_len_alloc += JOURNAL_PER_BALANCE_CNT ;
+     }
+     th->t_blocks_logged++ ;
+-    SB_JOURNAL(p_s_sb)->j_len++ ;
++    journal->j_len++ ;
+ 
+     cn->bh = bh ;
+     cn->blocknr = bh->b_blocknr ;
+     cn->sb = p_s_sb;
+     cn->jlist = NULL ;
+-    insert_journal_hash(SB_JOURNAL(p_s_sb)->j_hash_table, cn) ;
++    insert_journal_hash(journal->j_hash_table, cn) ;
+     if (!count_already_incd) {
+       get_bh(bh) ;
+     }
+   }
+   cn->next = NULL ;
+-  cn->prev = SB_JOURNAL(p_s_sb)->j_last ;
++  cn->prev = journal->j_last ;
+   cn->bh = bh ;
+-  if (SB_JOURNAL(p_s_sb)->j_last) {
+-    SB_JOURNAL(p_s_sb)->j_last->next = cn ;
+-    SB_JOURNAL(p_s_sb)->j_last = cn ;
++  if (journal->j_last) {
++    journal->j_last->next = cn ;
++    journal->j_last = cn ;
+   } else {
+-    SB_JOURNAL(p_s_sb)->j_first = cn ;
+-    SB_JOURNAL(p_s_sb)->j_last = cn ;
++    journal->j_first = cn ;
++    journal->j_last = cn ;
+   }
+   return 0 ;
+ }
+@@ -2860,9 +2890,10 @@
+ static int remove_from_transaction(struct super_block *p_s_sb, b_blocknr_t blocknr, int already_cleaned) {
+   struct buffer_head *bh ;
+   struct reiserfs_journal_cnode *cn ;
++  struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
+   int ret = 0;
+ 
+-  cn = get_journal_hash_dev(p_s_sb, SB_JOURNAL(p_s_sb)->j_hash_table, blocknr) ;
++  cn = get_journal_hash_dev(p_s_sb, journal->j_hash_table, blocknr) ;
+   if (!cn || !cn->bh) {
+     return ret ;
+   }
+@@ -2873,14 +2904,14 @@
+   if (cn->next) {
+     cn->next->prev = cn->prev ;
+   }
+-  if (cn == SB_JOURNAL(p_s_sb)->j_first) {
+-    SB_JOURNAL(p_s_sb)->j_first = cn->next ;  
++  if (cn == journal->j_first) {
++    journal->j_first = cn->next ;
+   }
+-  if (cn == SB_JOURNAL(p_s_sb)->j_last) {
+-    SB_JOURNAL(p_s_sb)->j_last = cn->prev ;
++  if (cn == journal->j_last) {
++    journal->j_last = cn->prev ;
+   }
+   if (bh)
+-	remove_journal_hash(p_s_sb, SB_JOURNAL(p_s_sb)->j_hash_table, NULL, bh->b_blocknr, 0) ; 
++	remove_journal_hash(p_s_sb, journal->j_hash_table, NULL, bh->b_blocknr, 0) ;
+   clear_buffer_journaled  (bh); /* don't log this one */
+ 
+   if (!already_cleaned) {
+@@ -2891,8 +2922,8 @@
+     }
+     ret = 1 ;
+   }
+-  SB_JOURNAL(p_s_sb)->j_len-- ;
+-  SB_JOURNAL(p_s_sb)->j_len_alloc-- ;
++  journal->j_len-- ;
++  journal->j_len_alloc-- ;
+   free_cnode(p_s_sb, cn) ;
+   return ret ;
+ }
+@@ -2943,12 +2974,13 @@
+ ** will wait until the current transaction is done/commited before returning 
+ */
+ int journal_end_sync(struct reiserfs_transaction_handle *th, struct super_block *p_s_sb, unsigned long nblocks) {
++  struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
+ 
+   /* you can sync while nested, very, very bad */
+   if (th->t_refcount > 1) {
+     BUG() ;
+   }
+-  if (SB_JOURNAL(p_s_sb)->j_len == 0) {
++  if (journal->j_len == 0) {
+     reiserfs_prepare_for_journal(p_s_sb, SB_BUFFER_WITH_SB(p_s_sb), 1) ;
+     journal_mark_dirty(th, p_s_sb, SB_BUFFER_WITH_SB(p_s_sb)) ;
+   }
+@@ -2960,13 +2992,14 @@
+ */
+ static void flush_async_commits(void *p) {
+   struct super_block *p_s_sb = p;
++  struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
+   struct reiserfs_journal_list *jl;
+   struct list_head *entry;
+ 
+   lock_kernel();
+-  if (!list_empty(&SB_JOURNAL(p_s_sb)->j_journal_list)) {
++  if (!list_empty(&journal->j_journal_list)) {
+       /* last entry is the youngest, commit it and you get everything */
+-      entry = SB_JOURNAL(p_s_sb)->j_journal_list.prev;
++      entry = journal->j_journal_list.prev;
+       jl = JOURNAL_LIST_ENTRY(entry);
+       flush_commit_list(p_s_sb, jl, 1);
+   }
+@@ -2975,10 +3008,10 @@
+    * this is a little racey, but there's no harm in missing
+    * the filemap_fdata_write
+    */
+-  if (!atomic_read(&SB_JOURNAL(p_s_sb)->j_async_throttle)) {
+-      atomic_inc(&SB_JOURNAL(p_s_sb)->j_async_throttle);
++  if (!atomic_read(&journal->j_async_throttle)) {
++      atomic_inc(&journal->j_async_throttle);
+       filemap_fdatawrite(p_s_sb->s_bdev->bd_inode->i_mapping);
+-      atomic_dec(&SB_JOURNAL(p_s_sb)->j_async_throttle);
++      atomic_dec(&journal->j_async_throttle);
+   }
+ }
+ 
+@@ -2989,23 +3022,23 @@
+ int reiserfs_flush_old_commits(struct super_block *p_s_sb) {
+     time_t now ;
+     struct reiserfs_transaction_handle th ;
++    struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
+ 
+     now = get_seconds();
+     /* safety check so we don't flush while we are replaying the log during
+      * mount
+      */
+-    if (list_empty(&SB_JOURNAL(p_s_sb)->j_journal_list)) {
++    if (list_empty(&journal->j_journal_list)) {
+ 	return 0  ;
+     }
+ 
+     /* check the current transaction.  If there are no writers, and it is
+      * too old, finish it, and force the commit blocks to disk
+      */
+-    if (atomic_read(&(SB_JOURNAL(p_s_sb)->j_wcount)) <= 0 &&
+-        SB_JOURNAL(p_s_sb)->j_trans_start_time > 0 &&
+-        SB_JOURNAL(p_s_sb)->j_len > 0 &&
+-        (now - SB_JOURNAL(p_s_sb)->j_trans_start_time) >
+-	SB_JOURNAL_MAX_TRANS_AGE(p_s_sb))
++    if (atomic_read(&journal->j_wcount) <= 0 &&
++        journal->j_trans_start_time > 0 &&
++        journal->j_len > 0 &&
++        (now - journal->j_trans_start_time) > journal->j_max_trans_age)
+     {
+ 	journal_join(&th, p_s_sb, 1) ;
+ 	reiserfs_prepare_for_journal(p_s_sb, SB_BUFFER_WITH_SB(p_s_sb), 1) ;
+@@ -3038,22 +3071,23 @@
+   int commit_now = flags & COMMIT_NOW ;
+   int wait_on_commit = flags & WAIT ;
+   struct reiserfs_journal_list *jl;
++  struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
+ 
+-  if (th->t_trans_id != SB_JOURNAL(p_s_sb)->j_trans_id) {
++  if (th->t_trans_id != journal->j_trans_id) {
+     reiserfs_panic(th->t_super, "journal-1577: handle trans id %ld != current trans id %ld\n", 
+-                   th->t_trans_id, SB_JOURNAL(p_s_sb)->j_trans_id);
++                   th->t_trans_id, journal->j_trans_id);
+   }
+ 
+-  SB_JOURNAL(p_s_sb)->j_len_alloc -= (th->t_blocks_allocated - th->t_blocks_logged) ;
+-  if (atomic_read(&(SB_JOURNAL(p_s_sb)->j_wcount)) > 0) { /* <= 0 is allowed.  unmounting might not call begin */
+-    atomic_dec(&(SB_JOURNAL(p_s_sb)->j_wcount)) ;
++  journal->j_len_alloc -= (th->t_blocks_allocated - th->t_blocks_logged) ;
++  if (atomic_read(&(journal->j_wcount)) > 0) { /* <= 0 is allowed.  unmounting might not call begin */
++    atomic_dec(&(journal->j_wcount)) ;
+   }
+ 
+   /* BUG, deal with case where j_len is 0, but people previously freed blocks need to be released 
+   ** will be dealt with by next transaction that actually writes something, but should be taken
+   ** care of in this trans
+   */
+-  if (SB_JOURNAL(p_s_sb)->j_len == 0) {
++  if (journal->j_len == 0) {
+     BUG();
+   }
+   /* if wcount > 0, and we are called to with flush or commit_now,
+@@ -3062,33 +3096,33 @@
+   ** Then, we flush the commit or journal list, and just return 0 
+   ** because the rest of journal end was already done for this transaction.
+   */
+-  if (atomic_read(&(SB_JOURNAL(p_s_sb)->j_wcount)) > 0) {
++  if (atomic_read(&(journal->j_wcount)) > 0) {
+     if (flush || commit_now) {
+       unsigned trans_id ;
+ 
+-      jl = SB_JOURNAL(p_s_sb)->j_current_jl;
++      jl = journal->j_current_jl;
+       trans_id = jl->j_trans_id;
+       if (wait_on_commit)
+         jl->j_state |= LIST_COMMIT_PENDING;
+-      atomic_set(&(SB_JOURNAL(p_s_sb)->j_jlock), 1) ;
++      atomic_set(&(journal->j_jlock), 1) ;
+       if (flush) {
+-        SB_JOURNAL(p_s_sb)->j_next_full_flush = 1 ;
++        journal->j_next_full_flush = 1 ;
+       }
+       unlock_journal(p_s_sb) ;
+ 
+       /* sleep while the current transaction is still j_jlocked */
+-      while(SB_JOURNAL(p_s_sb)->j_trans_id == trans_id) {
+-	if (atomic_read(&SB_JOURNAL(p_s_sb)->j_jlock)) {
++      while(journal->j_trans_id == trans_id) {
++	if (atomic_read(&journal->j_jlock)) {
+ 	    queue_log_writer(p_s_sb);
+         } else {
+ 	    lock_journal(p_s_sb);
+-	    if (SB_JOURNAL(p_s_sb)->j_trans_id == trans_id) {
+-	        atomic_set(&(SB_JOURNAL(p_s_sb)->j_jlock), 1) ;
++	    if (journal->j_trans_id == trans_id) {
++	        atomic_set(&(journal->j_jlock), 1) ;
+ 	    }
+ 	    unlock_journal(p_s_sb);
+ 	}
+       }
+-      if (SB_JOURNAL(p_s_sb)->j_trans_id == trans_id) {
++      if (journal->j_trans_id == trans_id) {
+           BUG();
+       }
+       if (commit_now && journal_list_still_alive(p_s_sb, trans_id) &&
+@@ -3104,22 +3138,22 @@
+ 
+   /* deal with old transactions where we are the last writers */
+   now = get_seconds();
+-  if ((now - SB_JOURNAL(p_s_sb)->j_trans_start_time) > SB_JOURNAL_MAX_TRANS_AGE(p_s_sb)) {
++  if ((now - journal->j_trans_start_time) > journal->j_max_trans_age) {
+     commit_now = 1 ;
+-    SB_JOURNAL(p_s_sb)->j_next_async_flush = 1 ;
++    journal->j_next_async_flush = 1 ;
+   }
+   /* don't batch when someone is waiting on j_join_wait */
+   /* don't batch when syncing the commit or flushing the whole trans */
+-  if (!(SB_JOURNAL(p_s_sb)->j_must_wait > 0) && !(atomic_read(&(SB_JOURNAL(p_s_sb)->j_jlock))) && !flush && !commit_now && 
+-      (SB_JOURNAL(p_s_sb)->j_len < SB_JOURNAL_MAX_BATCH(p_s_sb))  && 
+-      SB_JOURNAL(p_s_sb)->j_len_alloc < SB_JOURNAL_MAX_BATCH(p_s_sb) && SB_JOURNAL(p_s_sb)->j_cnode_free > (SB_JOURNAL_TRANS_MAX(p_s_sb) * 3)) {
+-    SB_JOURNAL(p_s_sb)->j_bcount++ ;
++  if (!(journal->j_must_wait > 0) && !(atomic_read(&(journal->j_jlock))) && !flush && !commit_now &&
++      (journal->j_len < journal->j_max_batch)  &&
++      journal->j_len_alloc < journal->j_max_batch && journal->j_cnode_free > (journal->j_trans_max * 3)) {
++    journal->j_bcount++ ;
+     unlock_journal(p_s_sb) ;
+     return 0 ;
+   }
+ 
+-  if (SB_JOURNAL(p_s_sb)->j_start > SB_ONDISK_JOURNAL_SIZE(p_s_sb)) {
+-    reiserfs_panic(p_s_sb, "journal-003: journal_end: j_start (%ld) is too high\n", SB_JOURNAL(p_s_sb)->j_start) ;
++  if (journal->j_start > SB_ONDISK_JOURNAL_SIZE(p_s_sb)) {
++    reiserfs_panic(p_s_sb, "journal-003: journal_end: j_start (%ld) is too high\n", journal->j_start) ;
+   }
+   return 1 ;
+ }
+@@ -3139,12 +3173,13 @@
+ ** Then remove it from the current transaction, decrementing any counters and filing it on the clean list.
+ */
+ int journal_mark_freed(struct reiserfs_transaction_handle *th, struct super_block *p_s_sb, b_blocknr_t blocknr) {
++  struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
+   struct reiserfs_journal_cnode *cn = NULL ;
+   struct buffer_head *bh = NULL ;
+   struct reiserfs_list_bitmap *jb = NULL ;
+   int cleaned = 0 ;
+ 
+-  cn = get_journal_hash_dev(p_s_sb, SB_JOURNAL(p_s_sb)->j_hash_table, blocknr);
++  cn = get_journal_hash_dev(p_s_sb, journal->j_hash_table, blocknr);
+   if (cn && cn->bh) {
+       bh = cn->bh ;
+       get_bh(bh) ;
+@@ -3157,7 +3192,7 @@
+     cleaned = remove_from_transaction(p_s_sb, blocknr, cleaned) ;
+   } else {
+     /* set the bit for this block in the journal bitmap for this transaction */
+-    jb = SB_JOURNAL(p_s_sb)->j_current_jl->j_list_bitmap;
++    jb = journal->j_current_jl->j_list_bitmap;
+     if (!jb) {
+       reiserfs_panic(p_s_sb, "journal-1702: journal_mark_freed, journal_list_bitmap is NULL\n") ;
+     }
+@@ -3172,7 +3207,7 @@
+     cleaned = remove_from_transaction(p_s_sb, blocknr, cleaned) ;
+ 
+     /* find all older transactions with this block, make sure they don't try to write it out */
+-    cn = get_journal_hash_dev(p_s_sb,SB_JOURNAL(p_s_sb)->j_list_hash_table,  blocknr) ;
++    cn = get_journal_hash_dev(p_s_sb,journal->j_list_hash_table,  blocknr) ;
+     while (cn) {
+       if (p_s_sb == cn->sb && blocknr == cn->blocknr) {
+ 	set_bit(BLOCK_FREED, &cn->state) ;
+@@ -3208,8 +3243,9 @@
+ }
+ 
+ void reiserfs_update_inode_transaction(struct inode *inode) {
+-  REISERFS_I(inode)->i_jl = SB_JOURNAL(inode->i_sb)->j_current_jl;
+-  REISERFS_I(inode)->i_trans_id = SB_JOURNAL(inode->i_sb)->j_trans_id ;
++  struct reiserfs_journal *journal = SB_JOURNAL (inode->i_sb);
++  REISERFS_I(inode)->i_jl = journal->j_current_jl;
++  REISERFS_I(inode)->i_trans_id = journal->j_trans_id ;
+ }
+ 
+ /*
+@@ -3221,20 +3257,21 @@
+ {
+     struct reiserfs_transaction_handle th ;
+     struct super_block *sb = inode->i_sb ;
++    struct reiserfs_journal *journal = SB_JOURNAL (sb);
+ 
+     /* is it from the current transaction, or from an unknown transaction? */
+-    if (id == SB_JOURNAL(sb)->j_trans_id) {
+-	jl = SB_JOURNAL(sb)->j_current_jl;
++    if (id == journal->j_trans_id) {
++	jl = journal->j_current_jl;
+ 	/* try to let other writers come in and grow this transaction */
+ 	let_transaction_grow(sb, id);
+-	if (SB_JOURNAL(sb)->j_trans_id != id) {
++	if (journal->j_trans_id != id) {
+ 	    goto flush_commit_only;
+ 	}
+ 
+ 	journal_begin(&th, sb, 1) ;
+ 
+ 	/* someone might have ended this transaction while we joined */
+-	if (SB_JOURNAL(sb)->j_trans_id != id) {
++	if (journal->j_trans_id != id) {
+ 	    reiserfs_prepare_for_journal(sb, SB_BUFFER_WITH_SB(sb), 1) ;
+ 	    journal_mark_dirty(&th, sb, SB_BUFFER_WITH_SB(sb)) ;
+ 	    journal_end(&th, sb, 1) ;
+@@ -3284,6 +3321,7 @@
+ 
+ void reiserfs_restore_prepared_buffer(struct super_block *p_s_sb, 
+                                       struct buffer_head *bh) {
++    struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
+     PROC_INFO_INC( p_s_sb, journal.restore_prepared );
+     if (!bh) {
+ 	return ;
+@@ -3292,7 +3330,7 @@
+ 	buffer_journal_dirty(bh)) {
+ 	struct reiserfs_journal_cnode *cn;
+ 	cn = get_journal_hash_dev(p_s_sb,
+-	                          SB_JOURNAL(p_s_sb)->j_list_hash_table,
++	                          journal->j_list_hash_table,
+ 				  bh->b_blocknr);
+ 	if (cn && can_dirty(cn)) {
+             set_buffer_journal_test (bh);
+@@ -3329,12 +3367,13 @@
+ }
+ 
+ static void flush_old_journal_lists(struct super_block *s) {
++    struct reiserfs_journal *journal = SB_JOURNAL (s);
+     struct reiserfs_journal_list *jl;
+     struct list_head *entry;
+     time_t now = get_seconds();
+ 
+-    while(!list_empty(&SB_JOURNAL(s)->j_journal_list)) {
+-        entry = SB_JOURNAL(s)->j_journal_list.next;
++    while(!list_empty(&journal->j_journal_list)) {
++        entry = journal->j_journal_list.next;
+ 	jl = JOURNAL_LIST_ENTRY(entry);
+ 	/* this check should always be run, to send old lists to disk */
+ 	if (jl->j_timestamp < (now - (JOURNAL_MAX_TRANS_AGE * 4))) {
+@@ -3354,6 +3393,7 @@
+ */
+ static int do_journal_end(struct reiserfs_transaction_handle *th, struct super_block  * p_s_sb, unsigned long nblocks, 
+ 		          int flags) {
++  struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
+   struct reiserfs_journal_cnode *cn, *next, *jl_cn; 
+   struct reiserfs_journal_cnode *last_cn = NULL;
+   struct reiserfs_journal_desc *desc ; 
+@@ -3376,17 +3416,17 @@
+ 
+   current->journal_info = th->t_handle_save;
+   reiserfs_check_lock_depth(p_s_sb, "journal end");
+-  if (SB_JOURNAL(p_s_sb)->j_len == 0) {
++  if (journal->j_len == 0) {
+       reiserfs_prepare_for_journal(p_s_sb, SB_BUFFER_WITH_SB(p_s_sb), 1) ;
+       journal_mark_dirty(th, p_s_sb, SB_BUFFER_WITH_SB(p_s_sb)) ;
+   }
+ 
+   lock_journal(p_s_sb) ;
+-  if (SB_JOURNAL(p_s_sb)->j_next_full_flush) {
++  if (journal->j_next_full_flush) {
+     flags |= FLUSH_ALL ;
+     flush = 1 ;
+   }
+-  if (SB_JOURNAL(p_s_sb)->j_next_async_flush) {
++  if (journal->j_next_async_flush) {
+     flags |= COMMIT_NOW | WAIT;
+     wait_on_commit = 1;
+   }
+@@ -3402,7 +3442,7 @@
+   }
+ 
+   /* check_journal_end might set these, check again */
+-  if (SB_JOURNAL(p_s_sb)->j_next_full_flush) {
++  if (journal->j_next_full_flush) {
+     flush = 1 ;
+   }
+ 
+@@ -3410,7 +3450,7 @@
+   ** j must wait means we have to flush the log blocks, and the real blocks for
+   ** this transaction
+   */
+-  if (SB_JOURNAL(p_s_sb)->j_must_wait > 0) {
++  if (journal->j_must_wait > 0) {
+     flush = 1 ;
+   }
+ 
+@@ -3423,23 +3463,23 @@
+ #endif
+   
+   /* setup description block */
+-  d_bh = journal_getblk(p_s_sb, SB_ONDISK_JOURNAL_1st_BLOCK(p_s_sb) + SB_JOURNAL(p_s_sb)->j_start) ; 
++  d_bh = journal_getblk(p_s_sb, SB_ONDISK_JOURNAL_1st_BLOCK(p_s_sb) + journal->j_start) ;
+   set_buffer_uptodate(d_bh);
+   desc = (struct reiserfs_journal_desc *)(d_bh)->b_data ;
+   memset(d_bh->b_data, 0, d_bh->b_size) ;
+   memcpy(get_journal_desc_magic (d_bh), JOURNAL_DESC_MAGIC, 8) ;
+-  set_desc_trans_id(desc, SB_JOURNAL(p_s_sb)->j_trans_id) ;
++  set_desc_trans_id(desc, journal->j_trans_id) ;
+ 
+   /* setup commit block.  Don't write (keep it clean too) this one until after everyone else is written */
+   c_bh =  journal_getblk(p_s_sb, SB_ONDISK_JOURNAL_1st_BLOCK(p_s_sb) + 
+-		 ((SB_JOURNAL(p_s_sb)->j_start + SB_JOURNAL(p_s_sb)->j_len + 1) % SB_ONDISK_JOURNAL_SIZE(p_s_sb))) ;
++		 ((journal->j_start + journal->j_len + 1) % SB_ONDISK_JOURNAL_SIZE(p_s_sb))) ;
+   commit = (struct reiserfs_journal_commit *)c_bh->b_data ;
+   memset(c_bh->b_data, 0, c_bh->b_size) ;
+-  set_commit_trans_id(commit, SB_JOURNAL(p_s_sb)->j_trans_id) ;
++  set_commit_trans_id(commit, journal->j_trans_id) ;
+   set_buffer_uptodate(c_bh) ;
+ 
+   /* init this journal list */
+-  jl = SB_JOURNAL(p_s_sb)->j_current_jl;
++  jl = journal->j_current_jl;
+ 
+   /* we lock the commit before doing anything because
+    * we want to make sure nobody tries to run flush_commit_list until
+@@ -3452,13 +3492,13 @@
+   commit_trans_id = jl->j_trans_id;
+ 
+   atomic_set(&jl->j_older_commits_done, 0) ;
+-  jl->j_trans_id = SB_JOURNAL(p_s_sb)->j_trans_id ;
+-  jl->j_timestamp = SB_JOURNAL(p_s_sb)->j_trans_start_time ;
++  jl->j_trans_id = journal->j_trans_id ;
++  jl->j_timestamp = journal->j_trans_start_time ;
+   jl->j_commit_bh = c_bh ;
+-  jl->j_start = SB_JOURNAL(p_s_sb)->j_start ;
+-  jl->j_len = SB_JOURNAL(p_s_sb)->j_len ;
+-  atomic_set(&jl->j_nonzerolen, SB_JOURNAL(p_s_sb)->j_len) ;
+-  atomic_set(&jl->j_commit_left, SB_JOURNAL(p_s_sb)->j_len + 2);
++  jl->j_start = journal->j_start ;
++  jl->j_len = journal->j_len ;
++  atomic_set(&jl->j_nonzerolen, journal->j_len) ;
++  atomic_set(&jl->j_commit_left, journal->j_len + 2);
+   jl->j_realblock = NULL ;
+ 
+   /* The ENTIRE FOR LOOP MUST not cause schedule to occur.
+@@ -3466,7 +3506,7 @@
+   ** copy into real block index array in the commit or desc block
+   */
+   trans_half = journal_trans_half(p_s_sb->s_blocksize);
+-  for (i = 0, cn = SB_JOURNAL(p_s_sb)->j_first ; cn ; cn = cn->next, i++) {
++  for (i = 0, cn = journal->j_first ; cn ; cn = cn->next, i++) {
+     if (buffer_journaled (cn->bh)) {
+       jl_cn = get_cnode(p_s_sb) ;
+       if (!jl_cn) {
+@@ -3492,7 +3532,7 @@
+       jl_cn->sb = p_s_sb;
+       jl_cn->bh = cn->bh ;
+       jl_cn->jlist = jl;
+-      insert_journal_hash(SB_JOURNAL(p_s_sb)->j_list_hash_table, jl_cn) ; 
++      insert_journal_hash(journal->j_list_hash_table, jl_cn) ;
+       if (i < trans_half) {
+ 	desc->j_realblock[i] = cpu_to_le32(cn->bh->b_blocknr) ;
+       } else {
+@@ -3502,13 +3542,13 @@
+       i-- ;
+     }
+   }
+-  set_desc_trans_len(desc, SB_JOURNAL(p_s_sb)->j_len) ;
+-  set_desc_mount_id(desc, SB_JOURNAL(p_s_sb)->j_mount_id) ;
+-  set_desc_trans_id(desc, SB_JOURNAL(p_s_sb)->j_trans_id) ;
+-  set_commit_trans_len(commit, SB_JOURNAL(p_s_sb)->j_len);
++  set_desc_trans_len(desc, journal->j_len) ;
++  set_desc_mount_id(desc, journal->j_mount_id) ;
++  set_desc_trans_id(desc, journal->j_trans_id) ;
++  set_commit_trans_len(commit, journal->j_len);
+ 
+   /* special check in case all buffers in the journal were marked for not logging */
+-  if (SB_JOURNAL(p_s_sb)->j_len == 0) {
++  if (journal->j_len == 0) {
+     BUG();
+   }
+ 
+@@ -3519,8 +3559,8 @@
+   mark_buffer_dirty(d_bh);
+ 
+   /* first data block is j_start + 1, so add one to cur_write_start wherever you use it */
+-  cur_write_start = SB_JOURNAL(p_s_sb)->j_start ;
+-  cn = SB_JOURNAL(p_s_sb)->j_first ;
++  cur_write_start = journal->j_start ;
++  cn = journal->j_first ;
+   jindex = 1 ; /* start at one so we don't get the desc again */
+   while(cn) {
+     clear_buffer_journal_new (cn->bh);
+@@ -3557,28 +3597,28 @@
+   ** so we dirty/relse c_bh in flush_commit_list, with commit_left <= 1.
+   */
+ 
+-  SB_JOURNAL(p_s_sb)->j_current_jl = alloc_journal_list(p_s_sb);
++  journal->j_current_jl = alloc_journal_list(p_s_sb);
+ 
+   /* now it is safe to insert this transaction on the main list */
+-  list_add_tail(&jl->j_list, &SB_JOURNAL(p_s_sb)->j_journal_list);
+-  list_add_tail(&jl->j_working_list, &SB_JOURNAL(p_s_sb)->j_working_list);
+-  SB_JOURNAL(p_s_sb)->j_num_work_lists++;
++  list_add_tail(&jl->j_list, &journal->j_journal_list);
++  list_add_tail(&jl->j_working_list, &journal->j_working_list);
++  journal->j_num_work_lists++;
+ 
+   /* reset journal values for the next transaction */
+-  old_start = SB_JOURNAL(p_s_sb)->j_start ;
+-  SB_JOURNAL(p_s_sb)->j_start = (SB_JOURNAL(p_s_sb)->j_start + SB_JOURNAL(p_s_sb)->j_len + 2) % SB_ONDISK_JOURNAL_SIZE(p_s_sb);
+-  atomic_set(&(SB_JOURNAL(p_s_sb)->j_wcount), 0) ;
+-  SB_JOURNAL(p_s_sb)->j_bcount = 0 ;
+-  SB_JOURNAL(p_s_sb)->j_last = NULL ;
+-  SB_JOURNAL(p_s_sb)->j_first = NULL ;
+-  SB_JOURNAL(p_s_sb)->j_len = 0 ;
+-  SB_JOURNAL(p_s_sb)->j_trans_start_time = 0 ;
+-  SB_JOURNAL(p_s_sb)->j_trans_id++ ;
+-  SB_JOURNAL(p_s_sb)->j_current_jl->j_trans_id = SB_JOURNAL(p_s_sb)->j_trans_id;
+-  SB_JOURNAL(p_s_sb)->j_must_wait = 0 ;
+-  SB_JOURNAL(p_s_sb)->j_len_alloc = 0 ;
+-  SB_JOURNAL(p_s_sb)->j_next_full_flush = 0 ;
+-  SB_JOURNAL(p_s_sb)->j_next_async_flush = 0 ;
++  old_start = journal->j_start ;
++  journal->j_start = (journal->j_start + journal->j_len + 2) % SB_ONDISK_JOURNAL_SIZE(p_s_sb);
++  atomic_set(&(journal->j_wcount), 0) ;
++  journal->j_bcount = 0 ;
++  journal->j_last = NULL ;
++  journal->j_first = NULL ;
++  journal->j_len = 0 ;
++  journal->j_trans_start_time = 0 ;
++  journal->j_trans_id++ ;
++  journal->j_current_jl->j_trans_id = journal->j_trans_id;
++  journal->j_must_wait = 0 ;
++  journal->j_len_alloc = 0 ;
++  journal->j_next_full_flush = 0 ;
++  journal->j_next_async_flush = 0 ;
+   init_journal_hash(p_s_sb) ; 
+ 
+   // make sure reiserfs_add_jh sees the new current_jl before we
+@@ -3593,8 +3633,8 @@
+    */
+   if (!list_empty(&jl->j_tail_bh_list)) {
+       unlock_kernel();
+-      write_ordered_buffers(&SB_JOURNAL(p_s_sb)->j_dirty_buffers_lock,
+-			    SB_JOURNAL(p_s_sb), jl, &jl->j_tail_bh_list);
++      write_ordered_buffers(&journal->j_dirty_buffers_lock,
++			    journal, jl, &jl->j_tail_bh_list);
+       lock_kernel();
+   }
+   if (!list_empty(&jl->j_tail_bh_list))
+@@ -3612,7 +3652,7 @@
+     flush_commit_list(p_s_sb, jl, 1) ;
+     flush_journal_list(p_s_sb, jl, 1) ;
+   } else if (!(jl->j_state & LIST_COMMIT_PENDING))
+-    queue_delayed_work(commit_wq, &SB_JOURNAL(p_s_sb)->j_work, HZ/10);
++    queue_delayed_work(commit_wq, &journal->j_work, HZ/10);
+ 
+ 
+   /* if the next transaction has any chance of wrapping, flush 
+@@ -3620,16 +3660,16 @@
+   ** old flush them as well.  
+   */
+ first_jl:
+-  list_for_each_safe(entry, safe, &SB_JOURNAL(p_s_sb)->j_journal_list) {
++  list_for_each_safe(entry, safe, &journal->j_journal_list) {
+     temp_jl = JOURNAL_LIST_ENTRY(entry);
+-    if (SB_JOURNAL(p_s_sb)->j_start <= temp_jl->j_start) {
+-      if ((SB_JOURNAL(p_s_sb)->j_start + SB_JOURNAL_TRANS_MAX(p_s_sb) + 1) >=
++    if (journal->j_start <= temp_jl->j_start) {
++      if ((journal->j_start + journal->j_trans_max + 1) >=
+           temp_jl->j_start)
+       {
+ 	flush_used_journal_lists(p_s_sb, temp_jl);
+ 	goto first_jl;
+-      } else if ((SB_JOURNAL(p_s_sb)->j_start +
+-                  SB_JOURNAL_TRANS_MAX(p_s_sb) + 1) <
++      } else if ((journal->j_start +
++                  journal->j_trans_max + 1) <
+ 		  SB_ONDISK_JOURNAL_SIZE(p_s_sb))
+       {
+           /* if we don't cross into the next transaction and we don't
+@@ -3638,11 +3678,11 @@
+ 	   */
+ 	  break;
+       }
+-    } else if ((SB_JOURNAL(p_s_sb)->j_start +
+-                SB_JOURNAL_TRANS_MAX(p_s_sb) + 1) >
++    } else if ((journal->j_start +
++                journal->j_trans_max + 1) >
+ 		SB_ONDISK_JOURNAL_SIZE(p_s_sb))
+     {
+-      if (((SB_JOURNAL(p_s_sb)->j_start + SB_JOURNAL_TRANS_MAX(p_s_sb) + 1) %
++      if (((journal->j_start + journal->j_trans_max + 1) %
+             SB_ONDISK_JOURNAL_SIZE(p_s_sb)) >= temp_jl->j_start)
+       {
+ 	flush_used_journal_lists(p_s_sb, temp_jl);
+@@ -3658,17 +3698,17 @@
+   }
+   flush_old_journal_lists(p_s_sb);
+ 
+-  SB_JOURNAL(p_s_sb)->j_current_jl->j_list_bitmap = get_list_bitmap(p_s_sb, SB_JOURNAL(p_s_sb)->j_current_jl) ;
++  journal->j_current_jl->j_list_bitmap = get_list_bitmap(p_s_sb, journal->j_current_jl) ;
+ 
+-  if (!(SB_JOURNAL(p_s_sb)->j_current_jl->j_list_bitmap)) {
++  if (!(journal->j_current_jl->j_list_bitmap)) {
+     reiserfs_panic(p_s_sb, "journal-1996: do_journal_end, could not get a list bitmap\n") ;
+   }
+ 
+-  atomic_set(&(SB_JOURNAL(p_s_sb)->j_jlock), 0) ;
++  atomic_set(&(journal->j_jlock), 0) ;
+   unlock_journal(p_s_sb) ;
+   /* wake up any body waiting to join. */
+-  clear_bit(WRITERS_QUEUED, &SB_JOURNAL(p_s_sb)->j_state);
+-  wake_up(&(SB_JOURNAL(p_s_sb)->j_join_wait)) ;
++  clear_bit(WRITERS_QUEUED, &journal->j_state);
++  wake_up(&(journal->j_join_wait)) ;
+ 
+   if (!flush && wait_on_commit &&
+       journal_list_still_alive(p_s_sb, commit_trans_id)) {
+diff -Nru a/fs/reiserfs/procfs.c b/fs/reiserfs/procfs.c
+--- a/fs/reiserfs/procfs.c	2004-12-23 01:01:06 -08:00
++++ b/fs/reiserfs/procfs.c	2004-12-23 01:01:06 -08:00
+@@ -399,7 +399,7 @@
+                         DJP( jp_journal_trans_max ),
+                         DJP( jp_journal_magic ),
+                         DJP( jp_journal_max_batch ),
+-                        SB_JOURNAL_MAX_COMMIT_AGE(sb),
++			SB_JOURNAL(sb)->j_max_commit_age,
+                         DJP( jp_journal_max_trans_age ),
+ 
+ 			JF( j_1st_reserved_block ),			
+diff -Nru a/fs/reiserfs/super.c b/fs/reiserfs/super.c
+--- a/fs/reiserfs/super.c	2004-12-23 01:01:06 -08:00
++++ b/fs/reiserfs/super.c	2004-12-23 01:01:06 -08:00
+@@ -861,6 +861,7 @@
+   unsigned long mount_options = REISERFS_SB(s)->s_mount_opt;
+   unsigned long safe_mask = 0;
+   unsigned int commit_max_age = (unsigned int)-1;
++  struct reiserfs_journal *journal = SB_JOURNAL(s);
+ 
+   rs = SB_DISK_SUPER_BLOCK (s);
+ 
+@@ -887,14 +888,14 @@
+   REISERFS_SB(s)->s_mount_opt = (REISERFS_SB(s)->s_mount_opt & ~safe_mask) |  (mount_options & safe_mask);
+ 
+   if(commit_max_age != 0 && commit_max_age != (unsigned int)-1) {
+-    SB_JOURNAL_MAX_COMMIT_AGE(s) = commit_max_age;
+-    SB_JOURNAL_MAX_TRANS_AGE(s) = commit_max_age;
++    journal->j_max_commit_age = commit_max_age;
++    journal->j_max_trans_age = commit_max_age;
+   }
+   else if(commit_max_age == 0)
+   {
+     /* 0 means restore defaults. */
+-    SB_JOURNAL_MAX_COMMIT_AGE(s) = SB_JOURNAL_DEFAULT_MAX_COMMIT_AGE(s);
+-    SB_JOURNAL_MAX_TRANS_AGE(s) = JOURNAL_MAX_TRANS_AGE;
++    journal->j_max_commit_age = journal->j_default_max_commit_age;
++    journal->j_max_trans_age = JOURNAL_MAX_TRANS_AGE;
+   }
+ 
+   if(blocks) {
+diff -Nru a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h
+--- a/include/linux/reiserfs_fs_sb.h	2004-12-23 01:01:06 -08:00
++++ b/include/linux/reiserfs_fs_sb.h	2004-12-23 01:01:06 -08:00
+@@ -206,11 +206,11 @@
+   int j_cnode_used ;	      /* number of cnodes on the used list */
+   int j_cnode_free ;          /* number of cnodes on the free list */
+ 
+-  unsigned int s_journal_trans_max ;           /* max number of blocks in a transaction.  */
+-  unsigned int s_journal_max_batch ;           /* max number of blocks to batch into a trans */
+-  unsigned int s_journal_max_commit_age ;      /* in seconds, how old can an async commit be */
+-  unsigned int s_journal_default_max_commit_age ; /* the default for the max commit age */
+-  unsigned int s_journal_max_trans_age ;       /* in seconds, how old can a transaction be */  
++  unsigned int j_trans_max ;           /* max number of blocks in a transaction.  */
++  unsigned int j_max_batch ;           /* max number of blocks to batch into a trans */
++  unsigned int j_max_commit_age ;      /* in seconds, how old can an async commit be */
++  unsigned int j_max_trans_age ;       /* in seconds, how old can a transaction be */
++  unsigned int j_default_max_commit_age ; /* the default for the max commit age */
+ 
+   struct reiserfs_journal_cnode *j_cnode_free_list ;
+   struct reiserfs_journal_cnode *j_cnode_free_orig ; /* orig pointer returned from vmalloc */
+@@ -493,12 +493,6 @@
+ #define SB_AP_BITMAP(s) (REISERFS_SB(s)->s_ap_bitmap)
+ 
+ #define SB_DISK_JOURNAL_HEAD(s) (SB_JOURNAL(s)->j_header_bh->)
+-
+-#define SB_JOURNAL_TRANS_MAX(s)      (SB_JOURNAL(s)->s_journal_trans_max)
+-#define SB_JOURNAL_MAX_BATCH(s)      (SB_JOURNAL(s)->s_journal_max_batch)
+-#define SB_JOURNAL_MAX_COMMIT_AGE(s) (SB_JOURNAL(s)->s_journal_max_commit_age)
+-#define SB_JOURNAL_DEFAULT_MAX_COMMIT_AGE(s) (SB_JOURNAL(s)->s_journal_default_max_commit_age)
+-#define SB_JOURNAL_MAX_TRANS_AGE(s)  (SB_JOURNAL(s)->s_journal_max_trans_age)
+ 
+ /* A safe version of the "bdevname", which returns the "s_id" field of
+  * a superblock or else "Null superblock" if the super block is NULL.

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-sucks-2.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-sucks-2.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-sucks-2.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,2962 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: ReiserFS: Add I/O error handling to journal operations
+## DP: Patch author: Jeff Mahoney <jeffm at novell.com>
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/18 23:07:45-07:00 jeffm at novell.com 
+#   [PATCH] ReiserFS: Add I/O error handling to journal operations
+#   
+#   This patch allows ReiserFS to handle I/O errors in the journal (or journal
+#   flush) where it would have previously panicked.  The new behavior is to
+#   mark the filesystem read-only, disallow new transactions to be started, and
+#   to allow existing transactions to complete (though not to commit).  The
+#   resultant filesystem can be safely umounted, and checked via normal
+#   mechanisms.  As it is a journaling filesystem, the filesystem itself will
+#   be in a similar state to the power being cut to the machine, once umounted.
+#   
+#   Signed-off-by: Jeff Mahoney <jeffm at novell.com>
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# fs/reiserfs/bitmap.c
+#   2004/10/18 22:26:49-07:00 jeffm at novell.com +13 -0
+#   ReiserFS: Add I/O error handling to journal operations
+# 
+# fs/reiserfs/dir.c
+#   2004/10/18 22:26:49-07:00 jeffm at novell.com +5 -2
+#   ReiserFS: Add I/O error handling to journal operations
+# 
+# fs/reiserfs/file.c
+#   2004/10/18 22:26:49-07:00 jeffm at novell.com +103 -24
+#   ReiserFS: Add I/O error handling to journal operations
+# 
+# fs/reiserfs/inode.c
+#   2004/10/18 22:26:49-07:00 jeffm at novell.com +149 -47
+#   ReiserFS: Add I/O error handling to journal operations
+# 
+# fs/reiserfs/journal.c
+#   2004/10/18 22:26:49-07:00 jeffm at novell.com +260 -95
+#   ReiserFS: Add I/O error handling to journal operations
+# 
+# fs/reiserfs/namei.c
+#   2004/10/18 22:28:07-07:00 jeffm at novell.com +108 -47
+#   ReiserFS: Add I/O error handling to journal operations
+# 
+# fs/reiserfs/objectid.c
+#   2004/10/18 22:26:49-07:00 jeffm at novell.com +2 -0
+#   ReiserFS: Add I/O error handling to journal operations
+# 
+# fs/reiserfs/prints.c
+#   2004/10/18 22:26:49-07:00 jeffm at novell.com +43 -0
+#   ReiserFS: Add I/O error handling to journal operations
+# 
+# fs/reiserfs/resize.c
+#   2004/10/18 22:26:49-07:00 jeffm at novell.com +18 -8
+#   ReiserFS: Add I/O error handling to journal operations
+# 
+# fs/reiserfs/stree.c
+#   2004/10/18 22:26:49-07:00 jeffm at novell.com +46 -11
+#   ReiserFS: Add I/O error handling to journal operations
+# 
+# fs/reiserfs/super.c
+#   2004/10/18 22:26:49-07:00 jeffm at novell.com +99 -37
+#   ReiserFS: Add I/O error handling to journal operations
+# 
+# fs/reiserfs/tail_conversion.c
+#   2004/10/18 22:26:49-07:00 jeffm at novell.com +3 -0
+#   ReiserFS: Add I/O error handling to journal operations
+# 
+# include/linux/reiserfs_fs.h
+#   2004/10/18 22:26:49-07:00 jeffm at novell.com +9 -6
+#   ReiserFS: Add I/O error handling to journal operations
+# 
+# include/linux/reiserfs_fs_sb.h
+#   2004/10/18 22:26:49-07:00 jeffm at novell.com +26 -0
+#   ReiserFS: Add I/O error handling to journal operations
+# 
+diff -Nru a/fs/reiserfs/bitmap.c b/fs/reiserfs/bitmap.c
+--- a/fs/reiserfs/bitmap.c	2004-12-22 22:53:54 -08:00
++++ b/fs/reiserfs/bitmap.c	2004-12-22 22:53:54 -08:00
+@@ -137,6 +137,8 @@
+     int end, next;
+     int org = *beg;
+ 
++    BUG_ON (!th->t_trans_id);
++
+     RFALSE(bmap_n >= SB_BMAP_NR (s), "Bitmap %d is out of range (0..%d)",bmap_n, SB_BMAP_NR (s) - 1);
+     PROC_INFO_INC( s, scan_bitmap.bmap );
+ /* this is unclear and lacks comments, explain how journal bitmaps
+@@ -290,6 +292,8 @@
+     int end_bm, end_off;
+     int off_max = s->s_blocksize << 3;
+ 
++    BUG_ON (!th->t_trans_id);
++
+     PROC_INFO_INC( s, scan_bitmap.call ); 
+     if ( SB_FREE_BLOCKS(s) <= 0)
+ 	return 0; // No point in looking for more free blocks
+@@ -348,6 +352,8 @@
+     struct reiserfs_bitmap_info *apbi;
+     int nr, offset;
+ 
++    BUG_ON (!th->t_trans_id);
++
+     PROC_INFO_INC( s, free_block );
+ 
+     rs = SB_DISK_SUPER_BLOCK (s);
+@@ -389,6 +395,8 @@
+ {
+     struct super_block * s = th->t_super;
+ 
++    BUG_ON (!th->t_trans_id);
++
+     RFALSE(!s, "vs-4061: trying to free block on nonexistent device");
+     RFALSE(is_reusable (s, block, 1) == 0, "vs-4071: can not free such block");
+     /* mark it before we clear it, just in case */
+@@ -401,6 +409,7 @@
+ 			  struct inode *inode, b_blocknr_t block) {
+     RFALSE(!th->t_super, "vs-4060: trying to free block on nonexistent device");
+     RFALSE(is_reusable (th->t_super, block, 1) == 0, "vs-4070: can not free such block");
++    BUG_ON (!th->t_trans_id);
+     _reiserfs_free_block(th, inode, block, 1) ;
+ }
+ 
+@@ -410,6 +419,7 @@
+     unsigned long save = ei->i_prealloc_block ;
+     int dirty = 0;
+     struct inode *inode = &ei->vfs_inode;
++    BUG_ON (!th->t_trans_id);
+ #ifdef CONFIG_REISERFS_CHECK
+     if (ei->i_prealloc_count < 0)
+ 	reiserfs_warning (th->t_super, "zam-4001:%s: inode has negative prealloc blocks count.", __FUNCTION__ );
+@@ -431,6 +441,7 @@
+ 				struct inode *inode)
+ {
+     struct reiserfs_inode_info *ei = REISERFS_I(inode);
++    BUG_ON (!th->t_trans_id);
+     if (ei->i_prealloc_count)
+ 	__discard_prealloc(th, ei);
+ }
+@@ -438,6 +449,8 @@
+ void reiserfs_discard_all_prealloc (struct reiserfs_transaction_handle *th)
+ {
+     struct list_head * plist = &SB_JOURNAL(th->t_super)->j_prealloc_list;
++
++    BUG_ON (!th->t_trans_id);
+ 
+     while (!list_empty(plist)) {
+ 	struct reiserfs_inode_info *ei;
+diff -Nru a/fs/reiserfs/dir.c b/fs/reiserfs/dir.c
+--- a/fs/reiserfs/dir.c	2004-12-22 22:53:54 -08:00
++++ b/fs/reiserfs/dir.c	2004-12-22 22:53:54 -08:00
+@@ -26,10 +26,13 @@
+ 
+ int reiserfs_dir_fsync(struct file *filp, struct dentry *dentry, int datasync) {
+   struct inode *inode = dentry->d_inode;
++  int err;
+   reiserfs_write_lock(inode->i_sb);
+-  reiserfs_commit_for_inode(inode) ;
++  err = reiserfs_commit_for_inode(inode) ;
+   reiserfs_write_unlock(inode->i_sb) ;
+-  return 0 ;
++  if (err < 0)
++      return err;
++  return 0;
+ }
+ 
+ 
+diff -Nru a/fs/reiserfs/file.c b/fs/reiserfs/file.c
+--- a/fs/reiserfs/file.c	2004-12-22 22:53:54 -08:00
++++ b/fs/reiserfs/file.c	2004-12-22 22:53:54 -08:00
+@@ -35,6 +35,8 @@
+ {
+ 
+     struct reiserfs_transaction_handle th ;
++    int err;
++    int jbegin_failure = 0;
+ 
+     if (!S_ISREG (inode->i_mode))
+ 	BUG ();
+@@ -49,26 +51,58 @@
+     
+     reiserfs_write_lock(inode->i_sb);
+     down (&inode->i_sem); 
+-    journal_begin(&th, inode->i_sb, JOURNAL_PER_BALANCE_CNT * 3) ;
++    /* freeing preallocation only involves relogging blocks that
++     * are already in the current transaction.  preallocation gets
++     * freed at the end of each transaction, so it is impossible for
++     * us to log any additional blocks
++     */
++    err = journal_begin(&th, inode->i_sb, 1);
++    if (err) {
++	/* uh oh, we can't allow the inode to go away while there
++	 * is still preallocation blocks pending.  Try to join the
++	 * aborted transaction
++	 */
++	jbegin_failure = err;
++	err = journal_join_abort(&th, inode->i_sb, 1);
++
++	if (err) {
++	    /* hmpf, our choices here aren't good.  We can pin the inode
++	     * which will disallow unmount from every happening, we can
++	     * do nothing, which will corrupt random memory on unmount,
++	     * or we can forcibly remove the file from the preallocation
++	     * list, which will leak blocks on disk.  Lets pin the inode
++	     * and let the admin know what is going on.
++	     */
++	    igrab(inode);
++	    reiserfs_warning(inode->i_sb, "pinning inode %lu because the "
++	                     "preallocation can't be freed");
++	    goto out;
++	}
++    }
+     reiserfs_update_inode_transaction(inode) ;
+ 
+ #ifdef REISERFS_PREALLOCATE
+     reiserfs_discard_prealloc (&th, inode);
+ #endif
+-    journal_end(&th, inode->i_sb, JOURNAL_PER_BALANCE_CNT * 3) ;
++    err = journal_end(&th, inode->i_sb, 1);
+ 
+-    if (atomic_read(&inode->i_count) <= 1 &&
++    /* copy back the error code from journal_begin */
++    if (!err)
++        err = jbegin_failure;
++
++    if (!err && atomic_read(&inode->i_count) <= 1 &&
+ 	(REISERFS_I(inode)->i_flags & i_pack_on_close_mask) &&
+         tail_has_to_be_packed (inode)) {
+ 	/* if regular file is released by last holder and it has been
+ 	   appended (we append by unformatted node only) or its direct
+ 	   item(s) had to be converted, then it may have to be
+ 	   indirect2direct converted */
+-	reiserfs_truncate_file(inode, 0) ;
++	err = reiserfs_truncate_file(inode, 0) ;
+     }
++out:
+     up (&inode->i_sem); 
+     reiserfs_write_unlock(inode->i_sb);
+-    return 0;
++    return err;
+ }
+ 
+ static void reiserfs_vfs_truncate_file(struct inode *inode) {
+@@ -146,7 +182,6 @@
+ 				 // of the fact that we already prepared
+ 				 // current block for journal
+     int will_prealloc = 0;
+-
+     RFALSE(!blocks_to_allocate, "green-9004: tried to allocate zero blocks?");
+ 
+     /* only preallocate if this is a small write */
+@@ -166,7 +201,9 @@
+     /* If we came here, it means we absolutely need to open a transaction,
+        since we need to allocate some blocks */
+     reiserfs_write_lock(inode->i_sb); // Journaling stuff and we need that.
+-    journal_begin(th, inode->i_sb, JOURNAL_PER_BALANCE_CNT * 3 + 1); // Wish I know if this number enough
++    res = journal_begin(th, inode->i_sb, JOURNAL_PER_BALANCE_CNT * 3 + 1); // Wish I know if this number enough
++    if (res)
++        goto error_exit;
+     reiserfs_update_inode_transaction(inode) ;
+ 
+     /* Look for the in-tree position of our write, need path for block allocator */
+@@ -194,7 +231,9 @@
+ 	    /* We flush the transaction in case of no space. This way some
+ 	       blocks might become free */
+ 	    SB_JOURNAL(inode->i_sb)->j_must_wait = 1;
+-	    restart_transaction(th, inode, &path);
++	    res = restart_transaction(th, inode, &path);
++            if (res)
++                goto error_exit;
+ 
+ 	    /* We might have scheduled, so search again */
+ 	    res = search_for_position_by_key(inode->i_sb, &key, &path);
+@@ -322,8 +361,14 @@
+ 		}
+ 		/* Now we want to check if transaction is too full, and if it is
+ 		   we restart it. This will also free the path. */
+-		if (journal_transaction_should_end(th, th->t_blocks_allocated))
+-		    restart_transaction(th, inode, &path);
++		if (journal_transaction_should_end(th, th->t_blocks_allocated)) {
++		    res = restart_transaction(th, inode, &path);
++                    if (res) {
++                        pathrelse (&path);
++                        kfree(zeros);
++                        goto error_exit;
++                    }
++                }
+ 
+ 		/* Well, need to recalculate path and stuff */
+ 		set_cpu_key_k_offset( &key, cpu_key_k_offset(&key) + (to_paste << inode->i_blkbits));
+@@ -349,6 +394,7 @@
+     // we are going to overwrite, so there is nothing to scan through for holes.
+     for ( curr_block = 0, itempos = path.pos_in_item ; curr_block < blocks_to_allocate && res == POSITION_FOUND ; ) {
+ retry:
++
+ 	if ( itempos >= ih_item_len(ih)/UNFM_P_SIZE ) {
+ 	    /* We run out of data in this indirect item, let's look for another
+ 	       one. */
+@@ -526,8 +572,14 @@
+ 	reiserfs_free_block(th, inode, le32_to_cpu(allocated_blocks[i]), 1);
+ 
+ error_exit:
+-    reiserfs_update_sd(th, inode); // update any changes we made to blk count
+-    journal_end(th, inode->i_sb, JOURNAL_PER_BALANCE_CNT * 3 + 1);
++    if (th->t_trans_id) {
++        int err;
++        // update any changes we made to blk count
++        reiserfs_update_sd(th, inode);
++        err = journal_end(th, inode->i_sb, JOURNAL_PER_BALANCE_CNT * 3 + 1);
++        if (err)
++            res = err;
++    }
+     reiserfs_write_unlock(inode->i_sb);
+     kfree(allocated_blocks);
+ 
+@@ -602,13 +654,16 @@
+     struct super_block *s = inode->i_sb;
+     int bh_per_page = PAGE_CACHE_SIZE / s->s_blocksize;
+     struct reiserfs_transaction_handle th;
+-    th.t_trans_id = 0;
++    int ret = 0;
+ 
++    th.t_trans_id = 0;
+     blocksize = 1 << inode->i_blkbits;
+ 
+     if (logit) {
+ 	reiserfs_write_lock(s);
+-	journal_begin(&th, s, bh_per_page + 1);
++	ret = journal_begin(&th, s, bh_per_page + 1);
++	if (ret)
++	    goto drop_write_lock;
+ 	reiserfs_update_inode_transaction(inode);
+     }
+     for(bh = head = page_buffers(page), block_start = 0;
+@@ -640,7 +695,8 @@
+ 	}
+     }
+     if (logit) {
+-	journal_end(&th, s, bh_per_page + 1);
++	ret = journal_end(&th, s, bh_per_page + 1);
++drop_write_lock:
+ 	reiserfs_write_unlock(s);
+     }
+     /*
+@@ -651,7 +707,7 @@
+      */
+     if (!partial)
+ 	SetPageUptodate(page);
+-    return 0;
++    return ret;
+ }
+ 
+ 
+@@ -717,7 +773,9 @@
+ 	reiserfs_write_lock(inode->i_sb);
+ 	if (!sd_update)
+ 	    reiserfs_update_sd(th, inode);
+-	journal_end(th, th->t_super, th->t_blocks_allocated);
++	status = journal_end(th, th->t_super, th->t_blocks_allocated);
++        if (status)
++            retval = status;
+ 	reiserfs_write_unlock(inode->i_sb);
+     }
+     th->t_trans_id = 0;
+@@ -1100,6 +1158,7 @@
+     size_t already_written = 0; // Number of bytes already written to the file.
+     loff_t pos; // Current position in the file.
+     ssize_t res; // return value of various functions that we call.
++    int err = 0;
+     struct inode *inode = file->f_dentry->d_inode; // Inode of the file that we are writing to.
+ 				/* To simplify coding at this time, we store
+ 				   locked pages in array for now */
+@@ -1114,24 +1173,40 @@
+ 	       If we will crash while doing direct io, finish_unfinished will
+ 	       cut the garbage from the file end. */
+ 	    reiserfs_write_lock(inode->i_sb);
+-	    journal_begin(&th, inode->i_sb,  JOURNAL_PER_BALANCE_CNT );
++	    err = journal_begin(&th, inode->i_sb,  JOURNAL_PER_BALANCE_CNT );
++            if (err) {
++		reiserfs_write_unlock (inode->i_sb);
++		return err;
++	    }
+ 	    reiserfs_update_inode_transaction(inode);
+ 	    add_save_link (&th, inode, 1 /* Truncate */);
+-	    journal_end(&th, inode->i_sb, JOURNAL_PER_BALANCE_CNT );
+-	    reiserfs_write_unlock(inode->i_sb);
+ 	    after_file_end = 1;
++	    err = journal_end(&th, inode->i_sb, JOURNAL_PER_BALANCE_CNT );
++            reiserfs_write_unlock(inode->i_sb);
++	    if (err)
++		return err;
+ 	}
+ 	result = generic_file_write(file, buf, count, ppos);
+ 
+ 	if ( after_file_end ) { /* Now update i_size and remove the savelink */
+ 	    struct reiserfs_transaction_handle th;
+ 	    reiserfs_write_lock(inode->i_sb);
+-	    journal_begin(&th, inode->i_sb, 1);
++	    err = journal_begin(&th, inode->i_sb, 1);
++            if (err) {
++                reiserfs_write_unlock (inode->i_sb);
++                return err;
++            }
+ 	    reiserfs_update_inode_transaction(inode);
+ 	    reiserfs_update_sd(&th, inode);
+-	    journal_end(&th, inode->i_sb, 1);
+-	    remove_save_link (inode, 1/* truncate */);
++	    err = journal_end(&th, inode->i_sb, 1);
++            if (err) {
++                reiserfs_write_unlock (inode->i_sb);
++                return err;
++            }
++	    err = remove_save_link (inode, 1/* truncate */);
+ 	    reiserfs_write_unlock(inode->i_sb);
++            if (err)
++                return err;
+ 	}
+ 
+ 	return result;
+@@ -1280,8 +1355,12 @@
+     /* this is only true on error */
+     if (th.t_trans_id) {
+         reiserfs_write_lock(inode->i_sb);
+-	journal_end(&th, th.t_super, th.t_blocks_allocated);
++        err = journal_end(&th, th.t_super, th.t_blocks_allocated);
+         reiserfs_write_unlock(inode->i_sb);
++        if (err) {
++            res = err;
++            goto out;
++        }
+     }
+ 
+     if ((file->f_flags & O_SYNC) || IS_SYNC(inode))
+diff -Nru a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
+--- a/fs/reiserfs/inode.c	2004-12-22 22:53:54 -08:00
++++ b/fs/reiserfs/inode.c	2004-12-22 22:53:54 -08:00
+@@ -47,21 +47,32 @@
+ 
+ 	reiserfs_delete_xattrs (inode);
+ 
+-	journal_begin(&th, inode->i_sb, jbegin_count) ;
++	if (journal_begin(&th, inode->i_sb, jbegin_count)) {
++	    up (&inode->i_sem);
++	    goto out;
++	}
+ 	reiserfs_update_inode_transaction(inode) ;
+ 
+-	reiserfs_delete_object (&th, inode);
++	if (reiserfs_delete_object (&th, inode)) {
++	    up (&inode->i_sem);
++	    goto out;
++	}
+ 
+-	journal_end(&th, inode->i_sb, jbegin_count) ;
++	if (journal_end(&th, inode->i_sb, jbegin_count)) {
++	    up (&inode->i_sem);
++	    goto out;
++	}
+ 
+         up (&inode->i_sem);
+ 
+         /* all items of file are deleted, so we can remove "save" link */
+-	remove_save_link (inode, 0/* not truncate */);
++	remove_save_link (inode, 0/* not truncate */); /* we can't do anything
++                                                        * about an error here */
+     } else {
+ 	/* no object items are in the tree */
+ 	;
+     }
++out:
+     clear_inode (inode); /* note this must go after the journal_end to prevent deadlock */
+     inode->i_blocks = 0;
+     reiserfs_write_unlock(inode->i_sb);
+@@ -201,20 +212,28 @@
+     return 0;
+ }
+ 
+-/*static*/ void restart_transaction(struct reiserfs_transaction_handle *th,
++/*static*/ int restart_transaction(struct reiserfs_transaction_handle *th,
+ 				struct inode *inode, struct path *path) {
+   struct super_block *s = th->t_super ;
+   int len = th->t_blocks_allocated ;
++  int err;
++
++  BUG_ON (!th->t_trans_id);
++  BUG_ON (!th->t_refcount);
+ 
+   /* we cannot restart while nested */
+   if (th->t_refcount > 1) {
+-      return  ;
++      return 0  ;
+   }
+   pathrelse(path) ;
+   reiserfs_update_sd(th, inode) ;
+-  journal_end(th, s, len) ;
+-  journal_begin(th, s, JOURNAL_PER_BALANCE_CNT * 6) ;
+-  reiserfs_update_inode_transaction(inode) ;
++  err = journal_end(th, s, len) ;
++  if (!err) {
++      err = journal_begin(th, s, JOURNAL_PER_BALANCE_CNT * 6) ;
++      if (!err)
++        reiserfs_update_inode_transaction(inode) ;
++  }
++  return err;
+ }
+ 
+ // it is called by get_block when create == 0. Returns block number
+@@ -443,9 +462,11 @@
+ 
+     ret = reiserfs_get_block(inode, iblock, bh_result,
+                              create | GET_BLOCK_NO_DANGLE) ;
++    if (ret)
++        goto out;
+ 
+     /* don't allow direct io onto tail pages */
+-    if (ret == 0 && buffer_mapped(bh_result) && bh_result->b_blocknr == 0) {
++    if (buffer_mapped(bh_result) && bh_result->b_blocknr == 0) {
+         /* make sure future calls to the direct io funcs for this offset
+         ** in the file fail by unmapping the buffer
+         */
+@@ -455,11 +476,15 @@
+     /* Possible unpacked tail. Flush the data before pages have
+        disappeared */
+     if (REISERFS_I(inode)->i_flags & i_pack_on_close_mask) {
++        int err;
+         lock_kernel();
+-        reiserfs_commit_for_inode(inode);
++        err = reiserfs_commit_for_inode(inode);
+         REISERFS_I(inode)->i_flags &= ~i_pack_on_close_mask;
+         unlock_kernel();
++        if (err < 0)
++            ret = err;
+     }
++out:
+     return ret ;
+ }
+ 
+@@ -539,6 +564,7 @@
+ 			   b_blocknr_t *allocated_block_nr, 
+ 			   struct path * path,
+ 			   int flags) {
++    BUG_ON (!th->t_trans_id);
+   
+ #ifdef REISERFS_PREALLOCATE
+     if (!(flags & GET_BLOCK_NO_ISEM)) {
+@@ -551,7 +577,7 @@
+ int reiserfs_get_block (struct inode * inode, sector_t block,
+ 			struct buffer_head * bh_result, int create)
+ {
+-    int repeat, retval;
++    int repeat, retval = 0;
+     b_blocknr_t allocated_block_nr = 0;// b_blocknr_t is (unsigned) 32 bit int
+     INITIALIZE_PATH(path);
+     int pos_in_item;
+@@ -655,7 +681,9 @@
+ 	    ** research if we succeed on the second try
+ 	    */
+ 	    SB_JOURNAL(inode->i_sb)->j_next_async_flush = 1;
+-	    restart_transaction(th, inode, &path) ;
++	    retval = restart_transaction(th, inode, &path) ;
++            if (retval)
++                goto failure;
+ 	    repeat = _allocate_block(th, block, inode, &allocated_block_nr, NULL, create);
+ 
+ 	    if (repeat != NO_DISK_SPACE && repeat != QUOTA_EXCEEDED) {
+@@ -696,8 +724,9 @@
+ 	}
+ 	set_block_dev_mapped(bh_result, unfm_ptr, inode);
+ 	pathrelse (&path);
++        retval = 0;
+ 	if (!dangle && th)
+-	    reiserfs_end_persistent_transaction(th);
++	    retval = reiserfs_end_persistent_transaction(th);
+ 
+ 	reiserfs_write_unlock(inode->i_sb);
+ 	 
+@@ -705,7 +734,7 @@
+ 	** there is no need to make sure the inode is updated with this 
+ 	** transaction
+ 	*/
+-	return 0;
++	return retval;
+     }
+ 
+     if (!th) {
+@@ -766,9 +795,12 @@
+ 		 * ugly, but we can only end the transaction if
+ 		 * we aren't nested
+ 		 */
++		BUG_ON (!th->t_refcount);
+ 		if (th->t_refcount == 1) {
+-		    reiserfs_end_persistent_transaction(th);
++		    retval = reiserfs_end_persistent_transaction(th);
+ 		    th = NULL;
++		    if (retval)
++			goto failure;
+ 		}
+ 
+ 		retval = convert_tail_for_hole(inode, bh_result, tail_offset) ;
+@@ -898,7 +930,9 @@
+ 	** ending their transaction will be able to continue.
+ 	*/
+ 	if (journal_transaction_should_end(th, th->t_blocks_allocated)) {
+-	  restart_transaction(th, inode, &path) ;
++	  retval = restart_transaction(th, inode, &path) ;
++	  if (retval)
++	    goto failure;
+ 	}
+ 	/* inserting indirect pointers for a hole can take a 
+ 	** long time.  reschedule if needed
+@@ -929,10 +963,15 @@
+     retval = 0;
+ 
+  failure:
+-    if (th && !dangle) {
+-      reiserfs_update_sd(th, inode) ;
+-      reiserfs_end_persistent_transaction(th);
++    if (th && (!dangle || (retval && !th->t_trans_id))) {
++        int err;
++        if (th->t_trans_id)
++            reiserfs_update_sd(th, inode);
++        err = reiserfs_end_persistent_transaction(th);
++        if (err)
++            retval = err;
+     }
++
+     reiserfs_write_unlock(inode->i_sb);
+     reiserfs_check_path(&path) ;
+     return retval;
+@@ -1215,6 +1254,8 @@
+     struct item_head *ih, tmp_ih ;
+     int retval;
+ 
++    BUG_ON (!th->t_trans_id);
++
+     make_cpu_key (&key, inode, SD_OFFSET, TYPE_STAT_DATA, 3);//key type is unimportant
+     
+     for(;;) {
+@@ -1508,12 +1549,8 @@
+     struct reiserfs_transaction_handle th ;
+     int jbegin_count = 1 ;
+ 
+-    if (inode->i_sb->s_flags & MS_RDONLY) {
+-        reiserfs_warning (inode->i_sb,
+-			  "clm-6005: writing inode %lu on readonly FS",
+-			  inode->i_ino) ;
++    if (inode->i_sb->s_flags & MS_RDONLY)
+         return ;
+-    }
+     /* memory pressure can sometimes initiate write_inode calls with sync == 1,
+     ** these cases are just when the system needs ram, not when the 
+     ** inode needs to reach disk for safety, and they can safely be
+@@ -1521,9 +1558,10 @@
+     */
+     if (do_sync && !(current->flags & PF_MEMALLOC)) {
+ 	reiserfs_write_lock(inode->i_sb);
+-	journal_begin(&th, inode->i_sb, jbegin_count) ;
+-	reiserfs_update_sd (&th, inode);
+-	journal_end_sync(&th, inode->i_sb, jbegin_count) ;
++	if (!journal_begin(&th, inode->i_sb, jbegin_count)) {
++            reiserfs_update_sd (&th, inode);
++            journal_end_sync(&th, inode->i_sb, jbegin_count) ;
++        }
+ 	reiserfs_write_unlock(inode->i_sb);
+     }
+     return 0;
+@@ -1551,6 +1589,8 @@
+     char * body = empty_dir;
+     struct cpu_key key;
+     int retval;
++
++    BUG_ON (!th->t_trans_id);
+     
+     _make_cpu_key (&key, KEY_FORMAT_3_5, le32_to_cpu (ih->ih_key.k_dir_id),
+ 		   le32_to_cpu (ih->ih_key.k_objectid), DOT_OFFSET, TYPE_DIRENTRY, 3/*key length*/);
+@@ -1602,6 +1642,8 @@
+     struct cpu_key key;
+     int retval;
+ 
++    BUG_ON (!th->t_trans_id);
++
+     _make_cpu_key (&key, KEY_FORMAT_3_5, 
+ 		   le32_to_cpu (ih->ih_key.k_dir_id), 
+ 		   le32_to_cpu (ih->ih_key.k_objectid),
+@@ -1652,6 +1694,8 @@
+     struct stat_data sd;
+     int retval;
+     int err;
++
++    BUG_ON (!th->t_trans_id);
+   
+     if (!dir || !dir->i_nlink) {
+ 	err = -EPERM;
+@@ -1926,7 +1970,7 @@
+ **
+ ** some code taken from block_truncate_page
+ */
+-void reiserfs_truncate_file(struct inode *p_s_inode, int update_timestamps) {
++int reiserfs_truncate_file(struct inode *p_s_inode, int update_timestamps) {
+     struct reiserfs_transaction_handle th ;
+     /* we want the offset for the first byte after the end of the file */
+     unsigned long offset = p_s_inode->i_size & (PAGE_CACHE_SIZE - 1) ;
+@@ -1962,18 +2006,28 @@
+     /* it is enough to reserve space in transaction for 2 balancings:
+        one for "save" link adding and another for the first
+        cut_from_item. 1 is for update_sd */
+-    journal_begin(&th, p_s_inode->i_sb,  JOURNAL_PER_BALANCE_CNT * 2 + 1 ) ;
++    error = journal_begin (&th, p_s_inode->i_sb,
++                           JOURNAL_PER_BALANCE_CNT * 2 + 1);
++    if (error)
++        goto out;
+     reiserfs_update_inode_transaction(p_s_inode) ;
+     if (update_timestamps)
+ 	    /* we are doing real truncate: if the system crashes before the last
+ 	       transaction of truncating gets committed - on reboot the file
+ 	       either appears truncated properly or not truncated at all */
+ 	add_save_link (&th, p_s_inode, 1);
+-    reiserfs_do_truncate (&th, p_s_inode, page, update_timestamps) ;
+-    journal_end(&th, p_s_inode->i_sb,  JOURNAL_PER_BALANCE_CNT * 2 + 1 ) ;
++    error = reiserfs_do_truncate (&th, p_s_inode, page, update_timestamps) ;
++    if (error)
++        goto out;
++    error = journal_end (&th, p_s_inode->i_sb, JOURNAL_PER_BALANCE_CNT * 2 + 1);
++    if (error)
++        goto out;
+ 
+-    if (update_timestamps)
+-	remove_save_link (p_s_inode, 1/* truncate */);
++    if (update_timestamps) {
++	error = remove_save_link (p_s_inode, 1/* truncate */);
++        if (error)
++            goto out;
++    }
+ 
+     if (page) {
+         length = offset & (blocksize - 1) ;
+@@ -1995,6 +2049,14 @@
+     }
+ 
+     reiserfs_write_unlock(p_s_inode->i_sb);
++    return 0;
++out:
++    if (page) {
++        unlock_page (page);
++        page_cache_release (page);
++    }
++    reiserfs_write_unlock(p_s_inode->i_sb);
++    return error;
+ }
+ 
+ static int map_block_for_writepage(struct inode *inode, 
+@@ -2064,7 +2126,9 @@
+ 
+ 	if (!trans_running) {
+ 	    /* vs-3050 is gone, no need to drop the path */
+-	    journal_begin(&th, inode->i_sb, jbegin_count) ;
++	    retval = journal_begin(&th, inode->i_sb, jbegin_count) ;
++            if (retval)
++                goto out;
+ 	    reiserfs_update_inode_transaction(inode) ;
+ 	    trans_running = 1;
+ 	    if (fs_changed(fs_gen, inode->i_sb) && item_moved(&tmp_ih, &path)) {
+@@ -2104,7 +2168,9 @@
+ out:
+     pathrelse(&path) ;
+     if (trans_running) {
+-	journal_end(&th, inode->i_sb, jbegin_count) ;
++        int err = journal_end(&th, inode->i_sb, jbegin_count) ;
++        if (err)
++            retval = err;
+ 	trans_running = 0;
+     }
+     reiserfs_write_unlock(inode->i_sb);
+@@ -2210,7 +2276,11 @@
+     if (checked) {
+ 	ClearPageChecked(page);
+ 	reiserfs_write_lock(s);
+-	journal_begin(&th, s, bh_per_page + 1);
++	error = journal_begin(&th, s, bh_per_page + 1);
++	if (error) {
++	    reiserfs_write_unlock(s);
++	    goto fail;
++	}
+ 	reiserfs_update_inode_transaction(inode);
+     }
+     /* now go through and lock any dirty buffers on the page */
+@@ -2245,8 +2315,10 @@
+     } while((bh = bh->b_this_page) != head);
+ 
+     if (checked) {
+-	journal_end(&th, s, bh_per_page + 1);
++	error = journal_end(&th, s, bh_per_page + 1);
+ 	reiserfs_write_unlock(s);
++	if (error)
++	    goto fail;
+     }
+     BUG_ON(PageWriteback(page));
+     set_page_writeback(page);
+@@ -2352,7 +2424,9 @@
+     fix_tail_page_for_writing(page) ;
+     if (reiserfs_transaction_running(inode->i_sb)) {
+ 	struct reiserfs_transaction_handle *th;
+-        th = (struct reiserfs_transaction_handle *)current->journal_info;
++	th = (struct reiserfs_transaction_handle *)current->journal_info;
++        BUG_ON (!th->t_refcount);
++        BUG_ON (!th->t_trans_id);
+ 	old_ref = th->t_refcount;
+ 	th->t_refcount++;
+     }
+@@ -2374,9 +2448,12 @@
+ 	    if (old_ref)
+ 	    	th->t_refcount--;
+ 	    else {
++                int err;
+ 		reiserfs_write_lock(inode->i_sb);
+-		reiserfs_end_persistent_transaction(th);
++		err = reiserfs_end_persistent_transaction(th);
+ 		reiserfs_write_unlock(inode->i_sb);
++                if (err)
++                    ret = err;
+ 	    }
+ 	}
+     }
+@@ -2417,20 +2494,28 @@
+ 	     (have_small_tails (inode->i_sb) && inode->i_size > i_block_size(inode)) )
+ 	    REISERFS_I(inode)->i_flags &= ~i_pack_on_close_mask ;
+ 
+-	journal_begin(&myth, inode->i_sb, 1) ;
++	ret = journal_begin(&myth, inode->i_sb, 1) ;
++	if (ret) {
++	    reiserfs_write_unlock(inode->i_sb);
++	    goto journal_error;
++	}
+ 	reiserfs_update_inode_transaction(inode) ;
+ 	inode->i_size = pos ;
+ 	reiserfs_update_sd(&myth, inode) ;
+ 	update_sd = 1;
+-	journal_end(&myth, inode->i_sb, 1) ;
++	ret = journal_end(&myth, inode->i_sb, 1) ;
+ 	reiserfs_write_unlock(inode->i_sb);
++	if (ret)
++	    goto journal_error;
+     }
+     if (th) {
+ 	reiserfs_write_lock(inode->i_sb);
+ 	if (!update_sd)
+ 	    reiserfs_update_sd(th, inode) ;
+-        reiserfs_end_persistent_transaction(th);
++	ret = reiserfs_end_persistent_transaction(th);
+ 	reiserfs_write_unlock(inode->i_sb);
++	if (ret)
++	    goto out;
+     }
+  
+     /* we test for O_SYNC here so we can commit the transaction
+@@ -2438,10 +2523,22 @@
+     */
+     if (f && (f->f_flags & O_SYNC)) {
+ 	reiserfs_write_lock(inode->i_sb);
+- 	reiserfs_commit_for_inode(inode) ;
++ 	ret = reiserfs_commit_for_inode(inode) ;
+ 	reiserfs_write_unlock(inode->i_sb);
+     }
++out:
+     return ret ;
++
++journal_error:
++    if (th) {
++	reiserfs_write_lock(inode->i_sb);
++	if (!update_sd)
++	    reiserfs_update_sd(th, inode) ;
++        ret = reiserfs_end_persistent_transaction(th);
++	reiserfs_write_unlock(inode->i_sb);
++    }
++
++    return ret;
+ }
+ 
+ void sd_attrs_to_i_attrs( __u16 sd_attrs, struct inode *inode )
+@@ -2667,11 +2764,16 @@
+         if (attr->ia_size > inode->i_size) {
+ 	    error = generic_cont_expand(inode, attr->ia_size) ;
+ 	    if (REISERFS_I(inode)->i_prealloc_count > 0) {
++		int err;
+ 		struct reiserfs_transaction_handle th ;
+ 		/* we're changing at most 2 bitmaps, inode + super */
+-		journal_begin(&th, inode->i_sb, 4) ;
+-		reiserfs_discard_prealloc (&th, inode);
+-		journal_end(&th, inode->i_sb, 4) ;
++		err = journal_begin(&th, inode->i_sb, 4) ;
++		if (!err) {
++		    reiserfs_discard_prealloc (&th, inode);
++		    err = journal_end(&th, inode->i_sb, 4) ;
++		}
++		if (err)
++		    error = err;
+ 	    }
+ 	    if (error)
+ 	        goto out;
+diff -Nru a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
+--- a/fs/reiserfs/journal.c	2004-12-22 22:53:54 -08:00
++++ b/fs/reiserfs/journal.c	2004-12-22 22:53:54 -08:00
+@@ -93,12 +93,6 @@
+ #define COMMIT_NOW  2		/* end and commit this transaction */
+ #define WAIT        4		/* wait for the log blocks to hit the disk*/
+ 
+-/* state bits for the journal */
+-#define WRITERS_BLOCKED 1      /* set when new writers not allowed */
+-#define WRITERS_QUEUED 2       /* set when log is full due to too many
+-				* writers
+-				*/
+-
+ static int do_journal_end(struct reiserfs_transaction_handle *,struct super_block *,unsigned long nblocks,int flags) ;
+ static int flush_journal_list(struct super_block *s, struct reiserfs_journal_list *jl, int flushall) ;
+ static int flush_commit_list(struct super_block *s, struct reiserfs_journal_list *jl, int flushall)  ;
+@@ -109,6 +103,18 @@
+ static int dirty_one_transaction(struct super_block *s,
+                                  struct reiserfs_journal_list *jl);
+ static void flush_async_commits(void *p);
++static void queue_log_writer(struct super_block *s);
++
++/* values for join in do_journal_begin_r */
++enum {
++    JBEGIN_REG = 0, /* regular journal begin */
++    JBEGIN_JOIN = 1, /* join the running transaction if at all possible */
++    JBEGIN_ABORT = 2, /* called from cleanup code, ignores aborted flag */
++};
++
++static int do_journal_begin_r(struct reiserfs_transaction_handle *th,
++                             struct super_block * p_s_sb,
++			     unsigned long nblocks,int join);
+ 
+ static void init_journal_hash(struct super_block *p_s_sb) {
+   struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
+@@ -771,7 +777,7 @@
+ {
+     struct buffer_head *bh;
+     struct reiserfs_jh *jh;
+-    int ret = 0;
++    int ret = j->j_errno;
+     struct buffer_chunk chunk;
+     struct list_head tmp;
+     INIT_LIST_HEAD(&tmp);
+@@ -795,11 +801,11 @@
+ 	    cond_resched();
+ 	    spin_lock(lock);
+ 	    goto loop_next;
+-	}
++        }
+ 	if (buffer_dirty(bh)) {
+ 	    list_del_init(&jh->list);
+ 	    list_add(&jh->list, &tmp);
+-	    add_to_chunk(&chunk, bh, lock, write_ordered_chunk);
++            add_to_chunk(&chunk, bh, lock, write_ordered_chunk);
+ 	} else {
+ 	    reiserfs_free_jh(bh);
+ 	    unlock_buffer(bh);
+@@ -824,8 +830,9 @@
+ 	    wait_on_buffer(bh);
+ 	    spin_lock(lock);
+ 	}
+-	if (!buffer_uptodate(bh))
++	if (!buffer_uptodate(bh)) {
+ 	    ret = -EIO;
++        }
+ 	put_bh(bh);
+ 	cond_resched_lock(lock);
+     }
+@@ -917,6 +924,7 @@
+   unsigned long trans_id = jl->j_trans_id;
+   struct reiserfs_journal *journal = SB_JOURNAL (s);
++  int retval = 0;
+ 
+   reiserfs_check_lock_depth(s, "flush_commit_list") ;
+ 
+   if (atomic_read(&jl->j_older_commits_done)) {
+@@ -927,10 +935,8 @@
+   /* before we can put our commit blocks on disk, we have to make sure everyone older than
+   ** us is on disk too
+   */
+-  if (jl->j_len <= 0)
+-    BUG();
+-  if (trans_id == journal->j_trans_id)
+-    BUG();
++  BUG_ON (jl->j_len <= 0);
++  BUG_ON (trans_id == journal->j_trans_id);
+ 
+   get_journal_list(jl);
+   if (flushall) {
+@@ -946,8 +952,7 @@
+     up(&jl->j_commit_lock);
+     goto put_jl;
+   }
+-  if (jl->j_trans_id == 0)
+-    BUG();
++  BUG_ON (jl->j_trans_id == 0);
+ 
+   /* this commit is done, exit */
+   if (atomic_read(&(jl->j_commit_left)) <= 0) {
+@@ -964,8 +969,7 @@
+                             journal, jl, &jl->j_bh_list);
+       lock_kernel();
+   }
+-  if (!list_empty(&jl->j_bh_list))
+-      BUG();
++  BUG_ON (!list_empty(&jl->j_bh_list));
+   /*
+    * for the description block and all the log blocks, submit any buffers
+    * that haven't already reached the disk
+@@ -975,7 +979,7 @@
+     bn = SB_ONDISK_JOURNAL_1st_BLOCK(s) + (jl->j_start+i) %
+          SB_ONDISK_JOURNAL_SIZE(s);
+     tbh = journal_find_get_block(s, bn) ;
+-    if (buffer_dirty(tbh))
++    if (buffer_dirty(tbh)) /* redundant, ll_rw_block() checks */
+ 	ll_rw_block(WRITE, 1, &tbh) ;
+     put_bh(tbh) ;
+   }
+@@ -1003,18 +1007,20 @@
+     // since we're using ll_rw_blk above, it might have skipped over
+     // a locked buffer.  Double check here
+     //
+-    if (buffer_dirty(tbh))
++    if (buffer_dirty(tbh)) /* redundant, sync_dirty_buffer() checks */
+       sync_dirty_buffer(tbh);
+-    if (!buffer_uptodate(tbh)) {
+-      reiserfs_panic(s, "journal-601, buffer write failed\n") ;
++    if (unlikely (!buffer_uptodate(tbh))) {
++#ifdef CONFIG_REISERFS_CHECK
++      reiserfs_warning(s, "journal-601, buffer write failed") ;
++#endif
++      retval = -EIO;
+     }
+     put_bh(tbh) ; /* once for journal_find_get_block */
+     put_bh(tbh) ;    /* once due to original getblk in do_journal_end */
+     atomic_dec(&(jl->j_commit_left)) ;
+   }
+ 
+-  if (atomic_read(&(jl->j_commit_left)) != 1)
+-    BUG();
++  BUG_ON (atomic_read(&(jl->j_commit_left)) != 1);
+ 
+   if (!barrier) {
+       if (buffer_dirty(jl->j_commit_bh))
+@@ -1025,8 +1031,15 @@
+     BUG();
+   mark_buffer_dirty(jl->j_commit_bh) ;
+   sync_dirty_buffer(jl->j_commit_bh) ;
+-  if (!buffer_uptodate(jl->j_commit_bh)) {
+-    reiserfs_panic(s, "journal-615: buffer write failed\n") ;
++
++  /* If there was a write error in the journal - we can't commit this
++   * transaction - it will be invalid and, if successful, will just end
++   * up propogating the write error out to the filesystem. */
++  if (unlikely (!buffer_uptodate(jl->j_commit_bh))) {
++#ifdef CONFIG_REISERFS_CHECK
++    reiserfs_warning(s, "journal-615: buffer write failed") ;
++#endif
++    retval = -EIO;
+   }
+   bforget(jl->j_commit_bh) ;
+   if (journal->j_last_commit_id != 0 &&
+@@ -1040,8 +1053,11 @@
+   /* now, every commit block is on the disk.  It is safe to allow blocks freed during this transaction to be reallocated */
+   cleanup_freed_for_journal_list(s, jl) ;
+ 
++  retval = retval ? retval : journal->j_errno;
++
+   /* mark the metadata dirty */
+-  dirty_one_transaction(s, jl);
++  if (!retval)
++    dirty_one_transaction(s, jl);
+   atomic_dec(&(jl->j_commit_left)) ;
+ 
+   if (flushall) {
+@@ -1050,7 +1066,10 @@
+   up(&jl->j_commit_lock);
+ put_jl:
+   put_journal_list(s, jl);
+-  return 0 ;
++
++  if (retval)
++    reiserfs_abort (s, retval, "Journal write error in %s", __FUNCTION__);
++  return retval;
+ }
+ 
+ /*
+@@ -1113,11 +1132,18 @@
+ static int _update_journal_header_block(struct super_block *p_s_sb, unsigned long offset, unsigned long trans_id) {
+   struct reiserfs_journal_header *jh ;
+   struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
++
++  if (reiserfs_is_journal_aborted (journal))
++    return -EIO;
++
+   if (trans_id >= journal->j_last_flush_trans_id) {
+     if (buffer_locked((journal->j_header_bh)))  {
+       wait_on_buffer((journal->j_header_bh)) ;
+-      if (!buffer_uptodate(journal->j_header_bh)) {
+-        reiserfs_panic(p_s_sb, "journal-699: buffer write failed\n") ;
++      if (unlikely (!buffer_uptodate(journal->j_header_bh))) {
++#ifdef CONFIG_REISERFS_CHECK
++        reiserfs_warning (p_s_sb, "journal-699: buffer write failed") ;
++#endif
++        return -EIO;
+       }
+     }
+     journal->j_last_flush_trans_id = trans_id ;
+@@ -1154,10 +1180,7 @@
+ static int update_journal_header_block(struct super_block *p_s_sb, 
+                                        unsigned long offset, 
+ 				       unsigned long trans_id) {
+-    if (_update_journal_header_block(p_s_sb, offset, trans_id)) {
+-	reiserfs_panic(p_s_sb, "journal-712: buffer write failed\n") ;
+-    }
+-    return 0 ;
++    return _update_journal_header_block(p_s_sb, offset, trans_id);
+ }
+ /* 
+ ** flush any and all journal lists older than you are 
+@@ -1176,8 +1199,12 @@
+      */
+ restart:
+     entry = journal->j_journal_list.next;
++    /* Did we wrap? */
++    if (entry == &journal->j_journal_list)
++        return 0;
+     other_jl = JOURNAL_LIST_ENTRY(entry);
+     if (other_jl->j_trans_id < trans_id) {
++        BUG_ON (other_jl->j_refcount <= 0);
+ 	/* do not flush all */
+ 	flush_journal_list(p_s_sb, other_jl, 0) ;
+ 
+@@ -1215,17 +1242,15 @@
+   struct buffer_head *saved_bh ; 
+   unsigned long j_len_saved = jl->j_len ;
+   struct reiserfs_journal *journal = SB_JOURNAL (s);
++  int err = 0;
+ 
+-  if (j_len_saved <= 0) {
+-    BUG();
+-  }
++  BUG_ON (j_len_saved <= 0);
+ 
+   if (atomic_read(&journal->j_wcount) != 0) {
+     reiserfs_warning(s, "clm-2048: flush_journal_list called with wcount %d",
+                       atomic_read(&journal->j_wcount)) ;
+   }
+-  if (jl->j_trans_id == 0)
+-    BUG();
++  BUG_ON (jl->j_trans_id == 0);
+ 
+   /* if flushall == 0, the lock is already held */
+   if (flushall) {
+@@ -1251,7 +1276,7 @@
+   */
+   flush_commit_list(s, jl, 1) ;
+ 
+-  if (!(jl->j_state & LIST_DIRTY))
++  if (!(jl->j_state & LIST_DIRTY) && !reiserfs_is_journal_aborted (journal))
+       BUG();
+ 
+   /* are we done now? */
+@@ -1275,6 +1300,11 @@
+     if (cn->blocknr == 0) {
+       goto free_cnode ;
+     }
++
++    /* This transaction failed commit. Don't write out to the disk */
++    if (!(jl->j_state & LIST_DIRTY))
++        goto free_cnode;
++
+     pjl = find_newer_jl_for_cn(cn) ;
+     /* the order is important here.  We check pjl to make sure we
+     ** don't clear BH_JDirty_wait if we aren't the one writing this
+@@ -1289,8 +1319,7 @@
+       get_bh(saved_bh) ;
+ 
+       if (buffer_journal_dirty(saved_bh)) {
+-	if (!can_dirty(cn))
+-	  BUG();
++        BUG_ON (!can_dirty (cn));
+         was_jwait = 1 ;
+         was_dirty = 1 ;
+       } else if (can_dirty(cn)) {
+@@ -1330,8 +1359,7 @@
+       get_bh(saved_bh) ;
+       set_bit(BLOCK_NEEDS_FLUSH, &cn->state) ;
+       lock_buffer(saved_bh);
+-      if (cn->blocknr != saved_bh->b_blocknr)
+-        BUG();
++      BUG_ON (cn->blocknr != saved_bh->b_blocknr);
+       if (buffer_dirty(saved_bh))
+         submit_logged_buffer(saved_bh) ;
+       else
+@@ -1363,14 +1391,16 @@
+ 	if (!cn->bh) {
+ 	  reiserfs_panic(s, "journal-1012: cn->bh is NULL\n") ;
+ 	}
+-	if (!buffer_uptodate(cn->bh)) {
+-	  reiserfs_panic(s, "journal-949: buffer write failed\n") ;
+-	}
++	if (unlikely (!buffer_uptodate(cn->bh))) {
++#ifdef CONFIG_REISERFS_CHECK
++	  reiserfs_warning(s, "journal-949: buffer write failed\n") ;
++#endif
++          err = -EIO;
++  	}
+ 	/* note, we must clear the JDirty_wait bit after the up to date
+ 	** check, otherwise we race against our flushpage routine
+ 	*/
+-        if (!test_clear_buffer_journal_dirty (cn->bh))
+-	    BUG();
++        BUG_ON (!test_clear_buffer_journal_dirty (cn->bh));
+ 
+         /* undo the inc from journal_mark_dirty */
+ 	put_bh(cn->bh) ;
+@@ -1380,7 +1410,11 @@
+     }
+   }
+ 
++  if (err)
++    reiserfs_abort (s, -EIO, "Write error while pushing transaction to disk in %s", __FUNCTION__);
+ flush_older_and_return:
++
++
+   /* before we can update the journal header block, we _must_ flush all 
+   ** real blocks from all older transactions to disk.  This is because
+   ** once the header block is updated, this transaction will not be
+@@ -1390,6 +1424,7 @@
+     flush_older_journal_lists(s, jl);
+   } 
+   
++  err = journal->j_errno;
+   /* before we can remove everything from the hash tables for this 
+   ** transaction, we must make sure it can never be replayed
+   **
+@@ -1398,11 +1433,13 @@
+   ** we only need to update the journal header block for the last list
+   ** being flushed
+   */
+-  if (flushall) {
+-    update_journal_header_block(s, (jl->j_start + jl->j_len + 2) % SB_ONDISK_JOURNAL_SIZE(s), jl->j_trans_id) ;
++  if (!err && flushall) {
++    err = update_journal_header_block(s, (jl->j_start + jl->j_len + 2) % SB_ONDISK_JOURNAL_SIZE(s), jl->j_trans_id) ;
++    if (err)
++        reiserfs_abort (s, -EIO, "Write error while updating journal header in %s", __FUNCTION__);
+   }
+   remove_all_from_journal_list(s, jl, 0) ;
+-  list_del(&jl->j_list);
++  list_del_init(&jl->j_list);
+   journal->j_num_lists--;
+   del_from_work_list(s, jl);
+ 
+@@ -1427,7 +1464,7 @@
+   put_journal_list(s, jl);
+   if (flushall)
+     up(&journal->j_flush_sem);
+-  return 0 ;
++  return err ;
+ } 
+ 
+ static int write_one_transaction(struct super_block *s,
+@@ -1497,8 +1534,7 @@
+ 	pjl = find_newer_jl_for_cn(cn) ;
+         if (!pjl && cn->blocknr && cn->bh && buffer_journal_dirty(cn->bh))
+ 	{
+-	    if (!can_dirty(cn))
+-	        BUG();
++	    BUG_ON (!can_dirty(cn));
+ 	    /* if the buffer is prepared, it will either be logged
+ 	     * or restored.  If restored, we need to make sure
+ 	     * it actually gets marked dirty
+@@ -1543,7 +1579,7 @@
+           (!num_trans && written < num_blocks)) {
+ 
+ 	if (jl->j_len == 0 || (jl->j_state & LIST_TOUCHED) ||
+-	    atomic_read(&jl->j_commit_left))
++	    atomic_read(&jl->j_commit_left) || !(jl->j_state & LIST_DIRTY))
+ 	{
+ 	    del_from_work_list(s, jl);
+ 	    break;
+@@ -1693,18 +1729,33 @@
+ */
+ static int do_journal_release(struct reiserfs_transaction_handle *th, struct super_block *p_s_sb, int error) {
+   struct reiserfs_transaction_handle myth ;
++  int flushed = 0;
++  struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
+ 
+   /* we only want to flush out transactions if we were called with error == 0
+   */
+   if (!error && !(p_s_sb->s_flags & MS_RDONLY)) {
+     /* end the current trans */
++    BUG_ON (!th->t_trans_id);
+     do_journal_end(th, p_s_sb,10, FLUSH_ALL) ;
+ 
+     /* make sure something gets logged to force our way into the flush code */
+-    journal_join(&myth, p_s_sb, 1) ;
+-    reiserfs_prepare_for_journal(p_s_sb, SB_BUFFER_WITH_SB(p_s_sb), 1) ;
+-    journal_mark_dirty(&myth, p_s_sb, SB_BUFFER_WITH_SB(p_s_sb)) ;
+-    do_journal_end(&myth, p_s_sb,1, FLUSH_ALL) ;
++    if (!journal_join(&myth, p_s_sb, 1)) {
++        reiserfs_prepare_for_journal(p_s_sb, SB_BUFFER_WITH_SB(p_s_sb), 1) ;
++        journal_mark_dirty(&myth, p_s_sb, SB_BUFFER_WITH_SB(p_s_sb)) ;
++        do_journal_end(&myth, p_s_sb,1, FLUSH_ALL) ;
++        flushed = 1;
++    }
++  }
++
++  /* this also catches errors during the do_journal_end above */
++  if (!error && reiserfs_is_journal_aborted(journal)) {
++      memset(&myth, 0, sizeof(myth));
++      if (!journal_join_abort(&myth, p_s_sb, 1)) {
++	  reiserfs_prepare_for_journal(p_s_sb, SB_BUFFER_WITH_SB(p_s_sb), 1) ;
++	  journal_mark_dirty(&myth, p_s_sb, SB_BUFFER_WITH_SB(p_s_sb)) ;
++          do_journal_end(&myth, p_s_sb, 1, FLUSH_ALL) ;
++      }
+   }
+ 
+   reiserfs_mounted_fs_count-- ;
+@@ -2314,6 +2365,7 @@
+     INIT_LIST_HEAD (&journal->j_prealloc_list);
+     INIT_LIST_HEAD(&journal->j_working_list);
+     INIT_LIST_HEAD(&journal->j_journal_list);
++    journal->j_persistent_trans = 0;
+     if (reiserfs_allocate_list_bitmaps(p_s_sb,
+ 				       journal->j_list_bitmap,
+  				       SB_BMAP_NR(p_s_sb)))
+@@ -2492,6 +2544,7 @@
+   struct reiserfs_journal *journal = SB_JOURNAL (th->t_super);
+   time_t now = get_seconds() ;
+   /* cannot restart while nested */
++  BUG_ON (!th->t_trans_id);
+   if (th->t_refcount > 1)
+     return 0 ;
+   if ( journal->j_must_wait > 0 ||
+@@ -2509,8 +2562,9 @@
+ */
+ void reiserfs_block_writes(struct reiserfs_transaction_handle *th) {
+     struct reiserfs_journal *journal = SB_JOURNAL (th->t_super);
++    BUG_ON (!th->t_trans_id);
+     journal->j_must_wait = 1 ;
+-    set_bit(WRITERS_BLOCKED, &journal->j_state) ;
++    set_bit(J_WRITERS_BLOCKED, &journal->j_state) ;
+     return ;
+ }
+ 
+@@ -2519,7 +2573,7 @@
+ */
+ void reiserfs_allow_writes(struct super_block *s) {
+     struct reiserfs_journal *journal = SB_JOURNAL (s);
+-    clear_bit(WRITERS_BLOCKED, &journal->j_state) ;
++    clear_bit(J_WRITERS_BLOCKED, &journal->j_state) ;
+     wake_up(&journal->j_join_wait) ;
+ }
+ 
+@@ -2529,13 +2583,13 @@
+ void reiserfs_wait_on_write_block(struct super_block *s) {
+     struct reiserfs_journal *journal = SB_JOURNAL (s);
+     wait_event(journal->j_join_wait,
+-               !test_bit(WRITERS_BLOCKED, &journal->j_state)) ;
++               !test_bit(J_WRITERS_BLOCKED, &journal->j_state)) ;
+ }
+ 
+ static void queue_log_writer(struct super_block *s) {
+     wait_queue_t wait;
+     struct reiserfs_journal *journal = SB_JOURNAL (s);
+-    set_bit(WRITERS_QUEUED, &journal->j_state);
++    set_bit(J_WRITERS_QUEUED, &journal->j_state);
+ 
+     /*
+      * we don't want to use wait_event here because
+@@ -2544,7 +2598,7 @@
+     init_waitqueue_entry(&wait, current);
+     add_wait_queue(&journal->j_join_wait, &wait);
+     set_current_state(TASK_UNINTERRUPTIBLE);
+-    if (test_bit(WRITERS_QUEUED, &journal->j_state))
++    if (test_bit(J_WRITERS_QUEUED, &journal->j_state))
+         schedule();
+     current->state = TASK_RUNNING;
+     remove_wait_queue(&journal->j_join_wait, &wait);
+@@ -2552,7 +2606,7 @@
+ 
+ static void wake_queued_writers(struct super_block *s) {
+     struct reiserfs_journal *journal = SB_JOURNAL (s);
+-    if (test_and_clear_bit(WRITERS_QUEUED, &journal->j_state))
++    if (test_and_clear_bit(J_WRITERS_QUEUED, &journal->j_state))
+         wake_up(&journal->j_join_wait);
+ }
+ 
+@@ -2590,10 +2644,9 @@
+   struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
+   struct reiserfs_transaction_handle myth;
+   int sched_count = 0;
++  int retval;
+ 
+   reiserfs_check_lock_depth(p_s_sb, "journal_begin") ;
+-  RFALSE( p_s_sb->s_flags & MS_RDONLY, 
+-	  "clm-2078: calling journal_begin on readonly FS") ;
+ 
+   PROC_INFO_INC( p_s_sb, journal.journal_being );
+   /* set here for journal_join */
+@@ -2602,9 +2655,14 @@
+ 
+ relock:
+   lock_journal(p_s_sb) ;
++  if (join != JBEGIN_ABORT && reiserfs_is_journal_aborted (journal)) {
++    unlock_journal (p_s_sb);
++    retval = journal->j_errno;
++    goto out_fail;
++  }
+   journal->j_bcount++;
+ 
+-  if (test_bit(WRITERS_BLOCKED, &journal->j_state)) {
++  if (test_bit(J_WRITERS_BLOCKED, &journal->j_state)) {
+     unlock_journal(p_s_sb) ;
+     reiserfs_wait_on_write_block(p_s_sb) ;
+     PROC_INFO_INC( p_s_sb, journal.journal_relock_writers );
+@@ -2647,15 +2705,20 @@
+         }
+ 	goto relock;
+     }
+-    journal_join(&myth, p_s_sb, 1) ;
++    retval = journal_join(&myth, p_s_sb, 1) ;
++    if (retval)
++        goto out_fail;
+ 
+     /* someone might have ended the transaction while we joined */
+     if (old_trans_id != journal->j_trans_id) {
+-        do_journal_end(&myth, p_s_sb, 1, 0) ;
++        retval = do_journal_end(&myth, p_s_sb, 1, 0) ;
+     } else {
+-        do_journal_end(&myth, p_s_sb, 1, COMMIT_NOW) ;
++        retval = do_journal_end(&myth, p_s_sb, 1, COMMIT_NOW) ;
+     }
+ 
++    if (retval)
++        goto out_fail;
++
+     PROC_INFO_INC( p_s_sb, journal.journal_relock_wcount );
+     goto relock ;
+   }
+@@ -2669,7 +2732,16 @@
+   th->t_blocks_allocated = nblocks ;
+   th->t_trans_id = journal->j_trans_id ;
+   unlock_journal(p_s_sb) ;
++  INIT_LIST_HEAD (&th->t_list);
+   return 0 ;
++
++out_fail:
++  memset (th, 0, sizeof (*th));
++  /* Re-set th->t_super, so we can properly keep track of how many
++   * persistent transactions there are. We need to do this so if this
++   * call is part of a failed restart_transaction, we can free it later */
++  th->t_super = p_s_sb;
++  return retval;
+ }
+ 
+ struct reiserfs_transaction_handle *
+@@ -2696,16 +2768,23 @@
+ 	reiserfs_kfree(th, sizeof(struct reiserfs_transaction_handle), s) ;
+         return NULL;
+     }
++
++    SB_JOURNAL(s)->j_persistent_trans++;
+     return th ;
+ }
+ 
+ int
+ reiserfs_end_persistent_transaction(struct reiserfs_transaction_handle *th) {
+     struct super_block *s = th->t_super;
+-    int ret;
+-    ret = journal_end(th, th->t_super, th->t_blocks_allocated);
+-    if (th->t_refcount == 0)
++    int ret = 0;
++    if (th->t_trans_id)
++        ret = journal_end(th, th->t_super, th->t_blocks_allocated);
++    else
++        ret = -EIO;
++    if (th->t_refcount == 0) {
++        SB_JOURNAL(s)->j_persistent_trans--;
+ 	reiserfs_kfree(th, sizeof(struct reiserfs_transaction_handle), s) ;
++    }
+     return ret;
+ }
+ 
+@@ -2719,7 +2798,20 @@
+   if (cur_th && cur_th->t_refcount > 1) {
+       BUG() ;
+   }
+-  return do_journal_begin_r(th, p_s_sb, nblocks, 1) ;
++  return do_journal_begin_r(th, p_s_sb, nblocks, JBEGIN_JOIN) ;
++}
++
++int journal_join_abort(struct reiserfs_transaction_handle *th, struct super_block *p_s_sb, unsigned long nblocks) {
++  struct reiserfs_transaction_handle *cur_th = current->journal_info;
++
++  /* this keeps do_journal_end from NULLing out the current->journal_info
++  ** pointer
++  */
++  th->t_handle_save = cur_th ;
++  if (cur_th && cur_th->t_refcount > 1) {
++      BUG() ;
++  }
++  return do_journal_begin_r(th, p_s_sb, nblocks, JBEGIN_ABORT) ;
+ }
+ 
+ int journal_begin(struct reiserfs_transaction_handle *th, struct super_block  * p_s_sb, unsigned long nblocks) {
+@@ -2730,6 +2822,7 @@
+     if (cur_th) {
+ 	/* we are nesting into the current transaction */
+ 	if (cur_th->t_super == p_s_sb) {
++              BUG_ON (!cur_th->t_refcount);
+ 	      cur_th->t_refcount++ ;
+ 	      memcpy(th, cur_th, sizeof(*th));
+ 	      if (th->t_refcount <= 1)
+@@ -2747,9 +2840,18 @@
+     } else {
+ 	current->journal_info = th;
+     }
+-    ret = do_journal_begin_r(th, p_s_sb, nblocks, 0) ;
++    ret = do_journal_begin_r(th, p_s_sb, nblocks, JBEGIN_REG) ;
+     if (current->journal_info != th)
+         BUG() ;
++
++    /* I guess this boils down to being the reciprocal of clm-2100 above.
++     * If do_journal_begin_r fails, we need to put it back, since journal_end
++     * won't be called to do it. */
++    if (ret)
++        current->journal_info = th->t_handle_save;
++    else
++        BUG_ON (!th->t_refcount);
++
+     return ret ;
+ }
+ 
+@@ -2767,12 +2869,14 @@
+   struct reiserfs_journal_cnode *cn = NULL;
+   int count_already_incd = 0 ;
+   int prepared = 0 ;
++  BUG_ON (!th->t_trans_id);
+ 
+   PROC_INFO_INC( p_s_sb, journal.mark_dirty );
+   if (th->t_trans_id != journal->j_trans_id) {
+     reiserfs_panic(th->t_super, "journal-1577: handle trans id %ld != current trans id %ld\n", 
+                    th->t_trans_id, journal->j_trans_id);
+   }
++
+   p_s_sb->s_dirt = 1;
+ 
+   prepared = test_clear_buffer_journal_prepared (bh);
+@@ -2860,6 +2964,11 @@
+     reiserfs_warning (p_s_sb, "REISER-NESTING: th NULL, refcount %d",
+                       th->t_refcount);
+ 
++  if (!th->t_trans_id) {
++    WARN_ON (1);
++    return -EIO;
++  }
++
+   th->t_refcount--;
+   if (th->t_refcount > 0) {
+     struct reiserfs_transaction_handle *cur_th = current->journal_info ;
+@@ -2976,6 +3085,7 @@
+ int journal_end_sync(struct reiserfs_transaction_handle *th, struct super_block *p_s_sb, unsigned long nblocks) {
+   struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
+ 
++  BUG_ON (!th->t_trans_id);
+   /* you can sync while nested, very, very bad */
+   if (th->t_refcount > 1) {
+     BUG() ;
+@@ -3008,7 +3118,7 @@
+    * this is a little racey, but there's no harm in missing
+    * the filemap_fdata_write
+    */
+-  if (!atomic_read(&journal->j_async_throttle)) {
++  if (!atomic_read(&journal->j_async_throttle) && !reiserfs_is_journal_aborted (journal)) {
+       atomic_inc(&journal->j_async_throttle);
+       filemap_fdatawrite(p_s_sb->s_bdev->bd_inode->i_mapping);
+       atomic_dec(&journal->j_async_throttle);
+@@ -3040,14 +3150,15 @@
+         journal->j_len > 0 &&
+         (now - journal->j_trans_start_time) > journal->j_max_trans_age)
+     {
+-	journal_join(&th, p_s_sb, 1) ;
+-	reiserfs_prepare_for_journal(p_s_sb, SB_BUFFER_WITH_SB(p_s_sb), 1) ;
+-	journal_mark_dirty(&th, p_s_sb, SB_BUFFER_WITH_SB(p_s_sb)) ;
+-
+-	/* we're only being called from kreiserfsd, it makes no sense to do
+-	** an async commit so that kreiserfsd can do it later
+-	*/
+-	do_journal_end(&th, p_s_sb,1, COMMIT_NOW | WAIT) ;
++	if (!journal_join(&th, p_s_sb, 1)) {
++            reiserfs_prepare_for_journal(p_s_sb, SB_BUFFER_WITH_SB(p_s_sb), 1) ;
++            journal_mark_dirty(&th, p_s_sb, SB_BUFFER_WITH_SB(p_s_sb)) ;
++
++            /* we're only being called from kreiserfsd, it makes no sense to do
++            ** an async commit so that kreiserfsd can do it later
++            */
++            do_journal_end(&th, p_s_sb,1, COMMIT_NOW | WAIT) ;
++        }
+     }
+     return p_s_sb->s_dirt;
+ }
+@@ -3073,6 +3184,8 @@
+   struct reiserfs_journal_list *jl;
+   struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
+ 
++  BUG_ON (!th->t_trans_id);
++
+   if (th->t_trans_id != journal->j_trans_id) {
+     reiserfs_panic(th->t_super, "journal-1577: handle trans id %ld != current trans id %ld\n", 
+                    th->t_trans_id, journal->j_trans_id);
+@@ -3178,6 +3291,7 @@
+   struct buffer_head *bh = NULL ;
+   struct reiserfs_list_bitmap *jb = NULL ;
+   int cleaned = 0 ;
++  BUG_ON (!th->t_trans_id);
+ 
+   cn = get_journal_hash_dev(p_s_sb, journal->j_hash_table, blocknr);
+   if (cn && cn->bh) {
+@@ -3297,6 +3414,8 @@
+ 	    if (atomic_read(&jl->j_commit_left) > 1)
+ 	        ret = 1;
+ 	    flush_commit_list(sb, jl, 1) ;
++	    if (journal->j_errno)
++		ret = journal->j_errno;
+ 	}
+     }
+     /* otherwise the list is gone, and long since committed */
+@@ -3390,6 +3509,9 @@
+ ** If no_async, won't return until all commit blocks are on disk.
+ **
+ ** keep reading, there are comments as you go along
++**
++** If the journal is aborted, we just clean up. Things like flushing
++** journal lists, etc just won't happen.
+ */
+ static int do_journal_end(struct reiserfs_transaction_handle *th, struct super_block  * p_s_sb, unsigned long nblocks, 
+ 		          int flags) {
+@@ -3411,8 +3533,8 @@
+   unsigned long commit_trans_id;
+   int trans_half;
+ 
+-  if (th->t_refcount > 1)
+-    BUG() ;
++  BUG_ON (th->t_refcount > 1);
++  BUG_ON (!th->t_trans_id);
+ 
+   current->journal_info = th->t_handle_save;
+   reiserfs_check_lock_depth(p_s_sb, "journal end");
+@@ -3707,7 +3829,7 @@
+   atomic_set(&(journal->j_jlock), 0) ;
+   unlock_journal(p_s_sb) ;
+   /* wake up any body waiting to join. */
+-  clear_bit(WRITERS_QUEUED, &journal->j_state);
++  clear_bit(J_WRITERS_QUEUED, &journal->j_state);
+   wake_up(&(journal->j_join_wait)) ;
+ 
+   if (!flush && wait_on_commit &&
+@@ -3716,6 +3838,49 @@
+   }
+ out:
+   reiserfs_check_lock_depth(p_s_sb, "journal end2");
+-  th->t_trans_id = 0;
+-  return 0 ;
++
++  memset (th, 0, sizeof (*th));
++  /* Re-set th->t_super, so we can properly keep track of how many
++   * persistent transactions there are. We need to do this so if this
++   * call is part of a failed restart_transaction, we can free it later */
++  th->t_super = p_s_sb;
++
++  return journal->j_errno;
++}
++
++void
++__reiserfs_journal_abort_hard (struct super_block *sb)
++{
++    struct reiserfs_journal *journal = SB_JOURNAL (sb);
++    if (test_bit (J_ABORTED, &journal->j_state))
++        return;
++
++    printk (KERN_CRIT "REISERFS: Aborting journal for filesystem on %s\n",
++                      reiserfs_bdevname (sb));
++
++    sb->s_flags |= MS_RDONLY;
++    set_bit (J_ABORTED, &journal->j_state);
++
++#ifdef CONFIG_REISERFS_CHECK
++    dump_stack();
++#endif
++}
++
++void
++__reiserfs_journal_abort_soft (struct super_block *sb, int errno)
++{
++    struct reiserfs_journal *journal = SB_JOURNAL (sb);
++    if (test_bit (J_ABORTED, &journal->j_state))
++        return;
++
++    if (!journal->j_errno)
++        journal->j_errno = errno;
++
++    __reiserfs_journal_abort_hard (sb);
++}
++
++void
++reiserfs_journal_abort (struct super_block *sb, int errno)
++{
++    return __reiserfs_journal_abort_soft (sb, errno);
+ }
+diff -Nru a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
+--- a/fs/reiserfs/namei.c	2004-12-22 22:53:54 -08:00
++++ b/fs/reiserfs/namei.c	2004-12-22 22:53:54 -08:00
+@@ -430,6 +430,7 @@
+     int buflen, paste_size;
+     int retval;
+ 
++    BUG_ON (!th->t_trans_id);
+ 
+     /* cannot allow items to be added into a busy deleted directory */
+     if (!namelen)
+@@ -606,16 +607,21 @@
+     if (locked)
+         reiserfs_write_lock_xattrs (dir->i_sb);
+ 
+-    journal_begin(&th, dir->i_sb, jbegin_count) ;
+-    retval = reiserfs_new_inode (&th, dir, mode, NULL, 0/*i_size*/, dentry, inode);
+-
+-    if (locked)
+-        reiserfs_write_unlock_xattrs (dir->i_sb);
+-
++    retval = journal_begin(&th, dir->i_sb, jbegin_count);
+     if (retval) {
++        drop_new_inode (inode);
+         goto out_failed;
+     }
++
++    retval = reiserfs_new_inode (&th, dir, mode, 0, 0/*i_size*/, dentry, inode);
++    if (retval)
++        goto out_failed;
+ 	
++    if (locked) {
++        reiserfs_write_unlock_xattrs (dir->i_sb);
++        locked = 0;
++    }
++
+     inode->i_op = &reiserfs_file_inode_operations;
+     inode->i_fop = &reiserfs_file_operations;
+     inode->i_mapping->a_ops = &reiserfs_address_space_operations ;
+@@ -623,9 +629,12 @@
+     retval = reiserfs_add_entry (&th, dir, dentry->d_name.name, dentry->d_name.len, 
+ 				inode, 1/*visible*/);
+     if (retval) {
++        int err;
+ 	inode->i_nlink--;
+ 	reiserfs_update_sd (&th, inode);
+-	journal_end(&th, dir->i_sb, jbegin_count) ;
++	err = journal_end(&th, dir->i_sb, jbegin_count) ;
++        if (err)
++            retval = err;
+ 	iput (inode);
+ 	goto out_failed;
+     }
+@@ -633,9 +642,11 @@
+     reiserfs_update_inode_transaction(dir) ;
+ 
+     d_instantiate(dentry, inode);
+-    journal_end(&th, dir->i_sb, jbegin_count) ;
++    retval = journal_end(&th, dir->i_sb, jbegin_count) ;
+ 
+ out_failed:
++    if (locked)
++        reiserfs_write_unlock_xattrs (dir->i_sb);
+     reiserfs_write_unlock(dir->i_sb);
+     return retval;
+ }
+@@ -666,17 +677,23 @@
+     if (locked)
+         reiserfs_write_lock_xattrs (dir->i_sb);
+ 
+-    journal_begin(&th, dir->i_sb, jbegin_count) ;
++    retval = journal_begin(&th, dir->i_sb, jbegin_count) ;
++    if (retval) {
++        drop_new_inode (inode);
++        goto out_failed;
++    }
+ 
+     retval = reiserfs_new_inode (&th, dir, mode, NULL, 0/*i_size*/, dentry, inode);
+-
+-    if (locked)
+-        reiserfs_write_unlock_xattrs (dir->i_sb);
+-
+     if (retval) {
+         goto out_failed;
+     }
+ 
++    if (locked) {
++        reiserfs_write_unlock_xattrs (dir->i_sb);
++        locked = 0;
++    }
++
++
+     inode->i_op = &reiserfs_special_inode_operations;
+     init_special_inode(inode, inode->i_mode, rdev) ;
+ 
+@@ -689,17 +706,22 @@
+     retval = reiserfs_add_entry (&th, dir, dentry->d_name.name, dentry->d_name.len, 
+ 				 inode, 1/*visible*/);
+     if (retval) {
++        int err;
+ 	inode->i_nlink--;
+ 	reiserfs_update_sd (&th, inode);
+-	journal_end(&th, dir->i_sb, jbegin_count) ;
++	err = journal_end(&th, dir->i_sb, jbegin_count) ;
++        if (err)
++	    retval = err;
+ 	iput (inode);
+ 	goto out_failed;
+     }
+ 
+     d_instantiate(dentry, inode);
+-    journal_end(&th, dir->i_sb, jbegin_count) ;
++    retval = journal_end(&th, dir->i_sb, jbegin_count) ;
+ 
+ out_failed:
++    if (locked)
++        reiserfs_write_unlock_xattrs (dir->i_sb);
+     reiserfs_write_unlock(dir->i_sb);
+     return retval;
+ }
+@@ -730,7 +752,13 @@
+     reiserfs_write_lock(dir->i_sb);
+     if (locked)
+         reiserfs_write_lock_xattrs (dir->i_sb);
+-    journal_begin(&th, dir->i_sb, jbegin_count) ;
++
++    retval = journal_begin(&th, dir->i_sb, jbegin_count) ;
++    if (retval) {
++        drop_new_inode (inode);
++        goto out_failed;
++    }
++
+ 
+     /* inc the link count now, so another writer doesn't overflow it while
+     ** we sleep later on.
+@@ -741,13 +769,16 @@
+ 				old_format_only (dir->i_sb) ? 
+ 				EMPTY_DIR_SIZE_V1 : EMPTY_DIR_SIZE,
+ 				dentry, inode);
+-    if (locked)
+-        reiserfs_write_unlock_xattrs (dir->i_sb);
+-
+     if (retval) {
+ 	dir->i_nlink-- ;
+ 	goto out_failed;
+     }
++
++    if (locked) {
++	reiserfs_write_unlock_xattrs (dir->i_sb);
++	locked = 0;
++    }
++
+     reiserfs_update_inode_transaction(inode) ;
+     reiserfs_update_inode_transaction(dir) ;
+ 
+@@ -758,10 +789,13 @@
+     retval = reiserfs_add_entry (&th, dir, dentry->d_name.name, dentry->d_name.len, 
+ 				inode, 1/*visible*/);
+     if (retval) {
++	int err;
+ 	inode->i_nlink = 0;
+ 	DEC_DIR_INODE_NLINK(dir);
+ 	reiserfs_update_sd (&th, inode);
+-	journal_end(&th, dir->i_sb, jbegin_count) ;
++	err = journal_end(&th, dir->i_sb, jbegin_count) ;
++	if (err)
++	    retval = err;
+ 	iput (inode);
+ 	goto out_failed;
+     }
+@@ -770,8 +804,10 @@
+     reiserfs_update_sd (&th, dir);
+ 
+     d_instantiate(dentry, inode);
+-    journal_end(&th, dir->i_sb, jbegin_count) ;
++    retval = journal_end(&th, dir->i_sb, jbegin_count) ;
+ out_failed:
++    if (locked)
++        reiserfs_write_unlock_xattrs (dir->i_sb);
+     reiserfs_write_unlock(dir->i_sb);
+     return retval;
+ }
+@@ -791,7 +827,7 @@
+ 
+ static int reiserfs_rmdir (struct inode * dir, struct dentry *dentry)
+ {
+-    int retval;
++    int retval, err;
+     struct inode * inode;
+     struct reiserfs_transaction_handle th ;
+     int jbegin_count; 
+@@ -803,7 +839,9 @@
+     jbegin_count = JOURNAL_PER_BALANCE_CNT * 2 + 2;
+ 
+     reiserfs_write_lock(dir->i_sb);
+-    journal_begin(&th, dir->i_sb, jbegin_count) ;
++    retval = journal_begin(&th, dir->i_sb, jbegin_count) ;
++    if (retval)
++        goto out_rmdir;
+ 
+     de.de_gen_number_bit_string = NULL;
+     if ( (retval = reiserfs_find_entry (dir, dentry->d_name.name, dentry->d_name.len, &path, &de)) == NAME_NOT_FOUND) {
+@@ -852,24 +890,25 @@
+     /* prevent empty directory from getting lost */
+     add_save_link (&th, inode, 0/* not truncate */);
+ 
+-    journal_end(&th, dir->i_sb, jbegin_count) ;
++    retval = journal_end(&th, dir->i_sb, jbegin_count) ;
+     reiserfs_check_path(&path) ;
++out_rmdir:
+     reiserfs_write_unlock(dir->i_sb);
+-    return 0;
++    return retval;
+ 	
+  end_rmdir:
+     /* we must release path, because we did not call
+        reiserfs_cut_from_item, or reiserfs_cut_from_item does not
+        release path if operation was not complete */
+     pathrelse (&path);
+-    journal_end(&th, dir->i_sb, jbegin_count) ;
++    err = journal_end(&th, dir->i_sb, jbegin_count) ;
+     reiserfs_write_unlock(dir->i_sb);
+-    return retval;	
++    return err ? err : retval;
+ }
+ 
+ static int reiserfs_unlink (struct inode * dir, struct dentry *dentry)
+ {
+-    int retval;
++    int retval, err;
+     struct inode * inode;
+     struct reiserfs_dir_entry de;
+     INITIALIZE_PATH (path);
+@@ -884,7 +923,9 @@
+     jbegin_count = JOURNAL_PER_BALANCE_CNT * 2 + 2;
+ 
+     reiserfs_write_lock(dir->i_sb);
+-    journal_begin(&th, dir->i_sb, jbegin_count) ;
++    retval = journal_begin(&th, dir->i_sb, jbegin_count) ;
++    if (retval)
++        goto out_unlink;
+ 	
+     de.de_gen_number_bit_string = NULL;
+     if ( (retval = reiserfs_find_entry (dir, dentry->d_name.name, dentry->d_name.len, &path, &de)) == NAME_NOT_FOUND) {
+@@ -938,15 +979,18 @@
+        /* prevent file from getting lost */
+        add_save_link (&th, inode, 0/* not truncate */);
+ 
+-    journal_end(&th, dir->i_sb, jbegin_count) ;
++    retval = journal_end(&th, dir->i_sb, jbegin_count) ;
+     reiserfs_check_path(&path) ;
+     reiserfs_write_unlock(dir->i_sb);
+-    return 0;
++    return retval;
+ 
+  end_unlink:
+     pathrelse (&path);
+-    journal_end(&th, dir->i_sb, jbegin_count) ;
++    err = journal_end(&th, dir->i_sb, jbegin_count) ;
+     reiserfs_check_path(&path) ;
++    if (err)
++        retval = err;
++out_unlink:
+     reiserfs_write_unlock(dir->i_sb);
+     return retval;
+ }
+@@ -989,7 +1033,12 @@
+ 
+     /* We would inherit the default ACL here, but symlinks don't get ACLs */
+ 
+-    journal_begin(&th, parent_dir->i_sb, jbegin_count) ;
++    retval = journal_begin(&th, parent_dir->i_sb, jbegin_count) ;
++    if (retval) {
++        drop_new_inode (inode);
++        reiserfs_kfree (name, item_len, parent_dir->i_sb);
++        goto out_failed;
++    }
+ 
+     retval = reiserfs_new_inode (&th, parent_dir, mode, name, strlen (symname), 
+                                  dentry, inode);
+@@ -1011,15 +1060,18 @@
+     retval = reiserfs_add_entry (&th, parent_dir, dentry->d_name.name, 
+                                  dentry->d_name.len, inode, 1/*visible*/);
+     if (retval) {
++	int err;
+ 	inode->i_nlink--;
+ 	reiserfs_update_sd (&th, inode);
+-	journal_end(&th, parent_dir->i_sb, jbegin_count) ;
++	err = journal_end(&th, parent_dir->i_sb, jbegin_count) ;
++	if (err)
++	    retval = err;
+ 	iput (inode);
+ 	goto out_failed;
+     }
+ 
+     d_instantiate(dentry, inode);
+-    journal_end(&th, parent_dir->i_sb, jbegin_count) ;
++    retval = journal_end(&th, parent_dir->i_sb, jbegin_count) ;
+ out_failed:
+     reiserfs_write_unlock(parent_dir->i_sb);
+     return retval;
+@@ -1045,7 +1097,12 @@
+     /* inc before scheduling so reiserfs_unlink knows we are here */
+     inode->i_nlink++;
+ 
+-    journal_begin(&th, dir->i_sb, jbegin_count) ;
++    retval = journal_begin(&th, dir->i_sb, jbegin_count) ;
++    if (retval) {
++        inode->i_nlink--;
++        reiserfs_write_unlock (dir->i_sb);
++        return retval;
++    }
+ 
+     /* create new entry */
+     retval = reiserfs_add_entry (&th, dir, dentry->d_name.name, dentry->d_name.len,
+@@ -1055,10 +1112,11 @@
+     reiserfs_update_inode_transaction(dir) ;
+ 
+     if (retval) {
++	int err;
+ 	inode->i_nlink--;
+-	journal_end(&th, dir->i_sb, jbegin_count) ;
++	err = journal_end(&th, dir->i_sb, jbegin_count) ;
+ 	reiserfs_write_unlock(dir->i_sb);
+-	return retval;
++	return err ? err : retval;
+     }
+ 
+     inode->i_ctime = CURRENT_TIME;
+@@ -1066,9 +1124,9 @@
+ 
+     atomic_inc(&inode->i_count) ;
+     d_instantiate(dentry, inode);
+-    journal_end(&th, dir->i_sb, jbegin_count) ;
++    retval = journal_end(&th, dir->i_sb, jbegin_count) ;
+     reiserfs_write_unlock(dir->i_sb);
+-    return 0;
++    return retval;
+ }
+ 
+ 
+@@ -1195,7 +1253,12 @@
+ 	}
+     }
+ 
+-    journal_begin(&th, old_dir->i_sb, jbegin_count) ;
++    retval = journal_begin(&th, old_dir->i_sb, jbegin_count) ;
++    if (retval) {
++        reiserfs_write_unlock (old_dir->i_sb);
++        return retval;
++    }
++
+ 
+     /* add new entry (or find the existing one) */
+     retval = reiserfs_add_entry (&th, new_dir, new_dentry->d_name.name, new_dentry->d_name.len, 
+@@ -1206,9 +1269,9 @@
+ 			    "vs-7050: new entry is found, new inode == 0\n");
+ 	}
+     } else if (retval) {
+-	journal_end(&th, old_dir->i_sb, jbegin_count) ;
++	int err = journal_end(&th, old_dir->i_sb, jbegin_count) ;
+ 	reiserfs_write_unlock(old_dir->i_sb);
+-	return retval;
++	return err ? err : retval;
+     }
+ 
+     reiserfs_update_inode_transaction(old_dir) ;
+@@ -1357,9 +1420,9 @@
+ 	reiserfs_update_sd (&th, new_dentry_inode);
+     }
+ 
+-    journal_end(&th, old_dir->i_sb, jbegin_count) ;
++    retval = journal_end(&th, old_dir->i_sb, jbegin_count) ;
+     reiserfs_write_unlock(old_dir->i_sb);
+-    return 0;
++    return retval;
+ }
+ 
+ /*
+@@ -1414,5 +1477,3 @@
+     .permission     = reiserfs_permission,
+ 
+ };
+-
+-
+diff -Nru a/fs/reiserfs/objectid.c b/fs/reiserfs/objectid.c
+--- a/fs/reiserfs/objectid.c	2004-12-22 22:53:54 -08:00
++++ b/fs/reiserfs/objectid.c	2004-12-22 22:53:54 -08:00
+@@ -55,6 +55,7 @@
+     __u32 * map = objectid_map (s, rs);
+     __u32 unused_objectid;
+ 
++    BUG_ON (!th->t_trans_id);
+ 
+     check_objectid_map (s, map);
+ 
+@@ -99,6 +100,7 @@
+     __u32 * map = objectid_map (s, rs);
+     int i = 0;
+ 
++    BUG_ON (!th->t_trans_id);
+     //return;
+     check_objectid_map (s, map);
+ 
+diff -Nru a/fs/reiserfs/prints.c b/fs/reiserfs/prints.c
+--- a/fs/reiserfs/prints.c	2004-12-22 22:53:54 -08:00
++++ b/fs/reiserfs/prints.c	2004-12-22 22:53:54 -08:00
+@@ -366,6 +366,49 @@
+ 	 reiserfs_bdevname (sb), error_buf);
+ }
+ 
++static void
++do_handle_error (struct super_block *sb, int errno)
++{
++    if (reiserfs_error_panic (sb)) {
++        panic ("REISERFS: panic (device %s): Panic forced after error\n",
++               reiserfs_bdevname (sb));
++    }
++
++    if (reiserfs_error_ro (sb)) {
++        printk (KERN_CRIT "REISERFS: error (device %s): Re-mounting fs "
++                "readonly\n", reiserfs_bdevname (sb));
++        reiserfs_journal_abort (sb, errno);
++    }
++}
++
++void
++reiserfs_error (struct super_block * sb, int errno, const char *fmt, ...)
++{
++    do_reiserfs_warning (fmt);
++    printk (KERN_CRIT "REISERFS: error (device %s): %s\n",
++            reiserfs_bdevname (sb), error_buf);
++    do_handle_error (sb, errno);
++}
++
++void
++reiserfs_abort (struct super_block *sb, int errno, const char *fmt, ...)
++{
++    do_reiserfs_warning (fmt);
++
++    if (reiserfs_error_panic (sb)) {
++        panic (KERN_CRIT "REISERFS: panic (device %s): %s\n",
++               reiserfs_bdevname (sb), error_buf);
++    }
++
++    if (sb->s_flags & MS_RDONLY)
++        return;
++
++    printk (KERN_CRIT "REISERFS: abort (device %s): %s\n",
++            reiserfs_bdevname (sb), error_buf);
++
++    sb->s_flags |= MS_RDONLY;
++    reiserfs_journal_abort (sb, errno);
++}
+ 
+ void print_virtual_node (struct virtual_node * vn)
+ {
+diff -Nru a/fs/reiserfs/resize.c b/fs/reiserfs/resize.c
+--- a/fs/reiserfs/resize.c	2004-12-22 22:53:54 -08:00
++++ b/fs/reiserfs/resize.c	2004-12-22 22:53:54 -08:00
+@@ -19,8 +19,10 @@
+ 
+ int reiserfs_resize (struct super_block * s, unsigned long block_count_new)
+ {
++        int err = 0;
+ 	struct reiserfs_super_block * sb;
+         struct reiserfs_bitmap_info *bitmap;
++	struct reiserfs_bitmap_info *old_bitmap = SB_AP_BITMAP(s);
+ 	struct buffer_head * bh;
+ 	struct reiserfs_transaction_handle th;
+ 	unsigned int bmap_nr_new, bmap_nr;
+@@ -107,12 +109,19 @@
+ 	     * block pointers */
+ 	    bitmap = vmalloc(sizeof(struct reiserfs_bitmap_info) * bmap_nr_new);
+ 	    if (!bitmap) {
++		/* Journal bitmaps are still supersized, but the memory isn't
++		 * leaked, so I guess it's ok */
+ 		printk("reiserfs_resize: unable to allocate memory.\n");
+ 		return -ENOMEM;
+ 	    }
+ 	    memset (bitmap, 0, sizeof (struct reiserfs_bitmap_info) * SB_BMAP_NR(s));
+ 	    for (i = 0; i < bmap_nr; i++)
+-		bitmap[i] = SB_AP_BITMAP(s)[i];
++		bitmap[i] = old_bitmap[i];
++
++	    /* This doesn't go through the journal, but it doesn't have to.
++	     * The changes are still atomic: We're synced up when the journal
++	     * transaction begins, and the new bitmaps don't matter if the
++	     * transaction fails. */
+ 	    for (i = bmap_nr; i < bmap_nr_new; i++) {
+ 		bitmap[i].bh = sb_getblk(s, i * s->s_blocksize * 8);
+ 		memset(bitmap[i].bh->b_data, 0, sb_blocksize(sb));
+@@ -126,12 +135,16 @@
+ 		bitmap[i].free_count = sb_blocksize(sb) * 8 - 1;
+ 	    }	
+ 	    /* free old bitmap blocks array */
+-	    vfree(SB_AP_BITMAP(s));
+ 	    SB_AP_BITMAP(s) = bitmap;
++	    vfree (old_bitmap);
+ 	}
+ 	
+-	/* begin transaction */
+-	journal_begin(&th, s, 10);
++	/* begin transaction, if there was an error, it's fine. Yes, we have
++	 * incorrect bitmaps now, but none of it is ever going to touch the
++	 * disk anyway. */
++	err = journal_begin(&th, s, 10);
++	if (err)
++	    return err;
+ 
+ 	/* correct last bitmap blocks in old and new disk layout */
+ 	reiserfs_prepare_for_journal(s, SB_AP_BITMAP(s)[bmap_nr - 1].bh, 1);
+@@ -165,8 +178,5 @@
+ 	journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB(s));
+ 	
+ 	SB_JOURNAL(s)->j_must_wait = 1;
+-	journal_end(&th, s, 10);
+-
+-	return 0;
++	return journal_end(&th, s, 10);
+ }
+-
+diff -Nru a/fs/reiserfs/stree.c b/fs/reiserfs/stree.c
+--- a/fs/reiserfs/stree.c	2004-12-22 22:53:54 -08:00
++++ b/fs/reiserfs/stree.c	2004-12-22 22:53:54 -08:00
+@@ -1036,6 +1036,8 @@
+     struct item_head    * p_le_ih = PATH_PITEM_HEAD(p_s_path);
+     struct buffer_head  * p_s_bh = PATH_PLAST_BUFFER(p_s_path);
+ 
++    BUG_ON (!th->t_trans_id);
++
+     /* Stat_data item. */
+     if ( is_statdata_le_ih (p_le_ih) ) {
+ 
+@@ -1222,6 +1224,9 @@
+     struct path         * p_s_path,
+     int                   n_size
+     ) {
++
++    BUG_ON (!th->t_trans_id);
++
+     memset (p_s_tb,'\0',sizeof(struct tree_balance));
+     p_s_tb->transaction_handle = th ;
+     p_s_tb->tb_sb = p_s_sb;
+@@ -1290,6 +1295,8 @@
+     int			n_iter = 0;
+ #endif
+ 
++    BUG_ON (!th->t_trans_id);
++
+     init_tb_struct(th, &s_del_balance, p_s_sb, p_s_path, 0/*size is unknown*/);
+ 
+     while ( 1 ) {
+@@ -1419,6 +1426,8 @@
+     struct cpu_key cpu_key;
+     int retval;
+     int quota_cut_bytes = 0;
++
++    BUG_ON (!th->t_trans_id);
+     
+     le_key2cpu_key (&cpu_key, key);
+     
+@@ -1474,12 +1483,16 @@
+ }
+ 
+ 
+-void reiserfs_delete_object (struct reiserfs_transaction_handle *th, struct inode * inode)
++int reiserfs_delete_object (struct reiserfs_transaction_handle *th, struct inode * inode)
+ {
++    int err;
+     inode->i_size = 0;
++    BUG_ON (!th->t_trans_id);
+ 
+     /* for directory this deletes item containing "." and ".." */
+-    reiserfs_do_truncate (th, inode, NULL, 0/*no timestamp updates*/);
++    err = reiserfs_do_truncate (th, inode, NULL, 0/*no timestamp updates*/);
++    if (err)
++        return err;
+     
+ #if defined( USE_INODE_GENERATION_COUNTER )
+     if( !old_format_only ( th -> t_super ) )
+@@ -1493,6 +1506,8 @@
+ /* USE_INODE_GENERATION_COUNTER */
+ #endif
+     reiserfs_delete_solid_item (th, inode, INODE_PKEY (inode));
++
++    return err;
+ }
+ 
+ static void
+@@ -1542,6 +1557,7 @@
+     struct super_block * p_s_sb = p_s_inode->i_sb;
+     int n_block_size = p_s_sb->s_blocksize;
+     int cut_bytes;
++    BUG_ON (!th->t_trans_id);
+ 
+     if (n_new_file_size != p_s_inode->i_size)
+ 	BUG ();
+@@ -1574,6 +1590,7 @@
+     struct cpu_key tail_key;
+     int tail_len;
+     int removed;
++    BUG_ON (!th->t_trans_id);
+ 
+     make_cpu_key (&tail_key, inode, inode->i_size + 1, TYPE_DIRECT, 4);// !!!!
+     tail_key.key_length = 4;
+@@ -1623,6 +1640,8 @@
+     int retval2 = -1;
+     int quota_cut_bytes;
+     loff_t tail_pos = 0;
++
++    BUG_ON (!th->t_trans_id);
+     
+     init_tb_struct(th, &s_cut_balance, p_s_inode->i_sb, p_s_path, n_cut_size);
+ 
+@@ -1775,6 +1794,7 @@
+ 
+ static void truncate_directory (struct reiserfs_transaction_handle *th, struct inode * inode)
+ {
++    BUG_ON (!th->t_trans_id);
+     if (inode->i_nlink)
+ 	reiserfs_warning (inode->i_sb,
+ 			  "vs-5655: truncate_directory: link count != 0");
+@@ -1792,7 +1812,7 @@
+ 
+ /* Truncate file to the new size. Note, this must be called with a transaction
+    already started */
+-void reiserfs_do_truncate (struct reiserfs_transaction_handle *th, 
++int reiserfs_do_truncate (struct reiserfs_transaction_handle *th,
+ 			   struct  inode * p_s_inode, /* ->i_size contains new
+                                                          size */
+ 			   struct page *page, /* up to date for last block */
+@@ -1808,14 +1828,16 @@
+ 	n_new_file_size;/* New file size. */
+     int                   n_deleted;      /* Number of deleted or truncated bytes. */
+     int retval;
++    int err = 0;
+ 
++    BUG_ON (!th->t_trans_id);
+     if ( ! (S_ISREG(p_s_inode->i_mode) || S_ISDIR(p_s_inode->i_mode) || S_ISLNK(p_s_inode->i_mode)) )
+-	return;
++	return 0;
+ 
+     if (S_ISDIR(p_s_inode->i_mode)) {
+ 	// deletion of directory - no need to update timestamps
+ 	truncate_directory (th, p_s_inode);
+-	return;
++	return 0;
+     }
+ 
+     /* Get new file size. */
+@@ -1828,13 +1850,15 @@
+     if (retval == IO_ERROR) {
+ 	reiserfs_warning (p_s_inode->i_sb, "vs-5657: reiserfs_do_truncate: "
+ 			  "i/o failure occurred trying to truncate %K", &s_item_key);
+-	return;
++        err = -EIO;
++        goto out;
+     }
+     if (retval == POSITION_FOUND || retval == FILE_NOT_FOUND) {
+-	pathrelse (&s_search_path);
+ 	reiserfs_warning (p_s_inode->i_sb, "PAP-5660: reiserfs_do_truncate: "
+ 			  "wrong result %d of search for %K", retval, &s_item_key);
+-	return;
++
++        err = -EIO;
++        goto out;
+     }
+ 
+     s_search_path.pos_in_item --;
+@@ -1872,7 +1896,7 @@
+ 	if (n_deleted < 0) {
+ 	    reiserfs_warning (p_s_inode->i_sb, "vs-5665: reiserfs_do_truncate: reiserfs_cut_from_item failed");
+ 	    reiserfs_check_path(&s_search_path) ;
+-	    return;
++	    return 0;
+ 	}
+ 
+ 	RFALSE( n_deleted > n_file_size,
+@@ -1902,8 +1926,13 @@
+ 	  } 
+ 	  reiserfs_update_sd(th, p_s_inode) ;
+ 
+-	  journal_end(th, p_s_inode->i_sb, orig_len_alloc) ;
+-	  journal_begin(th, p_s_inode->i_sb, JOURNAL_PER_BALANCE_CNT * 6) ;
++	  err = journal_end(th, p_s_inode->i_sb, orig_len_alloc) ;
++	  if (err)
++	    goto out;
++	  err = journal_begin (th, p_s_inode->i_sb,
++                               JOURNAL_PER_BALANCE_CNT * 6);
++	  if (err)
++	    goto out;
+ 	  reiserfs_update_inode_transaction(p_s_inode) ;
+ 	}
+     } while ( n_file_size > ROUND_UP (n_new_file_size) &&
+@@ -1920,7 +1949,9 @@
+     }
+     reiserfs_update_sd (th, p_s_inode);
+ 
++out:
+     pathrelse(&s_search_path) ;
++    return err;
+ }
+ 
+ 
+@@ -1963,6 +1994,8 @@
+     int                 retval;
+     int			fs_gen;
+ 
++    BUG_ON (!th->t_trans_id);
++
+     fs_gen = get_generation(inode->i_sb) ;
+ 
+ #ifdef REISERQUOTA_DEBUG
+@@ -2034,6 +2067,8 @@
+     int                 retval;
+     int fs_gen = 0 ;
+     int quota_bytes = 0 ;
++
++    BUG_ON (!th->t_trans_id);
+ 
+     if (inode) {      /* Do we count quotas for item? */
+ 	fs_gen = get_generation(inode->i_sb);
+diff -Nru a/fs/reiserfs/super.c b/fs/reiserfs/super.c
+--- a/fs/reiserfs/super.c	2004-12-22 22:53:54 -08:00
++++ b/fs/reiserfs/super.c	2004-12-22 22:53:54 -08:00
+@@ -24,6 +24,7 @@
+ #include <linux/blkdev.h>
+ #include <linux/buffer_head.h>
+ #include <linux/vfs.h>
++#include <linux/namespace.h>
+ 
+ struct file_system_type reiserfs_fs_type;
+ 
+@@ -66,11 +67,14 @@
+     if (!(s->s_flags & MS_RDONLY)) {
+         struct reiserfs_transaction_handle th;
+ 	reiserfs_write_lock(s);
+-	journal_begin(&th, s, 1);
+-	journal_end_sync(&th, s, 1);
+-	reiserfs_flush_old_commits(s);
+-	s->s_dirt = 0;
++	if (!journal_begin(&th, s, 1))
++            if (!journal_end_sync(&th, s, 1))
++                reiserfs_flush_old_commits(s);
++	s->s_dirt = 0; /* Even if it's not true.
++                        * We'll loop forever in sync_supers otherwise */
+ 	reiserfs_write_unlock(s);
++    } else {
++        s->s_dirt = 0;
+     }
+ }
+ 
+@@ -84,11 +88,15 @@
+   struct reiserfs_transaction_handle th ;
+   reiserfs_write_lock(s);
+   if (!(s->s_flags & MS_RDONLY)) {
+-    journal_begin(&th, s, 1) ;
+-    reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), 1);
+-    journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB (s));
+-    reiserfs_block_writes(&th) ;
+-    journal_end_sync(&th, s, 1) ;
++    int err = journal_begin(&th, s, 1) ;
++    if (err) {
++        reiserfs_block_writes(&th) ;
++    } else {
++        reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), 1);
++        journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB (s));
++        reiserfs_block_writes(&th) ;
++        journal_end_sync(&th, s, 1) ;
++    }
+   }
+   s->s_dirt = 0;
+   reiserfs_write_unlock(s);
+@@ -108,29 +116,32 @@
+    protecting unlink is bigger that a key lf "save link" which
+    protects truncate), so there left no items to make truncate
+    completion on */
+-static void remove_save_link_only (struct super_block * s, struct key * key, int oid_free)
++static int remove_save_link_only (struct super_block * s, struct key * key, int oid_free)
+ {
+     struct reiserfs_transaction_handle th;
++    int err;
+ 
+      /* we are going to do one balancing */
+-     journal_begin (&th, s, JOURNAL_PER_BALANCE_CNT);
++     err = journal_begin (&th, s, JOURNAL_PER_BALANCE_CNT);
++     if (err)
++        return err;
+  
+      reiserfs_delete_solid_item (&th, NULL, key);
+      if (oid_free)
+         /* removals are protected by direct items */
+         reiserfs_release_objectid (&th, le32_to_cpu (key->k_objectid));
+ 
+-     journal_end (&th, s, JOURNAL_PER_BALANCE_CNT);
++     return journal_end (&th, s, JOURNAL_PER_BALANCE_CNT);
+ }
+  
+  
+ /* look for uncompleted unlinks and truncates and complete them */
+-static void finish_unfinished (struct super_block * s)
++static int finish_unfinished (struct super_block * s)
+ {
+     INITIALIZE_PATH (path);
+     struct cpu_key max_cpu_key, obj_key;
+     struct key save_link_key;
+-    int retval;
++    int retval = 0;
+     struct item_head * ih;
+     struct buffer_head * bh;
+     int item_pos;
+@@ -147,7 +158,7 @@
+  
+     done = 0;
+     REISERFS_SB(s)->s_is_unlinked_ok = 1;
+-    while (1) {
++    while (!retval) {
+         retval = search_item (s, &max_cpu_key, &path);
+         if (retval != ITEM_NOT_FOUND) {
+             reiserfs_warning (s, "vs-2140: finish_unfinished: search_by_key returned %d",
+@@ -189,7 +200,7 @@
+ 	       "save" link and release objectid */
+             reiserfs_warning (s, "vs-2180: finish_unfinished: iget failed for %K",
+                               &obj_key);
+-            remove_save_link_only (s, &save_link_key, 1);
++            retval = remove_save_link_only (s, &save_link_key, 1);
+             continue;
+         }
+ 
+@@ -197,7 +208,7 @@
+ 	    /* file is not unlinked */
+             reiserfs_warning (s, "vs-2185: finish_unfinished: file %K is not unlinked",
+                               &obj_key);
+-            remove_save_link_only (s, &save_link_key, 0);
++            retval = remove_save_link_only (s, &save_link_key, 0);
+             continue;
+ 	}
+ 
+@@ -207,7 +218,7 @@
+ 	       then boot into old kernel, remove the file and create dir with
+ 	       the same key. */
+ 	    reiserfs_warning(s, "green-2101: impossible truncate on a directory %k. Please report", INODE_PKEY (inode));
+-	    remove_save_link_only (s, &save_link_key, 0);
++	    retval = remove_save_link_only (s, &save_link_key, 0);
+ 	    truncate = 0;
+ 	    iput (inode); 
+ 	    continue;
+@@ -220,12 +231,13 @@
+             reiserfs_info (s, "Truncating %k to %Ld ..",
+                               INODE_PKEY (inode), inode->i_size);
+             reiserfs_truncate_file (inode, 0/*don't update modification time*/);
+-            remove_save_link (inode, truncate);
++            retval = remove_save_link (inode, truncate);
+         } else {
+             REISERFS_I(inode) -> i_flags |= i_link_saved_unlink_mask;
+             /* not completed unlink (rmdir) found */
+             reiserfs_info (s, "Removing %k..", INODE_PKEY (inode));
+             /* removal gets completed in iput */
++            retval = 0;
+         }
+  
+         iput (inode);
+@@ -238,6 +250,7 @@
+     if (done)
+         reiserfs_info (s, "There were %d uncompleted unlinks/truncates. "
+                           "Completed\n", done);
++    return retval;
+ }
+  
+ /* to protect file being unlinked from getting lost we "safe" link files
+@@ -253,6 +266,8 @@
+     struct item_head ih;
+     __u32 link;
+ 
++    BUG_ON (!th->t_trans_id);
++
+     /* file can only get one "save link" of each kind */
+     RFALSE( truncate && 
+ 	    ( REISERFS_I(inode) -> i_flags & i_link_saved_truncate_mask ),
+@@ -317,14 +332,16 @@
+ 
+ 
+ /* this opens transaction unlike add_save_link */
+-void remove_save_link (struct inode * inode, int truncate)
++int remove_save_link (struct inode * inode, int truncate)
+ {
+     struct reiserfs_transaction_handle th;
+     struct key key;
+- 
++    int err;
+  
+     /* we are going to do one balancing only */
+-    journal_begin (&th, inode->i_sb, JOURNAL_PER_BALANCE_CNT);
++    err = journal_begin (&th, inode->i_sb, JOURNAL_PER_BALANCE_CNT);
++    if (err)
++        return err;
+  
+     /* setup key of "save" link */
+     key.k_dir_id = cpu_to_le32 (MAX_KEY_OBJECTID);
+@@ -352,7 +369,7 @@
+     } else
+ 	REISERFS_I(inode) -> i_flags &= ~i_link_saved_truncate_mask;
+  
+-    journal_end (&th, inode->i_sb, JOURNAL_PER_BALANCE_CNT);
++    return journal_end (&th, inode->i_sb, JOURNAL_PER_BALANCE_CNT);
+ }
+ 
+ 
+@@ -360,6 +377,7 @@
+ {
+   int i;
+   struct reiserfs_transaction_handle th ;
++  th.t_trans_id = 0;
+ 
+   if (REISERFS_SB(s)->xattr_root) {
+     d_invalidate (REISERFS_SB(s)->xattr_root);
+@@ -373,10 +391,11 @@
+ 
+   /* change file system state to current state if it was mounted with read-write permissions */
+   if (!(s->s_flags & MS_RDONLY)) {
+-    journal_begin(&th, s, 10) ;
+-    reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), 1) ;
+-    set_sb_umount_state( SB_DISK_SUPER_BLOCK(s), REISERFS_SB(s)->s_mount_state );
+-    journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB (s));
++    if (!journal_begin(&th, s, 10)) {
++        reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), 1) ;
++        set_sb_umount_state( SB_DISK_SUPER_BLOCK(s), REISERFS_SB(s)->s_mount_state );
++        journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB (s));
++    }
+   }
+ 
+   /* note, journal_release checks for readonly mount, and can decide not
+@@ -461,6 +480,7 @@
+ static void reiserfs_dirty_inode (struct inode * inode) {
+     struct reiserfs_transaction_handle th ;
+ 
++    int err = 0;
+     if (inode->i_sb->s_flags & MS_RDONLY) {
+         reiserfs_warning(inode->i_sb, "clm-6006: writing inode %lu on readonly FS",
+ 	                  inode->i_ino) ;
+@@ -471,7 +491,11 @@
+     /* this is really only used for atime updates, so they don't have
+     ** to be included in O_SYNC or fsync
+     */
+-    journal_begin(&th, inode->i_sb, 1) ;
++    err = journal_begin(&th, inode->i_sb, 1) ;
++    if (err) {
++        reiserfs_write_unlock (inode->i_sb);
++        return;
++    }
+     reiserfs_update_sd (&th, inode);
+     journal_end(&th, inode->i_sb, 1) ;
+     reiserfs_write_unlock(inode->i_sb);
+@@ -575,6 +599,18 @@
+     {NULL, 0, 0}
+ };
+ 
++static const arg_desc_t error_actions[] = {
++    {"panic", 1 << REISERFS_ERROR_PANIC,
++              (1 << REISERFS_ERROR_RO | 1 << REISERFS_ERROR_CONTINUE)},
++    {"ro-remount", 1 << REISERFS_ERROR_RO,
++              (1 << REISERFS_ERROR_PANIC | 1 << REISERFS_ERROR_CONTINUE)},
++#ifdef REISERFS_JOURNAL_ERROR_ALLOWS_NO_LOG
++    {"continue", 1 << REISERFS_ERROR_CONTINUE,
++              (1 << REISERFS_ERROR_PANIC | 1 << REISERFS_ERROR_RO)},
++#endif
++    {NULL, 0, 0},
++};
++
+ int reiserfs_default_io_size = 128 * 1024; /* Default recommended I/O size is 128k.
+ 					      There might be broken applications that are
+ 					      confused by this. Use nolargeio mount option
+@@ -725,6 +761,7 @@
+ 	{"commit",	.arg_required = 'c', .values = NULL},
+ 	{"usrquota",},
+ 	{"grpquota",},
++	{"errors", 	.arg_required = 'e', .values = error_actions},
+ 	{NULL,}
+     };
+ 	
+@@ -862,6 +899,7 @@
+   unsigned long safe_mask = 0;
+   unsigned int commit_max_age = (unsigned int)-1;
+   struct reiserfs_journal *journal = SB_JOURNAL(s);
++  int err;
+ 
+   rs = SB_DISK_SUPER_BLOCK (s);
+ 
+@@ -882,6 +920,9 @@
+   safe_mask |= 1 << REISERFS_ATTRS;
+   safe_mask |= 1 << REISERFS_XATTRS_USER;
+   safe_mask |= 1 << REISERFS_POSIXACL;
++  safe_mask |= 1 << REISERFS_ERROR_RO;
++  safe_mask |= 1 << REISERFS_ERROR_CONTINUE;
++  safe_mask |= 1 << REISERFS_ERROR_PANIC;
+ 
+   /* Update the bitmask, taking care to keep
+    * the bits we're not allowed to change here */
+@@ -915,7 +956,10 @@
+       return 0;
+     }
+ 
+-    journal_begin(&th, s, 10) ;
++    err = journal_begin(&th, s, 10) ;
++    if (err)
++        return err;
++
+     /* Mounting a rw partition read-only. */
+     reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), 1) ;
+     set_sb_umount_state( rs, REISERFS_SB(s)->s_mount_state );
+@@ -927,11 +971,16 @@
+ 	reiserfs_xattr_init (s, *mount_flags);
+ 	return 0; /* We are read-write already */
+     }
+ 
++    if (reiserfs_is_journal_aborted (journal))
++	return journal->j_errno;
++
+     handle_data_mode(s, mount_options);
+     REISERFS_SB(s)->s_mount_state = sb_umount_state(rs) ;
+     s->s_flags &= ~MS_RDONLY ; /* now it is safe to call journal_begin */
+-    journal_begin(&th, s, 10) ;
++    err = journal_begin(&th, s, 10) ;
++    if (err)
++	return err;
+     
+     /* Mount a partition which is read-only, read-write */
+     reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), 1) ;
+@@ -944,7 +993,9 @@
+   }
+   /* this will force a full flush of all journal lists */
+   SB_JOURNAL(s)->j_must_wait = 1 ;
+-  journal_end(&th, s, 10) ;
++  err = journal_end(&th, s, 10) ;
++  if (err)
++    return err;
+   s->s_dirt = 0;
+ 
+   if (!( *mount_flags & MS_RDONLY ) ) {
+@@ -1372,8 +1423,9 @@
+     }
+     s->s_fs_info = sbi;
+     memset (sbi, 0, sizeof (struct reiserfs_sb_info));
+-    /* Set default values for options: non-aggressive tails */
+-    REISERFS_SB(s)->s_mount_opt = ( 1 << REISERFS_SMALLTAIL );
++    /* Set default values for options: non-aggressive tails, RO on errors */
++    REISERFS_SB(s)->s_mount_opt |= (1 << REISERFS_SMALLTAIL);
++    REISERFS_SB(s)->s_mount_opt |= (1 << REISERFS_ERROR_RO);
+     /* no preallocation minimum, be smart in
+        reiserfs_file_write instead */
+     REISERFS_SB(s)->s_alloc_options.preallocmin = 0;
+@@ -1501,7 +1553,12 @@
+     
+     if (!(s->s_flags & MS_RDONLY)) {
+ 
+-	journal_begin(&th, s, 1) ;
++	errval = journal_begin(&th, s, 1) ;
++        if (errval) {
++	    dput (s->s_root);
++	    s->s_root = NULL;
++	    goto error;
++        }
+ 	reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), 1) ;
+ 
+         set_sb_umount_state( rs, REISERFS_ERROR_FS );
+@@ -1531,9 +1588,14 @@
+ 	}
+ 
+ 	journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB (s));
+-	journal_end(&th, s, 1) ;
++	errval = journal_end(&th, s, 1) ;
++	if (errval) {
++	    dput (s->s_root);
++	    s->s_root = NULL;
++	    goto error;
++	}
+ 
+-	if (reiserfs_xattr_init (s, s->s_flags)) {
++	if ((errval = reiserfs_xattr_init (s, s->s_flags))) {
+ 	    dput (s->s_root);
+ 	    s->s_root = NULL;
+ 	    goto error;
+@@ -1546,7 +1608,7 @@
+ 	    reiserfs_info (s, "using 3.5.x disk format\n") ;
+ 	}
+ 
+-	if (reiserfs_xattr_init (s, s->s_flags)) {
++	if ((errval = reiserfs_xattr_init (s, s->s_flags))) {
+ 	    dput (s->s_root);
+ 	    s->s_root = NULL;
+ 	    goto error;
+diff -Nru a/fs/reiserfs/tail_conversion.c b/fs/reiserfs/tail_conversion.c
+--- a/fs/reiserfs/tail_conversion.c	2004-12-22 22:53:54 -08:00
++++ b/fs/reiserfs/tail_conversion.c	2004-12-22 22:53:54 -08:00
+@@ -34,6 +34,7 @@
+ 				       that will be inserted in the
+ 				       tree. */
+ 
++    BUG_ON (!th->t_trans_id);
+ 
+     REISERFS_SB(sb)->s_direct2indirect ++;
+ 
+@@ -183,6 +184,8 @@
+     int tail_len, round_tail_len;
+     loff_t pos, pos1; /* position of first byte of the tail */
+     struct cpu_key key;
++
++    BUG_ON (!th->t_trans_id);
+ 
+     REISERFS_SB(p_s_sb)->s_indirect2direct ++;
+ 
+diff -Nru a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
+--- a/include/linux/reiserfs_fs.h	2004-12-22 22:53:54 -08:00
++++ b/include/linux/reiserfs_fs.h	2004-12-22 22:53:54 -08:00
+@@ -1751,6 +1751,7 @@
+   void *t_handle_save ;		/* save existing current->journal_info */
+   unsigned displace_new_blocks:1; /* if new block allocation occurres, that block
+ 				   should be displaced from others */
++  struct list_head t_list;
+ } ;
+ 
+ /* used to keep track of ordered and tail writes, attached to the buffer
+@@ -1810,12 +1811,14 @@
+ int journal_transaction_should_end(struct reiserfs_transaction_handle *, int) ;
+ int reiserfs_in_journal(struct super_block *p_s_sb, int bmap_nr, int bit_nr, int searchall, b_blocknr_t *next) ;
+ int journal_begin(struct reiserfs_transaction_handle *, struct super_block *p_s_sb, unsigned long) ;
+-
++int journal_join_abort(struct reiserfs_transaction_handle *, struct super_block *p_s_sb, unsigned long) ;
++void reiserfs_journal_abort (struct super_block *sb, int errno);
++void reiserfs_abort (struct super_block *sb, int errno, const char *fmt, ...);
+ int reiserfs_allocate_list_bitmaps(struct super_block *s, struct reiserfs_list_bitmap *, int) ;
+ 
+ void add_save_link (struct reiserfs_transaction_handle * th,
+ 					struct inode * inode, int truncate);
+-void remove_save_link (struct inode * inode, int truncate);
++int remove_save_link (struct inode * inode, int truncate);
+ 
+ /* objectid.c */
+ __u32 reiserfs_get_unused_objectid (struct reiserfs_transaction_handle *th);
+@@ -1911,8 +1914,8 @@
+ 
+ void reiserfs_delete_solid_item (struct reiserfs_transaction_handle *th,
+ 				 struct inode *inode, struct key * key);
+-void reiserfs_delete_object (struct reiserfs_transaction_handle *th, struct inode * p_s_inode);
+-void reiserfs_do_truncate (struct reiserfs_transaction_handle *th, 
++int reiserfs_delete_object (struct reiserfs_transaction_handle *th, struct inode * p_s_inode);
++int reiserfs_do_truncate (struct reiserfs_transaction_handle *th,
+ 			   struct  inode * p_s_inode, struct page *, 
+ 			   int update_timestamps);
+ 
+@@ -1926,7 +1929,7 @@
+ void padd_item (char * item, int total_length, int length);
+ 
+ /* inode.c */
+-void restart_transaction(struct reiserfs_transaction_handle *th, struct inode *inode, struct path *path);
++int restart_transaction(struct reiserfs_transaction_handle *th, struct inode *inode, struct path *path);
+ void reiserfs_read_locked_inode(struct inode * inode, struct reiserfs_iget_args *args) ;
+ int reiserfs_find_actor(struct inode * inode, void *p) ;
+ int reiserfs_init_locked_inode(struct inode * inode, void *p) ;
+@@ -1941,7 +1944,7 @@
+ 						int connectable );
+ 
+ int reiserfs_prepare_write(struct file *, struct page *, unsigned, unsigned) ;
+-void reiserfs_truncate_file(struct inode *, int update_timestamps) ;
++int reiserfs_truncate_file(struct inode *, int update_timestamps) ;
+ void make_cpu_key (struct cpu_key * cpu_key, struct inode * inode, loff_t offset,
+ 		   int type, int key_length);
+ void make_le_item_head (struct item_head * ih, const struct cpu_key * key, 
+diff -Nru a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h
+--- a/include/linux/reiserfs_fs_sb.h	2004-12-22 22:53:54 -08:00
++++ b/include/linux/reiserfs_fs_sb.h	2004-12-22 22:53:54 -08:00
+@@ -242,14 +242,24 @@
+   struct reiserfs_journal_cnode *j_list_hash_table[JOURNAL_HASH_SIZE] ; /* hash table for all the real buffer heads in all 
+   										the transactions */
+   struct list_head j_prealloc_list;     /* list of inodes which have preallocated blocks */
++  int j_persistent_trans;
+   unsigned long j_max_trans_size ;
+   unsigned long j_max_batch_size ;
+ 
++  int j_errno;
++
+   /* when flushing ordered buffers, throttle new ordered writers */
+   struct work_struct j_work;
+   atomic_t j_async_throttle;
+ };
+ 
++enum journal_state_bits {
++    J_WRITERS_BLOCKED = 1,   /* set when new writers not allowed */
++    J_WRITERS_QUEUED,        /* set when log is full due to too many writers */
++    J_ABORTED,               /* set when log is aborted */
++};
++
++
+ #define JOURNAL_DESC_MAGIC "ReIsErLB" /* ick.  magic string to find desc blocks in the journal */
+ 
+ typedef __u32 (*hashf_t) (const signed char *, int);
+@@ -399,6 +409,7 @@
+     struct dentry *xattr_root; /* root of /.reiserfs_priv/.xa */
+     struct rw_semaphore xattr_dir_sem;
+ 
++    int j_errno;
+ };
+ 
+ /* Definitions of reiserfs on-disk properties: */
+@@ -447,6 +458,11 @@
+     REISERFS_BARRIER_NONE,
+     REISERFS_BARRIER_FLUSH,
+ 
++    /* Actions on error */
++    REISERFS_ERROR_PANIC,
++    REISERFS_ERROR_RO,
++    REISERFS_ERROR_CONTINUE,
++
+     REISERFS_TEST1,
+     REISERFS_TEST2,
+     REISERFS_TEST3,
+@@ -478,6 +494,10 @@
+ #define reiserfs_barrier_none(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_BARRIER_NONE))
+ #define reiserfs_barrier_flush(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_BARRIER_FLUSH))
+ 
++#define reiserfs_error_panic(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_ERROR_PANIC))
++#define reiserfs_error_ro(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_ERROR_RO))
++#define reiserfs_error_continue(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_ERROR_CONTINUE))
++
+ void reiserfs_file_buffer (struct buffer_head * bh, int list);
+ extern struct file_system_type reiserfs_fs_type;
+ int reiserfs_resize(struct super_block *, unsigned long) ;
+@@ -500,6 +520,12 @@
+ static inline char *reiserfs_bdevname(struct super_block *s)
+ {
+         return (s == NULL) ? "Null superblock" : s -> s_id;
++}
++
++#define reiserfs_is_journal_aborted(journal) (unlikely (__reiserfs_is_journal_aborted (journal)))
++static inline int __reiserfs_is_journal_aborted (struct reiserfs_journal *journal)
++{
++    return test_bit (J_ABORTED, &journal->j_state);
+ }
+ 
+ #endif	/* _LINUX_REISER_FS_SB */

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-sucks-3.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-sucks-3.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-sucks-3.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,47 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: ReiserFS: Fix several missing reiserfs_write_unlock calls
+## DP: Patch author: Jeff Mahoney <jeffm at novell.com>
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/18 23:07:58-07:00 jeffm at novell.com 
+#   [PATCH] ReiserFS: Fix several missing reiserfs_write_unlock calls
+#   
+#   This patch fixes several missing reiserfs_write_unlock() calls on error
+#   paths not introduced by reiserfs-io-error-handling.diff
+#   
+#   Signed-off-by: Jeff Mahoney <jeffm at novell.com>
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# fs/reiserfs/namei.c
+#   2004/10/18 22:26:49-07:00 jeffm at novell.com +2 -0
+#   ReiserFS: Fix several missing reiserfs_write_unlock calls
+# 
+diff -Nru a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
+--- a/fs/reiserfs/namei.c	2004-12-22 22:33:49 -08:00
++++ b/fs/reiserfs/namei.c	2004-12-22 22:33:49 -08:00
+@@ -341,6 +341,7 @@
+             REISERFS_SB(dir->i_sb)->priv_root &&
+             REISERFS_SB(dir->i_sb)->priv_root->d_inode &&
+ 	    de.de_objectid == le32_to_cpu (INODE_PKEY(REISERFS_SB(dir->i_sb)->priv_root->d_inode)->k_objectid)) {
++	  reiserfs_write_unlock (dir->i_sb);
+ 	  return ERR_PTR (-EACCES);
+ 	}
+ 
+@@ -1091,6 +1092,7 @@
+ 	return -EMLINK;
+     }
+     if (inode->i_nlink == 0) {
++        reiserfs_write_unlock(dir->i_sb);
+         return -ENOENT;
+     }
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-sucks-4.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-sucks-4.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-sucks-4.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,93 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: ReiserFS: change commit_for_inode to report failures
+## DP: Patch author: Andres Salomon <dilinger at voxel.net>, taken from BK
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- orig/fs/reiserfs/journal.c	2004-12-23 16:13:40.000000000 -0500
++++ mod/fs/reiserfs/journal.c	2004-12-23 16:19:47.000000000 -0500
+@@ -3302,12 +3302,13 @@
+   REISERFS_I(inode)->i_trans_id = journal->j_trans_id ;
+ }
+ 
+-static void __commit_trans_jl(struct inode *inode, unsigned long id,
++static int __commit_trans_jl(struct inode *inode, unsigned long id,
+                                  struct reiserfs_journal_list *jl)
+ {
+     struct reiserfs_transaction_handle th ;
+     struct super_block *sb = inode->i_sb ;
+     struct reiserfs_journal *journal = SB_JOURNAL (sb);
++    int ret = 0;
+ 
+     /* is it from the current transaction, or from an unknown transaction? */
+     if (id == journal->j_trans_id) {
+@@ -3318,17 +3319,21 @@
+ 	    goto flush_commit_only;
+ 	}
+ 
+-	journal_begin(&th, sb, 1) ;
++	ret = journal_begin(&th, sb, 1) ;
++	if (ret)
++		return ret;
+ 
+ 	/* someone might have ended this transaction while we joined */
+ 	if (journal->j_trans_id != id) {
+ 	    reiserfs_prepare_for_journal(sb, SB_BUFFER_WITH_SB(sb), 1) ;
+ 	    journal_mark_dirty(&th, sb, SB_BUFFER_WITH_SB(sb)) ;
+-	    journal_end(&th, sb, 1) ;
++	    ret = journal_end(&th, sb, 1) ;
+ 	    goto flush_commit_only;
+ 	}
+ 
+-	journal_end_sync(&th, sb, 1) ;
++	ret = journal_end_sync(&th, sb, 1) ;
++	if (!ret)
++		ret = 1;
+ 
+     } else {
+ 	/* this gets tricky, we have to make sure the journal list in
+@@ -3337,15 +3342,18 @@
+ 	 */
+ flush_commit_only:
+ 	if (journal_list_still_alive(inode->i_sb, id)) {
++	    if (atomic_read(&jl->j_commit_left) > 1)
++		ret = 1;
+ 	    flush_commit_list(sb, jl, 1) ;
+ 	    if (journal->j_errno)
+ 		ret = journal->j_errno;
+ 	}
+     }
+     /* otherwise the list is gone, and long since committed */
++    return ret;
+ }
+ 
+-void reiserfs_commit_for_inode(struct inode *inode) {
++int reiserfs_commit_for_inode(struct inode *inode) {
+     unsigned long id = REISERFS_I(inode)->i_trans_id;
+     struct reiserfs_journal_list *jl = REISERFS_I(inode)->i_jl;
+ 
+@@ -3358,7 +3366,7 @@
+ 	/* jl will be updated in __commit_trans_jl */
+     }
+ 
+-    __commit_trans_jl(inode, id, jl);
++    return __commit_trans_jl(inode, id, jl);
+ }
+ 
+ void reiserfs_restore_prepared_buffer(struct super_block *p_s_sb, 
+--- orig/include/linux/reiserfs_fs.h	2004-12-23 16:23:43.000000000 -0500
++++ mod/include/linux/reiserfs_fs.h	2004-12-23 16:23:53.000000000 -0500
+@@ -1793,7 +1793,7 @@
+ int reiserfs_commit_page(struct inode *inode, struct page *page,
+ 		unsigned from, unsigned to);
+ int reiserfs_flush_old_commits(struct super_block *);
+-void reiserfs_commit_for_inode(struct inode *) ;
++int reiserfs_commit_for_inode(struct inode *) ;
+ void reiserfs_update_inode_transaction(struct inode *) ;
+ void reiserfs_wait_on_write_block(struct super_block *s) ;
+ void reiserfs_block_writes(struct reiserfs_transaction_handle *th) ;

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-write-signed-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-write-signed-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-write-signed-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,49 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix write() return values for reiserfs.
+## DP: Patch author: holt at sgi.com
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/09/17 12:17:28-07:00 holt at sgi.com 
+#   [PATCH] Fix write() return values for reiserfs.
+#   
+#   This patch fixes the direct I/O return value for reiserfs writes to be
+#   ssize_t instead of int.
+#   
+#   Signed-off-by: Robin Holt <holt at sgi.com>
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# fs/reiserfs/file.c
+#   2004/09/17 00:08:17-07:00 holt at sgi.com +2 -2
+#   Fix write() return values for reiserfs.
+# 
+diff -Nru a/fs/reiserfs/file.c b/fs/reiserfs/file.c
+--- a/fs/reiserfs/file.c	2004-10-17 18:15:56 -07:00
++++ b/fs/reiserfs/file.c	2004-10-17 18:15:56 -07:00
+@@ -1099,7 +1099,7 @@
+ {
+     size_t already_written = 0; // Number of bytes already written to the file.
+     loff_t pos; // Current position in the file.
+-    size_t res; // return value of various functions that we call.
++    ssize_t res; // return value of various functions that we call.
+     struct inode *inode = file->f_dentry->d_inode; // Inode of the file that we are writing to.
+ 				/* To simplify coding at this time, we store
+ 				   locked pages in array for now */
+@@ -1108,7 +1108,7 @@
+     th.t_trans_id = 0;
+ 
+     if ( file->f_flags & O_DIRECT) { // Direct IO needs treatment
+-	int result, after_file_end = 0;
++	ssize_t result, after_file_end = 0;
+ 	if ( (*ppos + count >= inode->i_size) || (file->f_flags & O_APPEND) ) {
+ 	    /* If we are appending a file, we need to put this savelink in here.
+ 	       If we will crash while doing direct io, finish_unfinished will

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-xattr-dont-dirty-mark.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-xattr-dont-dirty-mark.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-xattr-dont-dirty-mark.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,65 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix for default ACL handling on ReiserFS
+## DP: Patch author: jeffm at suse.com
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/09/22 18:22:07-07:00 jeffm at suse.com 
+#   [PATCH] Fix for default ACL handling on ReiserFS
+#   
+#   reiserfs_set_xattr() explicitly updates the ctime for the host inode.
+#   
+#   This works for direct setfacl/setfattr calls, but for the more common case
+#   of an inherited default ACL, it breaks.  The ACL is inherited in the middle
+#   of the new inode creation, before the inode has been hashed.
+#   
+#   When mark_inode_dirty is called, one of the checks bails out if the inode
+#   is unhashed -- but AFTER inode->i_state is updated, so the inode is marked
+#   dirty but never placed on any dirty list.
+#   
+#   Since the inode is never placed on a dirty list, __sync_single_inode from
+#   the writeback_inodes() path can never be called on it to clear the dirty
+#   flags.  Once the inode is hashed and mark_inode_dirty is called for it
+#   again, it's too late -- it will bail early assuming (correctly) that the
+#   inode is already marked dirty.  This ultimately results in I/O stalls that
+#   can't be resolved by the fs path, only be the memory allocation path that
+#   uses pages directly.
+#   
+#   The attached patch makes the update of the ctime conditional on the inode
+#   being hashed already.
+#   
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# fs/reiserfs/xattr.c
+#   2004/09/22 13:30:51-07:00 jeffm at suse.com +8 -2
+#   Fix for default ACL handling on ReiserFS
+# 
+diff -Nru a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c
+--- a/fs/reiserfs/xattr.c	2004-10-17 18:05:56 -07:00
++++ b/fs/reiserfs/xattr.c	2004-10-17 18:05:56 -07:00
+@@ -589,8 +589,14 @@
+             break;
+     }
+ 
+-    inode->i_ctime = CURRENT_TIME;
+-    mark_inode_dirty (inode);
++    /* We can't mark the inode dirty if it's not hashed. This is the case
++     * when we're inheriting the default ACL. If we dirty it, the inode
++     * gets marked dirty, but won't (ever) make it onto the dirty list until
++     * it's synced explicitly to clear I_DIRTY. This is bad. */
++    if (!hlist_unhashed(&inode->i_hash)) {
++        inode->i_ctime = CURRENT_TIME;
++        mark_inode_dirty (inode);
++    }
+ 
+ out_filp:
+     up (&xinode->i_sem);

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-xattr.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-xattr.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/reiserfs-xattr.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,58 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI> 
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: reiserfs: xattr/acl fixes bug if filesystem root
+## DP: Patch author: jeffm at suse.com
+## DP: Upstream status: included in 2.6.9-rc1
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -Nru a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c
+--- a/fs/reiserfs/xattr.c	2004-08-29 01:41:33 -07:00
++++ b/fs/reiserfs/xattr.c	2004-08-29 01:41:33 -07:00
+@@ -761,6 +761,11 @@
+     err = __reiserfs_xattr_del (dir, name, strlen (name));
+     dput (dir);
+ 
++    if (!err) {
++        inode->i_ctime = CURRENT_TIME;
++        mark_inode_dirty (inode);
++    }
++
+ out:
+     return err;
+ }
+@@ -1240,8 +1245,10 @@
+         name->hash == priv_root->d_name.hash &&
+         !memcmp (name->name, priv_root->d_name.name, name->len)) {
+             return -ENOENT;
+-    }
+-    return 0;
++    } else if (q1->len == name->len &&
++               !memcmp(q1->name, name->name, name->len))
++        return 0;
++    return 1;
+ }
+ 
+ static struct dentry_operations xattr_lookup_poison_ops = {
+diff -Nru a/fs/reiserfs/xattr_acl.c b/fs/reiserfs/xattr_acl.c
+--- a/fs/reiserfs/xattr_acl.c	2004-08-29 01:41:33 -07:00
++++ b/fs/reiserfs/xattr_acl.c	2004-08-29 01:41:33 -07:00
+@@ -289,8 +289,14 @@
+             error = reiserfs_xattr_set(inode, name, value, size, 0);
+ 	} else {
+             error = reiserfs_xattr_del (inode, name);
+-            if (error == -ENODATA)
++            if (error == -ENODATA) {
++                /* This may seem odd here, but it means that the ACL was set
++                 * with a value representable with mode bits. If there was
++                 * an ACL before, reiserfs_xattr_del already dirtied the inode.
++                 */
++                mark_inode_dirty (inode);
+                 error = 0;
++            }
+         }
+ 
+ 	if (value)

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/remove-references-to-removed-drivers.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/remove-references-to-removed-drivers.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/remove-references-to-removed-drivers.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,672 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: remove non-free bits
+## DP: Patch author: unknown
+## DP: Upstream status: not submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -urN kernel-source-2.6.6/arch/alpha/defconfig kernel-source-2.6.6-1/arch/alpha/defconfig
+--- kernel-source-2.6.6/arch/alpha/defconfig	2004-04-05 19:49:22.000000000 +1000
++++ kernel-source-2.6.6-1/arch/alpha/defconfig	2004-04-05 20:54:15.000000000 +1000
+@@ -492,7 +492,6 @@
+ # CONFIG_B44 is not set
+ # CONFIG_FORCEDETH is not set
+ # CONFIG_CS89x0 is not set
+-# CONFIG_DGRS is not set
+ # CONFIG_EEPRO100 is not set
+ # CONFIG_E100 is not set
+ # CONFIG_LNE390 is not set
+diff -urN kernel-source-2.6.6/arch/arm/defconfig kernel-source-2.6.6-1/arch/arm/defconfig
+--- kernel-source-2.6.6/arch/arm/defconfig	2004-03-11 13:55:24.000000000 +1100
++++ kernel-source-2.6.6-1/arch/arm/defconfig	2003-09-21 08:41:56.000000000 +1000
+@@ -239,7 +239,6 @@
+ # CONFIG_CS89x0 is not set
+ CONFIG_TULIP=y
+ # CONFIG_DE4X5 is not set
+-# CONFIG_DGRS is not set
+ # CONFIG_DM9102 is not set
+ CONFIG_EEPRO100=y
+ CONFIG_EEPRO100_PM=y
+@@ -262,7 +261,6 @@
+ #
+ # Ethernet (1000 Mbit)
+ #
+-# CONFIG_ACENIC is not set
+ # CONFIG_HAMACHI is not set
+ # CONFIG_YELLOWFIN is not set
+ # CONFIG_SK98LIN is not set
+diff -urN kernel-source-2.6.6/arch/i386/defconfig kernel-source-2.6.6-1/arch/i386/defconfig
+--- kernel-source-2.6.6/arch/i386/defconfig	2004-04-05 19:49:22.000000000 +1000
++++ kernel-source-2.6.6-1/arch/i386/defconfig	2004-04-05 20:54:17.000000000 +1000
+@@ -624,7 +624,6 @@
+ # CONFIG_B44 is not set
+ # CONFIG_FORCEDETH is not set
+ # CONFIG_CS89x0 is not set
+-# CONFIG_DGRS is not set
+ # CONFIG_EEPRO100 is not set
+ # CONFIG_E100 is not set
+ # CONFIG_FEALNX is not set
+@@ -646,7 +645,6 @@
+ #
+ # Ethernet (1000 Mbit)
+ #
+-# CONFIG_ACENIC is not set
+ # CONFIG_DL2K is not set
+ # CONFIG_E1000 is not set
+ # CONFIG_NS83820 is not set
+@@ -1027,7 +1025,6 @@
+ #
+ # USB Multimedia devices
+ #
+-# CONFIG_USB_DABUSB is not set
+ 
+ #
+ # Video4Linux support is needed for USB Multimedia device support
+diff -urN kernel-source-2.6.6/arch/ia64/defconfig kernel-source-2.6.6-1/arch/ia64/defconfig
+--- kernel-source-2.6.6/arch/ia64/defconfig	2004-05-10 19:47:46.000000000 +1000
++++ kernel-source-2.6.6-1/arch/ia64/defconfig	2004-05-10 22:21:10.000000000 +1000
+@@ -439,7 +439,6 @@
+ # CONFIG_ADAPTEC_STARFIRE is not set
+ # CONFIG_B44 is not set
+ # CONFIG_FORCEDETH is not set
+-# CONFIG_DGRS is not set
+ CONFIG_EEPRO100=y
+ # CONFIG_EEPRO100_PIO is not set
+ # CONFIG_E100 is not set
+@@ -456,7 +455,6 @@
+ #
+ # Ethernet (1000 Mbit)
+ #
+-# CONFIG_ACENIC is not set
+ # CONFIG_DL2K is not set
+ CONFIG_E1000=y
+ # CONFIG_E1000_NAPI is not set
+@@ -865,7 +863,6 @@
+ #
+ # USB Multimedia devices
+ #
+-# CONFIG_USB_DABUSB is not set
+ 
+ #
+ # Video4Linux support is needed for USB Multimedia device support
+diff -urN kernel-source-2.6.6/arch/parisc/defconfig kernel-source-2.6.6-1/arch/parisc/defconfig
+--- kernel-source-2.6.6/arch/parisc/defconfig	2004-05-10 19:47:49.000000000 +1000
++++ kernel-source-2.6.6-1/arch/parisc/defconfig	2004-05-10 22:21:17.000000000 +1000
+@@ -366,7 +366,6 @@
+ #
+ # Ethernet (1000 Mbit)
+ #
+-# CONFIG_ACENIC is not set
+ CONFIG_DL2K=y
+ # CONFIG_E1000 is not set
+ # CONFIG_NS83820 is not set
+@@ -703,7 +702,6 @@
+ #
+ # USB Multimedia devices
+ #
+-# CONFIG_USB_DABUSB is not set
+ 
+ #
+ # Video4Linux support is needed for USB Multimedia device support
+diff -urN kernel-source-2.6.6/arch/ppc/defconfig kernel-source-2.6.6-1/arch/ppc/defconfig
+--- kernel-source-2.6.6/arch/ppc/defconfig	2004-05-10 19:47:49.000000000 +1000
++++ kernel-source-2.6.6-1/arch/ppc/defconfig	2004-05-10 22:21:17.000000000 +1000
+@@ -559,7 +558,6 @@
+ # CONFIG_B44 is not set
+ # CONFIG_FORCEDETH is not set
+ # CONFIG_CS89x0 is not set
+-# CONFIG_DGRS is not set
+ # CONFIG_EEPRO100 is not set
+ # CONFIG_E100 is not set
+ # CONFIG_FEALNX is not set
+@@ -577,7 +576,6 @@
+ #
+ # Ethernet (1000 Mbit)
+ #
+-# CONFIG_ACENIC is not set
+ # CONFIG_DL2K is not set
+ # CONFIG_E1000 is not set
+ # CONFIG_NS83820 is not set
+@@ -1080,7 +1078,6 @@
+ #
+ # USB Multimedia devices
+ #
+-# CONFIG_USB_DABUSB is not set
+ 
+ #
+ # Video4Linux support is needed for USB Multimedia device support
+diff -urN kernel-source-2.6.6/arch/ppc64/defconfig kernel-source-2.6.6-1/arch/ppc64/defconfig
+--- kernel-source-2.6.6/arch/ppc64/defconfig	2004-05-10 19:47:49.000000000 +1000
++++ kernel-source-2.6.6-1/arch/ppc64/defconfig	2004-05-10 22:21:18.000000000 +1000
+@@ -459,7 +459,6 @@
+ # CONFIG_ADAPTEC_STARFIRE is not set
+ # CONFIG_B44 is not set
+ # CONFIG_FORCEDETH is not set
+-# CONFIG_DGRS is not set
+ # CONFIG_EEPRO100 is not set
+ CONFIG_E100=y
+ # CONFIG_E100_NAPI is not set
+@@ -476,8 +475,6 @@
+ #
+ # Ethernet (1000 Mbit)
+ #
+-CONFIG_ACENIC=y
+-CONFIG_ACENIC_OMIT_TIGON_I=y
+ # CONFIG_DL2K is not set
+ CONFIG_E1000=y
+ # CONFIG_E1000_NAPI is not set
+diff -urN kernel-source-2.6.6/arch/sparc64/defconfig kernel-source-2.6.6-1/arch/sparc64/defconfig
+--- kernel-source-2.6.6/arch/sparc64/defconfig	2004-05-10 19:47:50.000000000 +1000
++++ kernel-source-2.6.6-1/arch/sparc64/defconfig	2004-05-10 22:21:21.000000000 +1000
+@@ -840,7 +840,6 @@
+ CONFIG_ADAPTEC_STARFIRE_NAPI=y
+ CONFIG_B44=m
+ CONFIG_FORCEDETH=m
+-CONFIG_DGRS=m
+ CONFIG_EEPRO100=m
+ # CONFIG_EEPRO100_PIO is not set
+ CONFIG_E100=m
+@@ -864,8 +863,6 @@
+ #
+ # Ethernet (1000 Mbit)
+ #
+-CONFIG_ACENIC=m
+-# CONFIG_ACENIC_OMIT_TIGON_I is not set
+ CONFIG_DL2K=m
+ CONFIG_E1000=m
+ CONFIG_E1000_NAPI=y
+@@ -1579,7 +1576,6 @@
+ #
+ # USB Multimedia devices
+ #
+-# CONFIG_USB_DABUSB is not set
+ # CONFIG_USB_VICAM is not set
+ # CONFIG_USB_DSBR is not set
+ # CONFIG_USB_IBMCAM is not set
+diff -urN kernel-source-2.6.6/arch/x86_64/defconfig kernel-source-2.6.6-1/arch/x86_64/defconfig
+--- kernel-source-2.6.6/arch/x86_64/defconfig	2004-05-10 19:47:50.000000000 +1000
++++ kernel-source-2.6.6-1/arch/x86_64/defconfig	2004-05-10 22:21:22.000000000 +1000
+@@ -437,7 +436,6 @@
+ # CONFIG_ADAPTEC_STARFIRE is not set
+ # CONFIG_B44 is not set
+ CONFIG_FORCEDETH=y
+-# CONFIG_DGRS is not set
+ # CONFIG_EEPRO100 is not set
+ # CONFIG_E100 is not set
+ # CONFIG_FEALNX is not set
+@@ -457,7 +456,6 @@
+ #
+ # Ethernet (1000 Mbit)
+ #
+-# CONFIG_ACENIC is not set
+ # CONFIG_DL2K is not set
+ CONFIG_E1000=y
+ # CONFIG_E1000_NAPI is not set
+diff -urN kernel-source-2.6.6/drivers/net/tokenring/Kconfig kernel-source-2.6.6-1/drivers/net/tokenring/Kconfig
+--- kernel-source-2.6.6/drivers/net/tokenring/Kconfig	2004-03-11 13:55:24.000000000 +1100
++++ kernel-source-2.6.6-1/drivers/net/tokenring/Kconfig	2004-01-14 20:00:15.000000000 +1100
+@@ -165,21 +165,5 @@
+ 	  To compile this driver as a module, choose M here: the module will be
+ 	  called madgemc.
+ 
+-config SMCTR
+-	tristate "SMC ISA/MCA adapter support"
+-	depends on TR && (ISA || MCA_LEGACY) && (BROKEN || !64BIT)
+-	---help---
+-	  This is support for the ISA and MCA SMC Token Ring cards,
+-	  specifically SMC TokenCard Elite (8115T) and SMC TokenCard Elite/A
+-	  (8115T/A) adapters.
+-
+-	  If you have such an adapter and would like to use it, say Y or M and
+-	  read the Token-Ring mini-HOWTO, available from
+-	  <http://www.tldp.org/docs.html#howto> and the file
+-	  <file:Documentation/networking/smctr.txt>.
+-
+-	  To compile this driver as a module, choose M here: the module will be
+-	  called smctr.
+-
+ endmenu
+ 
+diff -urN kernel-source-2.6.6/drivers/scsi/Kconfig kernel-source-2.6.6-1/drivers/scsi/Kconfig
+--- kernel-source-2.6.6/drivers/scsi/Kconfig	2004-05-10 19:47:58.000000000 +1000
++++ kernel-source-2.6.6-1/drivers/scsi/Kconfig	2004-05-10 22:21:38.000000000 +1000
+@@ -1259,8 +1277,6 @@
+ 	  To compile this driver as a module, choose M here: the
+ 	  module will be called qlogicpti.
+ 
+-source "drivers/scsi/qla2xxx/Kconfig"
+-
+ config SCSI_SEAGATE
+ 	tristate "Seagate ST-02 and Future Domain TMC-8xx SCSI support"
+ 	depends on X86 && ISA && SCSI && BROKEN
+diff -urN kernel-source-2.6.6/drivers/scsi/Makefile kernel-source-2.6.6-1/drivers/scsi/Makefile
+--- kernel-source-2.6.6/drivers/scsi/Makefile	2004-05-10 19:47:58.000000000 +1000
++++ kernel-source-2.6.6-1/drivers/scsi/Makefile	2004-05-10 22:21:38.000000000 +1000
+@@ -80,7 +80,6 @@
+ obj-$(CONFIG_SCSI_QLOGIC_ISP)	+= qlogicisp.o 
+ obj-$(CONFIG_SCSI_QLOGIC_FC)	+= qlogicfc.o 
+ obj-$(CONFIG_SCSI_QLOGIC_1280)	+= qla1280.o 
+-obj-$(CONFIG_SCSI_QLA2XXX)	+= qla2xxx/
+ obj-$(CONFIG_SCSI_PAS16)	+= pas16.o
+ obj-$(CONFIG_SCSI_SEAGATE)	+= seagate.o
+ obj-$(CONFIG_SCSI_FD_8xx)	+= seagate.o
+diff -urN kernel-source-2.6.6/drivers/usb/media/Kconfig kernel-source-2.6.6-1/drivers/usb/media/Kconfig
+--- kernel-source-2.6.6/drivers/usb/media/Kconfig	2004-05-10 19:48:01.000000000 +1000
++++ kernel-source-2.6.6-1/drivers/usb/media/Kconfig	2004-05-10 22:21:43.000000000 +1000
+@@ -4,20 +4,6 @@
+ comment "USB Multimedia devices"
+ 	depends on USB
+ 
+-config USB_DABUSB
+-	tristate "DABUSB driver"
+-	depends on USB
+-	---help---
+-	  A Digital Audio Broadcasting (DAB) Receiver for USB and Linux
+-	  brought to you by the DAB-Team
+-	  <http://wwwbode.cs.tum.edu/Par/arch/dab/>.  This driver can be taken
+-	  as an example for URB-based bulk, control, and isochronous
+-	  transactions. URB's are explained in
+-	  <file:Documentation/usb/URB.txt>.
+-
+-	  To compile this driver as a module, choose M here: the
+-	  module will be called dabusb.
+-
+ comment "Video4Linux support is needed for USB Multimedia device support"
+ 	depends on USB && VIDEO_DEV=n
+ 
+diff -urN kernel-source-2.6.6/drivers/usb/serial/Kconfig kernel-source-2.6.6-1/drivers/usb/serial/Kconfig
+--- kernel-source-2.6.6/drivers/usb/serial/Kconfig	2004-03-11 13:55:37.000000000 +1100
++++ kernel-source-2.6.6-1/drivers/usb/serial/Kconfig	2003-11-24 20:51:58.000000000 +1100
+@@ -219,84 +219,6 @@
+ 	  To compile this driver as a module, choose M here: the
+ 	  module will be called keyspan.
+ 
+-config USB_SERIAL_KEYSPAN_MPR
+-	bool "USB Keyspan MPR Firmware"
+-	depends on USB_SERIAL_KEYSPAN
+-	help
+-	  Say Y here to include firmware for the Keyspan MPR converter.
+-
+-config USB_SERIAL_KEYSPAN_USA28
+-	bool "USB Keyspan USA-28 Firmware"
+-	depends on USB_SERIAL_KEYSPAN
+-	help
+-	  Say Y here to include firmware for the USA-28 converter.
+-
+-config USB_SERIAL_KEYSPAN_USA28X
+-	bool "USB Keyspan USA-28X Firmware"
+-	depends on USB_SERIAL_KEYSPAN
+-	help
+-	  Say Y here to include firmware for the USA-28X converter.
+-	  Be sure you have a USA-28X, there are also 28XA and 28XB
+-	  models, the label underneath has the actual part number.
+-
+-config USB_SERIAL_KEYSPAN_USA28XA
+-	bool "USB Keyspan USA-28XA Firmware"
+-	depends on USB_SERIAL_KEYSPAN
+-	help
+-	  Say Y here to include firmware for the USA-28XA converter.
+-	  Be sure you have a USA-28XA, there are also 28X and 28XB
+-	  models, the label underneath has the actual part number.
+-
+-config USB_SERIAL_KEYSPAN_USA28XB
+-	bool "USB Keyspan USA-28XB Firmware"
+-	depends on USB_SERIAL_KEYSPAN
+-	help
+-	  Say Y here to include firmware for the USA-28XB converter.
+-	  Be sure you have a USA-28XB, there are also 28X and 28XA
+-	  models, the label underneath has the actual part number.
+-
+-config USB_SERIAL_KEYSPAN_USA19
+-	bool "USB Keyspan USA-19 Firmware"
+-	depends on USB_SERIAL_KEYSPAN
+-	help
+-	  Say Y here to include firmware for the USA-19 converter.
+-
+-config USB_SERIAL_KEYSPAN_USA18X
+-	bool "USB Keyspan USA-18X Firmware"
+-	depends on USB_SERIAL_KEYSPAN
+-	help
+-	  Say Y here to include firmware for the USA-18X converter.
+-
+-config USB_SERIAL_KEYSPAN_USA19W
+-	bool "USB Keyspan USA-19W Firmware"
+-	depends on USB_SERIAL_KEYSPAN
+-	help
+-	  Say Y here to include firmware for the USA-19W converter.
+-
+-config USB_SERIAL_KEYSPAN_USA19QW
+-	bool "USB Keyspan USA-19QW Firmware"
+-	depends on USB_SERIAL_KEYSPAN
+-	help
+-	  Say Y here to include firmware for the USA-19QW converter.
+-
+-config USB_SERIAL_KEYSPAN_USA19QI
+-	bool "USB Keyspan USA-19QI Firmware"
+-	depends on USB_SERIAL_KEYSPAN
+-	help
+-	  Say Y here to include firmware for the USA-19QI converter.
+-
+-config USB_SERIAL_KEYSPAN_USA49W
+-	bool "USB Keyspan USA-49W Firmware"
+-	depends on USB_SERIAL_KEYSPAN
+-	help
+-	  Say Y here to include firmware for the USA-49W converter.
+-
+-config USB_SERIAL_KEYSPAN_USA49WLC
+-	bool "USB Keyspan USA-49WLC Firmware"
+-	depends on USB_SERIAL_KEYSPAN
+-	help
+-	  Say Y here to include firmware for the USA-49WLC converter.
+-
+ config USB_SERIAL_KLSI
+ 	tristate "USB KL5KUSB105 (Palmconnect) Driver (EXPERIMENTAL)"
+ 	depends on USB_SERIAL && EXPERIMENTAL
+--- kernel-source-2.6.6/drivers/net/Kconfig	2004-05-10 19:47:54.000000000 +1000
++++ kernel-source-2.6.6-1/drivers/net/Kconfig	2004-05-11 22:25:31.000000000 +1000
+@@ -1383,21 +1383,6 @@
+ 	tristate "TOSHIBA TC35815 Ethernet support"
+ 	depends on NET_PCI && PCI && TOSHIBA_JMR3927
+ 
+-config DGRS
+-	tristate "Digi Intl. RightSwitch SE-X support"
+-	depends on NET_PCI && (PCI || EISA)
+-	---help---
+-	  This is support for the Digi International RightSwitch series of
+-	  PCI/EISA Ethernet switch cards. These include the SE-4 and the SE-6
+-	  models.  If you have a network card of this type, say Y and read the
+-	  Ethernet-HOWTO, available from
+-	  <http://www.tldp.org/docs.html#howto>.  More specific
+-	  information is contained in <file:Documentation/networking/dgrs.txt>.
+-
+-	  To compile this driver as a module, choose M here and read
+-	  <file:Documentation/networking/net-modules.txt>.  The module
+-	  will be called dgrs.
+-
+ config EEPRO100
+ 	tristate "EtherExpressPro/100 support (eepro100, original Becker driver)"
+ 	depends on NET_PCI && PCI
+@@ -1877,33 +1862,6 @@
+ menu "Ethernet (1000 Mbit)"
+ 	depends on NETDEVICES
+ 
+-config ACENIC
+-	tristate "Alteon AceNIC/3Com 3C985/NetGear GA620 Gigabit support"
+-	depends on PCI
+-	---help---
+-	  Say Y here if you have an Alteon AceNIC, 3Com 3C985(B), NetGear
+-	  GA620, SGI Gigabit or Farallon PN9000-SX PCI Gigabit Ethernet
+-	  adapter. The driver allows for using the Jumbo Frame option (9000
+-	  bytes/frame) however it requires that your switches can handle this
+-	  as well. To enable Jumbo Frames, add `mtu 9000' to your ifconfig
+-	  line.
+-
+-	  To compile this driver as a module, choose M here: the
+-	  module will be called acenic.
+-
+-config ACENIC_OMIT_TIGON_I
+-	bool "Omit support for old Tigon I based AceNICs"
+-	depends on ACENIC
+-	help
+-	  Say Y here if you only have Tigon II based AceNICs and want to leave
+-	  out support for the older Tigon I based cards which are no longer
+-	  being sold (ie. the original Alteon AceNIC and 3Com 3C985 (non B
+-	  version)).  This will reduce the size of the driver object by
+-	  app. 100KB.  If you are not sure whether your card is a Tigon I or a
+-	  Tigon II, say N here.
+-
+-	  The safe and default value for this is N.
+-
+ config DL2K
+ 	tristate "D-Link DL2000-based Gigabit Ethernet support"
+ 	depends on PCI
+--- kernel-source-2.6.7-2.6.7/arch/i386/defconfig	2004-06-21 14:41:04.955084080 +0200
++++ kernel-source-2.6.7-2.6.7/arch/i386/defconfig.pruned	2004-06-21 14:47:18.767076968 +0200
+@@ -1055,8 +1055,6 @@
+ #
+ # USB Miscellaneous drivers
+ #
+-# CONFIG_USB_EMI62 is not set
+-# CONFIG_USB_EMI26 is not set
+ # CONFIG_USB_TIGL is not set
+ # CONFIG_USB_AUERSWALD is not set
+ # CONFIG_USB_RIO500 is not set
+--- kernel-source-2.6.7-2.6.7/arch/sparc64/defconfig	2004-06-21 14:41:04.992082099 +0200
++++ kernel-source-2.6.7-2.6.7/arch/sparc64/defconfig.pruned	2004-06-21 14:47:21.073953542 +0200
+@@ -1668,8 +1668,6 @@
+ #
+ # USB Miscellaneous drivers
+ #
+-CONFIG_USB_EMI62=m
+-CONFIG_USB_EMI26=m
+ # CONFIG_USB_TIGL is not set
+ CONFIG_USB_AUERSWALD=m
+ CONFIG_USB_RIO500=m
+--- kernel-source-2.6.7-2.6.7/arch/ppc/configs/common_defconfig	2004-06-16 07:19:03.000000000 +0200
++++ kernel-source-2.6.7-2.6.7/arch/ppc/configs/common_defconfig.pruned	2004-06-21 14:47:22.053901111 +0200
+@@ -1138,8 +1138,6 @@
+ #
+ # USB Miscellaneous drivers
+ #
+-# CONFIG_USB_EMI62 is not set
+-# CONFIG_USB_EMI26 is not set
+ # CONFIG_USB_TIGL is not set
+ # CONFIG_USB_AUERSWALD is not set
+ # CONFIG_USB_RIO500 is not set
+--- kernel-source-2.6.7-2.6.7/arch/ppc/configs/sandpoint_defconfig	2004-06-16 07:19:22.000000000 +0200
++++ kernel-source-2.6.7-2.6.7/arch/ppc/configs/sandpoint_defconfig.pruned	2004-06-21 14:47:22.672867994 +0200
+@@ -601,8 +601,6 @@
+ #
+ # USB Miscellaneous drivers
+ #
+-# CONFIG_USB_EMI62 is not set
+-# CONFIG_USB_EMI26 is not set
+ # CONFIG_USB_TIGL is not set
+ # CONFIG_USB_AUERSWALD is not set
+ # CONFIG_USB_RIO500 is not set
+--- kernel-source-2.6.7-2.6.7/arch/ppc/configs/lopec_defconfig	2004-06-16 07:19:37.000000000 +0200
++++ kernel-source-2.6.7-2.6.7/arch/ppc/configs/lopec_defconfig.pruned	2004-06-21 14:47:23.263836374 +0200
+@@ -682,8 +682,6 @@
+ #
+ # USB Miscellaneous drivers
+ #
+-# CONFIG_USB_EMI62 is not set
+-# CONFIG_USB_EMI26 is not set
+ # CONFIG_USB_TIGL is not set
+ # CONFIG_USB_AUERSWALD is not set
+ # CONFIG_USB_RIO500 is not set
+--- kernel-source-2.6.7-2.6.7/arch/ppc/configs/pmac_defconfig	2004-06-16 07:20:03.000000000 +0200
++++ kernel-source-2.6.7-2.6.7/arch/ppc/configs/pmac_defconfig.pruned	2004-06-21 14:47:23.837805665 +0200
+@@ -1170,8 +1170,6 @@
+ #
+ # USB Miscellaneous drivers
+ #
+-# CONFIG_USB_EMI62 is not set
+-# CONFIG_USB_EMI26 is not set
+ # CONFIG_USB_TIGL is not set
+ # CONFIG_USB_AUERSWALD is not set
+ # CONFIG_USB_RIO500 is not set
+--- kernel-source-2.6.7-2.6.7/arch/ppc/defconfig	2004-06-21 14:41:04.976082956 +0200
++++ kernel-source-2.6.7-2.6.7/arch/ppc/defconfig.pruned	2004-06-21 14:47:24.352778112 +0200
+@@ -1141,8 +1141,6 @@
+ #
+ # USB Miscellaneous drivers
+ #
+-# CONFIG_USB_EMI62 is not set
+-# CONFIG_USB_EMI26 is not set
+ # CONFIG_USB_TIGL is not set
+ # CONFIG_USB_AUERSWALD is not set
+ # CONFIG_USB_RIO500 is not set
+--- kernel-source-2.6.7-2.6.7/arch/mips/configs/rm200_defconfig	2004-06-16 07:19:03.000000000 +0200
++++ kernel-source-2.6.7-2.6.7/arch/mips/configs/rm200_defconfig.pruned	2004-06-21 14:47:24.842751896 +0200
+@@ -1007,8 +1007,6 @@
+ #
+ # USB Miscellaneous drivers
+ #
+-# CONFIG_USB_EMI62 is not set
+-# CONFIG_USB_EMI26 is not set
+ CONFIG_USB_TIGL=m
+ CONFIG_USB_AUERSWALD=m
+ CONFIG_USB_RIO500=m
+--- kernel-source-2.6.7-2.6.7/arch/ia64/configs/zx1_defconfig	2004-06-16 07:19:37.000000000 +0200
++++ kernel-source-2.6.7-2.6.7/arch/ia64/configs/zx1_defconfig.pruned	2004-06-21 14:47:25.322726216 +0200
+@@ -1022,8 +1022,6 @@
+ #
+ # USB Miscellaneous drivers
+ #
+-# CONFIG_USB_EMI62 is not set
+-# CONFIG_USB_EMI26 is not set
+ # CONFIG_USB_TIGL is not set
+ # CONFIG_USB_AUERSWALD is not set
+ # CONFIG_USB_RIO500 is not set
+--- kernel-source-2.6.7-2.6.7/arch/ia64/defconfig	2004-06-21 14:41:04.966083491 +0200
++++ kernel-source-2.6.7-2.6.7/arch/ia64/defconfig.pruned	2004-06-21 14:47:25.802700535 +0200
+@@ -892,8 +892,6 @@
+ #
+ # USB Miscellaneous drivers
+ #
+-# CONFIG_USB_EMI62 is not set
+-# CONFIG_USB_EMI26 is not set
+ # CONFIG_USB_TIGL is not set
+ # CONFIG_USB_AUERSWALD is not set
+ # CONFIG_USB_RIO500 is not set
+--- kernel-source-2.6.7-2.6.7/arch/ppc64/configs/g5_defconfig	2004-06-16 07:18:56.000000000 +0200
++++ kernel-source-2.6.7-2.6.7/arch/ppc64/configs/g5_defconfig.pruned	2004-06-21 14:47:26.301673838 +0200
+@@ -951,8 +951,6 @@
+ #
+ # USB Miscellaneous drivers
+ #
+-# CONFIG_USB_EMI62 is not set
+-# CONFIG_USB_EMI26 is not set
+ # CONFIG_USB_TIGL is not set
+ # CONFIG_USB_AUERSWALD is not set
+ # CONFIG_USB_RIO500 is not set
+--- kernel-source-2.6.7-2.6.7/arch/ppc64/configs/pSeries_defconfig	2004-06-16 07:20:03.000000000 +0200
++++ kernel-source-2.6.7-2.6.7/arch/ppc64/configs/pSeries_defconfig.pruned	2004-06-21 14:47:26.805646874 +0200
+@@ -874,8 +874,6 @@
+ #
+ # USB Miscellaneous drivers
+ #
+-# CONFIG_USB_EMI62 is not set
+-# CONFIG_USB_EMI26 is not set
+ # CONFIG_USB_TIGL is not set
+ # CONFIG_USB_AUERSWALD is not set
+ # CONFIG_USB_RIO500 is not set
+--- kernel-source-2.6.7-2.6.7/arch/ppc64/defconfig	2004-06-21 14:41:04.983082581 +0200
++++ kernel-source-2.6.7-2.6.7/arch/ppc64/defconfig.pruned	2004-06-21 14:47:27.271621943 +0200
+@@ -874,8 +874,6 @@
+ #
+ # USB Miscellaneous drivers
+ #
+-# CONFIG_USB_EMI62 is not set
+-# CONFIG_USB_EMI26 is not set
+ # CONFIG_USB_TIGL is not set
+ # CONFIG_USB_AUERSWALD is not set
+ # CONFIG_USB_RIO500 is not set
+--- kernel-source-2.6.7-2.6.7/arch/arm/configs/lpd7a404_defconfig	2004-06-16 07:18:57.000000000 +0200
++++ kernel-source-2.6.7-2.6.7/arch/arm/configs/lpd7a404_defconfig.pruned	2004-06-21 14:47:27.781594657 +0200
+@@ -817,8 +817,6 @@
+ #
+ # USB Miscellaneous drivers
+ #
+-# CONFIG_USB_EMI62 is not set
+-# CONFIG_USB_EMI26 is not set
+ # CONFIG_USB_TIGL is not set
+ # CONFIG_USB_AUERSWALD is not set
+ # CONFIG_USB_RIO500 is not set
+--- kernel-source-2.6.7-2.6.7/arch/parisc/configs/c3000_defconfig	2004-06-16 07:19:36.000000000 +0200
++++ kernel-source-2.6.7-2.6.7/arch/parisc/configs/c3000_defconfig.pruned	2004-06-21 14:47:28.271568442 +0200
+@@ -874,8 +874,6 @@
+ #
+ # USB Miscellaneous drivers
+ #
+-# CONFIG_USB_EMI62 is not set
+-# CONFIG_USB_EMI26 is not set
+ # CONFIG_USB_TIGL is not set
+ # CONFIG_USB_AUERSWALD is not set
+ # CONFIG_USB_RIO500 is not set
+--- kernel-source-2.6.7-2.6.7/arch/parisc/defconfig	2004-06-21 14:41:04.968083384 +0200
++++ kernel-source-2.6.7-2.6.7/arch/parisc/defconfig.pruned	2004-06-21 14:47:28.753542654 +0200
+@@ -731,8 +731,6 @@
+ #
+ # USB Miscellaneous drivers
+ #
+-# CONFIG_USB_EMI62 is not set
+-# CONFIG_USB_EMI26 is not set
+ # CONFIG_USB_TIGL is not set
+ # CONFIG_USB_AUERSWALD is not set
+ # CONFIG_USB_RIO500 is not set
+--- kernel-source-2.6.7-2.6.7/arch/x86_64/defconfig	2004-06-21 14:41:04.993082046 +0200
++++ kernel-source-2.6.7-2.6.7/arch/x86_64/defconfig.pruned	2004-06-21 14:47:29.261515476 +0200
+@@ -769,8 +769,6 @@
+ #
+ # USB Miscellaneous drivers
+ #
+-# CONFIG_USB_EMI62 is not set
+-# CONFIG_USB_EMI26 is not set
+ # CONFIG_USB_TIGL is not set
+ # CONFIG_USB_AUERSWALD is not set
+ # CONFIG_USB_RIO500 is not set
+--- kernel-source-2.6.7-2.6.7/drivers/usb/misc/Kconfig~	2004-06-16 07:20:04.000000000 +0200
++++ kernel-source-2.6.7-2.6.7/drivers/usb/misc/Kconfig	2004-06-21 14:42:39.229036608 +0200
+@@ -4,34 +4,6 @@
+ comment "USB Miscellaneous drivers"
+ 	depends on USB
+ 
+-config USB_EMI62
+-	tristate "EMI 6|2m USB Audio interface support"
+-	depends on USB
+-	---help---
+-	  This driver loads firmware to Emagic EMI 6|2m low latency USB
+-	  Audio and Midi interface.
+-
+-	  After firmware load the device is handled with standard linux
+-	  USB Audio driver.
+-
+-	  This code is also available as a module ( = code which can be
+-	  inserted in and removed from the running kernel whenever you want).
+-	  The module will be called audio. If you want to compile it as a
+-	  module, say M here and read <file:Documentation/kbuild/modules.txt>.
+-
+-config USB_EMI26
+-	tristate "EMI 2|6 USB Audio interface support"
+-	depends on USB
+-	---help---
+-	  This driver loads firmware to Emagic EMI 2|6 low latency USB
+-	  Audio interface.
+-
+-	  After firmware load the device is handled with standard linux
+-	  USB Audio driver.
+-
+-	  To compile this driver as a module, choose M here: the
+-	  module will be called emi26.
+-
+ config USB_TIGL
+ 	tristate "Texas Instruments Graph Link USB (aka SilverLink) cable support"
+ 	depends on USB
+--- kernel-source-2.6.7-2.6.7/drivers/usb/misc/Makefile	2004-06-16 07:19:35.000000000 +0200
++++ kernel-source-2.6.7-2.6.7/drivers/usb/misc/Makefile.pruned	2004-06-21 14:47:29.790487173 +0200
+@@ -5,8 +5,6 @@
+ 
+ obj-$(CONFIG_USB_AUERSWALD)	+= auerswald.o
+ obj-$(CONFIG_USB_CYTHERM)	+= cytherm.o
+-obj-$(CONFIG_USB_EMI26)		+= emi26.o
+-obj-$(CONFIG_USB_EMI62)		+= emi62.o
+ obj-$(CONFIG_USB_LCD)		+= usblcd.o
+ obj-$(CONFIG_USB_LED)		+= usbled.o
+ obj-$(CONFIG_USB_LEGOTOWER)	+= legousbtower.o
+--- kernel-source-2.6.7-2.6.7/drivers/usb/Makefile	2004-06-16 07:20:04.000000000 +0200
++++ kernel-source-2.6.7-2.6.7/drivers/usb/Makefile.pruned	2004-06-21 14:47:30.625442500 +0200
+@@ -56,8 +56,6 @@
+ 
+ obj-$(CONFIG_USB_AUERSWALD)	+= misc/
+ obj-$(CONFIG_USB_CYTHERM)	+= misc/
+-obj-$(CONFIG_USB_EMI26)		+= misc/
+-obj-$(CONFIG_USB_EMI62)		+= misc/
+ obj-$(CONFIG_USB_LCD)		+= misc/
+ obj-$(CONFIG_USB_LED)		+= misc/
+ obj-$(CONFIG_USB_LEGOTOWER)	+= misc/

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/s390-build-sclp-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/s390-build-sclp-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/s390-build-sclp-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,35 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix sclp build
+## DP: Patch author: Bastian Blank <waldi at debian.org>
+## DP: Upstream status: accepted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -ur linux-2.6.9-rc3.orig/drivers/s390/char/sclp_tty.c linux-2.6.9-rc3/drivers/s390/char/sclp_tty.c
+--- linux-2.6.9-rc3.orig/drivers/s390/char/sclp_tty.c	2004-10-03 20:37:30.000000000 +0000
++++ linux-2.6.9-rc3/drivers/s390/char/sclp_tty.c	2004-10-03 18:16:39.000000000 +0000
+@@ -277,7 +277,7 @@
+ 	wake_up(&sclp_tty_waitq);
+ 	/* check if the tty needs a wake up call */
+ 	if (sclp_tty != NULL) {
+-		tty_wakeup(tty);
++		tty_wakeup(sclp_tty);
+ 	}
+ }
+ 
+diff -ur linux-2.6.9-rc3.orig/drivers/s390/char/sclp_vt220.c linux-2.6.9-rc3/drivers/s390/char/sclp_vt220.c
+--- linux-2.6.9-rc3.orig/drivers/s390/char/sclp_vt220.c	2004-10-03 20:37:30.000000000 +0000
++++ linux-2.6.9-rc3/drivers/s390/char/sclp_vt220.c	2004-10-03 18:17:52.000000000 +0000
+@@ -139,7 +139,7 @@
+ 	wake_up(&sclp_vt220_waitq);
+ 	/* Check if the tty needs a wake up call */
+ 	if (sclp_vt220_tty != NULL) {
+-		tty_wakeup(tty);
++		tty_wakeup(sclp_vt220_tty);
+ 	}
+ }
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/s390-export-copy_in_user.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/s390-export-copy_in_user.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/s390-export-copy_in_user.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,21 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Export copy_in_user
+## DP: Patch author: Bastian Blank <waldi at debian.org>
+## DP: Upstream status: accepted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- a/arch/s390/kernel/s390_ksyms.c	2004-08-14 05:37:15.000000000 +0000
++++ b/arch/s390/kernel/s390_ksyms.c	2004-09-01 16:21:14.000000000 +0000
+@@ -29,6 +29,7 @@
+ EXPORT_SYMBOL_NOVERS(_sb_findmap);
+ EXPORT_SYMBOL_NOVERS(__copy_from_user_asm);
+ EXPORT_SYMBOL_NOVERS(__copy_to_user_asm);
++EXPORT_SYMBOL_NOVERS(__copy_in_user_asm);
+ EXPORT_SYMBOL_NOVERS(__clear_user_asm);
+ EXPORT_SYMBOL_NOVERS(__strncpy_from_user_asm);
+ EXPORT_SYMBOL_NOVERS(__strnlen_user_asm);

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/s390-sacf-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/s390-sacf-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/s390-sacf-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,45 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: s390: Force user process back to home space mode in space switch event exception handler.
+## DP: Reference: CAN-2004-0887
+## DP: Patch author: Martin Schwidefsky <schwidefsky at de.ibm.com>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -urN linux-2.6/arch/s390/kernel/traps.c linux-2.6-patched/arch/s390/kernel/traps.c
+--- linux-2.6/arch/s390/kernel/traps.c	2004-10-22 13:51:45.000000000 +0200
++++ linux-2.6-patched/arch/s390/kernel/traps.c	2004-10-22 13:52:04.000000000 +0200
+@@ -591,6 +591,20 @@
+ 	}
+ }
+ 
++asmlinkage void space_switch_exception(struct pt_regs * regs, long int_code)
++{
++        siginfo_t info;
++
++	/* Set user psw back to home space mode. */
++	if (regs->psw.mask & PSW_MASK_PSTATE)
++		regs->psw.mask |= PSW_ASC_HOME;
++	/* Send SIGILL. */
++        info.si_signo = SIGILL;
++        info.si_errno = 0;
++        info.si_code = ILL_PRVOPC;
++        info.si_addr = get_check_address(regs);
++        do_trap(int_code, SIGILL, "space switch event", regs, &info);
++}
+ 
+ 
+ /* init is done in lowcore.S and head.S */
+@@ -629,7 +643,7 @@
+         pgm_check_table[0x3B] = &do_dat_exception;
+ #endif /* CONFIG_ARCH_S390X */
+         pgm_check_table[0x15] = &operand_exception;
+-        pgm_check_table[0x1C] = &privileged_op;
++        pgm_check_table[0x1C] = &space_switch_exception;
+         pgm_check_table[0x1D] = &hfp_sqrt_exception;
+ 	pgm_check_table[0x40] = &do_monitor_call;
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/scm_send-dos-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/scm_send-dos-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/scm_send-dos-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,117 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [SECURITY] Fix CMSG validation checks wrt. signedness.
+## DP: Patch author: Herbert Xu <herbert at gondor.apana.org.au>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/12/08 12:49:21-08:00 herbert at gondor.apana.org.au 
+#   [NET]: Fix CMSG validation checks wrt. signedness.
+#   
+#   Noticed by Georgi Guninski.
+#   
+#   Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
+#   Signed-off-by: David S. Miller <davem at davemloft.net>
+# 
+# include/linux/socket.h
+#   2004/12/08 12:48:28-08:00 herbert at gondor.apana.org.au +4 -0
+#   [NET]: Fix CMSG validation checks wrt. signedness.
+# 
+# net/core/scm.c
+#   2004/12/08 12:48:28-08:00 herbert at gondor.apana.org.au +1 -3
+#   [NET]: Fix CMSG validation checks wrt. signedness.
+# 
+# net/ipv4/ip_sockglue.c
+#   2004/12/08 12:48:28-08:00 herbert at gondor.apana.org.au +1 -4
+#   [NET]: Fix CMSG validation checks wrt. signedness.
+# 
+# net/ipv6/datagram.c
+#   2004/12/08 12:48:28-08:00 herbert at gondor.apana.org.au +1 -3
+#   [NET]: Fix CMSG validation checks wrt. signedness.
+# 
+# net/sctp/socket.c
+#   2004/12/08 12:48:29-08:00 herbert at gondor.apana.org.au +1 -5
+#   [NET]: Fix CMSG validation checks wrt. signedness.
+# 
+diff -Nru a/include/linux/socket.h b/include/linux/socket.h
+--- a/include/linux/socket.h	2004-12-15 13:50:50 -08:00
++++ b/include/linux/socket.h	2004-12-15 13:50:50 -08:00
+@@ -90,6 +90,10 @@
+ 				  (struct cmsghdr *)(ctl) : \
+ 				  (struct cmsghdr *)NULL)
+ #define CMSG_FIRSTHDR(msg)	__CMSG_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
++#define CMSG_OK(mhdr, cmsg) ((cmsg)->cmsg_len >= sizeof(struct cmsghdr) && \
++			     (cmsg)->cmsg_len <= (unsigned long) \
++			     ((mhdr)->msg_controllen - \
++			      ((char *)(cmsg) - (char *)(mhdr)->msg_control)))
+ 
+ /*
+  *	This mess will go away with glibc
+diff -Nru a/net/core/scm.c b/net/core/scm.c
+--- a/net/core/scm.c	2004-12-15 13:50:50 -08:00
++++ b/net/core/scm.c	2004-12-15 13:50:50 -08:00
+@@ -127,9 +127,7 @@
+ 		   for too short ancillary data object at all! Oops.
+ 		   OK, let's add it...
+ 		 */
+-		if (cmsg->cmsg_len < sizeof(struct cmsghdr) ||
+-		    (unsigned long)(((char*)cmsg - (char*)msg->msg_control)
+-				    + cmsg->cmsg_len) > msg->msg_controllen)
++		if (!CMSG_OK(msg, cmsg))
+ 			goto error;
+ 
+ 		if (cmsg->cmsg_level != SOL_SOCKET)
+diff -Nru a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
+--- a/net/ipv4/ip_sockglue.c	2004-12-15 13:50:50 -08:00
++++ b/net/ipv4/ip_sockglue.c	2004-12-15 13:50:50 -08:00
+@@ -146,11 +146,8 @@
+ 	struct cmsghdr *cmsg;
+ 
+ 	for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) {
+-		if (cmsg->cmsg_len < sizeof(struct cmsghdr) ||
+-		    (unsigned long)(((char*)cmsg - (char*)msg->msg_control)
+-				    + cmsg->cmsg_len) > msg->msg_controllen) {
++		if (!CMSG_OK(msg, cmsg))
+ 			return -EINVAL;
+-		}
+ 		if (cmsg->cmsg_level != SOL_IP)
+ 			continue;
+ 		switch (cmsg->cmsg_type) {
+diff -Nru a/net/ipv6/datagram.c b/net/ipv6/datagram.c
+--- a/net/ipv6/datagram.c	2004-12-15 13:50:50 -08:00
++++ b/net/ipv6/datagram.c	2004-12-15 13:50:50 -08:00
+@@ -427,9 +427,7 @@
+ 		int addr_type;
+ 		struct net_device *dev = NULL;
+ 
+-		if (cmsg->cmsg_len < sizeof(struct cmsghdr) ||
+-		    (unsigned long)(((char*)cmsg - (char*)msg->msg_control)
+-				    + cmsg->cmsg_len) > msg->msg_controllen) {
++		if (!CMSG_OK(msg, cmsg)) {
+ 			err = -EINVAL;
+ 			goto exit_f;
+ 		}
+diff -Nru a/net/sctp/socket.c b/net/sctp/socket.c
+--- a/net/sctp/socket.c	2004-12-15 13:50:50 -08:00
++++ b/net/sctp/socket.c	2004-12-15 13:50:50 -08:00
+@@ -4098,12 +4098,8 @@
+ 	for (cmsg = CMSG_FIRSTHDR(msg);
+ 	     cmsg != NULL;
+ 	     cmsg = CMSG_NXTHDR((struct msghdr*)msg, cmsg)) {
+-		/* Check for minimum length.  The SCM code has this check.  */
+-		if (cmsg->cmsg_len < sizeof(struct cmsghdr) ||
+-		    (unsigned long)(((char*)cmsg - (char*)msg->msg_control)
+-				    + cmsg->cmsg_len) > msg->msg_controllen) {
++		if (!CMSG_OK(msg, cmsg))
+ 			return -EINVAL;
+-		}
+ 
+ 		/* Should we parse this header or ignore?  */
+ 		if (cmsg->cmsg_level != IPPROTO_SCTP)

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/scm_send-dos-fix2.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/scm_send-dos-fix2.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/scm_send-dos-fix2.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,52 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [SECURITY] CMSG compat code needs signedness fixes too.
+## DP: Patch author: David S. Miller <davem at davemloft.net>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/12/08 13:03:03-08:00 davem at nuts.davemloft.net 
+#   [NET]: CMSG compat code needs signedness fixes too.
+#   
+#   Signed-off-by: David S. Miller <davem at davemloft.net>
+# 
+# net/compat.c
+#   2004/12/08 13:02:32-08:00 davem at nuts.davemloft.net +7 -5
+#   [NET]: CMSG compat code needs signedness fixes too.
+# 
+diff -Nru a/net/compat.c b/net/compat.c
+--- a/net/compat.c	2004-12-15 23:12:20 -08:00
++++ b/net/compat.c	2004-12-15 23:12:20 -08:00
+@@ -124,6 +124,12 @@
+ 	 (struct compat_cmsghdr __user *)((msg)->msg_control) :		\
+ 	 (struct compat_cmsghdr __user *)NULL)
+ 
++#define CMSG_COMPAT_OK(ucmlen, ucmsg, mhdr) \
++	((ucmlen) >= sizeof(struct cmsghdr) && \
++	 (ucmlen) <= (unsigned long) \
++	 ((mhdr)->msg_controllen - \
++	  ((char *)(ucmsg) - (char *)(mhdr)->msg_control)))
++
+ static inline struct compat_cmsghdr __user *cmsg_compat_nxthdr(struct msghdr *msg,
+ 		struct compat_cmsghdr __user *cmsg, int cmsg_len)
+ {
+@@ -154,11 +160,7 @@
+ 			return -EFAULT;
+ 
+ 		/* Catch bogons. */
+-		if(CMSG_COMPAT_ALIGN(ucmlen) <
+-		   CMSG_COMPAT_ALIGN(sizeof(struct compat_cmsghdr)))
+-			return -EINVAL;
+-		if((unsigned long)(((char __user *)ucmsg - (char __user *)kmsg->msg_control)
+-				   + ucmlen) > kmsg->msg_controllen)
++		if (!CMSG_COMPAT_OK(ucmlen, ucmsg, kmsg))
+ 			return -EINVAL;
+ 
+ 		tmp = ((ucmlen - CMSG_COMPAT_ALIGN(sizeof(*ucmsg))) +

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/scsi-blacklist-2.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/scsi-blacklist-2.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/scsi-blacklist-2.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,43 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: update scsi blacklist for USB multi card readers (again)
+## DP: Patch author: unknown (from Fedora) via Otavio Salvador <otavio at debian.org>
+## DP: Upstream status: unknown
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- kernel-source-2.6.8-orig/drivers/scsi/scsi_devinfo.c	2005-01-06 23:56:57.000000000 -0200
++++ kernel-source-2.6.8/drivers/scsi/scsi_devinfo.c	2005-01-07 00:07:23.000000000 -0200
+@@ -184,7 +184,6 @@
+ 	{"XYRATEX", "RS", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
+ 	{"Zzyzx", "RocketStor 500S", NULL, BLIST_SPARSELUN},
+ 	{"Zzyzx", "RocketStor 2000", NULL, BLIST_SPARSELUN},
+-	{ NULL, NULL, NULL, 0 },
+ 
+ 	/*
+ 	 * USB multi card readers. Only these should use BLIST_FORCELUN.
+@@ -196,16 +195,21 @@
+ 	{"Generic", "USB Storage-SMC", "0090", BLIST_FORCELUN},
+ 	{"Generic", "USB Storage-SMC", "0180", BLIST_FORCELUN},
+ 	{"Generic", "USB Storage-SMC", "0207", BLIST_FORCELUN},
++	{"IC", "USB Storage-CFC", "322E", BLIST_FORCELUN},
+ 	{"ICSI", "SD Card", "2.7C", BLIST_FORCELUN},
+ 	{"IOI", "Media Bay", "*", BLIST_FORCELUN},
+ 	{"Lexar", "Media Inc. SM/xD", "009E", BLIST_FORCELUN},
+ 	{"Medion", "Flash XL  MMC/SD", "2.6D", BLIST_FORCELUN},
++	{"OEI-USB2", "CompactFlash", "2.00", BLIST_FORCELUN},
+ 	{"SanDisk", "ImageMate CF-SD1", NULL, BLIST_FORCELUN},
+ 	{"SMSC", "223 U HS-CF", "1.95", BLIST_FORCELUN},
+ 	{"SMSC", "USB 2 HS-CF", NULL, BLIST_FORCELUN},
+ 	{"TwinMOS", "7-in-1 Card RWCF", "0100", BLIST_FORCELUN},
+ 	{"USB2.0", "SMARTMEDIA/XD", NULL, BLIST_FORCELUN},
+ 	{"Y-E DATA", "CF Card Reader", "1.03", BLIST_FORCELUN},
++	{"Zynet", "USB Storage-SMC", "I03A", BLIST_FORCELUN},
++
++	{ NULL, NULL, NULL, 0 },
+ };
+ 
+ /*

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/scsi-blacklist.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/scsi-blacklist.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/scsi-blacklist.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,88 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: update scsi blacklist for USB multi card readers
+## DP: Patch author: unknown (from Fedora)
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -urNp linux-1100/drivers/scsi/scsi_devinfo.c linux-10000/drivers/scsi/scsi_devinfo.c
+--- linux-1100/drivers/scsi/scsi_devinfo.c
++++ linux-10000/drivers/scsi/scsi_devinfo.c
+@@ -118,10 +118,7 @@ static struct {
+ 	 */
+ 	{"ADAPTEC", "AACRAID", NULL, BLIST_FORCELUN},
+ 	{"ADAPTEC", "Adaptec 5400S", NULL, BLIST_FORCELUN},
+-	{"AFT PRO", "-IX CF", "0.0>", BLIST_FORCELUN},
+-	{"BELKIN", "USB 2 HS-CF", "1.95",  BLIST_FORCELUN},
+ 	{"CANON", "IPUBJD", NULL, BLIST_SPARSELUN},
+-	{"CBOX3", "USB Storage-SMC", "300A", BLIST_FORCELUN},
+ 	{"CMD", "CRA-7280", NULL, BLIST_SPARSELUN},	/* CMD RAID Controller */
+ 	{"CNSI", "G7324", NULL, BLIST_SPARSELUN},	/* Chaparral G7324 RAID */
+ 	{"CNSi", "G8324", NULL, BLIST_SPARSELUN},	/* Chaparral G8324 RAID */
+@@ -142,9 +139,6 @@ static struct {
+ 	{"EMC", "SYMMETRIX", NULL, BLIST_SPARSELUN | BLIST_LARGELUN | BLIST_FORCELUN},
+ 	{"EMULEX", "MD21/S2     ESDI", NULL, BLIST_SINGLELUN},
+ 	{"FSC", "CentricStor", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
+-	{"Generic", "USB SD Reader", "1.00", BLIST_FORCELUN},
+-	{"Generic", "USB Storage-SMC", "0180", BLIST_FORCELUN},
+-	{"Generic", "USB Storage-SMC", "0207", BLIST_FORCELUN},
+ 	{"HITACHI", "DF400", "*", BLIST_SPARSELUN},
+ 	{"HITACHI", "DF500", "*", BLIST_SPARSELUN},
+ 	{"HITACHI", "DF600", "*", BLIST_SPARSELUN},
+@@ -164,7 +158,6 @@ static struct {
+ 	{"MATSHITA", "PD-1", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
+ 	{"MATSHITA", "DMC-LC5", NULL, BLIST_NOT_LOCKABLE | BLIST_INQUIRY_36},
+ 	{"MATSHITA", "DMC-LC40", NULL, BLIST_NOT_LOCKABLE | BLIST_INQUIRY_36},
+-	{"Medion", "Flash XL  MMC/SD", "2.6D", BLIST_FORCELUN},
+ 	{"MegaRAID", "LD", NULL, BLIST_FORCELUN},
+ 	{"MICROP", "4110", NULL, BLIST_NOTQ},
+ 	{"MYLEX", "DACARMRB", "*", BLIST_REPORTLUN2},
+@@ -178,11 +171,9 @@ static struct {
+ 	{"PIONEER", "CD-ROM DRM-602X", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
+ 	{"PIONEER", "CD-ROM DRM-604X", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
+ 	{"REGAL", "CDC-4X", NULL, BLIST_MAX5LUN | BLIST_SINGLELUN},
+-	{"SanDisk", "ImageMate CF-SD1", NULL, BLIST_FORCELUN},
+ 	{"SGI", "RAID3", "*", BLIST_SPARSELUN},
+ 	{"SGI", "RAID5", "*", BLIST_SPARSELUN},
+ 	{"SGI", "TP9100", "*", BLIST_REPORTLUN2},
+-	{"SMSC", "USB 2 HS-CF", NULL, BLIST_SPARSELUN},
+ 	{"SONY", "CD-ROM CDU-8001", NULL, BLIST_BORKEN},
+ 	{"SONY", "TSL", NULL, BLIST_FORCELUN},		/* DDS3 & DDS4 autoloaders */
+ 	{"SUN", "T300", "*", BLIST_SPARSELUN},
+@@ -190,11 +181,31 @@ static struct {
+ 	{"TEXEL", "CD-ROM", "1.06", BLIST_BORKEN},
+ 	{"TOSHIBA", "CDROM", NULL, BLIST_ISROM},
+ 	{"TOSHIBA", "CD-ROM", NULL, BLIST_ISROM},
+-	{"USB2.0", "SMARTMEDIA/XD", NULL, BLIST_FORCELUN},
+ 	{"XYRATEX", "RS", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
+ 	{"Zzyzx", "RocketStor 500S", NULL, BLIST_SPARSELUN},
+ 	{"Zzyzx", "RocketStor 2000", NULL, BLIST_SPARSELUN},
+ 	{ NULL, NULL, NULL, 0 },
++
++	/*
++	 * USB multi card readers. Only these should use BLIST_FORCELUN.
++	 */
++	{"AFT PRO", "-IX CF", "0.0>", BLIST_FORCELUN},
++	{"BELKIN", "USB 2 HS-CF", "1.95",  BLIST_FORCELUN},
++	{"CBOX3", "USB Storage-SMC", "300A", BLIST_FORCELUN},
++	{"Generic", "USB SD Reader", "1.00", BLIST_FORCELUN},
++	{"Generic", "USB Storage-SMC", "0090", BLIST_FORCELUN},
++	{"Generic", "USB Storage-SMC", "0180", BLIST_FORCELUN},
++	{"Generic", "USB Storage-SMC", "0207", BLIST_FORCELUN},
++	{"ICSI", "SD Card", "2.7C", BLIST_FORCELUN},
++	{"IOI", "Media Bay", "*", BLIST_FORCELUN},
++	{"Lexar", "Media Inc. SM/xD", "009E", BLIST_FORCELUN},
++	{"Medion", "Flash XL  MMC/SD", "2.6D", BLIST_FORCELUN},
++	{"SanDisk", "ImageMate CF-SD1", NULL, BLIST_FORCELUN},
++	{"SMSC", "223 U HS-CF", "1.95", BLIST_FORCELUN},
++	{"SMSC", "USB 2 HS-CF", NULL, BLIST_FORCELUN},
++	{"TwinMOS", "7-in-1 Card RWCF", "0100", BLIST_FORCELUN},
++	{"USB2.0", "SMARTMEDIA/XD", NULL, BLIST_FORCELUN},
++	{"Y-E DATA", "CF Card Reader", "1.03", BLIST_FORCELUN},
+ };
+ 
+ /*

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/scsi-shutdown-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/scsi-shutdown-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/scsi-shutdown-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,77 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Make sure scsi disk caches are flushed on shutdown
+## DP: Patch author: Mike Anderson <andmike at us.ibm.com>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/08/16 22:53:00-04:00 andmike at us.ibm.com 
+#   [PATCH] reorder call in scsi_remove_host
+#   
+#   This patch against scsi-misc-2.6 reorders a call to scsi_forget_host in
+#   the scsi_remove_host function. This removes the error message
+#   "Synchronizing SCSI cache..." on rmmod of a scsi host driver module as
+#   shown in example output 1 and 2 below.
+#   
+#   I had previous created a much more complicated patch to work around this
+#   problem. In response Christoph mention a simpler solution (pointer to
+#   thread below) which is this patch.
+#   
+#   http://marc.theaimsgroup.com/?l=linux-scsi&m=108720042210331&w=2
+#   
+#   Example output.
+#   
+#   1.) Before patch.
+#   
+#   elm:~# scsi1 : scsi_debug, version 1.73 [20040518], dev_size_mb=8,
+#   opts=0x0
+#     Vendor: Linux     Model: scsi_debug        Rev: 0004
+#     Type:   Direct-Access                      ANSI SCSI revision: 03
+#   SCSI device sdc: 16384 512-byte hdwr sectors (8 MB)
+#   SCSI device sdc: drive cache: write back
+#    sdc: unknown partition table
+#   Attached scsi disk sdc at scsi1, channel 0, id 0, lun 0
+#   Attached scsi generic sg4 at scsi1, channel 0, id 0, lun 0,  type 0
+#   Synchronizing SCSI cache for disk sdc: <4>FAILED
+#     status = 0, message = 00, host = 1, driver = 00
+#   
+#   2.) After patch.
+#   
+#   elm:~# scsi1 : scsi_debug, version 1.73 [20040518], dev_size_mb=8, opts=0x0
+#     Vendor: Linux     Model: scsi_debug        Rev: 0004
+#     Type:   Direct-Access                      ANSI SCSI revision: 03
+#   SCSI device sdc: 16384 512-byte hdwr sectors (8 MB)
+#   SCSI device sdc: drive cache: write back
+#    sdc: unknown partition table
+#   Attached scsi disk sdc at scsi1, channel 0, id 0, lun 0
+#   Attached scsi generic sg4 at scsi1, channel 0, id 0, lun 0,  type 0
+#   Synchronizing SCSI cache for disk sdc:
+#   
+#   Signed-off-by: Mike Anderson <andmike at us.ibm.com>
+#   Signed-off-by: James Bottomley <James.Bottomley at SteelEye.com>
+# 
+# drivers/scsi/hosts.c
+#   2004/08/11 13:35:07-04:00 andmike at us.ibm.com +1 -1
+#   reorder call in scsi_remove_host
+# 
+diff -Nru a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
+--- a/drivers/scsi/hosts.c	2004-09-05 13:22:05 +02:00
++++ b/drivers/scsi/hosts.c	2004-09-05 13:22:05 +02:00
+@@ -75,9 +75,9 @@
+  **/
+ void scsi_remove_host(struct Scsi_Host *shost)
+ {
++	scsi_forget_host(shost);
+ 	scsi_host_cancel(shost, 0);
+ 	scsi_proc_host_rm(shost);
+-	scsi_forget_host(shost);
+ 
+ 	set_bit(SHOST_DEL, &shost->shost_state);
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sec_brk-locked.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sec_brk-locked.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sec_brk-locked.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,227 @@
+#! /bin/sh -e
+## DP: Description: elf-loader root exploit
+## DP: Patch author: Marcelo Tosatti <marcelo.tosatti at cyclades.com>
+## DP: Upstream status: not yet merged
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -urNad linux-source-2.6.10-2.6.10/arch/mips/kernel/irixelf.c /usr/src/dpatchtemp/dpep.utRanM/linux-source-2.6.10-2.6.10/arch/mips/kernel/irixelf.c
+--- linux-source-2.6.10-2.6.10/arch/mips/kernel/irixelf.c	2004-12-24 22:35:50.000000000 +0100
++++ /usr/src/dpatchtemp/dpep.utRanM/linux-source-2.6.10-2.6.10/arch/mips/kernel/irixelf.c	2005-01-06 11:56:53.055898736 +0100
+@@ -127,7 +127,7 @@
+ 	end = PAGE_ALIGN(end);
+ 	if (end <= start)
+ 		return;
+-	do_brk(start, end - start);
++	do_brk_locked(start, end - start);
+ }
+ 
+ 
+diff -urNad linux-source-2.6.10-2.6.10/arch/x86_64/ia32/ia32_aout.c /usr/src/dpatchtemp/dpep.utRanM/linux-source-2.6.10-2.6.10/arch/x86_64/ia32/ia32_aout.c
+--- linux-source-2.6.10-2.6.10/arch/x86_64/ia32/ia32_aout.c	2004-12-24 22:35:40.000000000 +0100
++++ /usr/src/dpatchtemp/dpep.utRanM/linux-source-2.6.10-2.6.10/arch/x86_64/ia32/ia32_aout.c	2005-01-06 11:56:53.058898280 +0100
+@@ -113,7 +113,7 @@
+ 	end = PAGE_ALIGN(end);
+ 	if (end <= start)
+ 		return;
+-	do_brk(start, end - start);
++	do_brk_locked(start, end - start);
+ }
+ 
+ #if CORE_DUMP
+@@ -323,7 +323,7 @@
+ 		pos = 32;
+ 		map_size = ex.a_text+ex.a_data;
+ 
+-		error = do_brk(text_addr & PAGE_MASK, map_size);
++		error = do_brk_locked(text_addr & PAGE_MASK, map_size);
+ 		if (error != (text_addr & PAGE_MASK)) {
+ 			send_sig(SIGKILL, current, 0);
+ 			return error;
+@@ -359,7 +359,7 @@
+ 
+ 		if (!bprm->file->f_op->mmap||((fd_offset & ~PAGE_MASK) != 0)) {
+ 			loff_t pos = fd_offset;
+-			do_brk(N_TXTADDR(ex), ex.a_text+ex.a_data);
++			do_brk_locked(N_TXTADDR(ex), ex.a_text+ex.a_data);
+ 			bprm->file->f_op->read(bprm->file,(char *)N_TXTADDR(ex),
+ 					ex.a_text+ex.a_data, &pos);
+ 			flush_icache_range((unsigned long) N_TXTADDR(ex),
+@@ -468,7 +468,7 @@
+ 		}
+ #endif
+ 
+-		do_brk(start_addr, ex.a_text + ex.a_data + ex.a_bss);
++		do_brk_locked(start_addr, ex.a_text + ex.a_data + ex.a_bss);
+ 		
+ 		file->f_op->read(file, (char *)start_addr,
+ 			ex.a_text + ex.a_data, &pos);
+@@ -492,7 +492,7 @@
+ 	len = PAGE_ALIGN(ex.a_text + ex.a_data);
+ 	bss = ex.a_text + ex.a_data + ex.a_bss;
+ 	if (bss > len) {
+-		error = do_brk(start_addr + len, bss - len);
++		error = do_brk_locked(start_addr + len, bss - len);
+ 		retval = error;
+ 		if (error != start_addr + len)
+ 			goto out;
+diff -urNad linux-source-2.6.10-2.6.10/fs/binfmt_aout.c /usr/src/dpatchtemp/dpep.utRanM/linux-source-2.6.10-2.6.10/fs/binfmt_aout.c
+--- linux-source-2.6.10-2.6.10/fs/binfmt_aout.c	2004-12-24 22:35:50.000000000 +0100
++++ /usr/src/dpatchtemp/dpep.utRanM/linux-source-2.6.10-2.6.10/fs/binfmt_aout.c	2005-01-06 11:56:53.059898128 +0100
+@@ -50,7 +50,7 @@
+ 	start = PAGE_ALIGN(start);
+ 	end = PAGE_ALIGN(end);
+ 	if (end > start) {
+-		unsigned long addr = do_brk(start, end - start);
++		unsigned long addr = do_brk_locked(start, end - start);
+ 		if (BAD_ADDR(addr))
+ 			return addr;
+ 	}
+@@ -323,10 +323,10 @@
+ 		loff_t pos = fd_offset;
+ 		/* Fuck me plenty... */
+ 		/* <AOL></AOL> */
+-		error = do_brk(N_TXTADDR(ex), ex.a_text);
++		error = do_brk_locked(N_TXTADDR(ex), ex.a_text);
+ 		bprm->file->f_op->read(bprm->file, (char *) N_TXTADDR(ex),
+ 			  ex.a_text, &pos);
+-		error = do_brk(N_DATADDR(ex), ex.a_data);
++		error = do_brk_locked(N_DATADDR(ex), ex.a_data);
+ 		bprm->file->f_op->read(bprm->file, (char *) N_DATADDR(ex),
+ 			  ex.a_data, &pos);
+ 		goto beyond_if;
+@@ -347,7 +347,7 @@
+ 		map_size = ex.a_text+ex.a_data;
+ #endif
+ 
+-		error = do_brk(text_addr & PAGE_MASK, map_size);
++		error = do_brk_locked(text_addr & PAGE_MASK, map_size);
+ 		if (error != (text_addr & PAGE_MASK)) {
+ 			send_sig(SIGKILL, current, 0);
+ 			return error;
+@@ -382,7 +382,7 @@
+ 
+ 		if (!bprm->file->f_op->mmap||((fd_offset & ~PAGE_MASK) != 0)) {
+ 			loff_t pos = fd_offset;
+-			do_brk(N_TXTADDR(ex), ex.a_text+ex.a_data);
++			do_brk_locked(N_TXTADDR(ex), ex.a_text+ex.a_data);
+ 			bprm->file->f_op->read(bprm->file,
+ 					(char __user *)N_TXTADDR(ex),
+ 					ex.a_text+ex.a_data, &pos);
+@@ -488,7 +488,7 @@
+ 			error_time = jiffies;
+ 		}
+ 
+-		do_brk(start_addr, ex.a_text + ex.a_data + ex.a_bss);
++		do_brk_locked(start_addr, ex.a_text + ex.a_data + ex.a_bss);
+ 		
+ 		file->f_op->read(file, (char __user *)start_addr,
+ 			ex.a_text + ex.a_data, &pos);
+@@ -512,7 +512,7 @@
+ 	len = PAGE_ALIGN(ex.a_text + ex.a_data);
+ 	bss = ex.a_text + ex.a_data + ex.a_bss;
+ 	if (bss > len) {
+-		error = do_brk(start_addr + len, bss - len);
++		error = do_brk_locked(start_addr + len, bss - len);
+ 		retval = error;
+ 		if (error != start_addr + len)
+ 			goto out;
+diff -urNad linux-source-2.6.10-2.6.10/fs/binfmt_elf.c /usr/src/dpatchtemp/dpep.utRanM/linux-source-2.6.10-2.6.10/fs/binfmt_elf.c
+--- linux-source-2.6.10-2.6.10/fs/binfmt_elf.c	2004-12-24 22:34:33.000000000 +0100
++++ /usr/src/dpatchtemp/dpep.utRanM/linux-source-2.6.10-2.6.10/fs/binfmt_elf.c	2005-01-06 11:56:53.061897824 +0100
+@@ -87,7 +87,7 @@
+ 	start = ELF_PAGEALIGN(start);
+ 	end = ELF_PAGEALIGN(end);
+ 	if (end > start) {
+-		unsigned long addr = do_brk(start, end - start);
++		unsigned long addr = do_brk_locked(start, end - start);
+ 		if (BAD_ADDR(addr))
+ 			return addr;
+ 	}
+@@ -407,7 +407,7 @@
+ 
+ 	/* Map the last of the bss segment */
+ 	if (last_bss > elf_bss) {
+-		error = do_brk(elf_bss, last_bss - elf_bss);
++		error = do_brk_locked(elf_bss, last_bss - elf_bss);
+ 		if (BAD_ADDR(error))
+ 			goto out_close;
+ 	}
+@@ -447,7 +447,7 @@
+ 		goto out;
+ 	}
+ 
+-	do_brk(0, text_data);
++	do_brk_locked(0, text_data);
+ 	if (!interpreter->f_op || !interpreter->f_op->read)
+ 		goto out;
+ 	if (interpreter->f_op->read(interpreter, addr, text_data, &offset) < 0)
+@@ -455,7 +455,7 @@
+ 	flush_icache_range((unsigned long)addr,
+ 	                   (unsigned long)addr + text_data);
+ 
+-	do_brk(ELF_PAGESTART(text_data + ELF_MIN_ALIGN - 1),
++	do_brk_locked(ELF_PAGESTART(text_data + ELF_MIN_ALIGN - 1),
+ 		interp_ex->a_bss);
+ 	elf_entry = interp_ex->a_entry;
+ 
+@@ -1012,7 +1012,7 @@
+ 	len = ELF_PAGESTART(elf_phdata->p_filesz + elf_phdata->p_vaddr + ELF_MIN_ALIGN - 1);
+ 	bss = elf_phdata->p_memsz + elf_phdata->p_vaddr;
+ 	if (bss > len)
+-		do_brk(len, bss - len);
++		do_brk_locked(len, bss - len);
+ 	error = 0;
+ 
+ out_free_ph:
+diff -urNad linux-source-2.6.10-2.6.10/include/linux/mm.h /usr/src/dpatchtemp/dpep.utRanM/linux-source-2.6.10-2.6.10/include/linux/mm.h
+--- linux-source-2.6.10-2.6.10/include/linux/mm.h	2004-12-24 22:33:50.000000000 +0100
++++ /usr/src/dpatchtemp/dpep.utRanM/linux-source-2.6.10-2.6.10/include/linux/mm.h	2005-01-06 11:56:53.062897672 +0100
+@@ -653,6 +653,7 @@
+ extern int do_munmap(struct mm_struct *, unsigned long, size_t);
+ 
+ extern unsigned long do_brk(unsigned long, unsigned long);
++extern unsigned long do_brk_locked(unsigned long, unsigned long);
+ 
+ /* filemap.c */
+ extern unsigned long page_unuse(struct page *);
+diff -urNad linux-source-2.6.10-2.6.10/mm/mmap.c /usr/src/dpatchtemp/dpep.utRanM/linux-source-2.6.10-2.6.10/mm/mmap.c
+--- linux-source-2.6.10-2.6.10/mm/mmap.c	2004-12-24 22:35:00.000000000 +0100
++++ /usr/src/dpatchtemp/dpep.utRanM/linux-source-2.6.10-2.6.10/mm/mmap.c	2005-01-06 11:56:53.066897064 +0100
+@@ -1693,6 +1693,20 @@
+ 
+ EXPORT_SYMBOL(do_brk);
+ 
++/* locking version of do_brk. */
++unsigned long do_brk_locked(unsigned long addr, unsigned long len)
++{
++	unsigned long ret;
++
++	down_write(&current->mm->mmap_sem);
++	ret = do_brk(addr, len);
++	up_write(&current->mm->mmap_sem);
++
++	return ret;
++}
++
++EXPORT_SYMBOL(do_brk_locked);
++
+ /* Release all mmaps. */
+ void exit_mmap(struct mm_struct *mm)
+ {
+diff -urNad linux-source-2.6.10-2.6.10/mm/nommu.c /usr/src/dpatchtemp/dpep.utRanM/linux-source-2.6.10-2.6.10/mm/nommu.c
+--- linux-source-2.6.10-2.6.10/mm/nommu.c	2004-12-24 22:35:25.000000000 +0100
++++ /usr/src/dpatchtemp/dpep.utRanM/linux-source-2.6.10-2.6.10/mm/nommu.c	2005-01-06 11:56:53.068896760 +0100
+@@ -227,6 +227,11 @@
+ 	return mm->brk = brk;
+ }
+ 
++unsigned long do_brk_locked(unsigned long addr, unsigned long len)
++{
++	return -ENOMEM;
++}
++
+ /*
+  * Combine the mmap "prot" and "flags" argument into one "vm_flags" used
+  * internally. Essentially, translate the "PROT_xxx" and "MAP_xxx" bits

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/selinux-seqpacket-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/selinux-seqpacket-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/selinux-seqpacket-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,38 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix SELinux crashes with SOCK_SEQPACKET
+## DP: Patch author: Ross Axe <ross.axe at blueyonder.co.uk>
+## DP: Upstream status: unknown
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+
+With CONFIG_SECURITY_NETWORK=y and CONFIG_SECURITY_SELINUX=y, using
+SOCK_SEQPACKET unix domain sockets causes an oops in the superfluous(?)
+call to security_unix_may_send in sock_dgram_sendmsg. This patch avoids
+making this call for SOCK_SEQPACKET sockets.
+
+
+Signed-off-by: Ross Axe <ross.axe at blueyonder.co.uk>
+
+diff -urNad linux-source-2.6.9-2.6.9/net/unix/af_unix.c /tmp/dpep.JmX4rP/linux-source-2.6.9-2.6.9/net/unix/af_unix.c
+--- linux-source-2.6.9-2.6.9/net/unix/af_unix.c	2004-10-18 23:54:37.000000000 +0200
++++ /tmp/dpep.JmX4rP/linux-source-2.6.9-2.6.9/net/unix/af_unix.c	2004-12-01 10:46:38.572051328 +0100
+@@ -1365,9 +1365,11 @@
+ 	if (other->sk_shutdown & RCV_SHUTDOWN)
+ 		goto out_unlock;
+ 
+-	err = security_unix_may_send(sk->sk_socket, other->sk_socket);
+-	if (err)
+-		goto out_unlock;
++	if (sk->sk_type != SOCK_SEQPACKET) {
++		err = security_unix_may_send(sk->sk_socket, other->sk_socket);
++		if (err)
++			goto out_unlock;
++	}
+ 
+ 	if (unix_peer(other) != sk &&
+ 	    (skb_queue_len(&other->sk_receive_queue) >

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-1
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-1	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-1	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,55 @@
++ alpha-epoch-comment.dpatch
++ alpha-termbits.dpatch
++ doc-post_halloween.dpatch
++ drivers-ftape.dpatch
++ drivers-ide-dma-blacklist-toshiba.dpatch
++ drivers-input-hiddev-HIDIOCGUCODE.dpatch
++ drivers-input-psaux-hacks.dpatch
++ drivers-net-8139too-locking.dpatch
+X drivers/net/acenic_firmware.h
+X drivers/net/dgrs_firmware.c
+X drivers/net/tg3.c
+X drivers/net/tokenring/smctr_firmware.h
+X drivers/scsi/qla2xxx/ql2100_fw.c
+X drivers/scsi/qla2xxx/ql2200_fw.c
+X drivers/scsi/qla2xxx/ql2300_fw.c
+X drivers/scsi/qla2xxx/ql2322_fw.c
+X drivers/scsi/qla2xxx/ql6312_fw.c
+X drivers/scsi/qla2xxx/ql6322_fw.c
+X drivers/usb/media/dabfirmware.h
+X drivers/usb/misc/emi62_fw_m.h
+X drivers/usb/misc/emi62_fw_s.h
+X drivers/usb/serial/keyspan_mpr_fw.h
+X drivers/usb/serial/keyspan_usa18x_fw.h
+X drivers/usb/serial/keyspan_usa19_fw.h
+X drivers/usb/serial/keyspan_usa19qi_fw.h
+X drivers/usb/serial/keyspan_usa19qw_fw.h
+X drivers/usb/serial/keyspan_usa19w_fw.h
+X drivers/usb/serial/keyspan_usa28_fw.h
+X drivers/usb/serial/keyspan_usa28x_fw.h
+X drivers/usb/serial/keyspan_usa28xa_fw.h
+X drivers/usb/serial/keyspan_usa28xb_fw.h
+X drivers/usb/serial/keyspan_usa49w_fw.h
+X drivers/usb/serial/keyspan_usa49wlc_fw.h
++ drivers-net-tg3-readd.dpatch
++ drivers-scsi_changer.dpatch
++ drivers-scsi-generic_proc_info.dpatch
++ extraversion.dpatch
++ fs-asfs.dpatch
++ include-missing-includes.dpatch
++ ipsec-missing_wakeup.dpatch
++ modular-ide.dpatch
++ modular-ide-pnp.dpatch
++ modular-vesafb.dpatch
++ remove-references-to-removed-drivers.dpatch
++ x86-i486_emu.dpatch
++ marvell-mm.dpatch
++ marvell-pegasos.dpatch
++ powerpc-pegasos.dpatch
++ nfs-fix.dpatch
++ SG_IO-cap.dpatch
++ ia64-generic-no-smp.dpatch
++ ptmx-fix.dpatch
++ powerpc-ibm-240-e30.dpatch
++ xfs-ioctl32.dpatch
++ drivers-scsi-sym53c8xx_revert.dpatch

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-10
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-10	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-10	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,5 @@
++ aic7xxx-delay_h-update.dpatch
++ tty-locking-fixes9.dpatch
++ s390-sacf-fix.dpatch
++ s390-export-copy_in_user.dpatch
++ s390-build-sclp-fix.dpatch

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-11
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-11	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-11	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,35 @@
++ drm-locking-fixes.dpatch
++ selinux-seqpacket-fix.dpatch
++ mark-vmio.dpatch
++ unix-serialize-dgram.dpatch
++ drivers-firmware-pcdp-register.dpatch
++ arch-x86_64-sys32_ni-overflow.dpatch
++ scm_send-dos-fix.dpatch
++ igmp-src-list-fix.dpatch
++ scm_send-dos-fix2.dpatch
++ binfmt-huge-vma-dos.dpatch
++ binfmt-huge-vma-dos2.dpatch
++ arch-x86_64-sys32_quotactl-overflow.dpatch
++ ip-conntrack-ftp-leak.dpatch 
++ reiserfs-sucks-0.dpatch
++ reiserfs-sucks-1.dpatch
++ reiserfs-sucks-2.dpatch
++ reiserfs-sucks-3.dpatch
++ reiserfs-sucks-4.dpatch
++ fix-ip-options-leak.dpatch
++ vt-of-death.dpatch
++ drivers-usb-storage-revoltec.dpatch
++ arch-x86_64-signal-bug.dpatch
++ powerpc-970fx-support.dpatch
++ powerpc-g5-thermal-management-update.dpatch
++ powerpc-misc-powermac-fixes.dpatch
++ powerpc-serial.dpatch
++ powerpc-pegasos-via82cxxx.dpatch
+- powerpc-pegasos.dpatch
++ powerpc-pegasos-2.dpatch
++ sparc-cg6-fix.dpatch
++ sparc-warning-fixes.dpatch
++ sparc32-sun4d-support.dpatch
++ sparc32-hypersparc-dvma.dpatch
++ sparc32-vm-fault-codes.dpatch
++ sparc-ET_DYN_BASE.dpatch

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-12
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-12	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-12	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,7 @@
++ powerpc-prep-powerstack-irq.dpatch
++ qla1280-isp1040.dpatch
++ fix-alpha-ext3-oops.dpatch
++ 028-do_brk_security_fixes.dpatch
++ 029-random_poolsize_overflow.dpatch
++ 030-moxa_user_copy_checking.dpatch
++ 031-sg_scsi_ioctl_int_overflows.dpatch

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-13
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-13	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-13	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,6 @@
++ scsi-blacklist-2.dpatch
+- smbfs-overflow-fixes.dpatch
++ smbfs-overflow-fixes-2.dpatch
++ 034-stack_resize_exploit.dpatch
++ 035-do_brk_security_fixes-2.dpatch
++ cmsg-compat-signedness-fix-fix.dpatch

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-2
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-2	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-2	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,6 @@
+- marvell-pegasos.dpatch
++ marvell-pegasos-2.dpatch
++ powerpc-g4-l2-flush-errata.dpatch
++ ia64-generic-no-smp-1-to-2.dpatch
++ ia64_cyclone_nosmp.dpatch
++ fix-sn_console-for-config_smp.dpatch

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-3
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-3	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-3	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,16 @@
+- SG_IO-cap.dpatch
++ SG_IO-safe-commands.dpatch
+- drivers-scsi-sym53c8xx_revert.dpatch
++ bio_uncopy_user-memleak-2.dpatch
++ scsi-blacklist.dpatch
++ acpi-osname.dpatch
++ acpi-early.dpatch
++ acpi-speedstep-fix.dpatch
++ pmac-no-of-stdout.dpatch
++ net-sched-fix.dpatch
++ drivers-scsi-sym_2-dv-hang.dpatch
++ cciss-update.dpatch
++ minix-block-accounting-fix.dpatch
++ nfsd-subtreecheck-nostale.dpatch
++ shm-segment-count-fix.dpatch
++ modular-xfrm_tunnel.dpatch

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-4
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-4	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-4	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,5 @@
++ drivers-macintosh-adb-trackpad.dpatch
++ powerpc-g4-errata.dpatch
+- SG_IO-safe-commands.dpatch
++ SG_IO-safe-commands-2.dpatch
++ sparc64-update.dpatch

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-5
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-5	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-5	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,5 @@
++ sparc64-sunsab-fix.dpatch
++ sparc64-syslog-register.dpatch
++ sparc32-export-more-ksyms.dpatch
+- modular-xfrm_tunnel.dpatch
++ changelog.dpatch

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-6
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-6	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-6	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,16 @@
++ reiserfs-xattr.dpatch
++ netstat-fix-output.dpatch
++ intel-cache-descriptors.dpatch
+- changelog.dpatch
++ jfs-memory-leak.dpatch
++ sis900-add-phy.dpatch
++ fix-url-bsd-acct.dpatch
++ pcxx-is-broken.dpatch
++ microcode-devfs-name.dpatch
++ hfs-loop-fix.dpatch
++ powerpc-cmdline.dpatch
++ capi-freeing-fix.dpatch
++ scsi-shutdown-fix.dpatch
++ aic79xx-nohw.dpatch
++ aic7xxx-pcitable.dpatch
++ openpromfs-loop.dpatch

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-7
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-7	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-7	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,12 @@
++ ppc-boot-isa.dpatch
++ i915-agp.dpatch
++ copy_to_high_bio_irq-leak-fix.dpatch
++ tcp_default_win_scale.dpatch
++ ata_piix-combinde-mode-fix.dpatch
++ tg3-update.dpatch
++ forcedeth-update.dpatch
++ alsa-module-load-fix.dpatch
++ drivers-net-3c59x-build-fix.dpatch
++ drivers-net-arcnet-crash.dpatch
++ drivers-net-wireless-airo-build-smp.dpatch
+- acpi-early.dpatch 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-8
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-8	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-8	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,51 @@
++ sparc64-hme-lockup.dpatch
++ ia64-mem-boot-param-fix.dpatch
++ ia64-mem-max_addr-cmdline-fix.dpatch
++ tty-locking-fixes.dpatch
++ tty-locking-fixes2.dpatch
++ tty-locking-fixes3.dpatch
++ tty-locking-fixes4.dpatch
++ tty-locking-fixes5.dpatch
++ tty-locking-fixes6.dpatch
++ tty-locking-fixes7.dpatch
++ tty-locking-fixes8.dpatch
++ ia64-sparse-access_ok.dpatch
++ ia64-sparse-copy_to_user.dpatch
++ ext3-direct-io-assert-fix.dpatch
+- aic7xxx-pcitable.dpatch 
++ reiserfs-xattr-dont-dirty-mark.dpatch
++ reiserfs-write-signed-fix.dpatch
++ drivers-usb-storage-transport_dimage_getmaxlun.dpatch
++ net-sched-sch-cbq-leak.dpatch         
++ net-sched-sch-slab-corruption.dpatch
++ netfilter-localhost-frag.dpatch
+- aic79xx-nohw.dpatch
++ aic7xxx-update.dpatch
++ smbfs-overrun.dpatch 
++ drivers-pci-quirks-via8233a.dpatch
++ parport_pc-via8231.dpatch
++ dell-dbda-bios-fix.dpatch
++ via-velocity-update-01.dpatch
++ via-velocity-update-02.dpatch
++ via-velocity-update-03.dpatch
++ via-velocity-update-04.dpatch
++ via-velocity-update-05.dpatch
++ via-velocity-update-06.dpatch
++ via-velocity-update-07.dpatch
++ via-velocity-update-08.dpatch
++ via-velocity-update-09.dpatch
++ via-velocity-update-10.dpatch
++ via-velocity-update-11.dpatch
++ via-velocity-update-12.dpatch
++ via-velocity-update-13.dpatch
++ ia64-hp-sba_iommu-fix.dpatch
++ SG_IO-safe-commands-3.dpatch
++ SG_IO-safe-commands-5.dpatch
++ mm-vmscan-1.dpatch  
++ mm-vmscan-3.dpatch  
++ mm-vmscan-5.dpatch
++ mm-vmscan-2.dpatch  
++ mm-vmscan-4.dpatch  
++ drivers-usb-storage-transport-1.dpatch
++ drivers-usb-storage-transport-2.dpatch
++ dm_io-ENOMEM-goof.dpatch

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-9
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-9	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/series/2.6.8-9	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,28 @@
++ elf-loader-fixes.dpatch
++ sparc-sunzilog-timeout.dpatch
++ sparc-cg14-init.dpatch
++ drivers-serial-8250-ioremap-fix.dpatch
+- aic7xxx-update.dpatch
++ aic7xxx-0001-to-2.6.9.dpatch
++ aic7xxx-0007-1.1832.91.17.dpatch
++ aic7xxx-0008-1.1832.91.18.dpatch
++ aic7xxx-0009-1.1832.91.19.dpatch
++ aic7xxx-0010-1.1832.91.20.dpatch
++ aic7xxx-0011-1.1832.91.28.dpatch
++ aic7xxx-0017-1.1988.96.15.dpatch
+- ata_piix-combinde-mode-fix.dpatch
++ ata_piix-combinde-mode-fix-2.dpatch
++ vlan-update-1.dpatch
++ vlan-update-2.dpatch
++ sys_select-user_copy-check.dpatch
++ drivers-ide-dma-ricoh.dpatch
++ acpi-printk-breakpoint.dpatch
++ fs-tmpfs-free_inode-leak.dpatch
++ fs-ntfs-disconnect-fix.dpatch
++ elf-loader-fixes-the-return.dpatch
++ aout-loader-fixes.dpatch
+- smbfs-overrun.dpatch
++ smbfs-overflow-fixes.dpatch
++ sparc32-initrd-memcpy.dpatch
++ sparc64-sunsab-break-fix.dpatch
++ fs-partitions-check.dpatch

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/shm-segment-count-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/shm-segment-count-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/shm-segment-count-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,45 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: fix off by one in shm segment count limit
+## DP: Patch author: Manfred Spraul <manfred at colorfullife.com>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/08/24 11:27:43-07:00 manfred at colorfullife.com 
+#   [PATCH] remove magic +1 from shm segment count
+#   
+#   Michael Kerrisk found a bug in the shm accounting code: sysv shm allows to
+#   create SHMMNI+1 shared memory segments, instead of SHMMNI segments.  The +1
+#   is probably from the first shared anonymous mapping implementation that
+#   used the sysv code to implement shared anon mappings.
+#   
+#   The implementation got replaced, it's now the other way around (sysv uses
+#   the shared anon code), but the +1 remained.
+#   
+#   Signed-off-by: Manfred Spraul <manfred at colorfullife.com>
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# ipc/shm.c
+#   2004/08/24 02:08:43-07:00 manfred at colorfullife.com +1 -1
+#   remove magic +1 from shm segment count
+# 
+diff -Nru a/ipc/shm.c b/ipc/shm.c
+--- a/ipc/shm.c	2004-08-25 12:42:03 +02:00
++++ b/ipc/shm.c	2004-08-25 12:42:03 +02:00
+@@ -78,7 +78,7 @@
+ 
+ static inline int shm_addid(struct shmid_kernel *shp)
+ {
+-	return ipc_addid(&shm_ids, &shp->shm_perm, shm_ctlmni+1);
++	return ipc_addid(&shm_ids, &shp->shm_perm, shm_ctlmni);
+ }
+ 
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sis900-add-phy.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sis900-add-phy.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sis900-add-phy.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,33 @@
+#! /bin/sh -e  
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: add sis900 phy
+## DP: Patch author: Laurent <laurent at gobio2.net>
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+#    product info: vendor 08:00:17, model 3 rev 0
+#   
+#   and after some search on the web, I found it's a NS DP83847 which is very
+#   similar.
+#   
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+# 
+# drivers/net/sis900.c
+#   2004/08/25 03:15:20-04:00 akpm at osdl.org +1 -0
+#   Problem with SiS900 - Unknown PHY
+# 
+diff -Nru a/drivers/net/sis900.c b/drivers/net/sis900.c
+--- a/drivers/net/sis900.c	2004-08-29 02:46:36 -07:00
++++ b/drivers/net/sis900.c	2004-08-29 02:46:36 -07:00
+@@ -124,6 +124,7 @@
+ 	{ "AMD 79C901 HomePNA PHY",		0x0000, 0x6B90, HOME},
+ 	{ "ICS LAN PHY",			0x0015, 0xF440, LAN },
+ 	{ "NS 83851 PHY",			0x2000, 0x5C20, MIX },
++	{ "NS 83847 PHY",                       0x2000, 0x5C30, MIX },
+ 	{ "Realtek RTL8201 PHY",		0x0000, 0x8200, LAN },
+ 	{ "VIA 6103 PHY",			0x0101, 0x8f20, LAN },
+ 	{NULL,},

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/smbfs-overflow-fixes-2.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/smbfs-overflow-fixes-2.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/smbfs-overflow-fixes-2.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,133 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: SMBfs overflow fixes
+## DP: Patch author: unknown, stolen from -ac tree (probably Stefan Esser,  Juan Quintela, and Urban Widmark)
+## DP: Upstream status: unknown
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.10/fs/smbfs/proc.c linux-2.6.10/fs/smbfs/proc.c
+--- linux.vanilla-2.6.10/fs/smbfs/proc.c	2004-12-25 21:15:41.000000000 +0000
++++ linux-2.6.10/fs/smbfs/proc.c	2004-12-26 23:03:13.000000000 +0000
+@@ -1427,9 +1427,9 @@
+ 	 * So we must first calculate the amount of padding used by the server.
+ 	 */
+ 	data_off -= hdrlen;
+-	if (data_off > SMB_READX_MAX_PAD) {
+-		PARANOIA("offset is larger than max pad!\n");
+-		PARANOIA("%d > %d\n", data_off, SMB_READX_MAX_PAD);
++	if (data_off > SMB_READX_MAX_PAD || data_off < 0) {
++		PARANOIA("offset is larger than SMB_READX_MAX_PAD or negative!\n");
++		PARANOIA("%d > %d || %d < 0\n", data_off, SMB_READX_MAX_PAD, data_off);
+ 		req->rq_rlen = req->rq_bufsize + 1;
+ 		return;
+ 	}
+diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.10/fs/smbfs/request.c linux-2.6.10/fs/smbfs/request.c
+--- linux.vanilla-2.6.10/fs/smbfs/request.c	2004-12-25 21:15:41.000000000 +0000
++++ linux-2.6.10/fs/smbfs/request.c	2004-12-26 23:06:24.000000000 +0000
+@@ -588,8 +588,18 @@
+ 	data_count  = WVAL(inbuf, smb_drcnt);
+ 
+ 	/* Modify offset for the split header/buffer we use */
+-	data_offset -= hdrlen;
+-	parm_offset -= hdrlen;
++	if (data_count || data_offset) {
++		if (unlikely(data_offset < hdrlen))
++			goto out_bad_data;
++		else
++			data_offset -= hdrlen;
++	}
++	if (parm_count || parm_offset) {
++		if (unlikely(parm_offset < hdrlen))
++			goto out_bad_parm;
++		else
++			parm_offset -= hdrlen;
++	}
+ 
+ 	if (parm_count == parm_tot && data_count == data_tot) {
+ 		/*
+@@ -600,18 +610,22 @@
+ 		 * response that fits.
+ 		 */
+ 		VERBOSE("single trans2 response  "
+-			"dcnt=%d, pcnt=%d, doff=%d, poff=%d\n",
++			"dcnt=%u, pcnt=%u, doff=%u, poff=%u\n",
+ 			data_count, parm_count,
+ 			data_offset, parm_offset);
+ 		req->rq_ldata = data_count;
+ 		req->rq_lparm = parm_count;
+ 		req->rq_data = req->rq_buffer + data_offset;
+ 		req->rq_parm = req->rq_buffer + parm_offset;
++		if (unlikely(parm_offset + parm_count > req->rq_rlen))
++			goto out_bad_parm;
++		if (unlikely(data_offset + data_count > req->rq_rlen))
++			goto out_bad_data;
+ 		return 0;
+ 	}
+ 
+ 	VERBOSE("multi trans2 response  "
+-		"frag=%d, dcnt=%d, pcnt=%d, doff=%d, poff=%d\n",
++		"frag=%d, dcnt=%u, pcnt=%u, doff=%u, poff=%u\n",
+ 		req->rq_fragment,
+ 		data_count, parm_count,
+ 		data_offset, parm_offset);
+@@ -638,13 +652,15 @@
+ 
+ 		req->rq_parm = req->rq_trans2buffer;
+ 		req->rq_data = req->rq_trans2buffer + parm_tot;
+-	} else if (req->rq_total_data < data_tot ||
+-		   req->rq_total_parm < parm_tot)
++	} else if (unlikely(req->rq_total_data < data_tot ||
++			    req->rq_total_parm < parm_tot))
+ 		goto out_data_grew;
+ 
+-	if (parm_disp + parm_count > req->rq_total_parm)
++	if (unlikely(parm_disp + parm_count > req->rq_total_parm ||
++		     parm_offset + parm_count > req->rq_rlen))
+ 		goto out_bad_parm;
+-	if (data_disp + data_count > req->rq_total_data)
++	if (unlikely(data_disp + data_count > req->rq_total_data ||
++		     data_offset + data_count > req->rq_rlen))
+ 		goto out_bad_data;
+ 
+ 	inbuf = req->rq_buffer;
+@@ -666,10 +682,9 @@
+ 	return 1;
+ 
+ out_too_long:
+-	printk(KERN_ERR "smb_trans2: data/param too long, data=%d, parm=%d\n",
++	printk(KERN_ERR "smb_trans2: data/param too long, data=%u, parm=%u\n",
+ 		data_tot, parm_tot);
+-	req->rq_errno = -EIO;
+-	goto out;
++	goto out_EIO;
+ out_no_mem:
+ 	printk(KERN_ERR "smb_trans2: couldn't allocate data area of %d bytes\n",
+ 	       req->rq_trans2bufsize);
+@@ -677,16 +692,15 @@
+ 	goto out;
+ out_data_grew:
+ 	printk(KERN_ERR "smb_trans2: data/params grew!\n");
+-	req->rq_errno = -EIO;
+-	goto out;
++	goto out_EIO;
+ out_bad_parm:
+-	printk(KERN_ERR "smb_trans2: invalid parms, disp=%d, cnt=%d, tot=%d\n",
+-	       parm_disp, parm_count, parm_tot);
+-	req->rq_errno = -EIO;
+-	goto out;
++	printk(KERN_ERR "smb_trans2: invalid parms, disp=%u, cnt=%u, tot=%u, ofs=%u\n",
++	       parm_disp, parm_count, parm_tot, parm_offset);
++	goto out_EIO;
+ out_bad_data:
+-	printk(KERN_ERR "smb_trans2: invalid data, disp=%d, cnt=%d, tot=%d\n",
+-	       data_disp, data_count, data_tot);
++	printk(KERN_ERR "smb_trans2: invalid data, disp=%u, cnt=%u, tot=%u, ofs=%u\n",
++	       data_disp, data_count, data_tot, data_offset);
++out_EIO:
+ 	req->rq_errno = -EIO;
+ out:
+ 	return req->rq_errno;

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/smbfs-overflow-fixes.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/smbfs-overflow-fixes.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/smbfs-overflow-fixes.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,104 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: SMBfs overflow fixes
+## DP: Patch author: unknown, stolen from -ac tree (probably Stefan Esser,  Juan Quintela, and Urban Widmark)
+## DP: Upstream status: unknown
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.9/fs/smbfs/proc.c linux-2.6.9/fs/smbfs/proc.c
+--- linux.vanilla-2.6.9/fs/smbfs/proc.c	2004-10-20 23:17:20.000000000 +0100
++++ linux-2.6.9/fs/smbfs/proc.c	2004-11-17 19:41:41.000000000 +0000
+@@ -1427,9 +1427,9 @@
+ 	 * So we must first calculate the amount of padding used by the server.
+ 	 */
+ 	data_off -= hdrlen;
+-	if (data_off > SMB_READX_MAX_PAD) {
+-		PARANOIA("offset is larger than max pad!\n");
+-		PARANOIA("%d > %d\n", data_off, SMB_READX_MAX_PAD);
++	if (data_off > SMB_READX_MAX_PAD || data_off < 0) {
++		PARANOIA("offset is larger than SMB_READX_MAX_PAD or negative!\n");
++		PARANOIA("%d > %d || %d < 0\n", data_off, SMB_READX_MAX_PAD, data_off);
+ 		req->rq_rlen = req->rq_bufsize + 1;
+ 		return;
+ 	}
+diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.9/fs/smbfs/request.c linux-2.6.9/fs/smbfs/request.c
+--- linux.vanilla-2.6.9/fs/smbfs/request.c	2004-10-20 22:33:50.000000000 +0100
++++ linux-2.6.9/fs/smbfs/request.c	2004-11-17 19:41:41.000000000 +0000
+@@ -588,6 +588,10 @@
+ 	data_count  = WVAL(inbuf, smb_drcnt);
+ 
+ 	/* Modify offset for the split header/buffer we use */
++	if (data_offset < hdrlen)
++		goto out_bad_data;
++	if (parm_offset < hdrlen)
++		goto out_bad_parm;
+ 	data_offset -= hdrlen;
+ 	parm_offset -= hdrlen;
+ 
+@@ -607,6 +611,10 @@
+ 		req->rq_lparm = parm_count;
+ 		req->rq_data = req->rq_buffer + data_offset;
+ 		req->rq_parm = req->rq_buffer + parm_offset;
++		if (parm_offset + parm_count > req->rq_rlen)
++			goto out_bad_parm;
++		if (data_offset + data_count > req->rq_rlen)
++			goto out_bad_data;
+ 		return 0;
+ 	}
+ 
+@@ -634,6 +642,7 @@
+ 		req->rq_trans2buffer = smb_kmalloc(buf_len, GFP_NOFS);
+ 		if (!req->rq_trans2buffer)
+ 			goto out_no_mem;
++		memset(req->rq_trans2buffer, 0, buf_len);
+ 
+ 		req->rq_parm = req->rq_trans2buffer;
+ 		req->rq_data = req->rq_trans2buffer + parm_tot;
+@@ -643,8 +652,12 @@
+ 
+ 	if (parm_disp + parm_count > req->rq_total_parm)
+ 		goto out_bad_parm;
++	if (parm_offset + parm_count > req->rq_rlen)
++		goto out_bad_parm;
+ 	if (data_disp + data_count > req->rq_total_data)
+ 		goto out_bad_data;
++	if (data_offset + data_count > req->rq_rlen)
++		goto out_bad_data;
+ 
+ 	inbuf = req->rq_buffer;
+ 	memcpy(req->rq_parm + parm_disp, inbuf + parm_offset, parm_count);
+@@ -657,8 +670,11 @@
+ 	 * Check whether we've received all of the data. Note that
+ 	 * we use the packet totals -- total lengths might shrink!
+ 	 */
+-	if (req->rq_ldata >= data_tot && req->rq_lparm >= parm_tot)
++	if (req->rq_ldata >= data_tot && req->rq_lparm >= parm_tot) {
++		req->rq_ldata = data_tot;
++		req->rq_lparm = parm_tot;
+ 		return 0;
++	}
+ 	return 1;
+ 
+ out_too_long:
+@@ -676,13 +692,13 @@
+ 	req->rq_errno = -EIO;
+ 	goto out;
+ out_bad_parm:
+-	printk(KERN_ERR "smb_trans2: invalid parms, disp=%d, cnt=%d, tot=%d\n",
+-	       parm_disp, parm_count, parm_tot);
++	printk(KERN_ERR "smb_trans2: invalid parms, disp=%d, cnt=%d, tot=%d, ofs=%d\n",
++	       parm_disp, parm_count, parm_tot, parm_offset);
+ 	req->rq_errno = -EIO;
+ 	goto out;
+ out_bad_data:
+-	printk(KERN_ERR "smb_trans2: invalid data, disp=%d, cnt=%d, tot=%d\n",
+-	       data_disp, data_count, data_tot);
++	printk(KERN_ERR "smb_trans2: invalid data, disp=%d, cnt=%d, tot=%d, ofs=%d\n",
++	       data_disp, data_count, data_tot, data_offset);
+ 	req->rq_errno = -EIO;
+ out:
+ 	return req->rq_errno;

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/smbfs-overrun.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/smbfs-overrun.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/smbfs-overrun.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,62 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: fix smbfs overrun/leak
+## DP: Patch author: Urban.Widmark at enlight.net
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/21 10:58:29-07:00 s.esser at e-matters.de 
+#   [PATCH] smbfs protocol fixes
+#   
+#   From: <Urban.Widmark at enlight.net>
+#   
+#   The memset is because it was previously possible to send always the same CIFS
+#   fragment and use this to increase the data counters.  When the data counter
+#   "exceeds" the amount of bytes expected this will return the buffer only
+#   partially initialised...  With findfirst etc requests this should allow
+#   leaking kernel memory content.
+#   
+#   The other thing is that the data is only returned when data_tot and parm_tot
+#   both "exceed" the expected values.  Previously it was possible to create a
+#   sequence of CIFS fragments that allowed exceeding the counters.  The calling
+#   functions then would believe they received a number of bytes that does not fit
+#   into the allocated buffer.
+#   
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# fs/smbfs/request.c
+#   2004/10/21 01:39:27-07:00 s.esser at e-matters.de +5 -1
+#   smbfs protocol fixes
+# 
+diff -Nru a/fs/smbfs/request.c b/fs/smbfs/request.c
+--- a/fs/smbfs/request.c	2004-10-27 21:08:34 -07:00
++++ b/fs/smbfs/request.c	2004-10-27 21:08:34 -07:00
+@@ -634,6 +634,7 @@
+ 		req->rq_trans2buffer = smb_kmalloc(buf_len, GFP_NOFS);
+ 		if (!req->rq_trans2buffer)
+ 			goto out_no_mem;
++		memset(req->rq_trans2buffer, 0, buf_len);
+ 
+ 		req->rq_parm = req->rq_trans2buffer;
+ 		req->rq_data = req->rq_trans2buffer + parm_tot;
+@@ -657,8 +658,11 @@
+ 	 * Check whether we've received all of the data. Note that
+ 	 * we use the packet totals -- total lengths might shrink!
+ 	 */
+-	if (req->rq_ldata >= data_tot && req->rq_lparm >= parm_tot)
++	if (req->rq_ldata >= data_tot && req->rq_lparm >= parm_tot) {
++		req->rq_ldata = data_tot;
++		req->rq_lparm = parm_tot;
+ 		return 0;
++	}
+ 	return 1;
+ 
+ out_too_long:

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc-ET_DYN_BASE.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc-ET_DYN_BASE.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc-ET_DYN_BASE.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,71 @@
+# origin: bk
+# cset: 1.2119.1.45
+# inclusion: 2.6.10
+# description: unf**k huge sparc allocations
+# revision date: 2004-12-26
+
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/12/08 23:02:03-08:00 davem at nuts.davemloft.net 
+#   [SPARC]: Adjust 32-bit ELF_ET_DYN_BASE.
+#   
+#   We were using 0x08000000 instead of TASK_UNMAPPED_BASE
+#   so that running something like "/lib/ld-linux.so.2 emacs"
+#   would work.
+#   
+#   The issue there was that wherever /lib/ld-linux.so.2 gets
+#   mapped (controlled by ELF_ET_DYN_BASE), that is where the
+#   BSS start for the process ends up.  Now, emacs allocates
+#   dynamic memory for LISP objects from the BSS, and needs
+#   the top 4 bits of the virtual address to be clear so that
+#   it can encode LISP type and GC marking information there.
+#   
+#   But making this obscure emacs case work breaks lots of other
+#   stuff.  For example, programs with a reasonably large data
+#   section fail to load via direct ld.so interpreter execution
+#   because the data section is large enough to begin overlapping
+#   with the ELF_ET_DYN_BASE area.
+#   
+#   The /lib/ld-linux.so.2 emacs case does not work on a lot of
+#   platforms due to this issue, including i386, so it is not
+#   worth making work on sparc either.  It is indeed useful
+#   sometimes when debugging a new experimental build of glibc
+#   for example, but people doing that can hack the value of
+#   ELF_ET_DYN_BASE in their kernels.  Perhaps at some point
+#   we will make a sysctl controllable value.
+#   
+#   Signed-off-by: David S. Miller <davem at davemloft.net>
+# 
+# include/asm-sparc/elf.h
+#   2004/12/08 22:56:54-08:00 davem at nuts.davemloft.net +1 -1
+#   [SPARC]: Adjust 32-bit ELF_ET_DYN_BASE.
+# 
+# arch/sparc64/kernel/binfmt_elf32.c
+#   2004/12/08 22:56:54-08:00 davem at nuts.davemloft.net +1 -1
+#   [SPARC]: Adjust 32-bit ELF_ET_DYN_BASE.
+# 
+diff -Nru a/arch/sparc64/kernel/binfmt_elf32.c b/arch/sparc64/kernel/binfmt_elf32.c
+--- a/arch/sparc64/kernel/binfmt_elf32.c	2004-12-08 23:05:11 -08:00
++++ b/arch/sparc64/kernel/binfmt_elf32.c	2004-12-08 23:05:11 -08:00
+@@ -79,7 +79,7 @@
+ 
+ #define elf_check_arch(x)	(((x)->e_machine == EM_SPARC) || ((x)->e_machine == EM_SPARC32PLUS))
+ 
+-#define ELF_ET_DYN_BASE         0x08000000
++#define ELF_ET_DYN_BASE         0x70000000
+ 
+ 
+ #include <asm/processor.h>
+diff -Nru a/include/asm-sparc/elf.h b/include/asm-sparc/elf.h
+--- a/include/asm-sparc/elf.h	2004-12-08 23:05:11 -08:00
++++ b/include/asm-sparc/elf.h	2004-12-08 23:05:11 -08:00
+@@ -143,7 +143,7 @@
+    the loader.  We need to make sure that it is out of the way of the program
+    that it will "exec", and that there is sufficient room for the brk.  */
+ 
+-#define ELF_ET_DYN_BASE         (0x08000000)
++#define ELF_ET_DYN_BASE         (TASK_UNMAPPED_BASE)
+ 
+ /* This yields a mask that user programs can use to figure out what
+    instruction set this cpu supports.  This can NOT be done in userspace

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc-cg14-init.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc-cg14-init.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc-cg14-init.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,104 @@
+# origin: Debian (joshk) -> LKML (bbreuer)
+# cset: n/a
+# inclusion: davem knows about it
+# revision date: 2004-11-14 
+
+NOTE: had to be adapted from the diff sent to linux-sparc, which was broken 
+in ways previously unknown to man
+
+--- kernel-source-2.6.8-2.6.8/drivers/video/cg14.c~	2004-11-14 18:39:29.000000000 -0800
++++ kernel-source-2.6.8-2.6.8/drivers/video/cg14.c	2004-11-14 18:45:32.000000000 -0800
+@@ -255,6 +255,10 @@
+ 	if (regno >= 256)
+ 		return 1;
+ 
++	red >>= 8;
++	green >>= 8;
++	blue >>= 8;
++
+ 	val = (red | (green << 8) | (blue << 16));
+ 
+ 	spin_lock_irqsave(&par->lock, flags);
+@@ -322,7 +326,7 @@
+ 			break;
+ 
+ 		case MDI_16_PIX:
+-			cur_mode |= 0x20;
++			cur_mode |= (CG14_MCR_PIXMODE_16 << CG14_MCR_PIXMODE_SHIFT);;
+ 			break;
+ 
+ 		case MDI_8_PIX:
+@@ -331,7 +335,7 @@
+ 		default:
+ 			ret = -ENOSYS;
+ 			break;
+-		};
++		}
+ 		if (!ret) {
+ 			sbus_writeb(cur_mode, &regs->mcr);
+ 			par->mode = mode;
+@@ -341,9 +345,9 @@
+ 
+ 	default:
+ 		ret = sbusfb_ioctl_helper(cmd, arg, info,
+-					  FBTYPE_MDICOLOR, 24, par->fbsize);
++					  FBTYPE_MDICOLOR, 8, par->fbsize);
+ 		break;
+-	};
++	}
+ 
+ 	return ret;
+ }
+@@ -355,11 +359,17 @@
+ static void cg14_init_fix(struct fb_info *info, int linebytes)
+ {
+ 	struct cg14_par *par = (struct cg14_par *)info->par;
+-
+-	strlcpy(info->fix.id, par->sdev->prom_name, sizeof(info->fix.id));
++	const char *name;
++	
++	name = "cgfourteen";
++
++	if (par->sdev)
++		name = par->sdev->prom_name;
++	
++	strlcpy(info->fix.id, name, sizeof(info->fix.id));
+ 
+ 	info->fix.type = FB_TYPE_PACKED_PIXELS;
+-	info->fix.visual = FB_VISUAL_TRUECOLOR;
++	info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
+ 
+ 	info->fix.line_length = linebytes;
+ 
+@@ -484,8 +494,11 @@
+ 	spin_lock_init(&all->par.lock);
+ 
+ 	sbusfb_fill_var(&all->info.var, node, 8);
++	all->info.var.red.length = 8;
++	all->info.var.green.length = 8;
++	all->info.var.blue.length = 8;
+ 
+-	linebytes = prom_getintdefault(sdev->prom_node, "linebytes",
++	linebytes = prom_getintdefault(node, "linebytes",
+ 				       all->info.var.xres);
+ 	all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres);
+ 
+@@ -562,6 +575,7 @@
+ 		kfree(all);
+ 		return;
+ 	}
++	fb_set_cmap(&all->info.cmap, &all->info);
+ 
+ 	cg14_init_fix(&all->info, linebytes);
+ 
+@@ -574,8 +588,8 @@
+ 
+ 	list_add(&all->list, &cg14_list);
+ 
+-	printk("cg14: cgfourteen at %lx:%lx\n",
+-	       all->par.physbase, all->par.iospace);
++	printk("cg14: cgfourteen at %lx:%lx, %dMB\n",
++	       all->par.iospace, all->par.physbase, all->par.ramsize >> 20);
+ 
+ }
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc-cg6-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc-cg6-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc-cg6-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,30 @@
+Although the CG6 framebuffer is detected and initialized, without this
+patch all it displays is a blank screen. Tested on an Ultra 1 with a
+TGX+.
+
+Originally from Bob Breuer for the CG14.
+
+Signed-off-by: Adam Kropelin <akropel1 at rochester.rr.com>
+
+Index: wli-2.6.10-rc3-1/drivers/video/cg6.c
+===================================================================
+--- wli-2.6.10-rc3-1.orig/drivers/video/cg6.c	2004-12-16 06:19:52.000000000 -0800
++++ wli-2.6.10-rc3-1/drivers/video/cg6.c	2004-12-22 19:26:13.652508170 -0800
+@@ -689,6 +689,9 @@
+ 	all->par.physbase = sdev->reg_addrs[0].phys_addr;
+ 
+ 	sbusfb_fill_var(&all->info.var, sdev->prom_node, 8);
++	all->info.var.red.length = 8;
++	all->info.var.green.length = 8;
++	all->info.var.blue.length = 8;
+ 
+ 	linebytes = prom_getintdefault(sdev->prom_node, "linebytes",
+ 				       all->info.var.xres);
+@@ -732,6 +735,7 @@
+ 		return;
+ 	}
+ 
++	fb_set_cmap(&all->info.cmap, &all->info);
+ 	cg6_init_fix(&all->info, linebytes);
+ 
+ 	if (register_framebuffer(&all->info) < 0) {

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc-sunzilog-timeout.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc-sunzilog-timeout.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc-sunzilog-timeout.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,23 @@
+# origin: benh
+# cset: n/a
+# inclusion: pushed to davem
+# revision date: 2004-11-11
+
+I found recently a bug in pmac_zilog, which originates from sunzilog who so might
+have the same problem. The "timeout" member of the port structure was never
+initialized, causing very long pauses to happen on port close, that is pretty much
+all the time when hitting userland.
+
+Quick untested patch (I don't have a sparc)
+
+===== drivers/serial/sunzilog.c 1.46 vs edited =====
+--- 1.46/drivers/serial/sunzilog.c	2004-09-21 06:46:03 +10:00
++++ edited/drivers/serial/sunzilog.c	2004-11-07 10:05:37 +11:00
+@@ -974,6 +974,8 @@
+
+ 	sunzilog_maybe_update_regs(up, ZILOG_CHANNEL_FROM_PORT(port));
+
++	uart_update_timeout(port, termios->c_cflag, baud);
++
+ 	spin_unlock_irqrestore(&up->port.lock, flags);
+ }

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc-warning-fixes.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc-warning-fixes.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc-warning-fixes.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,25 @@
+Index: wli-2.6.10-rc3-1/drivers/char/rtc.c
+===================================================================
+--- wli-2.6.10-rc3-1.orig/drivers/char/rtc.c	2004-10-07 04:01:30.000000000 -0700
++++ wli-2.6.10-rc3-1/drivers/char/rtc.c	2004-12-22 10:09:09.741714954 -0800
+@@ -878,7 +878,7 @@
+ 	&rtc_fops
+ };
+ 
+-#ifdef RTC_IRQ
++#if defined(RTC_IRQ) && !defined(__sparc__)
+ static irqreturn_t (*rtc_int_handler_ptr)(int irq, void *dev_id, struct pt_regs *regs);
+ #endif
+ 
+Index: wli-2.6.10-rc3-1/include/asm-sparc/unistd.h
+===================================================================
+--- wli-2.6.10-rc3-1.orig/include/asm-sparc/unistd.h	2004-12-16 06:20:01.000000000 -0800
++++ wli-2.6.10-rc3-1/include/asm-sparc/unistd.h	2004-12-22 10:10:28.837690538 -0800
+@@ -486,7 +486,6 @@
+ static __inline__ _syscall3(int,execve,__const__ char *,file,char **,argv,char **,envp)
+ static __inline__ _syscall3(int,open,__const__ char *,file,int,flag,int,mode)
+ static __inline__ _syscall1(int,close,int,fd)
+-static __inline__ _syscall1(int,_exit,int,exitcode)
+ static __inline__ _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)
+ 
+ #include <linux/linkage.h>

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc32-export-more-ksyms.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc32-export-more-ksyms.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc32-export-more-ksyms.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,26 @@
+# DP: export more symbols for sparc32 so we can get our stuff built
+# DP: upstream-status: unsent
+
+--- kernel-source-2.6.8/arch/sparc/kernel/sparc_ksyms.c~	2004-08-27 01:09:06.000000000 -0700
++++ kernel-source-2.6.8/arch/sparc/kernel/sparc_ksyms.c	2004-08-27 01:10:27.000000000 -0700
+@@ -214,6 +214,10 @@
+ EXPORT_SYMBOL(pci_dma_sync_single_for_device);
+ EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu);
+ EXPORT_SYMBOL(pci_dma_sync_sg_for_device);
++EXPORT_SYMBOL(pci_map_sg);
++EXPORT_SYMBOL(pci_unmap_sg);
++EXPORT_SYMBOL(pci_map_page);
++EXPORT_SYMBOL(pci_unmap_page);
+ /* Actually, ioremap/iounmap are not PCI specific. But it is ok for drivers. */
+ EXPORT_SYMBOL(ioremap);
+ EXPORT_SYMBOL(iounmap);
+@@ -298,6 +302,9 @@
+ /* Cache flushing.  */
+ EXPORT_SYMBOL(sparc_flush_page_to_ram);
+ 
++/* For when serial stuff is built as modules. */
++EXPORT_SYMBOL(sun_do_break);
++
+ EXPORT_SYMBOL(__ret_efault);
+ 
+ EXPORT_SYMBOL(memcmp);

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc32-hypersparc-dvma.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc32-hypersparc-dvma.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc32-hypersparc-dvma.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,159 @@
+DVMA is having aliasing problems. Bob originally sent in the following
+description:
+
+At some point in the past, Bob Breuer wrote:
+> Here's the preliminary patch.  This time around, both the hme
+> and esp drivers are working for me.  This replaces my previous
+> patch and is against the vanilla 2.6.9 kernel.  I've tried to
+> reduce the amount of unnecessary cache flushing, therefore this
+> will need some testing on non-hypersparc cpus also.  It needs
+> some cleanup yet, and will be rediffed against a later kernel.
+> I'm looking for comments and feedback.
+
+This patch represents one of those subsequent rediffings.
+
+Signed-off-by: Bob Breuer <breuerr at mc.net>
+Acked-by: William Irwin <wli at holomorphy.com>
+
+Index: wli-2.6.10-rc3-1/include/asm-sparc/bitext.h
+===================================================================
+--- wli-2.6.10-rc3-1.orig/include/asm-sparc/bitext.h	2004-12-22 09:07:10.078189762 -0800
++++ wli-2.6.10-rc3-1/include/asm-sparc/bitext.h	2004-12-22 10:06:59.047583482 -0800
+@@ -17,6 +17,7 @@
+ 	int last_off;
+ 	int last_size;
+ 	int first_free;
++	int num_colors;
+ };
+ 
+ extern int bit_map_string_get(struct bit_map *t, int len, int align);
+Index: wli-2.6.10-rc3-1/arch/sparc/lib/bitext.c
+===================================================================
+--- wli-2.6.10-rc3-1.orig/arch/sparc/lib/bitext.c	2004-12-16 06:19:27.000000000 -0800
++++ wli-2.6.10-rc3-1/arch/sparc/lib/bitext.c	2004-12-22 10:06:59.050583026 -0800
+@@ -29,10 +29,17 @@
+ 	int offset, count;	/* siamese twins */
+ 	int off_new;
+ 	int align1;
+-	int i;
++	int i, color;
+ 
+-	if (align == 0)
+-		align = 1;
++	if (t->num_colors) {
++		/* align is overloaded to be the page color */
++		color = align;
++		align = t->num_colors;
++	} else {
++		color = 0;
++		if (align == 0)
++			align = 1;
++	}
+ 	align1 = align - 1;
+ 	if ((align & align1) != 0)
+ 		BUG();
+@@ -40,6 +47,7 @@
+ 		BUG();
+ 	if (len <= 0 || len > t->size)
+ 		BUG();
++	color &= align1;
+ 
+ 	spin_lock(&t->lock);
+ 	if (len < t->last_size)
+@@ -49,7 +57,7 @@
+ 	count = 0;
+ 	for (;;) {
+ 		off_new = find_next_zero_bit(t->map, t->size, offset);
+-		off_new = (off_new + align1) & ~align1;
++		off_new = ((off_new + align1) & ~align1) + color;
+ 		count += off_new - offset;
+ 		offset = off_new;
+ 		if (offset >= t->size)
+@@ -121,6 +129,4 @@
+ 	spin_lock_init(&t->lock);
+ 	t->map = map;
+ 	t->size = size;
+-	t->last_size = 0;
+-	t->first_free = 0;
+ }
+Index: wli-2.6.10-rc3-1/arch/sparc/mm/iommu.c
+===================================================================
+--- wli-2.6.10-rc3-1.orig/arch/sparc/mm/iommu.c	2004-12-16 06:19:27.000000000 -0800
++++ wli-2.6.10-rc3-1/arch/sparc/mm/iommu.c	2004-12-22 10:06:59.054582418 -0800
+@@ -119,6 +119,13 @@
+ 		prom_halt();
+ 	}
+ 	bit_map_init(&iommu->usemap, bitmap, IOMMU_NPTES);
++	/* To be coherent on HyperSparc, the page color of DVMA
++	 * and physical addresses must match.
++	 */
++	if (srmmu_modtype == HyperSparc)
++		iommu->usemap.num_colors = vac_cache_size >> PAGE_SHIFT;
++	else
++		iommu->usemap.num_colors = 1;
+ 
+ 	printk("IOMMU: impl %d vers %d table 0x%p[%d B] map [%d b]\n",
+ 	    impl, vers, iommu->page_table,
+@@ -128,7 +135,9 @@
+ }
+ 
+ /* This begs to be btfixup-ed by srmmu. */
+-static void iommu_viking_flush_iotlb(iopte_t *iopte, unsigned int niopte)
++/* Flush the iotlb entries to ram. */
++/* This could be better if we didn't have to flush whole pages. */
++static void iommu_flush_iotlb(iopte_t *iopte, unsigned int niopte)
+ {
+ 	unsigned long start;
+ 	unsigned long end;
+@@ -145,6 +154,11 @@
+ 			viking_flush_page(start);
+ 			start += PAGE_SIZE;
+ 		}
++	} else {
++		while(start < end) {
++			__flush_page_to_ram(start);
++			start += PAGE_SIZE;
++		}
+ 	}
+ }
+ 
+@@ -156,7 +170,8 @@
+ 	unsigned int busa, busa0;
+ 	int i;
+ 
+-	ioptex = bit_map_string_get(&iommu->usemap, npages, 1);
++	/* page color = pfn of page */
++	ioptex = bit_map_string_get(&iommu->usemap, npages, page_to_pfn(page));
+ 	if (ioptex < 0)
+ 		panic("iommu out");
+ 	busa0 = iommu->start + (ioptex << PAGE_SHIFT);
+@@ -172,8 +187,7 @@
+ 		page++;
+ 	}
+ 
+-	iommu_viking_flush_iotlb(iopte0, npages);
+-	flush_cache_all();
++	iommu_flush_iotlb(iopte0, npages);
+ 
+ 	return busa0;
+ }
+@@ -328,7 +342,9 @@
+ 	if ((addr & ~PAGE_MASK) != 0) BUG();
+ 	if ((len & ~PAGE_MASK) != 0) BUG();
+ 
+-	ioptex = bit_map_string_get(&iommu->usemap, len >> PAGE_SHIFT, 1);
++	/* page color = physical address */
++	ioptex = bit_map_string_get(&iommu->usemap, len >> PAGE_SHIFT,
++		addr >> PAGE_SHIFT);
+ 	if (ioptex < 0)
+ 		panic("iommu out");
+ 
+@@ -372,7 +388,7 @@
+ 	 *        to handle the latter case as well.
+ 	 */
+ 	flush_cache_all();
+-	iommu_viking_flush_iotlb(first, len >> PAGE_SHIFT);
++	iommu_flush_iotlb(first, len >> PAGE_SHIFT);
+ 	flush_tlb_all();
+ 	iommu_invalidate(iommu->regs);
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc32-initrd-memcpy.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc32-initrd-memcpy.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc32-initrd-memcpy.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,27 @@
+# origin: Debian (jurij)
+# cset: n/a
+# inclusion: approved by davem (projected: 2.4.28)
+# revision date: 2004-11-15
+
+--- build-sparc32.orig/include/asm-sparc/string.h	2004-08-14 01:36:11.000000000 -0400
++++ build-sparc32/include/asm-sparc/string.h	2004-11-14 22:09:49.000000000 -0500
+@@ -40,6 +40,9 @@
+ 
+ 	if(n <= 32) {
+ 		__builtin_memcpy(to, from, n);
++	} else if (((unsigned int) to & 7) != 0) {
++		/* Destination is not aligned on the double-word boundary */
++		__memcpy(to, from, n);
+ 	} else {
+ 		switch(n) {
+ 		case PAGE_SIZE:
+--- build-sparc32.orig/arch/sparc/mm/iommu.c	2004-08-14 01:38:08.000000000 -0400
++++ build-sparc32/arch/sparc/mm/iommu.c	2004-11-14 22:10:09.000000000 -0500
+@@ -173,6 +173,7 @@
+ 	}
+ 
+ 	iommu_viking_flush_iotlb(iopte0, npages);
++	flush_cache_all();
+ 
+ 	return busa0;
+ }

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc32-sun4d-support.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc32-sun4d-support.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc32-sun4d-support.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,161 @@
+Chris Newport and Thomas Bogendoerfer have been working to get the
+sun4d port functional again. This patch updates 2.6.10-rc3 to a current
+snapshot of their work. It does the following 3 things:
+
+(1) add sun4d hook to sbus_bus_ranges_init()
+(2) fix up pgd_offset() call in sun4d iommu code
+(3) fix up sun4d's definition of current
+
+Signed-off-by: Chris Newport <crn at netunix.com>
+Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
+Acked-by: William Irwin <wli at holomorphy.com>
+
+Index: wli-2.6.10-rc3-1/drivers/sbus/sbus.c
+===================================================================
+--- wli-2.6.10-rc3-1.orig/drivers/sbus/sbus.c	2004-12-22 09:07:09.318305282 -0800
++++ wli-2.6.10-rc3-1/drivers/sbus/sbus.c	2004-12-22 10:07:21.978097514 -0800
+@@ -217,6 +217,8 @@
+  * prom_sbus_ranges_init(), with all sun4d stuff cut away.
+  * Ask DaveM what is going on here, how is sun4d supposed to work... XXX
+  */
++/* added back sun4d patch from Thomas Bogendoerfer - should be OK (crn) */
++
+ static void __init sbus_bus_ranges_init(int parent_node, struct sbus_bus *sbus)
+ {
+ 	int len;
+@@ -229,6 +231,18 @@
+ 		return;
+ 	}
+ 	sbus->num_sbus_ranges = len / sizeof(struct linux_prom_ranges);
++	if (sparc_cpu_model == sun4d) {
++		struct linux_prom_ranges iounit_ranges[PROMREG_MAX];
++		int num_iounit_ranges;
++
++	len = prom_getproperty(parent_node, "ranges",
++				(char *) iounit_ranges,
++				sizeof (iounit_ranges));
++		if (len != -1) {
++			num_iounit_ranges = (len/sizeof(struct linux_prom_ranges));
++			prom_adjust_ranges (sbus->sbus_ranges, sbus->num_sbus_ranges, iounit_ranges, num_iounit_ranges);
++		}
++	}
+ }
+ 
+ static void __init __apply_ranges_to_regs(struct linux_prom_ranges *ranges,
+Index: wli-2.6.10-rc3-1/arch/sparc/mm/io-unit.c
+===================================================================
+--- wli-2.6.10-rc3-1.orig/arch/sparc/mm/io-unit.c	2004-12-16 06:19:27.000000000 -0800
++++ wli-2.6.10-rc3-1/arch/sparc/mm/io-unit.c	2004-12-22 10:07:21.981097058 -0800
+@@ -196,7 +196,7 @@
+ 			pte_t *ptep;
+ 			long i;
+ 
+-			pgdp = pgd_offset(init_task.mm, addr);
++			pgdp = pgd_offset(&init_mm, addr);
+ 			pmdp = pmd_offset(pgdp, addr);
+ 			ptep = pte_offset_map(pmdp, addr);
+ 
+Index: wli-2.6.10-rc3-1/arch/sparc/kernel/sun4d_smp.c
+===================================================================
+--- wli-2.6.10-rc3-1.orig/arch/sparc/kernel/sun4d_smp.c	2004-12-22 09:07:08.431440106 -0800
++++ wli-2.6.10-rc3-1/arch/sparc/kernel/sun4d_smp.c	2004-12-22 10:07:21.984096602 -0800
+@@ -122,8 +122,7 @@
+ 		
+ 	/* Fix idle thread fields. */
+ 	__asm__ __volatile__("ld [%0], %%g6\n\t"
+-			     "sta %%g6, [%%g0] %1\n\t"
+-			     : : "r" (&current_set[cpuid]), "i" (ASI_M_VIKING_TMP2)
++			     : : "r" (&current_set[cpuid])
+ 			     : "memory" /* paranoid */);
+ 
+ 	cpu_leds[cpuid] = 0x9;
+@@ -460,25 +459,18 @@
+ 
+ void __init smp4d_blackbox_current(unsigned *addr)
+ {
+-	/* We have a nice Linux current register :) */
+-	int rd = addr[1] & 0x3e000000;
++	int rd = *addr & 0x3e000000;
+ 	
+-	addr[0] = 0x10800006;			/* b .+24 */
+-	addr[1] = 0xc0800820 | rd;		/* lda [%g0] ASI_M_VIKING_TMP2, reg */
++	addr[0] = 0xc0800800 | rd;		/* lda [%g0] ASI_M_VIKING_TMP1, reg */
++	addr[2] = 0x81282002 | rd | (rd >> 11);	/* sll reg, 2, reg */
++	addr[4] = 0x01000000;			/* nop */
+ }
+ 
+ void __init sun4d_init_smp(void)
+ {
+ 	int i;
+-	extern unsigned int patchme_store_new_current[];
+ 	extern unsigned int t_nmi[], linux_trap_ipi15_sun4d[], linux_trap_ipi15_sun4m[];
+ 
+-	/* Store current into Linux current register :) */
+-	__asm__ __volatile__("sta %%g6, [%%g0] %0" : : "i"(ASI_M_VIKING_TMP2));
+-	
+-	/* Patch switch_to */
+-	patchme_store_new_current[0] = (patchme_store_new_current[0] & 0x3e000000) | 0xc0a00820;
+-	
+ 	/* Patch ipi15 trap table */
+ 	t_nmi[1] = t_nmi[1] + (linux_trap_ipi15_sun4d - linux_trap_ipi15_sun4m);
+ 	
+Index: wli-2.6.10-rc3-1/include/asm-sparc/winmacro.h
+===================================================================
+--- wli-2.6.10-rc3-1.orig/include/asm-sparc/winmacro.h	2004-12-22 09:07:10.086188546 -0800
++++ wli-2.6.10-rc3-1/include/asm-sparc/winmacro.h	2004-12-22 10:07:21.987096146 -0800
+@@ -112,9 +112,12 @@
+ 	and      %idreg, 0xc, %idreg; \
+ 	ld       [%idreg + %dest_reg], %dest_reg;
+ 
+-/* Sliiick. We have a Linux current register :) -jj */
+-#define LOAD_CURRENT4D(dest_reg) \
+-	lda	 [%g0] ASI_M_VIKING_TMP2, %dest_reg;
++#define LOAD_CURRENT4D(dest_reg, idreg) \
++	lda	 [%g0] ASI_M_VIKING_TMP1, %idreg; \
++	sethi	%hi(C_LABEL(current_set)), %dest_reg; \
++	sll	%idreg, 2, %idreg; \
++	or	%dest_reg, %lo(C_LABEL(current_set)), %dest_reg; \
++	ld	[%idreg + %dest_reg], %dest_reg;
+ 
+ /* Blackbox - take care with this... - check smp4m and smp4d before changing this. */
+ #define LOAD_CURRENT(dest_reg, idreg) 					\
+Index: wli-2.6.10-rc3-1/arch/sparc/prom/ranges.c
+===================================================================
+--- wli-2.6.10-rc3-1.orig/arch/sparc/prom/ranges.c	2004-12-22 09:07:08.437439194 -0800
++++ wli-2.6.10-rc3-1/arch/sparc/prom/ranges.c	2004-12-22 10:07:21.989095842 -0800
+@@ -34,7 +34,7 @@
+ 	}
+ }
+ 
+-static void
++void
+ prom_adjust_ranges(struct linux_prom_ranges *ranges1, int nranges1,
+ 		   struct linux_prom_ranges *ranges2, int nranges2)
+ {
+Index: wli-2.6.10-rc3-1/include/asm-sparc/asi.h
+===================================================================
+--- wli-2.6.10-rc3-1.orig/include/asm-sparc/asi.h	2004-12-22 09:07:10.077189914 -0800
++++ wli-2.6.10-rc3-1/include/asm-sparc/asi.h	2004-12-22 10:07:21.990095690 -0800
+@@ -104,7 +104,8 @@
+ #define ASI_M_DCDR         0x39   /* Data Cache Diagnostics Register rw, ss */
+ 
+ #define ASI_M_VIKING_TMP1  0x40	  /* Emulation temporary 1 on Viking */
+-#define ASI_M_VIKING_TMP2  0x41	  /* Emulation temporary 2 on Viking */
++/* only available on SuperSparc I */
++/* #define ASI_M_VIKING_TMP2  0x41 */  /* Emulation temporary 2 on Viking */
+ 
+ #define ASI_M_ACTION       0x4c   /* Breakpoint Action Register (GNU/Viking) */
+ 
+Index: wli-2.6.10-rc3-1/include/asm-sparc/sbus.h
+===================================================================
+--- wli-2.6.10-rc3-1.orig/include/asm-sparc/sbus.h	2004-06-15 22:19:01.000000000 -0700
++++ wli-2.6.10-rc3-1/include/asm-sparc/sbus.h	2004-12-22 10:07:21.993095234 -0800
+@@ -106,6 +106,8 @@
+ /* These yield IOMMU mappings in consistent mode. */
+ extern void *sbus_alloc_consistent(struct sbus_dev *, long, u32 *dma_addrp);
+ extern void sbus_free_consistent(struct sbus_dev *, long, void *, u32);
++void prom_adjust_ranges(struct linux_prom_ranges *, int,
++			struct linux_prom_ranges *, int);
+ 
+ #define SBUS_DMA_BIDIRECTIONAL	DMA_BIDIRECTIONAL
+ #define SBUS_DMA_TODEVICE	DMA_TO_DEVICE

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc32-vm-fault-codes.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc32-vm-fault-codes.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc32-vm-fault-codes.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,42 @@
+Index: wli-2.6.10-rc3-1/arch/sparc/mm/fault.c
+===================================================================
+--- wli-2.6.10-rc3-1.orig/arch/sparc/mm/fault.c	2004-10-07 04:01:27.000000000 -0700
++++ wli-2.6.10-rc3-1/arch/sparc/mm/fault.c	2004-12-22 10:09:36.723613082 -0800
+@@ -294,16 +294,17 @@
+ 	 * the fault.
+ 	 */
+ 	switch (handle_mm_fault(mm, vma, address, write)) {
+-	case 1:
+-		current->min_flt++;
+-		break;
+-	case 2:
++	case VM_FAULT_SIGBUS:
++		goto do_sigbus;
++	case VM_FAULT_OOM:
++		goto out_of_memory;
++	case VM_FAULT_MAJOR:
+ 		current->maj_flt++;
+ 		break;
+-	case 0:
+-		goto do_sigbus;
++	case VM_FAULT_MINOR:
+ 	default:
+-		goto out_of_memory;
++		current->min_flt++;
++		break;
+ 	}
+ 	up_read(&mm->mmap_sem);
+ 	return;
+@@ -535,8 +536,11 @@
+ 		if(!(vma->vm_flags & (VM_READ | VM_EXEC)))
+ 			goto bad_area;
+ 	}
+-	if (!handle_mm_fault(mm, vma, address, write))
++	switch (handle_mm_fault(mm, vma, address, write)) {
++	case VM_FAULT_SIGBUS:
++	case VM_FAULT_OOM:
+ 		goto do_sigbus;
++	}
+ 	up_read(&mm->mmap_sem);
+ 	return;
+ bad_area:

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc64-hme-lockup.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc64-hme-lockup.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc64-hme-lockup.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,20 @@
+# origin: Debian (bcollins)
+# cset: n/a
+# inclusion: not suitable for upstream
+# revision date: 2004-10-08
+
+Seemingly only on the onboard hme's on the Ultra 1E (enterprise) models
+(as the non-E models have an onboard le)... it's a strange lockup problem
+that requires a reboot to fix.  This one-liner is a band-aid that seems
+to take care of it... a possible weirdo timing bug. --Uzi
+
+--- linux/drivers/net/sunhme.c.orig	Mon Jul 15 02:38:27 2002
++++ linux/drivers/net/sunhme.c	Mon Jul 15 03:09:03 2002
+@@ -1983,6 +1983,7 @@
+ 	}
+ 	hp->tx_old = elem;
+ 	TXD((">"));
++	udelay(1);
+ 
+ 	if (netif_queue_stopped(dev) &&
+ 	    TX_BUFFS_AVAIL(hp) > (MAX_SKB_FRAGS + 1))

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc64-sunsab-break-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc64-sunsab-break-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc64-sunsab-break-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,52 @@
+# origin: Debian (jurij)
+# cset: n/a
+# inclusion: submitted
+# revision date: 2004-11-21
+
+--- build-sparc64.orig/drivers/serial/sunsab.c	2004-11-21 12:03:51.282281488 -0500
++++ build-sparc64/drivers/serial/sunsab.c	2004-11-21 11:49:04.000000000 -0500
+@@ -143,6 +143,11 @@
+ 		writeb(SAB82532_CMDR_RMC, &up->regs->w.cmdr);
+ 	}
+ 
++	/* Count may be zero for BRK, so we check for it here */
++	if((stat->sreg.isr1 & SAB82532_ISR1_BRK) &&
++	   (up->port.line == up->port.cons->index))
++		saw_console_brk = 1;
++
+ 	for (i = 0; i < count; i++) {
+ 		unsigned char ch = buf[i];
+ 
+@@ -172,8 +177,6 @@
+ 				stat->sreg.isr0 &= ~(SAB82532_ISR0_PERR |
+ 						     SAB82532_ISR0_FERR);
+ 				up->port.icount.brk++;
+-				if (up->port.line == up->port.cons->index)
+-					saw_console_brk = 1;
+ 				/*
+ 				 * We do the SysRQ and SAK checking
+ 				 * here because otherwise the break
+@@ -325,8 +328,9 @@
+ 
+ 	tty = NULL;
+ 	if (status.stat) {
+-		if (status.sreg.isr0 & (SAB82532_ISR0_TCD | SAB82532_ISR0_TIME |
+-					SAB82532_ISR0_RFO | SAB82532_ISR0_RPF))
++		if ((status.sreg.isr0 & (SAB82532_ISR0_TCD | SAB82532_ISR0_TIME |
++					SAB82532_ISR0_RFO | SAB82532_ISR0_RPF)) ||
++		    (status.sreg.isr1 & SAB82532_ISR1_BRK))
+ 			tty = receive_chars(up, &status, regs);
+ 		if ((status.sreg.isr0 & SAB82532_ISR0_CDSC) ||
+ 		    (status.sreg.isr1 & SAB82532_ISR1_CSC))
+@@ -352,8 +356,9 @@
+ 
+ 	tty = NULL;
+ 	if (status.stat) {
+-		if (status.sreg.isr0 & (SAB82532_ISR0_TCD | SAB82532_ISR0_TIME |
+-					SAB82532_ISR0_RFO | SAB82532_ISR0_RPF))
++		if ((status.sreg.isr0 & (SAB82532_ISR0_TCD | SAB82532_ISR0_TIME |
++					SAB82532_ISR0_RFO | SAB82532_ISR0_RPF)) ||
++		    (status.sreg.isr1 & SAB82532_ISR1_BRK))
+ 			tty = receive_chars(up, &status, regs);
+ 		if ((status.sreg.isr0 & SAB82532_ISR0_CDSC) ||
+ 		    (status.sreg.isr1 & (SAB82532_ISR1_BRK | SAB82532_ISR1_CSC)))

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc64-sunsab-fix.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc64-sunsab-fix.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc64-sunsab-fix.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,256 @@
+Return-Path: <davem at davemloft.net>
+X-Original-To: joshk at triplehelix.org
+Delivered-To: joshk at triplehelix.org
+Received: from cheetah.davemloft.net (adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105])
+	by triplehelix.org (Postfix) with ESMTP id CF8EC2A9542
+	for <joshk at triplehelix.org>; Fri, 27 Aug 2004 17:04:29 -0700 (PDT)
+Received: from localhost
+	([127.0.0.1] helo=cheetah.davemloft.net ident=davem)
+	by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian))
+	id 1C0qhm-0000eg-00; Fri, 27 Aug 2004 17:04:26 -0700
+Date: Fri, 27 Aug 2004 17:04:26 -0700
+From: "David S. Miller" <davem at davemloft.net>
+To: Joshua Kwan <joshk at triplehelix.org>
+Cc: rmitchell at eds.com, sparclinux at vger.kernel.org,
+	debian-sparc at lists.debian.org
+Subject: Re: [PATCH] SunSAB console problems in 2.6.x
+Message-Id: <20040827170426.34525fc6.davem at davemloft.net>
+In-Reply-To: <412FCB3D.3040600 at triplehelix.org>
+References: <20040825233247.237c1fb1.davem at redhat.com>
+	<412D9FFE.9060206 at eds.com>
+	<20040826132310.GH2333 at phunnypharm.org>
+	<412E265C.7080004 at eds.com>
+	<20040826170136.GB10029 at phunnypharm.org>
+	<20040826131946.35ae3d97.davem at redhat.com>
+	<412E8395.7040709 at triplehelix.org>
+	<20040826181059.140d7f3f.davem at redhat.com>
+	<412ECE75.6010000 at triplehelix.org>
+	<20040827162449.1b25a6e5.davem at redhat.com>
+	<412FCB3D.3040600 at triplehelix.org>
+X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu)
+X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN. at 4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP
+Mime-Version: 1.0
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+X-CRM114-Version: 20040816.BlameClockworkOrange-auto.3 (regex: TRE 0.6.8) MF-A10FFB4C 
+X-CRM114-Status: Good  ( pR: 163.1370 )
+
+On Fri, 27 Aug 2004 17:01:01 -0700
+Joshua Kwan <joshk at triplehelix.org> wrote:
+
+> > -	 mcount.o ipcsum.o rwsem.o xor.o splock.o find_bit.o
+> > +	 mcount.o ipcsum.o rwsem.o xor.o splock.o find_bit.o delay.o
+> >  
+> >  lib-$(CONFIG_DEBUG_SPINLOCK) += debuglocks.o
+> >  lib-$(CONFIG_HAVE_DEC_LOCK) += dec_and_lock.o
+> 
+> You forgot delay.c.
+
+Sorry, I'm a retard.
+
+This patch should be better.
+
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/08/27 16:12:23-07:00 davem at nuts.davemloft.net 
+#   [SPARC64]: Fix delay with HZ==1000.
+#   
+#   When I moved sparc64 over to HZ==1000 this added some
+#   problems to the udelay() handling.  Specifically, with
+#   slower cpus we could now get underflows to zero for
+#   things like udelay(1) due to the order of multiplies
+#   and shifts.
+#   
+#   Fix this, and move it out to arch/sparc64/lib/delay.c
+#   so it is easier to tinker with this in the future and
+#   also to optimize away one of the multiplies for the
+#   constant delay case just like other platforms do.
+#   
+#   Signed-off-by: David S. Miller <davem at davemloft.net>
+# 
+# include/asm-sparc64/delay.h
+#   2004/08/27 16:10:13-07:00 davem at nuts.davemloft.net +21 -46
+#   [SPARC64]: Fix delay with HZ==1000.
+# 
+# arch/sparc64/lib/Makefile
+#   2004/08/27 16:10:13-07:00 davem at nuts.davemloft.net +1 -1
+#   [SPARC64]: Fix delay with HZ==1000.
+# 
+# arch/sparc64/kernel/sparc64_ksyms.c
+#   2004/08/27 16:10:13-07:00 davem at nuts.davemloft.net +6 -0
+#   [SPARC64]: Fix delay with HZ==1000.
+# 
+# arch/sparc64/lib/delay.c
+#   2004/08/27 16:10:01-07:00 davem at nuts.davemloft.net +49 -0
+#   [SPARC64]: Fix delay with HZ==1000.
+# 
+# arch/sparc64/lib/delay.c
+#   2004/08/27 16:10:01-07:00 davem at nuts.davemloft.net +0 -0
+#   BitKeeper file /disk1/BK/sparc-2.6/arch/sparc64/lib/delay.c
+# 
+diff -Nru a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c
+--- a/arch/sparc64/kernel/sparc64_ksyms.c	2004-08-27 16:48:00 -07:00
++++ b/arch/sparc64/kernel/sparc64_ksyms.c	2004-08-27 16:48:00 -07:00
+@@ -372,6 +372,12 @@
+ EXPORT_SYMBOL_NOVERS(memmove);
+ EXPORT_SYMBOL_NOVERS(strncmp);
+ 
++/* Delay routines. */
++EXPORT_SYMBOL(__udelay);
++EXPORT_SYMBOL(__ndelay);
++EXPORT_SYMBOL(__const_udelay);
++EXPORT_SYMBOL(__delay);
++
+ void VISenter(void);
+ /* RAID code needs this */
+ EXPORT_SYMBOL_NOVERS(VISenter);
+diff -Nru a/arch/sparc64/lib/Makefile b/arch/sparc64/lib/Makefile
+--- a/arch/sparc64/lib/Makefile	2004-08-27 16:48:00 -07:00
++++ b/arch/sparc64/lib/Makefile	2004-08-27 16:48:00 -07:00
+@@ -12,7 +12,7 @@
+ 	 U1memcpy.o U1copy_from_user.o U1copy_to_user.o \
+ 	 U3memcpy.o U3copy_from_user.o U3copy_to_user.o U3patch.o \
+ 	 copy_in_user.o user_fixup.o memmove.o \
+-	 mcount.o ipcsum.o rwsem.o xor.o splock.o find_bit.o
++	 mcount.o ipcsum.o rwsem.o xor.o splock.o find_bit.o delay.o
+ 
+ lib-$(CONFIG_DEBUG_SPINLOCK) += debuglocks.o
+ lib-$(CONFIG_HAVE_DEC_LOCK) += dec_and_lock.o
+diff -Nru a/arch/sparc64/lib/delay.c b/arch/sparc64/lib/delay.c
+--- /dev/null	Wed Dec 31 16:00:00 196900
++++ b/arch/sparc64/lib/delay.c	2004-08-27 16:48:00 -07:00
+@@ -0,0 +1,49 @@
++/* delay.c: Delay loops for sparc64
++ *
++ * Copyright (C) 2004 David S. Miller <davem at redhat.com>
++ *
++ * Based heavily upon x86 variant which is:
++ *	Copyright (C) 1993 Linus Torvalds
++ *	Copyright (C) 1997 Martin Mares <mj at atrey.karlin.mff.cuni.cz>
++ */
++
++#include <linux/delay.h>
++
++void __delay(unsigned long loops)
++{
++	__asm__ __volatile__(
++"	b,pt	%%xcc, 1f\n"
++"	 cmp	%0, 0\n"
++"	.align	32\n"
++"1:\n"
++"	bne,pt	%%xcc, 1b\n"
++"	 subcc	%0, 1, %0\n"
++	: "=&r" (loops)
++	: "0" (loops)
++	: "cc");
++}
++
++/* We used to multiply by HZ after shifting down by 32 bits
++ * but that runs into problems for higher values of HZ and
++ * slow cpus.
++ */
++void __const_udelay(unsigned long n)
++{
++	n *= 4;
++
++	n *= (cpu_data(smp_processor_id()).udelay_val * (HZ/4));
++	n >>= 32;
++
++	__delay(n + 1);
++}
++
++void __udelay(unsigned long n)
++{
++	__const_udelay(n * 0x10c7UL);
++}
++
++
++void __ndelay(unsigned long n)
++{
++	__const_udelay(n * 0x5UL);
++}
+diff -Nru a/include/asm-sparc64/delay.h b/include/asm-sparc64/delay.h
+--- a/include/asm-sparc64/delay.h	2004-08-27 16:48:00 -07:00
++++ b/include/asm-sparc64/delay.h	2004-08-27 16:48:00 -07:00
+@@ -1,7 +1,11 @@
+-/* $Id: delay.h,v 1.13 2002/02/02 03:33:48 kanoj Exp $
+- * delay.h: Linux delay routines on the V9.
++/* delay.h: Linux delay routines on sparc64.
+  *
+- * Copyright (C) 1996 David S. Miller (davem at caip.rutgers.edu).
++ * Copyright (C) 1996, 2004 David S. Miller (davem at davemloft.net).
++ *
++ * Based heavily upon x86 variant which is:
++ * Copyright (C) 1993 Linus Torvalds
++ *
++ * Delay routines calling functions in arch/sparc64/lib/delay.c
+  */
+ 
+ #ifndef __SPARC64_DELAY_H
+@@ -13,50 +17,21 @@
+ 
+ #ifndef __ASSEMBLY__
+ 
+-static __inline__ void __delay(unsigned long loops)
+-{
+-	__asm__ __volatile__(
+-"	b,pt	%%xcc, 1f\n"
+-"	 cmp	%0, 0\n"
+-"	.align	32\n"
+-"1:\n"
+-"	bne,pt	%%xcc, 1b\n"
+-"	 subcc	%0, 1, %0\n"
+-	: "=&r" (loops)
+-	: "0" (loops)
+-	: "cc");
+-}
+-
+-static __inline__ void __udelay(unsigned long usecs, unsigned long lps)
+-{
+-	usecs *= 0x00000000000010c6UL;		/* 2**32 / 1000000 */
+-
+-	__asm__ __volatile__(
+-"	mulx	%1, %2, %0\n"
+-"	srlx	%0, 32, %0\n"
+-	: "=r" (usecs)
+-	: "r" (usecs), "r" (lps));
+-
+-	__delay(usecs * HZ);
+-}
+-
+-extern __inline__ void __ndelay(unsigned long usecs, unsigned long lps)
+-{
+-	usecs *= 0x0000000000000005UL;		/* 2**32 / 10000 */
+-
+-	__asm__ __volatile__(
+-"	mulx	%1, %2, %0\n"
+-"	srlx	%0, 32, %0\n"
+-	: "=r" (usecs)
+-	: "r" (usecs), "r" (lps));
+-
+-	__delay(usecs * HZ);
+-}
+-
+-#define __udelay_val cpu_data(smp_processor_id()).udelay_val
++extern void __bad_udelay(void);
++extern void __bad_ndelay(void);
+ 
+-#define udelay(usecs) __udelay((usecs),__udelay_val)
+-#define ndelay(usecs) __ndelay((usecs),__udelay_val)
++extern void __udelay(unsigned long usecs);
++extern void __ndelay(unsigned long nsecs);
++extern void __const_udelay(unsigned long usecs);
++extern void __delay(unsigned long loops);
++
++#define udelay(n) (__builtin_constant_p(n) ? \
++	((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c7ul)) : \
++	__udelay(n))
++	
++#define ndelay(n) (__builtin_constant_p(n) ? \
++	((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \
++	__ndelay(n))
+ 
+ #endif /* !__ASSEMBLY__ */
+ 
+

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc64-syslog-register.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc64-syslog-register.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc64-syslog-register.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,64 @@
+#!/bin/sh -e
+# DP: syslog 32-bit compat function was using the wrong registers.
+
+. $(dirname $0)/DPATCH
+
+Return-Path: <davem at redhat.com>
+X-Original-To: joshk at triplehelix.org
+Delivered-To: joshk at triplehelix.org
+Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31])
+	by triplehelix.org (Postfix) with ESMTP id 1F4DB2A9542
+	for <joshk at triplehelix.org>; Thu, 26 Aug 2004 18:06:41 -0700 (PDT)
+Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254])
+	by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7R16eS0003067;
+	Thu, 26 Aug 2004 21:06:40 -0400
+Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1])
+	by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i7R16Z316038;
+	Thu, 26 Aug 2004 21:06:35 -0400
+Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1])
+	by devserv.devel.redhat.com (8.12.11/8.12.10) with SMTP id i7R16S8q027597;
+	Thu, 26 Aug 2004 21:06:31 -0400
+Date: Thu, 26 Aug 2004 18:06:28 -0700
+From: "David S. Miller" <davem at redhat.com>
+To: Joshua Kwan <joshk at triplehelix.org>
+Cc: sparclinux at vger.kernel.org, debian-sparc at debian.org
+Subject: Re: [2.6] busybox EFAULT on sparc64
+Message-Id: <20040826180628.1fd4e09f.davem at redhat.com>
+In-Reply-To: <pan.2004.08.27.00.57.25.841201 at triplehelix.org>
+References: <20040818235528.GA8070 at triplehelix.org>
+	<20040819095200.14bb9100.davem at redhat.com>
+	<20040819220259.4007f378.davem at redhat.com>
+	<pan.2004.08.27.00.57.25.841201 at triplehelix.org>
+X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu)
+X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN. at 4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP
+Mime-Version: 1.0
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+X-CRM114-Version: 20040816.BlameClockworkOrange-auto.3 (regex: TRE 0.6.8) MF-A10FFB4C 
+X-CRM114-Status: Good  ( pR: 106.0078 )
+
+On Thu, 26 Aug 2004 17:57:27 -0700
+Joshua Kwan <joshk at triplehelix.org> wrote:
+
+> syslog(0x2, 0xefffed20, 0x1000
+> 
+> At this point everything hangs. I'm not sure if there's another four
+> digits after the 0x1000.
+> 
+> Ideas?
+
+This should fix it.
+
+===== arch/sparc64/kernel/sys32.S 1.9 vs edited =====
+--- 1.9/arch/sparc64/kernel/sys32.S	2004-06-03 14:51:21 -07:00
++++ edited/arch/sparc64/kernel/sys32.S	2004-08-26 17:49:39 -07:00
+@@ -120,7 +120,7 @@
+ SIGN2(sys32_setpgid, sys_setpgid, %o0, %o1)
+ SIGN3(sys32_setpriority, sys_setpriority, %o0, %o1, %o2)
+ SIGN1(sys32_ssetmask, sys_ssetmask, %o0)
+-SIGN2(sys32_syslog, sys_syslog, %o0, %o1)
++SIGN2(sys32_syslog, sys_syslog, %o0, %o2)
+ SIGN1(sys32_umask, sys_umask, %o0)
+ SIGN3(sys32_tgkill, sys_tgkill, %o0, %o1, %o2)
+ SIGN1(sys32_sendto, sys_sendto, %o0)
+

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc64-update.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc64-update.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sparc64-update.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,4198 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Sparc64 updates
+## DP: Patch author: David Miller <davem at redhat.com>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/08/23 14:36:20-07:00 davem at nuts.davemloft.net 
+#   [SPARC64]: Implement little-endian bitops using normal ones.
+#   
+#   Just like s390 and ppc64.
+#   
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# include/asm-sparc64/bitops.h
+#   2004/08/23 14:36:04-07:00 davem at nuts.davemloft.net +20 -15
+#   [SPARC64]: Implement little-endian bitops using normal ones.
+#   
+#   Just like s390 and ppc64.
+#   
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# arch/sparc64/lib/bitops.S
+#   2004/08/23 14:36:04-07:00 davem at nuts.davemloft.net +0 -38
+#   [SPARC64]: Implement little-endian bitops using normal ones.
+#   
+#   Just like s390 and ppc64.
+#   
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# arch/sparc64/kernel/sparc64_ksyms.c
+#   2004/08/23 14:36:04-07:00 davem at nuts.davemloft.net +0 -2
+#   [SPARC64]: Implement little-endian bitops using normal ones.
+#   
+#   Just like s390 and ppc64.
+#   
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# ChangeSet
+#   2004/08/23 14:35:39-07:00 davem at nuts.davemloft.net 
+#   [SPARC64]: Kill bogus __strlen symbol and strncmp inline cruft.
+#   
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# include/asm-sparc64/string.h
+#   2004/08/23 14:35:22-07:00 davem at nuts.davemloft.net +1 -64
+#   [SPARC64]: Kill bogus __strlen symbol and strncmp inline cruft.
+#   
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# arch/sparc64/lib/strncmp.S
+#   2004/08/23 14:35:22-07:00 davem at nuts.davemloft.net +1 -2
+#   [SPARC64]: Kill bogus __strlen symbol and strncmp inline cruft.
+#   
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# arch/sparc64/lib/strlen.S
+#   2004/08/23 14:35:22-07:00 davem at nuts.davemloft.net +1 -2
+#   [SPARC64]: Kill bogus __strlen symbol and strncmp inline cruft.
+#   
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# arch/sparc64/kernel/sparc64_ksyms.c
+#   2004/08/23 14:35:22-07:00 davem at nuts.davemloft.net +1 -4
+#   [SPARC64]: Kill bogus __strlen symbol and strncmp inline cruft.
+#   
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# ChangeSet
+#   2004/08/23 14:34:58-07:00 davem at nuts.davemloft.net 
+#   [SPARC64]: Fix bugs in new U1memcpy code.
+#   
+#   - U1copy_from_user needs PREAMBLE since it uses
+#     explicit ASI_BLK_AIUS references.
+#   - Need to use EX_RETVAL() in U1memcpy.S
+#   - U1memcpy.S can load one 64-bit word too
+#     many, passing the source buffer boundary
+#     and thus potentially causing exceptions.
+#   
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# arch/sparc64/lib/U1memcpy.S
+#   2004/08/23 14:34:42-07:00 davem at nuts.davemloft.net +4 -3
+#   [SPARC64]: Fix bugs in new U1memcpy code.
+#   
+#   - U1copy_from_user needs PREAMBLE since it uses
+#     explicit ASI_BLK_AIUS references.
+#   - Need to use EX_RETVAL() in U1memcpy.S
+#   - U1memcpy.S can load one 64-bit word too
+#     many, passing the source buffer boundary
+#     and thus potentially causing exceptions.
+#   
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# arch/sparc64/lib/U1copy_from_user.S
+#   2004/08/23 14:34:42-07:00 davem at nuts.davemloft.net +10 -0
+#   [SPARC64]: Fix bugs in new U1memcpy code.
+#   
+#   - U1copy_from_user needs PREAMBLE since it uses
+#     explicit ASI_BLK_AIUS references.
+#   - Need to use EX_RETVAL() in U1memcpy.S
+#   - U1memcpy.S can load one 64-bit word too
+#     many, passing the source buffer boundary
+#     and thus potentially causing exceptions.
+#   
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# ChangeSet
+#   2004/08/23 14:33:47-07:00 davem at nuts.davemloft.net 
+#   [SPARC64]: Revamped memcpy infrastructure.
+#   
+#   - Make it easier to maintain the Ultra-I vs. Ultra-III
+#     memcpy implementations.  Before you had to maintain
+#     3 different entire copies of the routines.
+#   - Kill %asi register writing Ultra-I single memcpy loop
+#     for both user and kernel.  Was not worth it.
+#   - Simplify exception detection and handling enormously.
+#   
+#   Signed-off-by: David S. Miller <davem at redhat.com>
+# 
+# include/asm-sparc64/uaccess.h
+#   2004/08/23 14:33:04-07:00 davem at nuts.davemloft.net +41 -9
+#   [SPARC64]: Revamped memcpy infrastructure.
+# 
+# include/asm-sparc64/string.h
+#   2004/08/23 14:33:04-07:00 davem at nuts.davemloft.net +17 -27
+#   [SPARC64]: Revamped memcpy infrastructure.
+# 
+# arch/sparc64/lib/U3memcpy.S
+#   2004/08/23 14:33:04-07:00 davem at nuts.davemloft.net +216 -116
+#   [SPARC64]: Revamped memcpy infrastructure.
+# 
+# arch/sparc64/lib/U3copy_to_user.S
+#   2004/08/23 14:33:04-07:00 davem at nuts.davemloft.net +23 -405
+#   [SPARC64]: Revamped memcpy infrastructure.
+# 
+# arch/sparc64/lib/U3copy_from_user.S
+#   2004/08/23 14:33:04-07:00 davem at nuts.davemloft.net +16 -406
+#   [SPARC64]: Revamped memcpy infrastructure.
+# 
+# arch/sparc64/lib/Makefile
+#   2004/08/23 14:33:04-07:00 davem at nuts.davemloft.net +5 -4
+#   [SPARC64]: Revamped memcpy infrastructure.
+# 
+# arch/sparc64/kernel/sparc64_ksyms.c
+#   2004/08/23 14:33:04-07:00 davem at nuts.davemloft.net +7 -5
+#   [SPARC64]: Revamped memcpy infrastructure.
+# 
+# arch/sparc64/lib/user_fixup.c
+#   2004/08/23 14:32:55-07:00 davem at nuts.davemloft.net +68 -0
+#   [SPARC64]: Revamped memcpy infrastructure.
+# 
+# arch/sparc64/lib/memmove.S
+#   2004/08/23 14:32:55-07:00 davem at nuts.davemloft.net +31 -0
+#   [SPARC64]: Revamped memcpy infrastructure.
+# 
+# arch/sparc64/lib/copy_in_user.S
+#   2004/08/23 14:32:55-07:00 davem at nuts.davemloft.net +114 -0
+#   [SPARC64]: Revamped memcpy infrastructure.
+# 
+# arch/sparc64/lib/U3patch.S
+#   2004/08/23 14:32:55-07:00 davem at nuts.davemloft.net +30 -0
+#   [SPARC64]: Revamped memcpy infrastructure.
+# 
+# arch/sparc64/lib/U1memcpy.S
+#   2004/08/23 14:32:55-07:00 davem at nuts.davemloft.net +551 -0
+#   [SPARC64]: Revamped memcpy infrastructure.
+# 
+# arch/sparc64/lib/U1copy_to_user.S
+#   2004/08/23 14:32:55-07:00 davem at nuts.davemloft.net +33 -0
+#   [SPARC64]: Revamped memcpy infrastructure.
+# 
+# arch/sparc64/lib/user_fixup.c
+#   2004/08/23 14:32:55-07:00 davem at nuts.davemloft.net +0 -0
+#   BitKeeper file /disk1/BK/sparc-2.6/arch/sparc64/lib/user_fixup.c
+# 
+# arch/sparc64/lib/memmove.S
+#   2004/08/23 14:32:55-07:00 davem at nuts.davemloft.net +0 -0
+#   BitKeeper file /disk1/BK/sparc-2.6/arch/sparc64/lib/memmove.S
+# 
+# arch/sparc64/lib/copy_in_user.S
+#   2004/08/23 14:32:55-07:00 davem at nuts.davemloft.net +0 -0
+#   BitKeeper file /disk1/BK/sparc-2.6/arch/sparc64/lib/copy_in_user.S
+# 
+# arch/sparc64/lib/U3patch.S
+#   2004/08/23 14:32:55-07:00 davem at nuts.davemloft.net +0 -0
+#   BitKeeper file /disk1/BK/sparc-2.6/arch/sparc64/lib/U3patch.S
+# 
+# arch/sparc64/lib/U1memcpy.S
+#   2004/08/23 14:32:55-07:00 davem at nuts.davemloft.net +0 -0
+#   BitKeeper file /disk1/BK/sparc-2.6/arch/sparc64/lib/U1memcpy.S
+# 
+# arch/sparc64/lib/U1copy_to_user.S
+#   2004/08/23 14:32:55-07:00 davem at nuts.davemloft.net +0 -0
+#   BitKeeper file /disk1/BK/sparc-2.6/arch/sparc64/lib/U1copy_to_user.S
+# 
+# arch/sparc64/lib/U1copy_from_user.S
+#   2004/08/23 14:32:54-07:00 davem at nuts.davemloft.net +23 -0
+#   [SPARC64]: Revamped memcpy infrastructure.
+# 
+# arch/sparc64/lib/U1copy_from_user.S
+#   2004/08/23 14:32:54-07:00 davem at nuts.davemloft.net +0 -0
+#   BitKeeper file /disk1/BK/sparc-2.6/arch/sparc64/lib/U1copy_from_user.S
+# 
+# BitKeeper/deleted/.del-VIScopy.S~b524fac86bb4c09
+#   2004/08/23 14:31:45-07:00 davem at nuts.davemloft.net +0 -0
+#   Delete: arch/sparc64/lib/VIScopy.S
+# 
+# BitKeeper/deleted/.del-U3copy_in_user.S~e2894e7f695913b4
+#   2004/08/23 14:31:45-07:00 davem at nuts.davemloft.net +0 -0
+#   Delete: arch/sparc64/lib/U3copy_in_user.S
+# 
+diff -Nru a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c
+--- a/arch/sparc64/kernel/sparc64_ksyms.c	2004-08-26 13:29:59 +02:00
++++ b/arch/sparc64/kernel/sparc64_ksyms.c	2004-08-26 13:29:59 +02:00
+@@ -74,8 +74,6 @@
+ extern void *__memscan_zero(void *, size_t);
+ extern void *__memscan_generic(void *, int, size_t);
+ extern int __memcmp(const void *, const void *, __kernel_size_t);
+-extern int __strncmp(const char *, const char *, __kernel_size_t);
+-extern __kernel_size_t __strlen(const char *);
+ extern __kernel_size_t strlen(const char *);
+ extern void linux_sparc_syscall(void);
+ extern void rtrap(void);
+@@ -187,8 +185,6 @@
+ EXPORT_SYMBOL(___test_and_set_bit);
+ EXPORT_SYMBOL(___test_and_clear_bit);
+ EXPORT_SYMBOL(___test_and_change_bit);
+-EXPORT_SYMBOL(___test_and_set_le_bit);
+-EXPORT_SYMBOL(___test_and_clear_le_bit);
+ 
+ /* Bit searching */
+ EXPORT_SYMBOL(find_next_bit);
+@@ -295,7 +291,6 @@
+ EXPORT_SYMBOL(__prom_getsibling);
+ 
+ /* sparc library symbols */
+-EXPORT_SYMBOL(__strlen);
+ EXPORT_SYMBOL(strlen);
+ EXPORT_SYMBOL(strnlen);
+ EXPORT_SYMBOL(__strlen_user);
+@@ -334,7 +329,6 @@
+ #endif
+ 
+ /* Special internal versions of library functions. */
+-EXPORT_SYMBOL(__memset);
+ EXPORT_SYMBOL(_clear_page);
+ EXPORT_SYMBOL(clear_user_page);
+ EXPORT_SYMBOL(copy_user_page);
+@@ -342,8 +336,7 @@
+ EXPORT_SYMBOL(__memscan_zero);
+ EXPORT_SYMBOL(__memscan_generic);
+ EXPORT_SYMBOL(__memcmp);
+-EXPORT_SYMBOL(__strncmp);
+-EXPORT_SYMBOL(__memmove);
++EXPORT_SYMBOL(__memset);
+ EXPORT_SYMBOL(memchr);
+ 
+ EXPORT_SYMBOL(csum_partial);
+@@ -351,9 +344,12 @@
+ EXPORT_SYMBOL(ip_fast_csum);
+ 
+ /* Moving data to/from/in userspace. */
+-EXPORT_SYMBOL(__copy_to_user);
+-EXPORT_SYMBOL(__copy_from_user);
+-EXPORT_SYMBOL(__copy_in_user);
++EXPORT_SYMBOL(___copy_to_user);
++EXPORT_SYMBOL(___copy_from_user);
++EXPORT_SYMBOL(___copy_in_user);
++EXPORT_SYMBOL(copy_to_user_fixup);
++EXPORT_SYMBOL(copy_from_user_fixup);
++EXPORT_SYMBOL(copy_in_user_fixup);
+ EXPORT_SYMBOL(__strncpy_from_user);
+ EXPORT_SYMBOL(__bzero_noasi);
+ 
+@@ -374,6 +370,7 @@
+ EXPORT_SYMBOL_NOVERS(memcpy);
+ EXPORT_SYMBOL_NOVERS(memset);
+ EXPORT_SYMBOL_NOVERS(memmove);
++EXPORT_SYMBOL_NOVERS(strncmp);
+ 
+ void VISenter(void);
+ /* RAID code needs this */
+diff -Nru a/arch/sparc64/lib/Makefile b/arch/sparc64/lib/Makefile
+--- a/arch/sparc64/lib/Makefile	2004-08-26 13:29:59 +02:00
++++ b/arch/sparc64/lib/Makefile	2004-08-26 13:29:59 +02:00
+@@ -7,11 +7,12 @@
+ 
+ lib-y := PeeCeeI.o copy_page.o clear_page.o strlen.o strncmp.o \
+ 	 memscan.o strncpy_from_user.o strlen_user.o memcmp.o checksum.o \
+-	 VIScopy.o VISbzero.o VISmemset.o VIScsum.o VIScsumcopy.o \
++	 VISbzero.o VISmemset.o VIScsum.o VIScsumcopy.o \
+ 	 VIScsumcopyusr.o VISsave.o atomic.o rwlock.o bitops.o \
+-	 U3memcpy.o U3copy_from_user.o U3copy_to_user.o \
+-	 U3copy_in_user.o mcount.o ipcsum.o rwsem.o xor.o splock.o \
+-	 find_bit.o
++	 U1memcpy.o U1copy_from_user.o U1copy_to_user.o \
++	 U3memcpy.o U3copy_from_user.o U3copy_to_user.o U3patch.o \
++	 copy_in_user.o user_fixup.o memmove.o \
++	 mcount.o ipcsum.o rwsem.o xor.o splock.o find_bit.o
+ 
+ lib-$(CONFIG_DEBUG_SPINLOCK) += debuglocks.o
+ lib-$(CONFIG_HAVE_DEC_LOCK) += dec_and_lock.o
+diff -Nru a/arch/sparc64/lib/U1copy_from_user.S b/arch/sparc64/lib/U1copy_from_user.S
+--- /dev/null	Wed Dec 31 16:00:00 196900
++++ b/arch/sparc64/lib/U1copy_from_user.S	2004-08-26 13:29:59 +02:00
+@@ -0,0 +1,33 @@
++/* U1copy_from_user.S: UltraSparc-I/II/IIi/IIe optimized copy from userspace.
++ *
++ * Copyright (C) 1999, 2000, 2004 David S. Miller (davem at redhat.com)
++ */
++
++#define EX_LD(x)		\
++98:	x;			\
++	.section .fixup;	\
++	.align 4;		\
++99:	retl;			\
++	 mov	1, %o0;		\
++	.section __ex_table;	\
++	.align 4;		\
++	.word 98b, 99b;		\
++	.text;			\
++	.align 4;
++
++#define FUNC_NAME		___copy_from_user
++#define LOAD(type,addr,dest)	type##a [addr] %asi, dest
++#define LOAD_BLK(addr,dest)	ldda [addr] ASI_BLK_AIUS, dest
++#define EX_RETVAL(x)		0
++
++	/* Writing to %asi is _expensive_ so we hardcode it.
++	 * Reading %asi to check for KERNEL_DS is comparatively
++	 * cheap.
++	 */
++#define PREAMBLE					\
++	rd		%asi, %g1;			\
++	cmp		%g1, ASI_AIUS;			\
++	bne,pn		%icc, memcpy_user_stub;		\
++	 nop;						\
++
++#include "U1memcpy.S"
+diff -Nru a/arch/sparc64/lib/U1copy_to_user.S b/arch/sparc64/lib/U1copy_to_user.S
+--- /dev/null	Wed Dec 31 16:00:00 196900
++++ b/arch/sparc64/lib/U1copy_to_user.S	2004-08-26 13:29:59 +02:00
+@@ -0,0 +1,33 @@
++/* U1copy_to_user.S: UltraSparc-I/II/IIi/IIe optimized copy to userspace.
++ *
++ * Copyright (C) 1999, 2000, 2004 David S. Miller (davem at redhat.com)
++ */
++
++#define EX_ST(x)		\
++98:	x;			\
++	.section .fixup;	\
++	.align 4;		\
++99:	retl;			\
++	 mov	1, %o0;		\
++	.section __ex_table;	\
++	.align 4;		\
++	.word 98b, 99b;		\
++	.text;			\
++	.align 4;
++
++#define FUNC_NAME		___copy_to_user
++#define STORE(type,src,addr)	type##a src, [addr] ASI_AIUS
++#define STORE_BLK(src,addr)	stda src, [addr] ASI_BLK_AIUS
++#define EX_RETVAL(x)		0
++
++	/* Writing to %asi is _expensive_ so we hardcode it.
++	 * Reading %asi to check for KERNEL_DS is comparatively
++	 * cheap.
++	 */
++#define PREAMBLE					\
++	rd		%asi, %g1;			\
++	cmp		%g1, ASI_AIUS;			\
++	bne,pn		%icc, memcpy_user_stub;		\
++	 nop;						\
++
++#include "U1memcpy.S"
+diff -Nru a/arch/sparc64/lib/U1memcpy.S b/arch/sparc64/lib/U1memcpy.S
+--- /dev/null	Wed Dec 31 16:00:00 196900
++++ b/arch/sparc64/lib/U1memcpy.S	2004-08-26 13:29:59 +02:00
+@@ -0,0 +1,552 @@
++/* U1memcpy.S: UltraSPARC-I/II/IIi/IIe optimized memcpy.
++ *
++ * Copyright (C) 1997, 2004 David S. Miller (davem at redhat.com)
++ * Copyright (C) 1996, 1997, 1998, 1999 Jakub Jelinek (jj at ultra.linux.cz)
++ */
++
++#ifdef __KERNEL__
++#include <asm/visasm.h>
++#include <asm/asi.h>
++#else
++#define ASI_BLK_P 0xf0
++#define FPRS_FEF  0x04
++#ifdef MEMCPY_DEBUG
++#define VISEntry rd %fprs, %o5; wr %g0, FPRS_FEF, %fprs; \
++		 clr %g1; clr %g2; clr %g3; subcc %g0, %g0, %g0;
++#define VISExit and %o5, FPRS_FEF, %o5; wr %o5, 0x0, %fprs
++#else
++#define VISEntry rd %fprs, %o5; wr %g0, FPRS_FEF, %fprs
++#define VISExit and %o5, FPRS_FEF, %o5; wr %o5, 0x0, %fprs
++#endif
++#endif
++
++#ifndef EX_LD
++#define EX_LD(x)	x
++#endif
++
++#ifndef EX_ST
++#define EX_ST(x)	x
++#endif
++
++#ifndef EX_RETVAL
++#define EX_RETVAL(x)	x
++#endif
++
++#ifndef LOAD
++#define LOAD(type,addr,dest)	type [addr], dest
++#endif
++
++#ifndef LOAD_BLK
++#define LOAD_BLK(addr,dest)	ldda [addr] ASI_BLK_P, dest
++#endif
++
++#ifndef STORE
++#define STORE(type,src,addr)	type src, [addr]
++#endif
++
++#ifndef STORE_BLK
++#define STORE_BLK(src,addr)	stda src, [addr] ASI_BLK_P
++#endif
++
++#ifndef FUNC_NAME
++#define FUNC_NAME	memcpy
++#endif
++
++#ifndef PREAMBLE
++#define PREAMBLE
++#endif
++
++#ifndef XCC
++#define XCC xcc
++#endif
++
++#define FREG_FROB(f1, f2, f3, f4, f5, f6, f7, f8, f9)		\
++	faligndata		%f1, %f2, %f48;			\
++	faligndata		%f2, %f3, %f50;			\
++	faligndata		%f3, %f4, %f52;			\
++	faligndata		%f4, %f5, %f54;			\
++	faligndata		%f5, %f6, %f56;			\
++	faligndata		%f6, %f7, %f58;			\
++	faligndata		%f7, %f8, %f60;			\
++	faligndata		%f8, %f9, %f62;
++
++#define MAIN_LOOP_CHUNK(src, dest, fdest, fsrc, len, jmptgt)	\
++	EX_LD(LOAD_BLK(%src, %fdest));				\
++	EX_ST(STORE_BLK(%fsrc, %dest));				\
++	add			%src, 0x40, %src;		\
++	subcc			%len, 0x40, %len;		\
++	be,pn			%xcc, jmptgt;			\
++	 add			%dest, 0x40, %dest;		\
++
++#define LOOP_CHUNK1(src, dest, len, branch_dest)		\
++	MAIN_LOOP_CHUNK(src, dest, f0,  f48, len, branch_dest)
++#define LOOP_CHUNK2(src, dest, len, branch_dest)		\
++	MAIN_LOOP_CHUNK(src, dest, f16, f48, len, branch_dest)
++#define LOOP_CHUNK3(src, dest, len, branch_dest)		\
++	MAIN_LOOP_CHUNK(src, dest, f32, f48, len, branch_dest)
++
++#define STORE_SYNC(dest, fsrc)				\
++	EX_ST(STORE_BLK(%fsrc, %dest));			\
++	add			%dest, 0x40, %dest;
++
++#define STORE_JUMP(dest, fsrc, target)			\
++	EX_ST(STORE_BLK(%fsrc, %dest));			\
++	add			%dest, 0x40, %dest;	\
++	ba,pt			%xcc, target;
++
++#define FINISH_VISCHUNK(dest, f0, f1, left)	\
++	subcc			%left, 8, %left;\
++	bl,pn			%xcc, 95f;	\
++	 faligndata		%f0, %f1, %f48;	\
++	EX_ST(STORE(std, %f48, %dest));		\
++	add			%dest, 8, %dest;
++
++#define UNEVEN_VISCHUNK_LAST(dest, f0, f1, left)	\
++	subcc			%left, 8, %left;	\
++	bl,pn			%xcc, 95f;		\
++	 fsrc1			%f0, %f1;
++
++#define UNEVEN_VISCHUNK(dest, f0, f1, left)		\
++	UNEVEN_VISCHUNK_LAST(dest, f0, f1, left)	\
++	ba,a,pt			%xcc, 93f;
++
++	.register	%g2,#scratch
++	.register	%g3,#scratch
++
++	.text
++	.align		64
++
++	.globl		FUNC_NAME
++FUNC_NAME:		/* %o0=dst, %o1=src, %o2=len */
++	PREAMBLE
++	mov		%o0, %g5
++	cmp		%o2, 0
++	be,pn		%XCC, 85f
++	 or		%o0, %o1, %o3
++	cmp		%o2, 16
++	blu,a,pn	%XCC, 80f
++	 or		%o3, %o2, %o3
++
++	cmp		%o2, (5 * 64)
++	blu,pt		%XCC, 70f
++	 andcc		%o3, 0x7, %g0
++
++	/* Clobbers o5/g1/g2/g3/g7/icc/xcc.  */
++	VISEntry
++
++	/* Is 'dst' already aligned on an 64-byte boundary? */
++	andcc		%o0, 0x3f, %g2
++	be,pt		%XCC, 2f
++
++	/* Compute abs((dst & 0x3f) - 0x40) into %g2.  This is the number
++	 * of bytes to copy to make 'dst' 64-byte aligned.  We pre-
++	 * subtract this from 'len'.
++	 */
++	 sub		%o0, %o1, %o4
++	sub		%g2, 0x40, %g2
++	sub		%g0, %g2, %g2
++	sub		%o2, %g2, %o2
++	andcc		%g2, 0x7, %g1
++	be,pt		%icc, 2f
++	 and		%g2, 0x38, %g2
++
++1:	subcc		%g1, 0x1, %g1
++	EX_LD(LOAD(ldub, %o1 + 0x00, %o3))
++	EX_ST(STORE(stb, %o3, %o1 + %o4))
++	bgu,pt		%XCC, 1b
++	 add		%o1, 0x1, %o1
++
++	add		%o1, %o4, %o0
++
++2:	cmp		%g2, 0x0
++	and		%o1, 0x7, %g1
++	be,pt		%icc, 3f
++	 alignaddr	%o1, %g0, %o1
++
++	EX_LD(LOAD(ldd, %o1, %f4))
++1:	EX_LD(LOAD(ldd, %o1 + 0x8, %f6))
++	add		%o1, 0x8, %o1
++	subcc		%g2, 0x8, %g2
++	faligndata	%f4, %f6, %f0
++	EX_ST(STORE(std, %f0, %o0))
++	be,pn		%icc, 3f
++	 add		%o0, 0x8, %o0
++
++	EX_LD(LOAD(ldd, %o1 + 0x8, %f4))
++	add		%o1, 0x8, %o1
++	subcc		%g2, 0x8, %g2
++	faligndata	%f6, %f4, %f0
++	EX_ST(STORE(std, %f0, %o0))
++	bne,pt		%icc, 1b
++	 add		%o0, 0x8, %o0
++
++	/* Destination is 64-byte aligned.  */
++3:	
++	membar		  #LoadStore | #StoreStore | #StoreLoad
++
++	subcc		%o2, 0x40, %o4
++	add		%o1, %g1, %g1
++	andncc		%o4, (0x40 - 1), %o4
++	srl		%g1, 3, %g2
++	sub		%o2, %o4, %g3
++	andn		%o1, (0x40 - 1), %o1
++	and		%g2, 7, %g2
++	andncc		%g3, 0x7, %g3
++	fmovd		%f0, %f2
++	sub		%g3, 0x8, %g3
++	sub		%o2, %o4, %o2
++
++	add		%g1, %o4, %g1
++	subcc		%o2, %g3, %o2
++
++	EX_LD(LOAD_BLK(%o1, %f0))
++	add		%o1, 0x40, %o1
++	add		%g1, %g3, %g1
++	EX_LD(LOAD_BLK(%o1, %f16))
++	add		%o1, 0x40, %o1
++	sub		%o4, 0x80, %o4
++	EX_LD(LOAD_BLK(%o1, %f32))
++	add		%o1, 0x40, %o1
++
++	/* There are 8 instances of the unrolled loop,
++	 * one for each possible alignment of the
++	 * source buffer.  Each loop instance is 452
++	 * bytes.
++	 */
++	sll		%g2, 3, %o3
++	sub		%o3, %g2, %o3
++	sllx		%o3, 4, %o3
++	add		%o3, %g2, %o3
++	sllx		%o3, 2, %g2
++1:	rd		%pc, %o3
++	add		%o3, %lo(1f - 1b), %o3
++	jmpl		%o3 + %g2, %g0
++	 nop
++
++	.align		64
++1:	FREG_FROB(f0, f2, f4, f6, f8, f10,f12,f14,f16)
++	LOOP_CHUNK1(o1, o0, o4, 1f)
++	FREG_FROB(f16,f18,f20,f22,f24,f26,f28,f30,f32)
++	LOOP_CHUNK2(o1, o0, o4, 2f)
++	FREG_FROB(f32,f34,f36,f38,f40,f42,f44,f46,f0)
++	LOOP_CHUNK3(o1, o0, o4, 3f)
++	ba,pt		%xcc, 1b+4
++	 faligndata	%f0, %f2, %f48
++1:	FREG_FROB(f16,f18,f20,f22,f24,f26,f28,f30,f32)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f32,f34,f36,f38,f40,f42,f44,f46,f0)
++	STORE_JUMP(o0, f48, 40f) membar #Sync
++2:	FREG_FROB(f32,f34,f36,f38,f40,f42,f44,f46,f0)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f0, f2, f4, f6, f8, f10,f12,f14,f16)
++	STORE_JUMP(o0, f48, 48f) membar #Sync
++3:	FREG_FROB(f0, f2, f4, f6, f8, f10,f12,f14,f16)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f16,f18,f20,f22,f24,f26,f28,f30,f32)
++	STORE_JUMP(o0, f48, 56f) membar #Sync
++
++1:	FREG_FROB(f2, f4, f6, f8, f10,f12,f14,f16,f18)
++	LOOP_CHUNK1(o1, o0, o4, 1f)
++	FREG_FROB(f18,f20,f22,f24,f26,f28,f30,f32,f34)
++	LOOP_CHUNK2(o1, o0, o4, 2f)
++	FREG_FROB(f34,f36,f38,f40,f42,f44,f46,f0, f2)
++	LOOP_CHUNK3(o1, o0, o4, 3f)
++	ba,pt		%xcc, 1b+4
++	 faligndata	%f2, %f4, %f48
++1:	FREG_FROB(f18,f20,f22,f24,f26,f28,f30,f32,f34)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f34,f36,f38,f40,f42,f44,f46,f0, f2)
++	STORE_JUMP(o0, f48, 41f) membar #Sync
++2:	FREG_FROB(f34,f36,f38,f40,f42,f44,f46,f0, f2)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f2, f4, f6, f8, f10,f12,f14,f16,f18)
++	STORE_JUMP(o0, f48, 49f) membar #Sync
++3:	FREG_FROB(f2, f4, f6, f8, f10,f12,f14,f16,f18)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f18,f20,f22,f24,f26,f28,f30,f32,f34)
++	STORE_JUMP(o0, f48, 57f) membar #Sync
++
++1:	FREG_FROB(f4, f6, f8, f10,f12,f14,f16,f18,f20)
++	LOOP_CHUNK1(o1, o0, o4, 1f)
++	FREG_FROB(f20,f22,f24,f26,f28,f30,f32,f34,f36)
++	LOOP_CHUNK2(o1, o0, o4, 2f)
++	FREG_FROB(f36,f38,f40,f42,f44,f46,f0, f2, f4)
++	LOOP_CHUNK3(o1, o0, o4, 3f)
++	ba,pt		%xcc, 1b+4
++	 faligndata	%f4, %f6, %f48
++1:	FREG_FROB(f20,f22,f24,f26,f28,f30,f32,f34,f36)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f36,f38,f40,f42,f44,f46,f0, f2, f4)
++	STORE_JUMP(o0, f48, 42f) membar #Sync
++2:	FREG_FROB(f36,f38,f40,f42,f44,f46,f0, f2, f4)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f4, f6, f8, f10,f12,f14,f16,f18,f20)
++	STORE_JUMP(o0, f48, 50f) membar #Sync
++3:	FREG_FROB(f4, f6, f8, f10,f12,f14,f16,f18,f20)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f20,f22,f24,f26,f28,f30,f32,f34,f36)
++	STORE_JUMP(o0, f48, 58f) membar #Sync
++
++1:	FREG_FROB(f6, f8, f10,f12,f14,f16,f18,f20,f22)
++	LOOP_CHUNK1(o1, o0, o4, 1f)
++	FREG_FROB(f22,f24,f26,f28,f30,f32,f34,f36,f38)
++	LOOP_CHUNK2(o1, o0, o4, 2f)
++	FREG_FROB(f38,f40,f42,f44,f46,f0, f2, f4, f6) 
++	LOOP_CHUNK3(o1, o0, o4, 3f)
++	ba,pt		%xcc, 1b+4
++	 faligndata	%f6, %f8, %f48
++1:	FREG_FROB(f22,f24,f26,f28,f30,f32,f34,f36,f38)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f38,f40,f42,f44,f46,f0, f2, f4, f6)
++	STORE_JUMP(o0, f48, 43f) membar #Sync
++2:	FREG_FROB(f38,f40,f42,f44,f46,f0, f2, f4, f6)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f6, f8, f10,f12,f14,f16,f18,f20,f22)
++	STORE_JUMP(o0, f48, 51f) membar #Sync
++3:	FREG_FROB(f6, f8, f10,f12,f14,f16,f18,f20,f22)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f22,f24,f26,f28,f30,f32,f34,f36,f38)
++	STORE_JUMP(o0, f48, 59f) membar #Sync
++
++1:	FREG_FROB(f8, f10,f12,f14,f16,f18,f20,f22,f24)
++	LOOP_CHUNK1(o1, o0, o4, 1f)
++	FREG_FROB(f24,f26,f28,f30,f32,f34,f36,f38,f40)
++	LOOP_CHUNK2(o1, o0, o4, 2f)
++	FREG_FROB(f40,f42,f44,f46,f0, f2, f4, f6, f8)
++	LOOP_CHUNK3(o1, o0, o4, 3f)
++	ba,pt		%xcc, 1b+4
++	 faligndata	%f8, %f10, %f48
++1:	FREG_FROB(f24,f26,f28,f30,f32,f34,f36,f38,f40)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f40,f42,f44,f46,f0, f2, f4, f6, f8)
++	STORE_JUMP(o0, f48, 44f) membar #Sync
++2:	FREG_FROB(f40,f42,f44,f46,f0, f2, f4, f6, f8)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f8, f10,f12,f14,f16,f18,f20,f22,f24)
++	STORE_JUMP(o0, f48, 52f) membar #Sync
++3:	FREG_FROB(f8, f10,f12,f14,f16,f18,f20,f22,f24)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f24,f26,f28,f30,f32,f34,f36,f38,f40)
++	STORE_JUMP(o0, f48, 60f) membar #Sync
++
++1:	FREG_FROB(f10,f12,f14,f16,f18,f20,f22,f24,f26)
++	LOOP_CHUNK1(o1, o0, o4, 1f)
++	FREG_FROB(f26,f28,f30,f32,f34,f36,f38,f40,f42)
++	LOOP_CHUNK2(o1, o0, o4, 2f)
++	FREG_FROB(f42,f44,f46,f0, f2, f4, f6, f8, f10)
++	LOOP_CHUNK3(o1, o0, o4, 3f)
++	ba,pt		%xcc, 1b+4
++	 faligndata	%f10, %f12, %f48
++1:	FREG_FROB(f26,f28,f30,f32,f34,f36,f38,f40,f42)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f42,f44,f46,f0, f2, f4, f6, f8, f10)
++	STORE_JUMP(o0, f48, 45f) membar #Sync
++2:	FREG_FROB(f42,f44,f46,f0, f2, f4, f6, f8, f10)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f10,f12,f14,f16,f18,f20,f22,f24,f26)
++	STORE_JUMP(o0, f48, 53f) membar #Sync
++3:	FREG_FROB(f10,f12,f14,f16,f18,f20,f22,f24,f26)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f26,f28,f30,f32,f34,f36,f38,f40,f42)
++	STORE_JUMP(o0, f48, 61f) membar #Sync
++
++1:	FREG_FROB(f12,f14,f16,f18,f20,f22,f24,f26,f28)
++	LOOP_CHUNK1(o1, o0, o4, 1f)
++	FREG_FROB(f28,f30,f32,f34,f36,f38,f40,f42,f44)
++	LOOP_CHUNK2(o1, o0, o4, 2f)
++	FREG_FROB(f44,f46,f0, f2, f4, f6, f8, f10,f12)
++	LOOP_CHUNK3(o1, o0, o4, 3f)
++	ba,pt		%xcc, 1b+4
++	 faligndata	%f12, %f14, %f48
++1:	FREG_FROB(f28,f30,f32,f34,f36,f38,f40,f42,f44)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f44,f46,f0, f2, f4, f6, f8, f10,f12)
++	STORE_JUMP(o0, f48, 46f) membar #Sync
++2:	FREG_FROB(f44,f46,f0, f2, f4, f6, f8, f10,f12)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f12,f14,f16,f18,f20,f22,f24,f26,f28)
++	STORE_JUMP(o0, f48, 54f) membar #Sync
++3:	FREG_FROB(f12,f14,f16,f18,f20,f22,f24,f26,f28)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f28,f30,f32,f34,f36,f38,f40,f42,f44)
++	STORE_JUMP(o0, f48, 62f) membar #Sync
++
++1:	FREG_FROB(f14,f16,f18,f20,f22,f24,f26,f28,f30)
++	LOOP_CHUNK1(o1, o0, o4, 1f)
++	FREG_FROB(f30,f32,f34,f36,f38,f40,f42,f44,f46)
++	LOOP_CHUNK2(o1, o0, o4, 2f)
++	FREG_FROB(f46,f0, f2, f4, f6, f8, f10,f12,f14)
++	LOOP_CHUNK3(o1, o0, o4, 3f)
++	ba,pt		%xcc, 1b+4
++	 faligndata	%f14, %f16, %f48
++1:	FREG_FROB(f30,f32,f34,f36,f38,f40,f42,f44,f46)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f46,f0, f2, f4, f6, f8, f10,f12,f14)
++	STORE_JUMP(o0, f48, 47f) membar #Sync
++2:	FREG_FROB(f46,f0, f2, f4, f6, f8, f10,f12,f14)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f14,f16,f18,f20,f22,f24,f26,f28,f30)
++	STORE_JUMP(o0, f48, 55f) membar #Sync
++3:	FREG_FROB(f14,f16,f18,f20,f22,f24,f26,f28,f30)
++	STORE_SYNC(o0, f48) membar #Sync
++	FREG_FROB(f30,f32,f34,f36,f38,f40,f42,f44,f46)
++	STORE_JUMP(o0, f48, 63f) membar #Sync
++
++40:	FINISH_VISCHUNK(o0, f0,  f2,  g3)
++41:	FINISH_VISCHUNK(o0, f2,  f4,  g3)
++42:	FINISH_VISCHUNK(o0, f4,  f6,  g3)
++43:	FINISH_VISCHUNK(o0, f6,  f8,  g3)
++44:	FINISH_VISCHUNK(o0, f8,  f10, g3)
++45:	FINISH_VISCHUNK(o0, f10, f12, g3)
++46:	FINISH_VISCHUNK(o0, f12, f14, g3)
++47:	UNEVEN_VISCHUNK(o0, f14, f0,  g3)
++48:	FINISH_VISCHUNK(o0, f16, f18, g3)
++49:	FINISH_VISCHUNK(o0, f18, f20, g3)
++50:	FINISH_VISCHUNK(o0, f20, f22, g3)
++51:	FINISH_VISCHUNK(o0, f22, f24, g3)
++52:	FINISH_VISCHUNK(o0, f24, f26, g3)
++53:	FINISH_VISCHUNK(o0, f26, f28, g3)
++54:	FINISH_VISCHUNK(o0, f28, f30, g3)
++55:	UNEVEN_VISCHUNK(o0, f30, f0,  g3)
++56:	FINISH_VISCHUNK(o0, f32, f34, g3)
++57:	FINISH_VISCHUNK(o0, f34, f36, g3)
++58:	FINISH_VISCHUNK(o0, f36, f38, g3)
++59:	FINISH_VISCHUNK(o0, f38, f40, g3)
++60:	FINISH_VISCHUNK(o0, f40, f42, g3)
++61:	FINISH_VISCHUNK(o0, f42, f44, g3)
++62:	FINISH_VISCHUNK(o0, f44, f46, g3)
++63:	UNEVEN_VISCHUNK_LAST(o0, f46, f0,  g3)
++
++93:	EX_LD(LOAD(ldd, %o1, %f2))
++	add		%o1, 8, %o1
++	subcc		%g3, 8, %g3
++	faligndata	%f0, %f2, %f8
++	EX_ST(STORE(std, %f8, %o0))
++	bl,pn		%xcc, 95f
++	 add		%o0, 8, %o0
++	EX_LD(LOAD(ldd, %o1, %f0))
++	add		%o1, 8, %o1
++	subcc		%g3, 8, %g3
++	faligndata	%f2, %f0, %f8
++	EX_ST(STORE(std, %f8, %o0))
++	bge,pt		%xcc, 93b
++	 add		%o0, 8, %o0
++
++95:	brz,pt		%o2, 2f
++	 mov		%g1, %o1
++
++1:	EX_LD(LOAD(ldub, %o1, %o3))
++	add		%o1, 1, %o1
++	subcc		%o2, 1, %o2
++	EX_ST(STORE(stb, %o3, %o0))
++	bne,pt		%xcc, 1b
++	 add		%o0, 1, %o0
++
++2:	membar		#StoreLoad | #StoreStore
++	VISExit
++	retl
++	 mov		EX_RETVAL(%g5), %o0
++
++	.align		64
++70:	/* 16 < len <= (5 * 64) */
++	bne,pn		%XCC, 75f
++	 sub		%o0, %o1, %o3
++
++72:	andn		%o2, 0xf, %o4
++	and		%o2, 0xf, %o2
++1:	EX_LD(LOAD(ldx, %o1 + 0x00, %o5))
++	EX_LD(LOAD(ldx, %o1 + 0x08, %g1))
++	subcc		%o4, 0x10, %o4
++	EX_ST(STORE(stx, %o5, %o1 + %o3))
++	add		%o1, 0x8, %o1
++	EX_ST(STORE(stx, %g1, %o1 + %o3))
++	bgu,pt		%XCC, 1b
++	 add		%o1, 0x8, %o1
++73:	andcc		%o2, 0x8, %g0
++	be,pt		%XCC, 1f
++	 nop
++	EX_LD(LOAD(ldx, %o1, %o5))
++	sub		%o2, 0x8, %o2
++	EX_ST(STORE(stx, %o5, %o1 + %o3))
++	add		%o1, 0x8, %o1
++1:	andcc		%o2, 0x4, %g0
++	be,pt		%XCC, 1f
++	 nop
++	EX_LD(LOAD(lduw, %o1, %o5))
++	sub		%o2, 0x4, %o2
++	EX_ST(STORE(stw, %o5, %o1 + %o3))
++	add		%o1, 0x4, %o1
++1:	cmp		%o2, 0
++	be,pt		%XCC, 85f
++	 nop
++	ba,pt		%xcc, 90f
++	 nop
++
++75:	andcc		%o0, 0x7, %g1
++	sub		%g1, 0x8, %g1
++	be,pn		%icc, 2f
++	 sub		%g0, %g1, %g1
++	sub		%o2, %g1, %o2
++
++1:	EX_LD(LOAD(ldub, %o1, %o5))
++	subcc		%g1, 1, %g1
++	EX_ST(STORE(stb, %o5, %o1 + %o3))
++	bgu,pt		%icc, 1b
++	 add		%o1, 1, %o1
++
++2:	add		%o1, %o3, %o0
++	andcc		%o1, 0x7, %g1
++	bne,pt		%icc, 8f
++	 sll		%g1, 3, %g1
++
++	cmp		%o2, 16
++	bgeu,pt		%icc, 72b
++	 nop
++	ba,a,pt		%xcc, 73b
++
++8:	mov		64, %o3
++	andn		%o1, 0x7, %o1
++	EX_LD(LOAD(ldx, %o1, %g2))
++	sub		%o3, %g1, %o3
++	andn		%o2, 0x7, %o4
++	sllx		%g2, %g1, %g2
++1:	EX_LD(LOAD(ldx, %o1 + 0x8, %g3))
++	subcc		%o4, 0x8, %o4
++	add		%o1, 0x8, %o1
++	srlx		%g3, %o3, %o5
++	or		%o5, %g2, %o5
++	EX_ST(STORE(stx, %o5, %o0))
++	add		%o0, 0x8, %o0
++	bgu,pt		%icc, 1b
++	 sllx		%g3, %g1, %g2
++
++	srl		%g1, 3, %g1
++	andcc		%o2, 0x7, %o2
++	be,pn		%icc, 85f
++	 add		%o1, %g1, %o1
++	ba,pt		%xcc, 90f
++	 sub		%o0, %o1, %o3
++
++	.align		64
++80:	/* 0 < len <= 16 */
++	andcc		%o3, 0x3, %g0
++	bne,pn		%XCC, 90f
++	 sub		%o0, %o1, %o3
++
++1:	EX_LD(LOAD(lduw, %o1, %g1))
++	subcc		%o2, 4, %o2
++	EX_ST(STORE(stw, %g1, %o1 + %o3))
++	bgu,pt		%XCC, 1b
++	 add		%o1, 4, %o1
++
++85:	retl
++	 mov		EX_RETVAL(%g5), %o0
++
++	.align		32
++90:	EX_LD(LOAD(ldub, %o1, %g1))
++	subcc		%o2, 1, %o2
++	EX_ST(STORE(stb, %g1, %o1 + %o3))
++	bgu,pt		%XCC, 90b
++	 add		%o1, 1, %o1
++	retl
++	 mov		EX_RETVAL(%g5), %o0
+diff -Nru a/arch/sparc64/lib/U3copy_from_user.S b/arch/sparc64/lib/U3copy_from_user.S
+--- a/arch/sparc64/lib/U3copy_from_user.S	2004-08-26 13:29:59 +02:00
++++ b/arch/sparc64/lib/U3copy_from_user.S	2004-08-26 13:29:59 +02:00
+@@ -3,410 +3,20 @@
+  * Copyright (C) 1999, 2000, 2004 David S. Miller (davem at redhat.com)
+  */
+ 
+-#include <asm/visasm.h>
+-#include <asm/asi.h>
+-#include <asm/dcu.h>
+-#include <asm/spitfire.h>
++#define EX_LD(x)		\
++98:	x;			\
++	.section .fixup;	\
++	.align 4;		\
++99:	retl;			\
++	 mov	1, %o0;		\
++	.section __ex_table;	\
++	.align 4;		\
++	.word 98b, 99b;		\
++	.text;			\
++	.align 4;
++
++#define FUNC_NAME		U3copy_from_user
++#define LOAD(type,addr,dest)	type##a [addr] %asi, dest
++#define EX_RETVAL(x)		0
+ 
+-#define XCC xcc
+-
+-#define EXNV_RAW(x,y,a,b)		\
+-98:	x,y;				\
+-	.section .fixup;		\
+-	.align 4;			\
+-99:	ba U3cfu_fixup;			\
+-	 a, b, %o1;			\
+-	.section __ex_table;		\
+-	.align 4;			\
+-	.word 98b, 99b;			\
+-	.text;				\
+-	.align 4;
+-#define EXNV(x,y,a,b)			\
+-98:	x,y;				\
+-	.section .fixup;		\
+-	.align 4;			\
+-99:	add %o1, %o3, %o0;		\
+-	ba U3cfu_fixup;			\
+-	 a, b, %o1;			\
+-	.section __ex_table;		\
+-	.align 4;			\
+-	.word 98b, 99b;			\
+-	.text;				\
+-	.align 4;
+-#define EXNV4(x,y,a,b)			\
+-98:	x,y;				\
+-	.section .fixup;		\
+-	.align 4;			\
+-99:	add %o1, %o3, %o0;		\
+-	a, b, %o1;			\
+-	ba U3cfu_fixup;			\
+-	 add %o1, 4, %o1;		\
+-	.section __ex_table;		\
+-	.align 4;			\
+-	.word 98b, 99b;			\
+-	.text;				\
+-	.align 4;
+-#define EXNV8(x,y,a,b)			\
+-98:	x,y;				\
+-	.section .fixup;		\
+-	.align 4;			\
+-99:	add %o1, %o3, %o0;		\
+-	a, b, %o1;			\
+-	ba U3cfu_fixup;			\
+-	 add %o1, 8, %o1;		\
+-	.section __ex_table;		\
+-	.align 4;			\
+-	.word 98b, 99b;			\
+-	.text;				\
+-	.align 4;
+-#define EX(x,y,a,b)			\
+-98:	x,y;				\
+-	.section .fixup;		\
+-	.align 4;			\
+-99:	VISExitHalf;			\
+-	ba U3cfu_fixup;			\
+-	 a, b, %o1;			\
+-	.section __ex_table;		\
+-	.align 4;			\
+-	.word 98b, 99b;			\
+-	.text;				\
+-	.align 4;
+-#define EX2(x,y)			\
+-98:	x,y;				\
+-	.section .fixup;		\
+-	.align 4;			\
+-99:	VISExitHalf;			\
+-	and %o2, (0x40 - 1), %o1;	\
+-	add %o1, %o4, %o1;		\
+-	ba U3cfu_fixup;			\
+-	 add %o1, 0x1c0, %o1;		\
+-	.section __ex_table;		\
+-	.align 4;			\
+-	.word 98b, 99b;			\
+-	.text;				\
+-	.align 4;
+-#define EX3(x,y)			\
+-98:	x,y;				\
+-	.section .fixup;		\
+-	.align 4;			\
+-99:	VISExitHalf;			\
+-	and %o2, (0x40 - 1), %o1;	\
+-	sll %g3, 6, %g3;		\
+-	add %o1, 0x80, %o1;		\
+-	ba U3cfu_fixup;			\
+-	 add %o1, %g3, %o1;		\
+-	.section __ex_table;		\
+-	.align 4;			\
+-	.word 98b, 99b;			\
+-	.text;				\
+-	.align 4;
+-#define EX4(x,y)			\
+-98:	x,y;				\
+-	.section .fixup;		\
+-	.align 4;			\
+-99:	VISExitHalf;			\
+-	and %o2, (0x40 - 1), %o1;	\
+-	add %o1, 0x40, %o1;		\
+-	ba U3cfu_fixup;			\
+-	 add %o1, %g3, %o1;		\
+-	.section __ex_table;		\
+-	.align 4;			\
+-	.word 98b, 99b;			\
+-	.text;				\
+-	.align 4;
+-
+-	.register	%g2,#scratch
+-	.register	%g3,#scratch
+-
+-	/* Special/non-trivial issues of this code:
+-	 *
+-	 * 1) %o5 is preserved from VISEntryHalf to VISExitHalf
+-	 * 2) Only low 32 FPU registers are used so that only the
+-	 *    lower half of the FPU register set is dirtied by this
+-	 *    code.  This is especially important in the kernel.
+-	 * 3) This code never prefetches cachelines past the end
+-	 *    of the source buffer.
+-	 */
+-
+-	.text
+-	.align	32
+-
+-	/* The cheetah's flexible spine, oversized liver, enlarged heart,
+-	 * slender muscular body, and claws make it the swiftest hunter
+-	 * in Africa and the fastest animal on land.  Can reach speeds
+-	 * of up to 2.4GB per second.
+-	 */
+-
+-	.globl	U3copy_from_user
+-U3copy_from_user:	/* %o0=dst, %o1=src, %o2=len */
+-	cmp		%o2, 0
+-	be,pn		%XCC, 85f
+-	 or		%o0, %o1, %o3
+-	cmp		%o2, 16
+-	bleu,a,pn	%XCC, 80f
+-	 or		%o3, %o2, %o3
+-
+-	cmp		%o2, 256
+-	blu,pt		%XCC, 70f
+-	 andcc		%o3, 0x7, %g0
+-
+-	ba,pt		%xcc, 1f
+-	 andcc		%o0, 0x3f, %g2
+-
+-	/* Here len >= 256 and condition codes reflect execution
+-	 * of "andcc %o0, 0x7, %g2", done by caller.
+-	 */
+-	.align		64
+-1:
+-	/* Is 'dst' already aligned on an 64-byte boundary? */
+-	be,pt		%XCC, 2f
+-
+-	/* Compute abs((dst & 0x3f) - 0x40) into %g2.  This is the number
+-	 * of bytes to copy to make 'dst' 64-byte aligned.  We pre-
+-	 * subtract this from 'len'.
+-	 */
+-	 sub		%g2, 0x40, %g2
+-	sub		%g0, %g2, %g2
+-	sub		%o2, %g2, %o2
+-
+-	/* Copy %g2 bytes from src to dst, one byte at a time. */
+-1:	EXNV_RAW(lduba [%o1 + 0x00] %asi, %o3, add %o2, %g2)
+-	add		%o1, 0x1, %o1
+-	add		%o0, 0x1, %o0
+-	subcc		%g2, 0x1, %g2
+-
+-	bg,pt		%XCC, 1b
+-	 stb		%o3, [%o0 + -1]
+-
+-2:	VISEntryHalf
+-	and		%o1, 0x7, %g1
+-	ba,pt		%xcc, 1f
+-	 alignaddr	%o1, %g0, %o1
+-
+-	.align		64
+-1:
+-	membar		#StoreLoad | #StoreStore | #LoadStore
+-	prefetcha	[%o1 + 0x000] %asi, #one_read
+-	prefetcha	[%o1 + 0x040] %asi, #one_read
+-	andn		%o2, (0x40 - 1), %o4
+-	prefetcha	[%o1 + 0x080] %asi, #one_read
+-	prefetcha	[%o1 + 0x0c0] %asi, #one_read
+-	EX(ldda [%o1 + 0x000] %asi, %f0, add %o2, %g0)
+-	prefetcha	[%o1 + 0x100] %asi, #one_read
+-	EX(ldda [%o1 + 0x008] %asi, %f2, add %o2, %g0)
+-	prefetcha	[%o1 + 0x140] %asi, #one_read
+-	EX(ldda [%o1 + 0x010] %asi, %f4, add %o2, %g0)
+-	prefetcha	[%o1 + 0x180] %asi, #one_read
+-	faligndata	%f0, %f2, %f16
+-	EX(ldda [%o1 + 0x018] %asi, %f6, add %o2, %g0)
+-	faligndata	%f2, %f4, %f18
+-	EX(ldda [%o1 + 0x020] %asi, %f8, add %o2, %g0)
+-	faligndata	%f4, %f6, %f20
+-	EX(ldda [%o1 + 0x028] %asi, %f10, add %o2, %g0)
+-	faligndata	%f6, %f8, %f22
+-
+-	EX(ldda [%o1 + 0x030] %asi, %f12, add %o2, %g0)
+-	faligndata	%f8, %f10, %f24
+-	EX(ldda [%o1 + 0x038] %asi, %f14, add %o2, %g0)
+-	faligndata	%f10, %f12, %f26
+-	EX(ldda [%o1 + 0x040] %asi, %f0, add %o2, %g0)
+-
+-	sub		%o4, 0x80, %o4
+-	add		%o1, 0x40, %o1
+-	ba,pt		%xcc, 1f
+-	 srl		%o4, 6, %o3
+-
+-	.align		64
+-1:
+-	EX3(ldda [%o1 + 0x008] %asi, %f2)
+-	faligndata	%f12, %f14, %f28
+-	EX3(ldda [%o1 + 0x010] %asi, %f4)
+-	faligndata	%f14, %f0, %f30
+-	stda		%f16, [%o0] ASI_BLK_P
+-	EX3(ldda [%o1 + 0x018] %asi, %f6)
+-	faligndata	%f0, %f2, %f16
+-
+-	EX3(ldda [%o1 + 0x020] %asi, %f8)
+-	faligndata	%f2, %f4, %f18
+-	EX3(ldda [%o1 + 0x028] %asi, %f10)
+-	faligndata	%f4, %f6, %f20
+-	EX3(ldda [%o1 + 0x030] %asi, %f12)
+-	faligndata	%f6, %f8, %f22
+-	EX3(ldda [%o1 + 0x038] %asi, %f14)
+-	faligndata	%f8, %f10, %f24
+-
+-	EX3(ldda [%o1 + 0x040] %asi, %f0)
+-	prefetcha	[%o1 + 0x180] %asi, #one_read
+-	faligndata	%f10, %f12, %f26
+-	subcc		%o3, 0x01, %o3
+-	add		%o1, 0x40, %o1
+-	bg,pt		%XCC, 1b
+-	 add		%o0, 0x40, %o0
+-
+-	/* Finally we copy the last full 64-byte block. */
+-	EX3(ldda [%o1 + 0x008] %asi, %f2)
+-	faligndata	%f12, %f14, %f28
+-	EX3(ldda [%o1 + 0x010] %asi, %f4)
+-	faligndata	%f14, %f0, %f30
+-	stda		%f16, [%o0] ASI_BLK_P
+-	EX3(ldda [%o1 + 0x018] %asi, %f6)
+-	faligndata	%f0, %f2, %f16
+-	EX3(ldda [%o1 + 0x020] %asi, %f8)
+-	faligndata	%f2, %f4, %f18
+-	EX3(ldda [%o1 + 0x028] %asi, %f10)
+-	faligndata	%f4, %f6, %f20
+-	EX3(ldda [%o1 + 0x030] %asi, %f12)
+-	faligndata	%f6, %f8, %f22
+-	EX3(ldda [%o1 + 0x038] %asi, %f14)
+-	faligndata	%f8, %f10, %f24
+-	cmp		%g1, 0
+-	be,pt		%XCC, 1f
+-	 add		%o0, 0x40, %o0
+-	EX4(ldda [%o1 + 0x040] %asi, %f0)
+-1:	faligndata	%f10, %f12, %f26
+-	faligndata	%f12, %f14, %f28
+-	faligndata	%f14, %f0, %f30
+-	stda		%f16, [%o0] ASI_BLK_P
+-	add		%o0, 0x40, %o0
+-	add		%o1, 0x40, %o1
+-
+-	membar		#Sync
+-
+-	/* Now we copy the (len modulo 64) bytes at the end.
+-	 * Note how we borrow the %f0 loaded above.
+-	 *
+-	 * Also notice how this code is careful not to perform a
+-	 * load past the end of the src buffer.
+-	 */
+-	and		%o2, 0x3f, %o2
+-	andcc		%o2, 0x38, %g2
+-	be,pn		%XCC, 10f
+-	 subcc		%g2, 0x8, %g2
+-	be,pn		%XCC, 10f
+-	 cmp		%g1, 0
+-
+-	be,a,pt		%XCC, 1f
+-	 EX(ldda [%o1 + 0x00] %asi, %f0, add %o2, %g0)
+-
+-1:	EX(ldda [%o1 + 0x08] %asi, %f2, add %o2, %g0)
+-	add		%o1, 0x8, %o1
+-	sub		%o2, 0x8, %o2
+-	subcc		%g2, 0x8, %g2
+-	faligndata	%f0, %f2, %f8
+-	std		%f8, [%o0 + 0x00]
+-	be,pn		%XCC, 10f
+-	 add		%o0, 0x8, %o0
+-	EX(ldda [%o1 + 0x08] %asi, %f0, add %o2, %g0)
+-	add		%o1, 0x8, %o1
+-	sub		%o2, 0x8, %o2
+-	subcc		%g2, 0x8, %g2
+-	faligndata	%f2, %f0, %f8
+-	std		%f8, [%o0 + 0x00]
+-	bne,pn		%XCC, 1b
+-	 add		%o0, 0x8, %o0
+-
+-	/* If anything is left, we copy it one byte at a time.
+-	 * Note that %g1 is (src & 0x3) saved above before the
+-	 * alignaddr was performed.
+-	 */
+-10:
+-	cmp		%o2, 0
+-	add		%o1, %g1, %o1
+-	VISExitHalf
+-	be,pn		%XCC, 85f
+-	 sub		%o0, %o1, %o3
+-
+-	andcc		%g1, 0x7, %g0
+-	bne,pn		%icc, 90f
+-	 andcc		%o2, 0x8, %g0
+-	be,pt		%icc, 1f
+-	 nop
+-	EXNV(ldxa [%o1] %asi, %o5, add %o2, %g0)
+-	stx		%o5, [%o1 + %o3]
+-	add		%o1, 0x8, %o1
+-
+-1:	andcc		%o2, 0x4, %g0
+-	be,pt		%icc, 1f
+-	 nop
+-	EXNV(lduwa [%o1] %asi, %o5, and %o2, 0x7)
+-	stw		%o5, [%o1 + %o3]
+-	add		%o1, 0x4, %o1
+-
+-1:	andcc		%o2, 0x2, %g0
+-	be,pt		%icc, 1f
+-	 nop
+-	EXNV(lduha [%o1] %asi, %o5, and %o2, 0x3)
+-	sth		%o5, [%o1 + %o3]
+-	add		%o1, 0x2, %o1
+-
+-1:	andcc		%o2, 0x1, %g0
+-	be,pt		%icc, 85f
+-	 nop
+-	EXNV(lduba [%o1] %asi, %o5, and %o2, 0x1)
+-	ba,pt		%xcc, 85f
+-	 stb		%o5, [%o1 + %o3]
+-
+-70: /* 16 < len <= 64 */
+-	bne,pn		%XCC, 90f
+-	 sub		%o0, %o1, %o3
+-
+-	andn		%o2, 0x7, %o4
+-	and		%o2, 0x7, %o2
+-1:	subcc		%o4, 0x8, %o4
+-	EXNV8(ldxa [%o1] %asi, %o5, add %o2, %o4)
+-	stx		%o5, [%o1 + %o3]
+-	bgu,pt		%XCC, 1b
+-	 add		%o1, 0x8, %o1
+-	andcc		%o2, 0x4, %g0
+-	be,pt		%XCC, 1f
+-	 nop
+-	sub		%o2, 0x4, %o2
+-	EXNV4(lduwa [%o1] %asi, %o5, add %o2, %g0)
+-	stw		%o5, [%o1 + %o3]
+-	add		%o1, 0x4, %o1
+-1:	cmp		%o2, 0
+-	be,pt		%XCC, 85f
+-	 nop
+-	ba,pt		%xcc, 90f
+-	 nop
+-
+-80: /* 0 < len <= 16 */
+-	andcc		%o3, 0x3, %g0
+-	bne,pn		%XCC, 90f
+-	 sub		%o0, %o1, %o3
+-
+-1:
+-	subcc		%o2, 4, %o2
+-	EXNV(lduwa [%o1] %asi, %g1, add %o2, %g0)
+-	stw		%g1, [%o1 + %o3]
+-	bgu,pt		%XCC, 1b
+-	 add		%o1, 4, %o1
+-
+-85:	retl
+-	 clr		%o0
+-
+-	.align	32
+-90:
+-	subcc		%o2, 1, %o2
+-	EXNV(lduba [%o1] %asi, %g1, add %o2, %g0)
+-	stb		%g1, [%o1 + %o3]
+-	bgu,pt		%XCC, 90b
+-	 add		%o1, 1, %o1
+-	retl
+-	 clr		%o0
+-
+-U3cfu_fixup:
+-	/* Since this is copy_from_user(), zero out the rest of the
+-	 * kernel buffer.
+-	 */
+-	cmp		%o1, 0
+-	ble,pn		%icc, 2f
+-	 mov		%o1, %g2
+-
+-1:	subcc		%g2, 1, %g2
+-	stb		%g0, [%o0]
+-	bne,pt		%icc, 1b
+-	 add		%o0, 1, %o0
+-
+-2:	retl
+-	 mov		%o1, %o0
++#include "U3memcpy.S"
+diff -Nru a/arch/sparc64/lib/U3copy_in_user.S b/arch/sparc64/lib/U3copy_in_user.S
+--- a/arch/sparc64/lib/U3copy_in_user.S	2004-08-26 13:29:59 +02:00
++++ /dev/null	Wed Dec 31 16:00:00 196900
+@@ -1,140 +0,0 @@
+-/* U3copy_in_user.S: UltraSparc-III optimized memcpy.
+- *
+- * Copyright (C) 1999, 2000, 2004 David S. Miller (davem at redhat.com)
+- */
+-
+-#include <asm/visasm.h>
+-#include <asm/asi.h>
+-#include <asm/dcu.h>
+-#include <asm/spitfire.h>
+-
+-#define XCC xcc
+-
+-#define EXNV(x,y,a,b)	\
+-98:	x,y;				\
+-	.section .fixup;		\
+-	.align 4;			\
+-99:	retl;				\
+-	 a, b, %o0;			\
+-	.section __ex_table;		\
+-	.align 4;			\
+-	.word 98b, 99b;			\
+-	.text;				\
+-	.align 4;
+-#define EXNV1(x,y,a,b)			\
+-98:	x,y;				\
+-	.section .fixup;		\
+-	.align 4;			\
+-99:	a, b, %o0;			\
+-	retl;				\
+-	 add %o0, 1, %o0;		\
+-	.section __ex_table;		\
+-	.align 4;			\
+-	.word 98b, 99b;			\
+-	.text;				\
+-	.align 4;
+-#define EXNV4(x,y,a,b)			\
+-98:	x,y;				\
+-	.section .fixup;		\
+-	.align 4;			\
+-99:	a, b, %o0;			\
+-	retl;				\
+-	 add %o0, 4, %o0;		\
+-	.section __ex_table;		\
+-	.align 4;			\
+-	.word 98b, 99b;			\
+-	.text;				\
+-	.align 4;
+-#define EXNV8(x,y,a,b)			\
+-98:	x,y;				\
+-	.section .fixup;		\
+-	.align 4;			\
+-99:	a, b, %o0;			\
+-	retl;				\
+-	 add %o0, 8, %o0;		\
+-	.section __ex_table;		\
+-	.align 4;			\
+-	.word 98b, 99b;			\
+-	.text;				\
+-	.align 4;
+-
+-	.register	%g2,#scratch
+-	.register	%g3,#scratch
+-
+-	.text
+-	.align	32
+-
+-	/* Don't try to get too fancy here, just nice and
+-	 * simple.  This is predominantly used for well aligned
+-	 * small copies in the compat layer.  It is also used
+-	 * to copy register windows around during thread cloning.
+-	 */
+-
+-	.globl	U3copy_in_user
+-U3copy_in_user:	/* %o0=dst, %o1=src, %o2=len */
+-	/* Writing to %asi is _expensive_ so we hardcode it.
+-	 * Reading %asi to check for KERNEL_DS is comparatively
+-	 * cheap.
+-	 */
+-	rd		%asi, %g1
+-	cmp		%g1, ASI_AIUS
+-	bne,pn		%icc, U3memcpy_user_stub
+-	 nop
+-
+-	cmp		%o2, 0
+-	be,pn		%XCC, out
+-	 or		%o0, %o1, %o3
+-	cmp		%o2, 16
+-	bleu,a,pn	%XCC, small_copy
+-	 or		%o3, %o2, %o3
+-
+-medium_copy: /* 16 < len <= 64 */
+-	andcc		%o3, 0x7, %g0
+-	bne,pn		%XCC, small_copy_unaligned
+-	 sub		%o0, %o1, %o3
+-
+-medium_copy_aligned:
+-	andn		%o2, 0x7, %o4
+-	and		%o2, 0x7, %o2
+-1:	subcc		%o4, 0x8, %o4
+-	EXNV8(ldxa [%o1] %asi, %o5, add %o4, %o2)
+-	EXNV8(stxa %o5, [%o1 + %o3] ASI_AIUS, add %o4, %o2)
+-	bgu,pt		%XCC, 1b
+-	 add		%o1, 0x8, %o1
+-	andcc		%o2, 0x4, %g0
+-	be,pt		%XCC, 1f
+-	 nop
+-	sub		%o2, 0x4, %o2
+-	EXNV4(lduwa [%o1] %asi, %o5, add %o4, %o2)
+-	EXNV4(stwa %o5, [%o1 + %o3] ASI_AIUS, add %o4, %o2)
+-	add		%o1, 0x4, %o1
+-1:	cmp		%o2, 0
+-	be,pt		%XCC, out
+-	 nop
+-	ba,pt		%xcc, small_copy_unaligned
+-	 nop
+-
+-small_copy: /* 0 < len <= 16 */
+-	andcc		%o3, 0x3, %g0
+-	bne,pn		%XCC, small_copy_unaligned
+-	 sub		%o0, %o1, %o3
+-
+-small_copy_aligned:
+-	subcc		%o2, 4, %o2
+-	EXNV4(lduwa [%o1] %asi, %g1, add %o2, %g0)
+-	EXNV4(stwa %g1, [%o1 + %o3] ASI_AIUS, add %o2, %g0)
+-	bgu,pt		%XCC, small_copy_aligned
+-	 add		%o1, 4, %o1
+-
+-out:	retl
+-	 clr		%o0
+-
+-	.align	32
+-small_copy_unaligned:
+-	subcc		%o2, 1, %o2
+-	EXNV1(lduba [%o1] %asi, %g1, add %o2, %g0)
+-	EXNV1(stba %g1, [%o1 + %o3] ASI_AIUS, add %o2, %g0)
+-	bgu,pt		%XCC, small_copy_unaligned
+-	 add		%o1, 1, %o1
+-	retl
+-	 clr		%o0
+diff -Nru a/arch/sparc64/lib/U3copy_to_user.S b/arch/sparc64/lib/U3copy_to_user.S
+--- a/arch/sparc64/lib/U3copy_to_user.S	2004-08-26 13:29:59 +02:00
++++ b/arch/sparc64/lib/U3copy_to_user.S	2004-08-26 13:29:59 +02:00
+@@ -1,415 +1,33 @@
+-/* U3copy_to_user.S: UltraSparc-III optimized memcpy.
++/* U3copy_to_user.S: UltraSparc-III optimized copy to userspace.
+  *
+  * Copyright (C) 1999, 2000, 2004 David S. Miller (davem at redhat.com)
+  */
+ 
+-#include <asm/visasm.h>
+-#include <asm/asi.h>
+-#include <asm/dcu.h>
+-#include <asm/spitfire.h>
++#define EX_ST(x)		\
++98:	x;			\
++	.section .fixup;	\
++	.align 4;		\
++99:	retl;			\
++	 mov	1, %o0;		\
++	.section __ex_table;	\
++	.align 4;		\
++	.word 98b, 99b;		\
++	.text;			\
++	.align 4;
++
++#define FUNC_NAME		U3copy_to_user
++#define STORE(type,src,addr)	type##a src, [addr] ASI_AIUS
++#define STORE_BLK(src,addr)	stda src, [addr] ASI_BLK_AIUS
++#define EX_RETVAL(x)		0
+ 
+-#define XCC xcc
+-
+-#define EXNV(x,y,a,b)	\
+-98:	x,y;				\
+-	.section .fixup;		\
+-	.align 4;			\
+-99:	retl;				\
+-	 a, b, %o0;			\
+-	.section __ex_table;		\
+-	.align 4;			\
+-	.word 98b, 99b;			\
+-	.text;				\
+-	.align 4;
+-#define EXNV2(x,y,a,b)	\
+-98:	x,y;				\
+-	.section .fixup;		\
+-	.align 4;			\
+-99:	a, b, %o0;			\
+-	retl;				\
+-	 add %o0, 1, %o0;		\
+-	.section __ex_table;		\
+-	.align 4;			\
+-	.word 98b, 99b;			\
+-	.text;				\
+-	.align 4;
+-#define EXNV3(x,y,a,b)	\
+-98:	x,y;				\
+-	.section .fixup;		\
+-	.align 4;			\
+-99:	a, b, %o0;			\
+-	retl;				\
+-	 add %o0, 4, %o0;		\
+-	.section __ex_table;		\
+-	.align 4;			\
+-	.word 98b, 99b;			\
+-	.text;				\
+-	.align 4;
+-#define EXNV4(x,y,a,b)	\
+-98:	x,y;				\
+-	.section .fixup;		\
+-	.align 4;			\
+-99:	a, b, %o0;			\
+-	retl;				\
+-	 add %o0, 8, %o0;		\
+-	.section __ex_table;		\
+-	.align 4;			\
+-	.word 98b, 99b;			\
+-	.text;				\
+-	.align 4;
+-#define EX(x,y,a,b)			\
+-98:	x,y;				\
+-	.section .fixup;		\
+-	.align 4;			\
+-99:	VISExitHalf;			\
+-	retl;				\
+-	 a, b, %o0;			\
+-	.section __ex_table;		\
+-	.align 4;			\
+-	.word 98b, 99b;			\
+-	.text;				\
+-	.align 4;
+-#define EXBLK1(x,y)			\
+-98:	x,y;				\
+-	.section .fixup;		\
+-	.align 4;			\
+-99:	VISExitHalf;			\
+-	add %o4, 0x1c0, %o1;		\
+-	and %o2, (0x40 - 1), %o2;	\
+-	retl;				\
+-	 add %o1, %o2, %o0;		\
+-	.section __ex_table;		\
+-	.align 4;			\
+-	.word 98b, 99b;			\
+-	.text;				\
+-	.align 4;
+-#define EXBLK2(x,y)			\
+-98:	x,y;				\
+-	.section .fixup;		\
+-	.align 4;			\
+-99:	VISExitHalf;			\
+-	sll %o3, 6, %o3;		\
+-	and %o2, (0x40 - 1), %o2;	\
+-	add %o3, 0x80, %o1;		\
+-	retl;				\
+-	 add %o1, %o2, %o0;		\
+-	.section __ex_table;		\
+-	.align 4;			\
+-	.word 98b, 99b;			\
+-	.text;				\
+-	.align 4;
+-#define EXBLK3(x,y)			\
+-98:	x,y;				\
+-	.section .fixup;		\
+-	.align 4;			\
+-99:	VISExitHalf;			\
+-	and %o2, (0x40 - 1), %o2;	\
+-	retl;				\
+-	 add %o2, 0x80, %o0;		\
+-	.section __ex_table;		\
+-	.align 4;			\
+-	.word 98b, 99b;			\
+-	.text;				\
+-	.align 4;
+-#define EXBLK4(x,y)			\
+-98:	x,y;				\
+-	.section .fixup;		\
+-	.align 4;			\
+-99:	VISExitHalf;			\
+-	and %o2, (0x40 - 1), %o2;	\
+-	retl;				\
+-	 add %o2, 0x40, %o0;		\
+-	.section __ex_table;		\
+-	.align 4;			\
+-	.word 98b, 99b;			\
+-	.text;				\
+-	.align 4;
+-
+-	.register	%g2,#scratch
+-	.register	%g3,#scratch
+-
+-	/* Special/non-trivial issues of this code:
+-	 *
+-	 * 1) %o5 is preserved from VISEntryHalf to VISExitHalf
+-	 * 2) Only low 32 FPU registers are used so that only the
+-	 *    lower half of the FPU register set is dirtied by this
+-	 *    code.  This is especially important in the kernel.
+-	 * 3) This code never prefetches cachelines past the end
+-	 *    of the source buffer.
+-	 */
+-
+-	.text
+-	.align	32
+-
+-	/* The cheetah's flexible spine, oversized liver, enlarged heart,
+-	 * slender muscular body, and claws make it the swiftest hunter
+-	 * in Africa and the fastest animal on land.  Can reach speeds
+-	 * of up to 2.4GB per second.
+-	 */
+-
+-	.globl	U3copy_to_user
+-U3copy_to_user:	/* %o0=dst, %o1=src, %o2=len */
+ 	/* Writing to %asi is _expensive_ so we hardcode it.
+ 	 * Reading %asi to check for KERNEL_DS is comparatively
+ 	 * cheap.
+ 	 */
+-	rd		%asi, %g1
+-	cmp		%g1, ASI_AIUS
+-	bne,pn		%icc, U3memcpy_user_stub
+-	 nop
+-
+-	cmp		%o2, 0
+-	be,pn		%XCC, 85f
+-	 or		%o0, %o1, %o3
+-	cmp		%o2, 16
+-	bleu,a,pn	%XCC, 80f
+-	 or		%o3, %o2, %o3
+-
+-	cmp		%o2, 256
+-	blu,pt		%XCC, 70f
+-	 andcc		%o3, 0x7, %g0
+-
+-	ba,pt		%xcc, 1f
+-	 andcc		%o0, 0x3f, %g2
+-
+-	/* Here len >= 256 and condition codes reflect execution
+-	 * of "andcc %o0, 0x7, %g2", done by caller.
+-	 */
+-	.align		64
+-1:
+-	/* Is 'dst' already aligned on an 64-byte boundary? */
+-	be,pt		%XCC, 2f
+-
+-	/* Compute abs((dst & 0x3f) - 0x40) into %g2.  This is the number
+-	 * of bytes to copy to make 'dst' 64-byte aligned.  We pre-
+-	 * subtract this from 'len'.
+-	 */
+-	 sub		%g2, 0x40, %g2
+-	sub		%g0, %g2, %g2
+-	sub		%o2, %g2, %o2
+-
+-	/* Copy %g2 bytes from src to dst, one byte at a time. */
+-1:	ldub		[%o1 + 0x00], %o3
+-	add		%o1, 0x1, %o1
+-	add		%o0, 0x1, %o0
+-	subcc		%g2, 0x1, %g2
+-
+-	bg,pt		%XCC, 1b
+-	 EXNV2(stba %o3, [%o0 + -1] %asi, add %o2, %g2)
+-
+-2:	VISEntryHalf
+-	and		%o1, 0x7, %g1
+-	ba,pt		%xcc, 1f
+-	 alignaddr	%o1, %g0, %o1
+-
+-	.align		64
+-1:
+-	membar		#StoreLoad | #StoreStore | #LoadStore
+-	prefetch	[%o1 + 0x000], #one_read
+-	prefetch	[%o1 + 0x040], #one_read
+-	andn		%o2, (0x40 - 1), %o4
+-	prefetch	[%o1 + 0x080], #one_read
+-	prefetch	[%o1 + 0x0c0], #one_read
+-	ldd		[%o1 + 0x000], %f0
+-	prefetch	[%o1 + 0x100], #one_read
+-	ldd		[%o1 + 0x008], %f2
+-	prefetch	[%o1 + 0x140], #one_read
+-	ldd		[%o1 + 0x010], %f4
+-	prefetch	[%o1 + 0x180], #one_read
+-	faligndata	%f0, %f2, %f16
+-	ldd		[%o1 + 0x018], %f6
+-	faligndata	%f2, %f4, %f18
+-	ldd		[%o1 + 0x020], %f8
+-	faligndata	%f4, %f6, %f20
+-	ldd		[%o1 + 0x028], %f10
+-	faligndata	%f6, %f8, %f22
+-
+-	ldd		[%o1 + 0x030], %f12
+-	faligndata	%f8, %f10, %f24
+-	ldd		[%o1 + 0x038], %f14
+-	faligndata	%f10, %f12, %f26
+-	ldd		[%o1 + 0x040], %f0
+-
+-	sub		%o4, 0x80, %o4
+-	add		%o1, 0x40, %o1
+-	ba,pt		%xcc, 1f
+-	 srl		%o4, 6, %o3
+-
+-	.align		64
+-1:
+-	ldd		[%o1 + 0x008], %f2
+-	faligndata	%f12, %f14, %f28
+-	ldd		[%o1 + 0x010], %f4
+-	faligndata	%f14, %f0, %f30
+-	EXBLK2(stda %f16, [%o0] ASI_BLK_AIUS)
+-	ldd		[%o1 + 0x018], %f6
+-	faligndata	%f0, %f2, %f16
+-
+-	ldd		[%o1 + 0x020], %f8
+-	faligndata	%f2, %f4, %f18
+-	ldd		[%o1 + 0x028], %f10
+-	faligndata	%f4, %f6, %f20
+-	ldd		[%o1 + 0x030], %f12
+-	faligndata	%f6, %f8, %f22
+-	ldd		[%o1 + 0x038], %f14
+-	faligndata	%f8, %f10, %f24
+-
+-	ldd		[%o1 + 0x040], %f0
+-	prefetch	[%o1 + 0x180], #one_read
+-	faligndata	%f10, %f12, %f26
+-	subcc		%o3, 0x01, %o3
+-	add		%o1, 0x40, %o1
+-	bg,pt		%XCC, 1b
+-	 add		%o0, 0x40, %o0
+-
+-	/* Finally we copy the last full 64-byte block. */
+-	ldd		[%o1 + 0x008], %f2
+-	faligndata	%f12, %f14, %f28
+-	ldd		[%o1 + 0x010], %f4
+-	faligndata	%f14, %f0, %f30
+-	EXBLK3(stda %f16, [%o0] ASI_BLK_AIUS)
+-	ldd		[%o1 + 0x018], %f6
+-	faligndata	%f0, %f2, %f16
+-	ldd		[%o1 + 0x020], %f8
+-	faligndata	%f2, %f4, %f18
+-	ldd		[%o1 + 0x028], %f10
+-	faligndata	%f4, %f6, %f20
+-	ldd		[%o1 + 0x030], %f12
+-	faligndata	%f6, %f8, %f22
+-	ldd		[%o1 + 0x038], %f14
+-	faligndata	%f8, %f10, %f24
+-	cmp		%g1, 0
+-	be,pt		%XCC, 1f
+-	 add		%o0, 0x40, %o0
+-	ldd		[%o1 + 0x040], %f0
+-1:	faligndata	%f10, %f12, %f26
+-	faligndata	%f12, %f14, %f28
+-	faligndata	%f14, %f0, %f30
+-	EXBLK4(stda %f16, [%o0] ASI_BLK_AIUS)
+-	add		%o0, 0x40, %o0
+-	add		%o1, 0x40, %o1
+-
+-	membar		#Sync
+-
+-	/* Now we copy the (len modulo 64) bytes at the end.
+-	 * Note how we borrow the %f0 loaded above.
+-	 *
+-	 * Also notice how this code is careful not to perform a
+-	 * load past the end of the src buffer.
+-	 */
+-	and		%o2, 0x3f, %o2
+-	andcc		%o2, 0x38, %g2
+-	be,pn		%XCC, 2f
+-	 subcc		%g2, 0x8, %g2
+-	be,pn		%XCC, 2f
+-	 cmp		%g1, 0
+-
+-	be,a,pt		%XCC, 1f
+-	 ldd		[%o1 + 0x00], %f0
+-
+-1:	ldd		[%o1 + 0x08], %f2
+-	add		%o1, 0x8, %o1
+-	sub		%o2, 0x8, %o2
+-	subcc		%g2, 0x8, %g2
+-	faligndata	%f0, %f2, %f8
+-	EX(stda %f8, [%o0 + 0x00] %asi, add %o2, 0x8)
+-	be,pn		%XCC, 2f
+-	 add		%o0, 0x8, %o0
+-	ldd		[%o1 + 0x08], %f0
+-	add		%o1, 0x8, %o1
+-	sub		%o2, 0x8, %o2
+-	subcc		%g2, 0x8, %g2
+-	faligndata	%f2, %f0, %f8
+-	EX(stda %f8, [%o0 + 0x00] %asi, add %o2, 0x8)
+-	bne,pn		%XCC, 1b
+-	 add		%o0, 0x8, %o0
+-
+-	/* If anything is left, we copy it one byte at a time.
+-	 * Note that %g1 is (src & 0x3) saved above before the
+-	 * alignaddr was performed.
+-	 */
+-2:
+-	cmp		%o2, 0
+-	add		%o1, %g1, %o1
+-	VISExitHalf
+-	be,pn		%XCC, 85f
+-	 sub		%o0, %o1, %o3
+-
+-	andcc		%g1, 0x7, %g0
+-	bne,pn		%icc, 90f
+-	 andcc		%o2, 0x8, %g0
+-	be,pt		%icc, 1f
+-	 nop
+-	ldx		[%o1], %o5
+-	EXNV(stxa %o5, [%o1 + %o3] ASI_AIUS, add %o2, %g0)
+-	add		%o1, 0x8, %o1
+-
+-1:	andcc		%o2, 0x4, %g0
+-	be,pt		%icc, 1f
+-	 nop
+-	lduw		[%o1], %o5
+-	EXNV(stwa %o5, [%o1 + %o3] ASI_AIUS, and %o2, 0x7)
+-	add		%o1, 0x4, %o1
+-
+-1:	andcc		%o2, 0x2, %g0
+-	be,pt		%icc, 1f
+-	 nop
+-	lduh		[%o1], %o5
+-	EXNV(stha %o5, [%o1 + %o3] ASI_AIUS, and %o2, 0x3)
+-	add		%o1, 0x2, %o1
+-
+-1:	andcc		%o2, 0x1, %g0
+-	be,pt		%icc, 85f
+-	 nop
+-	ldub		[%o1], %o5
+-	ba,pt		%xcc, 85f
+-	 EXNV(stba %o5, [%o1 + %o3] ASI_AIUS, and %o2, 0x1)
+-
+-70: /* 16 < len <= 64 */
+-	bne,pn		%XCC, 90f
+-	 sub		%o0, %o1, %o3
+-
+-	andn		%o2, 0x7, %o4
+-	and		%o2, 0x7, %o2
+-1:	subcc		%o4, 0x8, %o4
+-	ldx		[%o1], %o5
+-	EXNV4(stxa %o5, [%o1 + %o3] ASI_AIUS, add %o2, %o4)
+-	bgu,pt		%XCC, 1b
+-	 add		%o1, 0x8, %o1
+-	andcc		%o2, 0x4, %g0
+-	be,pt		%XCC, 1f
+-	 nop
+-	sub		%o2, 0x4, %o2
+-	lduw		[%o1], %o5
+-	EXNV3(stwa %o5, [%o1 + %o3] ASI_AIUS, add %o2, %g0)
+-	add		%o1, 0x4, %o1
+-1:	cmp		%o2, 0
+-	be,pt		%XCC, 85f
+-	 nop
+-	ba,pt		%xcc, 90f
+-	 nop
+-
+-80: /* 0 < len <= 16 */
+-	andcc		%o3, 0x3, %g0
+-	bne,pn		%XCC, 90f
+-	 sub		%o0, %o1, %o3
+-
+-1:
+-	subcc		%o2, 4, %o2
+-	lduw		[%o1], %g1
+-	EXNV3(stwa %g1, [%o1 + %o3] ASI_AIUS, add %o2, %g0)
+-	bgu,pt		%XCC, 1b
+-	 add		%o1, 4, %o1
+-
+-85:	retl
+-	 clr		%o0
++#define PREAMBLE					\
++	rd		%asi, %g1;			\
++	cmp		%g1, ASI_AIUS;			\
++	bne,pn		%icc, memcpy_user_stub;		\
++	 nop;						\
+ 
+-	.align	32
+-90:
+-	subcc		%o2, 1, %o2
+-	ldub		[%o1], %g1
+-	EXNV2(stba %g1, [%o1 + %o3] ASI_AIUS, add %o2, %g0)
+-	bgu,pt		%XCC, 90b
+-	 add		%o1, 1, %o1
+-	retl
+-	 clr		%o0
++#include "U3memcpy.S"
+diff -Nru a/arch/sparc64/lib/U3memcpy.S b/arch/sparc64/lib/U3memcpy.S
+--- a/arch/sparc64/lib/U3memcpy.S	2004-08-26 13:29:59 +02:00
++++ b/arch/sparc64/lib/U3memcpy.S	2004-08-26 13:29:59 +02:00
+@@ -6,14 +6,50 @@
+ #ifdef __KERNEL__
+ #include <asm/visasm.h>
+ #include <asm/asi.h>
+-#include <asm/dcu.h>
+-#include <asm/spitfire.h>
+ #else
+ #define ASI_BLK_P 0xf0
+ #define FPRS_FEF  0x04
++#ifdef MEMCPY_DEBUG
++#define VISEntryHalf rd %fprs, %o5; wr %g0, FPRS_FEF, %fprs; \
++		     clr %g1; clr %g2; clr %g3; subcc %g0, %g0, %g0;
++#define VISExitHalf and %o5, FPRS_FEF, %o5; wr %o5, 0x0, %fprs
++#else
+ #define VISEntryHalf rd %fprs, %o5; wr %g0, FPRS_FEF, %fprs
+ #define VISExitHalf and %o5, FPRS_FEF, %o5; wr %o5, 0x0, %fprs
+ #endif
++#endif
++
++#ifndef EX_LD
++#define EX_LD(x)	x
++#endif
++
++#ifndef EX_ST
++#define EX_ST(x)	x
++#endif
++
++#ifndef EX_RETVAL
++#define EX_RETVAL(x)	x
++#endif
++
++#ifndef LOAD
++#define LOAD(type,addr,dest)	type [addr], dest
++#endif
++
++#ifndef STORE
++#define STORE(type,src,addr)	type src, [addr]
++#endif
++
++#ifndef STORE_BLK
++#define STORE_BLK(src,addr)	stda src, [addr] ASI_BLK_P
++#endif
++
++#ifndef FUNC_NAME
++#define FUNC_NAME	U3memcpy
++#endif
++
++#ifndef PREAMBLE
++#define PREAMBLE
++#endif
+ 
+ #ifndef XCC
+ #define XCC xcc
+@@ -33,7 +69,7 @@
+ 	 */
+ 
+ 	.text
+-	.align	32
++	.align		64
+ 
+ 	/* The cheetah's flexible spine, oversized liver, enlarged heart,
+ 	 * slender muscular body, and claws make it the swiftest hunter
+@@ -41,137 +77,157 @@
+ 	 * of up to 2.4GB per second.
+ 	 */
+ 
+-	.globl	U3memcpy
+-U3memcpy:	/* %o0=dst, %o1=src, %o2=len */
++	.globl	FUNC_NAME
++FUNC_NAME:	/* %o0=dst, %o1=src, %o2=len */
++	PREAMBLE
+ 	mov		%o0, %g5
+ 	cmp		%o2, 0
+ 	be,pn		%XCC, 85f
+ 	 or		%o0, %o1, %o3
+ 	cmp		%o2, 16
+-	bleu,a,pn	%XCC, 70f
++	blu,a,pn	%XCC, 80f
+ 	 or		%o3, %o2, %o3
+ 
+-	cmp		%o2, 256
+-	blu,pt		%XCC, 80f
++	cmp		%o2, (3 * 64)
++	blu,pt		%XCC, 70f
+ 	 andcc		%o3, 0x7, %g0
+ 
+-	ba,pt		%xcc, 1f
+-	 andcc		%o0, 0x3f, %g2
+-
+-	/* Here len >= 256 and condition codes reflect execution
+-	 * of "andcc %o0, 0x7, %g2", done by caller.
++	/* Clobbers o5/g1/g2/g3/g7/icc/xcc.  We must preserve
++	 * o5 from here until we hit VISExitHalf.
+ 	 */
+-	.align		64
+-1:
++	VISEntryHalf
++
+ 	/* Is 'dst' already aligned on an 64-byte boundary? */
++	andcc		%o0, 0x3f, %g2
+ 	be,pt		%XCC, 2f
+ 
+ 	/* Compute abs((dst & 0x3f) - 0x40) into %g2.  This is the number
+ 	 * of bytes to copy to make 'dst' 64-byte aligned.  We pre-
+ 	 * subtract this from 'len'.
+ 	 */
+-	 sub		%g2, 0x40, %g2
++	 sub		%o0, %o1, %o4
++	sub		%g2, 0x40, %g2
+ 	sub		%g0, %g2, %g2
+ 	sub		%o2, %g2, %o2
++	andcc		%g2, 0x7, %g1
++	be,pt		%icc, 2f
++	 and		%g2, 0x38, %g2
++
++1:	subcc		%g1, 0x1, %g1
++	EX_LD(LOAD(ldub, %o1 + 0x00, %o3))
++	EX_ST(STORE(stb, %o3, %o1 + %o4))
++	bgu,pt		%XCC, 1b
++	 add		%o1, 0x1, %o1
+ 
+-	/* Copy %g2 bytes from src to dst, one byte at a time. */
+-1:	ldub		[%o1 + 0x00], %o3
+-	add		%o1, 0x1, %o1
+-	add		%o0, 0x1, %o0
+-	subcc		%g2, 0x1, %g2
+-
+-	bg,pt		%XCC, 1b
+-	 stb		%o3, [%o0 + -1]
++	add		%o1, %o4, %o0
+ 
+-2:	VISEntryHalf
++2:	cmp		%g2, 0x0
+ 	and		%o1, 0x7, %g1
+-	ba,pt		%xcc, 1f
++	be,pt		%icc, 3f
+ 	 alignaddr	%o1, %g0, %o1
+ 
+-	.align		64
+-1:
+-	membar		#StoreLoad | #StoreStore | #LoadStore
+-	prefetch	[%o1 + 0x000], #one_read
+-	prefetch	[%o1 + 0x040], #one_read
++	EX_LD(LOAD(ldd, %o1, %f4))
++1:	EX_LD(LOAD(ldd, %o1 + 0x8, %f6))
++	add		%o1, 0x8, %o1
++	subcc		%g2, 0x8, %g2
++	faligndata	%f4, %f6, %f0
++	EX_ST(STORE(std, %f0, %o0))
++	be,pn		%icc, 3f
++	 add		%o0, 0x8, %o0
++
++	EX_LD(LOAD(ldd, %o1 + 0x8, %f4))
++	add		%o1, 0x8, %o1
++	subcc		%g2, 0x8, %g2
++	faligndata	%f6, %f4, %f2
++	EX_ST(STORE(std, %f2, %o0))
++	bne,pt		%icc, 1b
++	 add		%o0, 0x8, %o0
++
++3:	LOAD(prefetch, %o1 + 0x000, #one_read)
++	LOAD(prefetch, %o1 + 0x040, #one_read)
+ 	andn		%o2, (0x40 - 1), %o4
+-	prefetch	[%o1 + 0x080], #one_read
+-	prefetch	[%o1 + 0x0c0], #one_read
+-	ldd		[%o1 + 0x000], %f0
+-	prefetch	[%o1 + 0x100], #one_read
+-	ldd		[%o1 + 0x008], %f2
+-	prefetch	[%o1 + 0x140], #one_read
+-	ldd		[%o1 + 0x010], %f4
+-	prefetch	[%o1 + 0x180], #one_read
++	LOAD(prefetch, %o1 + 0x080, #one_read)
++	LOAD(prefetch, %o1 + 0x0c0, #one_read)
++	LOAD(prefetch, %o1 + 0x100, #one_read)
++	EX_LD(LOAD(ldd, %o1 + 0x000, %f0))
++	LOAD(prefetch, %o1 + 0x140, #one_read)
++	EX_LD(LOAD(ldd, %o1 + 0x008, %f2))
++	LOAD(prefetch, %o1 + 0x180, #one_read)
++	EX_LD(LOAD(ldd, %o1 + 0x010, %f4))
++	LOAD(prefetch, %o1 + 0x1c0, #one_read)
+ 	faligndata	%f0, %f2, %f16
+-	ldd		[%o1 + 0x018], %f6
++	EX_LD(LOAD(ldd, %o1 + 0x018, %f6))
+ 	faligndata	%f2, %f4, %f18
+-	ldd		[%o1 + 0x020], %f8
++	EX_LD(LOAD(ldd, %o1 + 0x020, %f8))
+ 	faligndata	%f4, %f6, %f20
+-	ldd		[%o1 + 0x028], %f10
++	EX_LD(LOAD(ldd, %o1 + 0x028, %f10))
+ 	faligndata	%f6, %f8, %f22
+ 
+-	ldd		[%o1 + 0x030], %f12
++	EX_LD(LOAD(ldd, %o1 + 0x030, %f12))
+ 	faligndata	%f8, %f10, %f24
+-	ldd		[%o1 + 0x038], %f14
++	EX_LD(LOAD(ldd, %o1 + 0x038, %f14))
+ 	faligndata	%f10, %f12, %f26
+-	ldd		[%o1 + 0x040], %f0
++	EX_LD(LOAD(ldd, %o1 + 0x040, %f0))
+ 
+-	sub		%o4, 0x80, %o4
++	subcc		%o4, 0x80, %o4
+ 	add		%o1, 0x40, %o1
+-	ba,pt		%xcc, 1f
++	bgu,pt		%XCC, 1f
+ 	 srl		%o4, 6, %o3
++	ba,pt		%xcc, 2f
++	 nop
+ 
+ 	.align		64
+ 1:
+-	ldd		[%o1 + 0x008], %f2
++	EX_LD(LOAD(ldd, %o1 + 0x008, %f2))
+ 	faligndata	%f12, %f14, %f28
+-	ldd		[%o1 + 0x010], %f4
++	EX_LD(LOAD(ldd, %o1 + 0x010, %f4))
+ 	faligndata	%f14, %f0, %f30
+-	stda		%f16, [%o0] ASI_BLK_P
+-	ldd		[%o1 + 0x018], %f6
++	EX_ST(STORE_BLK(%f16, %o0))
++	EX_LD(LOAD(ldd, %o1 + 0x018, %f6))
+ 	faligndata	%f0, %f2, %f16
++	add		%o0, 0x40, %o0
+ 
+-	ldd		[%o1 + 0x020], %f8
++	EX_LD(LOAD(ldd, %o1 + 0x020, %f8))
+ 	faligndata	%f2, %f4, %f18
+-	ldd		[%o1 + 0x028], %f10
++	EX_LD(LOAD(ldd, %o1 + 0x028, %f10))
+ 	faligndata	%f4, %f6, %f20
+-	ldd		[%o1 + 0x030], %f12
++	EX_LD(LOAD(ldd, %o1 + 0x030, %f12))
++	subcc		%o3, 0x01, %o3
+ 	faligndata	%f6, %f8, %f22
+-	ldd		[%o1 + 0x038], %f14
+-	faligndata	%f8, %f10, %f24
++	EX_LD(LOAD(ldd, %o1 + 0x038, %f14))
+ 
+-	ldd		[%o1 + 0x040], %f0
+-	prefetch	[%o1 + 0x180], #one_read
++	faligndata	%f8, %f10, %f24
++	EX_LD(LOAD(ldd, %o1 + 0x040, %f0))
++	LOAD(prefetch, %o1 + 0x1c0, #one_read)
+ 	faligndata	%f10, %f12, %f26
+-	subcc		%o3, 0x01, %o3
+-	add		%o1, 0x40, %o1
+ 	bg,pt		%XCC, 1b
+-	 add		%o0, 0x40, %o0
++	 add		%o1, 0x40, %o1
+ 
+ 	/* Finally we copy the last full 64-byte block. */
+-	ldd		[%o1 + 0x008], %f2
++2:
++	EX_LD(LOAD(ldd, %o1 + 0x008, %f2))
+ 	faligndata	%f12, %f14, %f28
+-	ldd		[%o1 + 0x010], %f4
++	EX_LD(LOAD(ldd, %o1 + 0x010, %f4))
+ 	faligndata	%f14, %f0, %f30
+-	stda		%f16, [%o0] ASI_BLK_P
+-	ldd		[%o1 + 0x018], %f6
++	EX_ST(STORE_BLK(%f16, %o0))
++	EX_LD(LOAD(ldd, %o1 + 0x018, %f6))
+ 	faligndata	%f0, %f2, %f16
+-	ldd		[%o1 + 0x020], %f8
++	EX_LD(LOAD(ldd, %o1 + 0x020, %f8))
+ 	faligndata	%f2, %f4, %f18
+-	ldd		[%o1 + 0x028], %f10
++	EX_LD(LOAD(ldd, %o1 + 0x028, %f10))
+ 	faligndata	%f4, %f6, %f20
+-	ldd		[%o1 + 0x030], %f12
++	EX_LD(LOAD(ldd, %o1 + 0x030, %f12))
+ 	faligndata	%f6, %f8, %f22
+-	ldd		[%o1 + 0x038], %f14
++	EX_LD(LOAD(ldd, %o1 + 0x038, %f14))
+ 	faligndata	%f8, %f10, %f24
+ 	cmp		%g1, 0
+ 	be,pt		%XCC, 1f
+ 	 add		%o0, 0x40, %o0
+-	ldd		[%o1 + 0x040], %f0
++	EX_LD(LOAD(ldd, %o1 + 0x040, %f0))
+ 1:	faligndata	%f10, %f12, %f26
+ 	faligndata	%f12, %f14, %f28
+ 	faligndata	%f14, %f0, %f30
+-	stda		%f16, [%o0] ASI_BLK_P
++	EX_ST(STORE_BLK(%f16, %o0))
+ 	add		%o0, 0x40, %o0
+ 	add		%o1, 0x40, %o1
+ 	membar		#Sync
+@@ -189,23 +245,22 @@
+ 	be,pn		%XCC, 2f
+ 	 cmp		%g1, 0
+ 
++	sub		%o2, %g2, %o2
+ 	be,a,pt		%XCC, 1f
+-	 ldd		[%o1 + 0x00], %f0
++	 EX_LD(LOAD(ldd, %o1 + 0x00, %f0))
+ 
+-1:	ldd		[%o1 + 0x08], %f2
++1:	EX_LD(LOAD(ldd, %o1 + 0x08, %f2))
+ 	add		%o1, 0x8, %o1
+-	sub		%o2, 0x8, %o2
+ 	subcc		%g2, 0x8, %g2
+ 	faligndata	%f0, %f2, %f8
+-	std		%f8, [%o0 + 0x00]
++	EX_ST(STORE(std, %f8, %o0))
+ 	be,pn		%XCC, 2f
+ 	 add		%o0, 0x8, %o0
+-	ldd		[%o1 + 0x08], %f0
++	EX_LD(LOAD(ldd, %o1 + 0x08, %f0))
+ 	add		%o1, 0x8, %o1
+-	sub		%o2, 0x8, %o2
+ 	subcc		%g2, 0x8, %g2
+ 	faligndata	%f2, %f0, %f8
+-	std		%f8, [%o0 + 0x00]
++	EX_ST(STORE(std, %f8, %o0))
+ 	bne,pn		%XCC, 1b
+ 	 add		%o0, 0x8, %o0
+ 
+@@ -225,48 +280,60 @@
+ 	 andcc		%o2, 0x8, %g0
+ 	be,pt		%icc, 1f
+ 	 nop
+-	ldx		[%o1], %o5
+-	stx		%o5, [%o1 + %o3]
++	EX_LD(LOAD(ldx, %o1, %o5))
++	EX_ST(STORE(stx, %o5, %o1 + %o3))
+ 	add		%o1, 0x8, %o1
+ 
+ 1:	andcc		%o2, 0x4, %g0
+ 	be,pt		%icc, 1f
+ 	 nop
+-	lduw		[%o1], %o5
+-	stw		%o5, [%o1 + %o3]
++	EX_LD(LOAD(lduw, %o1, %o5))
++	EX_ST(STORE(stw, %o5, %o1 + %o3))
+ 	add		%o1, 0x4, %o1
+ 
+ 1:	andcc		%o2, 0x2, %g0
+ 	be,pt		%icc, 1f
+ 	 nop
+-	lduh		[%o1], %o5
+-	sth		%o5, [%o1 + %o3]
++	EX_LD(LOAD(lduh, %o1, %o5))
++	EX_ST(STORE(sth, %o5, %o1 + %o3))
+ 	add		%o1, 0x2, %o1
+ 
+ 1:	andcc		%o2, 0x1, %g0
+ 	be,pt		%icc, 85f
+ 	 nop
+-	ldub		[%o1], %o5
++	EX_LD(LOAD(ldub, %o1, %o5))
+ 	ba,pt		%xcc, 85f
+-	 stb		%o5, [%o1 + %o3]
++	 EX_ST(STORE(stb, %o5, %o1 + %o3))
+ 
++	.align		64
+ 70: /* 16 < len <= 64 */
+-	bne,pn		%XCC, 90f
++	bne,pn		%XCC, 75f
+ 	 sub		%o0, %o1, %o3
+ 
+-	andn		%o2, 0x7, %o4
+-	and		%o2, 0x7, %o2
+-1:	subcc		%o4, 0x8, %o4
+-	ldx		[%o1], %o5
+-	stx		%o5, [%o1 + %o3]
++72:
++	andn		%o2, 0xf, %o4
++	and		%o2, 0xf, %o2
++1:	subcc		%o4, 0x10, %o4
++	EX_LD(LOAD(ldx, %o1 + 0x00, %o5))
++	EX_LD(LOAD(ldx, %o1 + 0x08, %g1))
++	EX_ST(STORE(stx, %o5, %o1 + %o3))
++	add		%o1, 0x8, %o1
++	EX_ST(STORE(stx, %g1, %o1 + %o3))
+ 	bgu,pt		%XCC, 1b
+ 	 add		%o1, 0x8, %o1
+-	andcc		%o2, 0x4, %g0
++73:	andcc		%o2, 0x8, %g0
++	be,pt		%XCC, 1f
++	 nop
++	sub		%o2, 0x8, %o2
++	EX_LD(LOAD(ldx, %o1, %o5))
++	EX_ST(STORE(stx, %o5, %o1 + %o3))
++	add		%o1, 0x8, %o1
++1:	andcc		%o2, 0x4, %g0
+ 	be,pt		%XCC, 1f
+ 	 nop
+ 	sub		%o2, 0x4, %o2
+-	lduw		[%o1], %o5
+-	stw		%o5, [%o1 + %o3]
++	EX_LD(LOAD(lduw, %o1, %o5))
++	EX_ST(STORE(stw, %o5, %o1 + %o3))
+ 	add		%o1, 0x4, %o1
+ 1:	cmp		%o2, 0
+ 	be,pt		%XCC, 85f
+@@ -274,6 +341,53 @@
+ 	ba,pt		%xcc, 90f
+ 	 nop
+ 
++75:
++	andcc		%o0, 0x7, %g1
++	sub		%g1, 0x8, %g1
++	be,pn		%icc, 2f
++	 sub		%g0, %g1, %g1
++	sub		%o2, %g1, %o2
++
++1:	subcc		%g1, 1, %g1
++	EX_LD(LOAD(ldub, %o1, %o5))
++	EX_ST(STORE(stb, %o5, %o1 + %o3))
++	bgu,pt		%icc, 1b
++	 add		%o1, 1, %o1
++
++2:	add		%o1, %o3, %o0
++	andcc		%o1, 0x7, %g1
++	bne,pt		%icc, 8f
++	 sll		%g1, 3, %g1
++
++	cmp		%o2, 16
++	bgeu,pt		%icc, 72b
++	 nop
++	ba,a,pt		%xcc, 73b
++
++8:	mov		64, %o3
++	andn		%o1, 0x7, %o1
++	EX_LD(LOAD(ldx, %o1, %g2))
++	sub		%o3, %g1, %o3
++	andn		%o2, 0x7, %o4
++	sllx		%g2, %g1, %g2
++1:	EX_LD(LOAD(ldx, %o1 + 0x8, %g3))
++	subcc		%o4, 0x8, %o4
++	add		%o1, 0x8, %o1
++	srlx		%g3, %o3, %o5
++	or		%o5, %g2, %o5
++	EX_ST(STORE(stx, %o5, %o0))
++	add		%o0, 0x8, %o0
++	bgu,pt		%icc, 1b
++	 sllx		%g3, %g1, %g2
++
++	srl		%g1, 3, %g1
++	andcc		%o2, 0x7, %o2
++	be,pn		%icc, 85f
++	 add		%o1, %g1, %o1
++	ba,pt		%xcc, 90f
++	 sub		%o0, %o1, %o3
++
++	.align		64
+ 80: /* 0 < len <= 16 */
+ 	andcc		%o3, 0x3, %g0
+ 	bne,pn		%XCC, 90f
+@@ -281,34 +395,20 @@
+ 
+ 1:
+ 	subcc		%o2, 4, %o2
+-	lduw		[%o1], %g1
+-	stw		%g1, [%o1 + %o3]
++	EX_LD(LOAD(lduw, %o1, %g1))
++	EX_ST(STORE(stw, %g1, %o1 + %o3))
+ 	bgu,pt		%XCC, 1b
+ 	 add		%o1, 4, %o1
+ 
+ 85:	retl
+-	 mov		%g5, %o0
++	 mov		EX_RETVAL(%g5), %o0
+ 
+-	.align	32
++	.align		32
+ 90:
+ 	subcc		%o2, 1, %o2
+-	ldub		[%o1], %g1
+-	stb		%g1, [%o1 + %o3]
++	EX_LD(LOAD(ldub, %o1, %g1))
++	EX_ST(STORE(stb, %g1, %o1 + %o3))
+ 	bgu,pt		%XCC, 90b
+ 	 add		%o1, 1, %o1
+ 	retl
+-	 mov		%g5, %o0
+-
+-	/* Act like copy_{to,in}_user(), ie. return zero instead
+-	 * of original destination pointer.  This is invoked when
+-	 * copy_{to,in}_user() finds that %asi is kernel space.
+-	 */
+-	.globl	U3memcpy_user_stub
+-U3memcpy_user_stub:
+-	save		%sp, -192, %sp
+-	mov		%i0, %o0
+-	mov		%i1, %o1
+-	call		U3memcpy
+-	 mov		%i2, %o2
+-	ret
+-	 restore	%g0, %g0, %o0
++	 mov		EX_RETVAL(%g5), %o0
+diff -Nru a/arch/sparc64/lib/U3patch.S b/arch/sparc64/lib/U3patch.S
+--- /dev/null	Wed Dec 31 16:00:00 196900
++++ b/arch/sparc64/lib/U3patch.S	2004-08-26 13:29:59 +02:00
+@@ -0,0 +1,30 @@
++/* U3patch.S: Patch Ultra-I routines with Ultra-III variant.
++ *
++ * Copyright (C) 2004 David S. Miller <davem at redhat.com>
++ */
++
++#define BRANCH_ALWAYS	0x10680000
++#define NOP		0x01000000
++#define ULTRA3_DO_PATCH(OLD, NEW)	\
++	sethi	%hi(NEW), %g1; \
++	or	%g1, %lo(NEW), %g1; \
++	sethi	%hi(OLD), %g2; \
++	or	%g2, %lo(OLD), %g2; \
++	sub	%g1, %g2, %g1; \
++	sethi	%hi(BRANCH_ALWAYS), %g3; \
++	srl	%g1, 2, %g1; \
++	or	%g3, %lo(BRANCH_ALWAYS), %g3; \
++	or	%g3, %g1, %g3; \
++	stw	%g3, [%g2]; \
++	sethi	%hi(NOP), %g3; \
++	or	%g3, %lo(NOP), %g3; \
++	stw	%g3, [%g2 + 0x4]; \
++	flush	%g2;
++
++	.globl	cheetah_patch_copyops
++cheetah_patch_copyops:
++	ULTRA3_DO_PATCH(memcpy, U3memcpy)
++	ULTRA3_DO_PATCH(___copy_from_user, U3copy_from_user)
++	ULTRA3_DO_PATCH(___copy_to_user, U3copy_to_user)
++	retl
++	 nop
+diff -Nru a/arch/sparc64/lib/VIScopy.S b/arch/sparc64/lib/VIScopy.S
+--- a/arch/sparc64/lib/VIScopy.S	2004-08-26 13:29:59 +02:00
++++ /dev/null	Wed Dec 31 16:00:00 196900
+@@ -1,1138 +0,0 @@
+-/* $Id: VIScopy.S,v 1.27 2002/02/09 19:49:30 davem Exp $
+- * VIScopy.S: High speed copy operations utilizing the UltraSparc
+- *            Visual Instruction Set.
+- *
+- * Copyright (C) 1997 David S. Miller (davem at caip.rutgers.edu)
+- * Copyright (C) 1996, 1997, 1998, 1999 Jakub Jelinek (jj at ultra.linux.cz)
+- */
+-
+-#include "VIS.h"
+-
+-	/* VIS code can be used for numerous copy/set operation variants.
+-	 * It can be made to work in the kernel, one single instance,
+-	 * for all of memcpy, copy_to_user, and copy_from_user by setting
+-	 * the ASI src/dest globals correctly.  Furthermore it can
+-	 * be used for kernel-->kernel page copies as well, a hook label
+-	 * is put in here just for this purpose.
+-	 *
+-	 * For userland, compiling this without __KERNEL__ defined makes
+-	 * it work just fine as a generic libc bcopy and memcpy.
+-	 * If for userland it is compiled with a 32bit gcc (but you need
+-	 * -Wa,-Av9a for as), the code will just rely on lower 32bits of
+-	 * IEU registers, if you compile it with 64bit gcc (ie. define
+-	 * __sparc_v9__), the code will use full 64bit.
+-	 */
+-	 
+-#ifdef __KERNEL__
+-
+-#include <asm/visasm.h>
+-#include <asm/thread_info.h>
+-
+-#define FPU_CLEAN_RETL					\
+-	ldub		[%g6 + TI_CURRENT_DS], %o1;	\
+-	VISExit						\
+-	clr		%o0;				\
+-	retl;						\
+-	 wr		%o1, %g0, %asi;
+-#define FPU_RETL					\
+-	ldub		[%g6 + TI_CURRENT_DS], %o1;	\
+-	VISExit						\
+-	clr		%o0;				\
+-	retl;						\
+-	 wr		%o1, %g0, %asi;
+-#define NORMAL_RETL					\
+-	ldub		[%g6 + TI_CURRENT_DS], %o1;	\
+-	clr		%o0;				\
+-	retl;						\
+-	 wr		%o1, %g0, %asi;
+-#define EX(x,y,a,b) 				\
+-98: 	x,y;					\
+-	.section .fixup;			\
+-	.align	4;				\
+-99:	ba	VIScopyfixup_ret;		\
+-	 a, b, %o1;				\
+-	.section __ex_table;			\
+-	.align	4;				\
+-	.word	98b, 99b;			\
+-	.text;					\
+-	.align	4;
+-#define EX2(x,y,c,d,e,a,b) 			\
+-98: 	x,y;					\
+-	.section .fixup;			\
+-	.align	4;				\
+-99:	c, d, e;				\
+-	ba	VIScopyfixup_ret;		\
+-	 a, b, %o1;				\
+-	.section __ex_table;			\
+-	.align	4;				\
+-	.word	98b, 99b;			\
+-	.text;					\
+-	.align	4;
+-#define EXO2(x,y) 				\
+-98: 	x,y;					\
+-	.section __ex_table;			\
+-	.align	4;				\
+-	.word	98b, VIScopyfixup_reto2;	\
+-	.text;					\
+-	.align	4;
+-#define EXVISN(x,y,n) 				\
+-98: 	x,y;					\
+-	.section __ex_table;			\
+-	.align	4;				\
+-	.word	98b, VIScopyfixup_vis##n;	\
+-	.text;					\
+-	.align	4;
+-#define EXT(start,end,handler) 			\
+-	.section __ex_table;			\
+-	.align	4;				\
+-	.word	start, 0, end, handler;		\
+-	.text;					\
+-	.align	4;
+-#else
+-#ifdef REGS_64BIT
+-#define FPU_CLEAN_RETL				\
+-	retl;					\
+-	 mov	%g6, %o0;
+-#define FPU_RETL				\
+-	retl;					\
+-	 mov	%g6, %o0;
+-#else
+-#define FPU_CLEAN_RETL				\
+-	wr	%g0, FPRS_FEF, %fprs;		\
+-	retl;					\
+-	 mov	%g6, %o0;
+-#define FPU_RETL				\
+-	wr	%g0, FPRS_FEF, %fprs;		\
+-	retl;					\
+-	 mov	%g6, %o0;
+-#endif
+-#define NORMAL_RETL	\
+-	retl;		\
+-	 mov	%g6, %o0;
+-#define EX(x,y,a,b)		x,y
+-#define EX2(x,y,c,d,e,a,b)	x,y
+-#define EXO2(x,y)		x,y
+-#define EXVISN(x,y,n)		x,y
+-#define EXT(a,b,c)
+-#endif
+-#define EXVIS(x,y) EXVISN(x,y,0)
+-#define EXVIS1(x,y) EXVISN(x,y,1)
+-#define EXVIS2(x,y) EXVISN(x,y,2)
+-#define EXVIS3(x,y) EXVISN(x,y,3)
+-#define EXVIS4(x,y) EXVISN(x,y,4)
+-
+-#define FREG_FROB(f1, f2, f3, f4, f5, f6, f7, f8, f9)		\
+-	faligndata		%f1, %f2, %f48;			\
+-	faligndata		%f2, %f3, %f50;			\
+-	faligndata		%f3, %f4, %f52;			\
+-	faligndata		%f4, %f5, %f54;			\
+-	faligndata		%f5, %f6, %f56;			\
+-	faligndata		%f6, %f7, %f58;			\
+-	faligndata		%f7, %f8, %f60;			\
+-	faligndata		%f8, %f9, %f62;
+-
+-#define MAIN_LOOP_CHUNK(src, dest, fdest, fsrc, len, jmptgt)	\
+-	EXVIS(LDBLK		[%src] ASIBLK, %fdest);		\
+-	ASI_SETDST_BLK						\
+-	EXVIS(STBLK		%fsrc, [%dest] ASIBLK);		\
+-	add			%src, 0x40, %src;		\
+-	subcc			%len, 0x40, %len;		\
+-	be,pn			%xcc, jmptgt;			\
+-	 add			%dest, 0x40, %dest;		\
+-	ASI_SETSRC_BLK
+-
+-#define LOOP_CHUNK1(src, dest, len, branch_dest)		\
+-	MAIN_LOOP_CHUNK(src, dest, f0,  f48, len, branch_dest)
+-#define LOOP_CHUNK2(src, dest, len, branch_dest)		\
+-	MAIN_LOOP_CHUNK(src, dest, f16, f48, len, branch_dest)
+-#define LOOP_CHUNK3(src, dest, len, branch_dest)		\
+-	MAIN_LOOP_CHUNK(src, dest, f32, f48, len, branch_dest)
+-
+-#define STORE_SYNC(dest, fsrc)					\
+-	EXVIS(STBLK		%fsrc, [%dest] ASIBLK);		\
+-	add			%dest, 0x40, %dest;
+-
+-#ifdef __KERNEL__
+-#define STORE_JUMP(dest, fsrc, target)				\
+-	srl			asi_dest, 3, %g5;		\
+-	EXVIS2(STBLK		%fsrc, [%dest] ASIBLK);		\
+-	xor		       asi_dest, ASI_BLK_XOR1, asi_dest;\
+-	add			%dest, 0x40, %dest;		\
+-	xor			asi_dest, %g5, asi_dest;	\
+-	ba,pt			%xcc, target;
+-#else
+-#define STORE_JUMP(dest, fsrc, target)				\
+-	EXVIS2(STBLK		%fsrc, [%dest] ASIBLK);		\
+-	add			%dest, 0x40, %dest;		\
+-	ba,pt			%xcc, target;
+-#endif
+-
+-#ifndef __KERNEL__
+-#define VISLOOP_PAD nop; nop; nop; nop; \
+-		    nop; nop; nop; nop; \
+-		    nop; nop; nop; nop; \
+-		    nop; nop; nop;
+-#else
+-#define VISLOOP_PAD
+-#endif
+-
+-#define FINISH_VISCHUNK(dest, f0, f1, left)			\
+-	ASI_SETDST_NOBLK					\
+-	subcc			%left, 8, %left;		\
+-	bl,pn			%xcc, vis_out;			\
+-	 faligndata		%f0, %f1, %f48;			\
+-	EXVIS3(STDF		%f48, [%dest] ASINORMAL);	\
+-	add			%dest, 8, %dest;
+-
+-#define UNEVEN_VISCHUNK_LAST(dest, f0, f1, left)		\
+-	subcc			%left, 8, %left;		\
+-	bl,pn			%xcc, vis_out;			\
+-	 fsrc1			%f0, %f1;
+-#define UNEVEN_VISCHUNK(dest, f0, f1, left)			\
+-	UNEVEN_VISCHUNK_LAST(dest, f0, f1, left)		\
+-	ba,a,pt			%xcc, vis_out_slk;
+-
+-	/* Macros for non-VIS memcpy code. */
+-#ifdef REGS_64BIT
+-
+-#define MOVE_BIGCHUNK(src, dst, offset, t0, t1, t2, t3)			\
+-	ASI_SETSRC_NOBLK						\
+-	LDX			[%src + offset + 0x00] ASINORMAL, %t0; 	\
+-	LDX			[%src + offset + 0x08] ASINORMAL, %t1; 	\
+-	LDX			[%src + offset + 0x10] ASINORMAL, %t2; 	\
+-	LDX			[%src + offset + 0x18] ASINORMAL, %t3; 	\
+-	ASI_SETDST_NOBLK						\
+-	STW			%t0, [%dst + offset + 0x04] ASINORMAL; 	\
+-	srlx			%t0, 32, %t0;				\
+-	STW			%t0, [%dst + offset + 0x00] ASINORMAL; 	\
+-	STW			%t1, [%dst + offset + 0x0c] ASINORMAL; 	\
+-	srlx			%t1, 32, %t1;				\
+-	STW			%t1, [%dst + offset + 0x08] ASINORMAL; 	\
+-	STW			%t2, [%dst + offset + 0x14] ASINORMAL; 	\
+-	srlx			%t2, 32, %t2;				\
+-	STW			%t2, [%dst + offset + 0x10] ASINORMAL; 	\
+-	STW			%t3, [%dst + offset + 0x1c] ASINORMAL;	\
+-	srlx			%t3, 32, %t3;				\
+-	STW			%t3, [%dst + offset + 0x18] ASINORMAL;
+-
+-#define MOVE_BIGALIGNCHUNK(src, dst, offset, t0, t1, t2, t3)		\
+-	ASI_SETSRC_NOBLK						\
+-	LDX			[%src + offset + 0x00] ASINORMAL, %t0; 	\
+-	LDX			[%src + offset + 0x08] ASINORMAL, %t1; 	\
+-	LDX			[%src + offset + 0x10] ASINORMAL, %t2; 	\
+-	LDX			[%src + offset + 0x18] ASINORMAL, %t3; 	\
+-	ASI_SETDST_NOBLK						\
+-	STX			%t0, [%dst + offset + 0x00] ASINORMAL; 	\
+-	STX			%t1, [%dst + offset + 0x08] ASINORMAL; 	\
+-	STX			%t2, [%dst + offset + 0x10] ASINORMAL; 	\
+-	STX			%t3, [%dst + offset + 0x18] ASINORMAL; 	\
+-	ASI_SETSRC_NOBLK						\
+-	LDX			[%src + offset + 0x20] ASINORMAL, %t0; 	\
+-	LDX			[%src + offset + 0x28] ASINORMAL, %t1; 	\
+-	LDX			[%src + offset + 0x30] ASINORMAL, %t2; 	\
+-	LDX			[%src + offset + 0x38] ASINORMAL, %t3; 	\
+-	ASI_SETDST_NOBLK						\
+-	STX			%t0, [%dst + offset + 0x20] ASINORMAL; 	\
+-	STX			%t1, [%dst + offset + 0x28] ASINORMAL; 	\
+-	STX			%t2, [%dst + offset + 0x30] ASINORMAL; 	\
+-	STX			%t3, [%dst + offset + 0x38] ASINORMAL;
+-
+-#define MOVE_LASTCHUNK(src, dst, offset, t0, t1, t2, t3)		\
+-	ASI_SETSRC_NOBLK						\
+-	LDX			[%src - offset - 0x10] ASINORMAL, %t0;	\
+-	LDX			[%src - offset - 0x08] ASINORMAL, %t1; 	\
+-	ASI_SETDST_NOBLK						\
+-	STW			%t0, [%dst - offset - 0x0c] ASINORMAL; 	\
+-	srlx			%t0, 32, %t2;				\
+-	STW			%t2, [%dst - offset - 0x10] ASINORMAL; 	\
+-	STW			%t1, [%dst - offset - 0x04] ASINORMAL; 	\
+-	srlx			%t1, 32, %t3;				\
+-	STW			%t3, [%dst - offset - 0x08] ASINORMAL;
+-
+-#define MOVE_LASTALIGNCHUNK(src, dst, offset, t0, t1)			\
+-	ASI_SETSRC_NOBLK						\
+-	LDX			[%src - offset - 0x10] ASINORMAL, %t0; 	\
+-	LDX			[%src - offset - 0x08] ASINORMAL, %t1; 	\
+-	ASI_SETDST_NOBLK						\
+-	STX			%t0, [%dst - offset - 0x10] ASINORMAL; 	\
+-	STX			%t1, [%dst - offset - 0x08] ASINORMAL;
+-
+-#else /* !REGS_64BIT */
+-
+-#define MOVE_BIGCHUNK(src, dst, offset, t0, t1, t2, t3)			\
+-	lduw			[%src + offset + 0x00], %t0; 		\
+-	lduw			[%src + offset + 0x04], %t1; 		\
+-	lduw			[%src + offset + 0x08], %t2; 		\
+-	lduw			[%src + offset + 0x0c], %t3; 		\
+-	stw			%t0, [%dst + offset + 0x00]; 		\
+-	stw			%t1, [%dst + offset + 0x04]; 		\
+-	stw			%t2, [%dst + offset + 0x08]; 		\
+-	stw			%t3, [%dst + offset + 0x0c]; 		\
+-	lduw			[%src + offset + 0x10], %t0; 		\
+-	lduw			[%src + offset + 0x14], %t1; 		\
+-	lduw			[%src + offset + 0x18], %t2; 		\
+-	lduw			[%src + offset + 0x1c], %t3; 		\
+-	stw			%t0, [%dst + offset + 0x10]; 		\
+-	stw			%t1, [%dst + offset + 0x14]; 		\
+-	stw			%t2, [%dst + offset + 0x18]; 		\
+-	stw			%t3, [%dst + offset + 0x1c];
+-
+-#define MOVE_LASTCHUNK(src, dst, offset, t0, t1, t2, t3)		\
+-	lduw			[%src - offset - 0x10], %t0; 		\
+-	lduw			[%src - offset - 0x0c], %t1; 		\
+-	lduw			[%src - offset - 0x08], %t2; 		\
+-	lduw			[%src - offset - 0x04], %t3; 		\
+-	stw			%t0, [%dst - offset - 0x10]; 		\
+-	stw			%t1, [%dst - offset - 0x0c]; 		\
+-	stw			%t2, [%dst - offset - 0x08]; 		\
+-	stw			%t3, [%dst - offset - 0x04];
+-
+-#endif /* !REGS_64BIT */
+-
+-#ifdef __KERNEL__
+-		.section	__ex_table,#alloc
+-		.section	.fixup,#alloc,#execinstr
+-#endif
+-
+-		.text
+-		.align			32
+-		.globl			memcpy
+-		.type			memcpy, at function
+-
+-		.globl			bcopy
+-		.type			bcopy, at function
+-
+-#ifdef __KERNEL__
+-memcpy_private:
+-memcpy:		mov		ASI_P, asi_src			! IEU0	Group
+-		brnz,pt		%o2, __memcpy_entry		! CTI
+-		 mov		ASI_P, asi_dest			! IEU1
+-		retl
+-		 clr		%o0
+-
+-		.align			32
+-		.globl			__copy_from_user
+-		.type			__copy_from_user, at function
+-__copy_from_user:rd		%asi, asi_src			! IEU0	Group
+-		brnz,pt		%o2, __memcpy_entry		! CTI
+-		 mov		ASI_P, asi_dest			! IEU1
+-
+-		.globl			__copy_to_user
+-		.type			__copy_to_user, at function
+-__copy_to_user:	mov		ASI_P, asi_src			! IEU0	Group
+-		brnz,pt		%o2, __memcpy_entry		! CTI
+-		 rd		%asi, asi_dest			! IEU1
+-		retl						! CTI	Group
+-		 clr		%o0				! IEU0	Group
+-
+-		.globl			__copy_in_user
+-		.type			__copy_in_user, at function
+-__copy_in_user:	rd		%asi, asi_src			! IEU0	Group
+-		brnz,pt		%o2, __memcpy_entry		! CTI
+-		 mov		asi_src, asi_dest		! IEU1
+-		retl						! CTI	Group
+-		 clr		%o0				! IEU0	Group
+-#endif
+-
+-bcopy:		or		%o0, 0, %g3			! IEU0	Group
+-		addcc		%o1, 0, %o0			! IEU1
+-		brgez,pt	%o2, memcpy_private		! CTI
+-		 or		%g3, 0, %o1			! IEU0	Group
+-		retl						! CTI	Group brk forced
+-		 clr		%o0				! IEU0
+-
+-
+-#ifdef __KERNEL__
+-#define BRANCH_ALWAYS	0x10680000
+-#define NOP		0x01000000
+-#define ULTRA3_DO_PATCH(OLD, NEW)	\
+-	sethi	%hi(NEW), %g1; \
+-	or	%g1, %lo(NEW), %g1; \
+-	sethi	%hi(OLD), %g2; \
+-	or	%g2, %lo(OLD), %g2; \
+-	sub	%g1, %g2, %g1; \
+-	sethi	%hi(BRANCH_ALWAYS), %g3; \
+-	srl	%g1, 2, %g1; \
+-	or	%g3, %lo(BRANCH_ALWAYS), %g3; \
+-	or	%g3, %g1, %g3; \
+-	stw	%g3, [%g2]; \
+-	sethi	%hi(NOP), %g3; \
+-	or	%g3, %lo(NOP), %g3; \
+-	stw	%g3, [%g2 + 0x4]; \
+-	flush	%g2;
+-
+-	.globl	cheetah_patch_copyops
+-cheetah_patch_copyops:
+-	ULTRA3_DO_PATCH(memcpy, U3memcpy)
+-	ULTRA3_DO_PATCH(__copy_from_user, U3copy_from_user)
+-	ULTRA3_DO_PATCH(__copy_to_user, U3copy_to_user)
+-	ULTRA3_DO_PATCH(__copy_in_user, U3copy_in_user)
+-	retl
+-	 nop
+-#undef BRANCH_ALWAYS
+-#undef NOP
+-#undef ULTRA3_DO_PATCH
+-#endif /* __KERNEL__ */
+-
+-	.align			32
+-#ifdef __KERNEL__
+-	andcc			%o0, 7, %g2			! IEU1	Group
+-#endif
+-VIS_enter:
+-	be,pt			%xcc, dest_is_8byte_aligned	! CTI
+-#ifdef __KERNEL__
+-	 nop							! IEU0	Group
+-#else
+-	 andcc			%o0, 0x38, %g5			! IEU1	Group
+-#endif
+-do_dest_8byte_align:
+-	mov			8, %g1				! IEU0
+-	sub			%g1, %g2, %g2			! IEU0	Group
+-	andcc			%o0, 1, %g0			! IEU1
+-	be,pt			%icc, 2f			! CTI
+-	 sub			%o2, %g2, %o2			! IEU0	Group
+-1:	ASI_SETSRC_NOBLK					! LSU	Group
+-	EX(LDUB			[%o1] ASINORMAL, %o5, 
+-				add %o2, %g2)			! Load	Group
+-	add			%o1, 1, %o1			! IEU0
+-	add			%o0, 1, %o0			! IEU1
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	subcc			%g2, 1, %g2			! IEU1	Group
+-	be,pn			%xcc, 3f			! CTI
+-	 EX2(STB		%o5, [%o0 - 1] ASINORMAL,
+-				add %g2, 1, %g2,
+-				add %o2, %g2)			! Store
+-2:	ASI_SETSRC_NOBLK					! LSU	Group
+-	EX(LDUB			[%o1] ASINORMAL, %o5, 
+-				add %o2, %g2)			! Load	Group
+-	add			%o0, 2, %o0			! IEU0
+-	EX2(LDUB		[%o1 + 1] ASINORMAL, %g3,
+-				sub %o0, 2, %o0,
+-				add %o2, %g2)			! Load	Group
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	subcc			%g2, 2, %g2			! IEU1	Group
+-	EX2(STB			%o5, [%o0 - 2] ASINORMAL,
+-				add %g2, 2, %g2,
+-				add %o2, %g2)			! Store
+-	add			%o1, 2, %o1			! IEU0
+-	bne,pt			%xcc, 2b			! CTI	Group
+-	 EX2(STB		%g3, [%o0 - 1] ASINORMAL,
+-				add %g2, 1, %g2,
+-				add %o2, %g2)			! Store
+-#ifdef __KERNEL__
+-3:
+-dest_is_8byte_aligned:
+-	VISEntry
+-	andcc			%o0, 0x38, %g5			! IEU1	Group
+-#else
+-3:	andcc			%o0, 0x38, %g5			! IEU1	Group
+-dest_is_8byte_aligned:
+-#endif
+-	be,pt			%icc, dest_is_64byte_aligned	! CTI
+-	 mov			64, %g1				! IEU0
+-	fmovd			%f0, %f2			! FPU
+-	sub			%g1, %g5, %g5			! IEU0	Group
+-	ASI_SETSRC_NOBLK					! LSU	Group
+-	alignaddr		%o1, %g0, %g1			! GRU	Group
+-	EXO2(LDDF		[%g1] ASINORMAL, %f4)		! Load	Group
+-	sub			%o2, %g5, %o2			! IEU0
+-1:	EX(LDDF			[%g1 + 0x8] ASINORMAL, %f6,
+-				add %o2, %g5)			! Load	Group
+-	add			%g1, 0x8, %g1			! IEU0	Group
+-	subcc			%g5, 8, %g5			! IEU1
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	faligndata		%f4, %f6, %f0			! GRU	Group
+-	EX2(STDF		%f0, [%o0] ASINORMAL,
+-				add %g5, 8, %g5,
+-				add %o2, %g5)			! Store
+-	add			%o1, 8, %o1			! IEU0	Group
+-	be,pn			%xcc, dest_is_64byte_aligned	! CTI
+-	 add			%o0, 8, %o0			! IEU1
+-	ASI_SETSRC_NOBLK					! LSU	Group
+-	EX(LDDF			[%g1 + 0x8] ASINORMAL, %f4,
+-				add %o2, %g5)			! Load	Group
+-	add			%g1, 8, %g1			! IEU0
+-	subcc			%g5, 8, %g5			! IEU1
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	faligndata		%f6, %f4, %f0			! GRU	Group
+-	EX2(STDF		%f0, [%o0] ASINORMAL,
+-				add %g5, 8, %g5,
+-				add %o2, %g5)			! Store
+-	add			%o1, 8, %o1			! IEU0
+-	ASI_SETSRC_NOBLK					! LSU	Group
+-	bne,pt			%xcc, 1b			! CTI	Group
+-	 add			%o0, 8, %o0			! IEU0
+-dest_is_64byte_aligned:
+-	membar		  #LoadStore | #StoreStore | #StoreLoad	! LSU	Group
+-#ifndef __KERNEL__
+-	wr			%g0, ASI_BLK_P, %asi		! LSU	Group
+-#endif
+-	subcc			%o2, 0x40, %g7			! IEU1	Group
+-	mov			%o1, %g1			! IEU0
+-	andncc			%g7, (0x40 - 1), %g7		! IEU1	Group
+-	srl			%g1, 3, %g2			! IEU0
+-	sub			%o2, %g7, %g3			! IEU0	Group
+-	andn			%o1, (0x40 - 1), %o1		! IEU1
+-	and			%g2, 7, %g2			! IEU0	Group
+-	andncc			%g3, 0x7, %g3			! IEU1
+-	fmovd			%f0, %f2			! FPU
+-	sub			%g3, 0x10, %g3			! IEU0	Group
+-	sub			%o2, %g7, %o2			! IEU1
+-#ifdef __KERNEL__
+-	or			asi_src, ASI_BLK_OR, asi_src	! IEU0	Group
+-	or			asi_dest, ASI_BLK_OR, asi_dest	! IEU1
+-#endif
+-	alignaddr		%g1, %g0, %g0			! GRU	Group
+-	add			%g1, %g7, %g1			! IEU0	Group
+-	subcc			%o2, %g3, %o2			! IEU1
+-	ASI_SETSRC_BLK						! LSU	Group
+-	EXVIS1(LDBLK		[%o1 + 0x00] ASIBLK, %f0)	! LSU	Group
+-	add			%g1, %g3, %g1			! IEU0
+-	EXVIS1(LDBLK		[%o1 + 0x40] ASIBLK, %f16)	! LSU	Group
+-	sub			%g7, 0x80, %g7			! IEU0
+-	EXVIS(LDBLK		[%o1 + 0x80] ASIBLK, %f32)	! LSU	Group
+-#ifdef __KERNEL__
+-vispc:	sll			%g2, 9, %g2			! IEU0	Group
+-	sethi			%hi(vis00), %g5			! IEU1
+-	or			%g5, %lo(vis00), %g5		! IEU0	Group
+-	jmpl			%g5 + %g2, %g0			! CTI	Group brk forced
+-	 addcc			%o1, 0xc0, %o1			! IEU1	Group
+-#else
+-								! Clk1	Group 8-(
+-								! Clk2	Group 8-(
+-								! Clk3	Group 8-(
+-								! Clk4	Group 8-(
+-vispc:	rd			%pc, %g5			! PDU	Group 8-(
+-	addcc			%g5, %lo(vis00 - vispc), %g5	! IEU1	Group
+-	sll			%g2, 9, %g2			! IEU0
+-	jmpl			%g5 + %g2, %g0			! CTI	Group brk forced
+-	 addcc			%o1, 0xc0, %o1			! IEU1	Group
+-#endif
+-	.align			512		/* OK, here comes the fun part... */
+-vis00:FREG_FROB(f0, f2, f4, f6, f8, f10,f12,f14,f16) LOOP_CHUNK1(o1, o0, g7, vis01)
+-      FREG_FROB(f16,f18,f20,f22,f24,f26,f28,f30,f32) LOOP_CHUNK2(o1, o0, g7, vis02)
+-      FREG_FROB(f32,f34,f36,f38,f40,f42,f44,f46,f0)  LOOP_CHUNK3(o1, o0, g7, vis03)
+-      b,pt			%xcc, vis00+4; faligndata %f0, %f2, %f48
+-vis01:FREG_FROB(f16,f18,f20,f22,f24,f26,f28,f30,f32) STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f32,f34,f36,f38,f40,f42,f44,f46,f0)  STORE_JUMP(o0, f48, finish_f0) membar #Sync
+-vis02:FREG_FROB(f32,f34,f36,f38,f40,f42,f44,f46,f0)  STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f0, f2, f4, f6, f8, f10,f12,f14,f16) STORE_JUMP(o0, f48, finish_f16) membar #Sync
+-vis03:FREG_FROB(f0, f2, f4, f6, f8, f10,f12,f14,f16) STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f16,f18,f20,f22,f24,f26,f28,f30,f32) STORE_JUMP(o0, f48, finish_f32) membar #Sync
+-      VISLOOP_PAD
+-vis10:FREG_FROB(f2, f4, f6, f8, f10,f12,f14,f16,f18) LOOP_CHUNK1(o1, o0, g7, vis11)
+-      FREG_FROB(f18,f20,f22,f24,f26,f28,f30,f32,f34) LOOP_CHUNK2(o1, o0, g7, vis12)
+-      FREG_FROB(f34,f36,f38,f40,f42,f44,f46,f0, f2)  LOOP_CHUNK3(o1, o0, g7, vis13)
+-      b,pt			%xcc, vis10+4; faligndata %f2, %f4, %f48
+-vis11:FREG_FROB(f18,f20,f22,f24,f26,f28,f30,f32,f34) STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f34,f36,f38,f40,f42,f44,f46,f0, f2)  STORE_JUMP(o0, f48, finish_f2) membar #Sync
+-vis12:FREG_FROB(f34,f36,f38,f40,f42,f44,f46,f0, f2)  STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f2, f4, f6, f8, f10,f12,f14,f16,f18) STORE_JUMP(o0, f48, finish_f18) membar #Sync
+-vis13:FREG_FROB(f2, f4, f6, f8, f10,f12,f14,f16,f18) STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f18,f20,f22,f24,f26,f28,f30,f32,f34) STORE_JUMP(o0, f48, finish_f34) membar #Sync
+-      VISLOOP_PAD
+-vis20:FREG_FROB(f4, f6, f8, f10,f12,f14,f16,f18,f20) LOOP_CHUNK1(o1, o0, g7, vis21)
+-      FREG_FROB(f20,f22,f24,f26,f28,f30,f32,f34,f36) LOOP_CHUNK2(o1, o0, g7, vis22)
+-      FREG_FROB(f36,f38,f40,f42,f44,f46,f0, f2, f4)  LOOP_CHUNK3(o1, o0, g7, vis23)
+-      b,pt			%xcc, vis20+4; faligndata %f4, %f6, %f48
+-vis21:FREG_FROB(f20,f22,f24,f26,f28,f30,f32,f34,f36) STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f36,f38,f40,f42,f44,f46,f0, f2, f4)  STORE_JUMP(o0, f48, finish_f4) membar #Sync
+-vis22:FREG_FROB(f36,f38,f40,f42,f44,f46,f0, f2, f4)  STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f4, f6, f8, f10,f12,f14,f16,f18,f20) STORE_JUMP(o0, f48, finish_f20) membar #Sync
+-vis23:FREG_FROB(f4, f6, f8, f10,f12,f14,f16,f18,f20) STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f20,f22,f24,f26,f28,f30,f32,f34,f36) STORE_JUMP(o0, f48, finish_f36) membar #Sync
+-      VISLOOP_PAD
+-vis30:FREG_FROB(f6, f8, f10,f12,f14,f16,f18,f20,f22) LOOP_CHUNK1(o1, o0, g7, vis31)
+-      FREG_FROB(f22,f24,f26,f28,f30,f32,f34,f36,f38) LOOP_CHUNK2(o1, o0, g7, vis32)
+-      FREG_FROB(f38,f40,f42,f44,f46,f0, f2, f4, f6)  LOOP_CHUNK3(o1, o0, g7, vis33)
+-      b,pt			%xcc, vis30+4; faligndata %f6, %f8, %f48
+-vis31:FREG_FROB(f22,f24,f26,f28,f30,f32,f34,f36,f38) STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f38,f40,f42,f44,f46,f0, f2, f4, f6)  STORE_JUMP(o0, f48, finish_f6) membar #Sync
+-vis32:FREG_FROB(f38,f40,f42,f44,f46,f0, f2, f4, f6)  STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f6, f8, f10,f12,f14,f16,f18,f20,f22) STORE_JUMP(o0, f48, finish_f22) membar #Sync
+-vis33:FREG_FROB(f6, f8, f10,f12,f14,f16,f18,f20,f22) STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f22,f24,f26,f28,f30,f32,f34,f36,f38) STORE_JUMP(o0, f48, finish_f38) membar #Sync
+-      VISLOOP_PAD
+-vis40:FREG_FROB(f8, f10,f12,f14,f16,f18,f20,f22,f24) LOOP_CHUNK1(o1, o0, g7, vis41)
+-      FREG_FROB(f24,f26,f28,f30,f32,f34,f36,f38,f40) LOOP_CHUNK2(o1, o0, g7, vis42)
+-      FREG_FROB(f40,f42,f44,f46,f0, f2, f4, f6, f8)  LOOP_CHUNK3(o1, o0, g7, vis43)
+-      b,pt			%xcc, vis40+4; faligndata %f8, %f10, %f48
+-vis41:FREG_FROB(f24,f26,f28,f30,f32,f34,f36,f38,f40) STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f40,f42,f44,f46,f0, f2, f4, f6, f8)  STORE_JUMP(o0, f48, finish_f8) membar #Sync
+-vis42:FREG_FROB(f40,f42,f44,f46,f0, f2, f4, f6, f8)  STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f8, f10,f12,f14,f16,f18,f20,f22,f24) STORE_JUMP(o0, f48, finish_f24) membar #Sync
+-vis43:FREG_FROB(f8, f10,f12,f14,f16,f18,f20,f22,f24) STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f24,f26,f28,f30,f32,f34,f36,f38,f40) STORE_JUMP(o0, f48, finish_f40) membar #Sync
+-      VISLOOP_PAD
+-vis50:FREG_FROB(f10,f12,f14,f16,f18,f20,f22,f24,f26) LOOP_CHUNK1(o1, o0, g7, vis51)
+-      FREG_FROB(f26,f28,f30,f32,f34,f36,f38,f40,f42) LOOP_CHUNK2(o1, o0, g7, vis52)
+-      FREG_FROB(f42,f44,f46,f0, f2, f4, f6, f8, f10) LOOP_CHUNK3(o1, o0, g7, vis53)
+-      b,pt			%xcc, vis50+4; faligndata %f10, %f12, %f48
+-vis51:FREG_FROB(f26,f28,f30,f32,f34,f36,f38,f40,f42) STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f42,f44,f46,f0, f2, f4, f6, f8, f10) STORE_JUMP(o0, f48, finish_f10) membar #Sync
+-vis52:FREG_FROB(f42,f44,f46,f0, f2, f4, f6, f8, f10) STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f10,f12,f14,f16,f18,f20,f22,f24,f26) STORE_JUMP(o0, f48, finish_f26) membar #Sync
+-vis53:FREG_FROB(f10,f12,f14,f16,f18,f20,f22,f24,f26) STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f26,f28,f30,f32,f34,f36,f38,f40,f42) STORE_JUMP(o0, f48, finish_f42) membar #Sync
+-      VISLOOP_PAD
+-vis60:FREG_FROB(f12,f14,f16,f18,f20,f22,f24,f26,f28) LOOP_CHUNK1(o1, o0, g7, vis61)
+-      FREG_FROB(f28,f30,f32,f34,f36,f38,f40,f42,f44) LOOP_CHUNK2(o1, o0, g7, vis62)
+-      FREG_FROB(f44,f46,f0, f2, f4, f6, f8, f10,f12) LOOP_CHUNK3(o1, o0, g7, vis63)
+-      b,pt			%xcc, vis60+4; faligndata %f12, %f14, %f48
+-vis61:FREG_FROB(f28,f30,f32,f34,f36,f38,f40,f42,f44) STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f44,f46,f0, f2, f4, f6, f8, f10,f12) STORE_JUMP(o0, f48, finish_f12) membar #Sync
+-vis62:FREG_FROB(f44,f46,f0, f2, f4, f6, f8, f10,f12) STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f12,f14,f16,f18,f20,f22,f24,f26,f28) STORE_JUMP(o0, f48, finish_f28) membar #Sync
+-vis63:FREG_FROB(f12,f14,f16,f18,f20,f22,f24,f26,f28) STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f28,f30,f32,f34,f36,f38,f40,f42,f44) STORE_JUMP(o0, f48, finish_f44) membar #Sync
+-      VISLOOP_PAD
+-vis70:FREG_FROB(f14,f16,f18,f20,f22,f24,f26,f28,f30) LOOP_CHUNK1(o1, o0, g7, vis71)
+-      FREG_FROB(f30,f32,f34,f36,f38,f40,f42,f44,f46) LOOP_CHUNK2(o1, o0, g7, vis72)
+-      FREG_FROB(f46,f0, f2, f4, f6, f8, f10,f12,f14) LOOP_CHUNK3(o1, o0, g7, vis73)
+-      b,pt			%xcc, vis70+4; faligndata %f14, %f16, %f48
+-vis71:FREG_FROB(f30,f32,f34,f36,f38,f40,f42,f44,f46) STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f46,f0, f2, f4, f6, f8, f10,f12,f14) STORE_JUMP(o0, f48, finish_f14) membar #Sync
+-vis72:FREG_FROB(f46,f0, f2, f4, f6, f8, f10,f12,f14) STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f14,f16,f18,f20,f22,f24,f26,f28,f30) STORE_JUMP(o0, f48, finish_f30) membar #Sync
+-vis73:FREG_FROB(f14,f16,f18,f20,f22,f24,f26,f28,f30) STORE_SYNC(o0, f48) membar #Sync
+-      FREG_FROB(f30,f32,f34,f36,f38,f40,f42,f44,f46) STORE_JUMP(o0, f48, finish_f46) membar #Sync
+-      VISLOOP_PAD
+-finish_f0:	FINISH_VISCHUNK(o0, f0,  f2,  g3)
+-finish_f2:	FINISH_VISCHUNK(o0, f2,  f4,  g3)
+-finish_f4:	FINISH_VISCHUNK(o0, f4,  f6,  g3)
+-finish_f6:	FINISH_VISCHUNK(o0, f6,  f8,  g3)
+-finish_f8:	FINISH_VISCHUNK(o0, f8,  f10, g3)
+-finish_f10:	FINISH_VISCHUNK(o0, f10, f12, g3)
+-finish_f12:	FINISH_VISCHUNK(o0, f12, f14, g3)
+-finish_f14:	UNEVEN_VISCHUNK(o0, f14, f0,  g3)
+-finish_f16:	FINISH_VISCHUNK(o0, f16, f18, g3)
+-finish_f18:	FINISH_VISCHUNK(o0, f18, f20, g3)
+-finish_f20:	FINISH_VISCHUNK(o0, f20, f22, g3)
+-finish_f22:	FINISH_VISCHUNK(o0, f22, f24, g3)
+-finish_f24:	FINISH_VISCHUNK(o0, f24, f26, g3)
+-finish_f26:	FINISH_VISCHUNK(o0, f26, f28, g3)
+-finish_f28:	FINISH_VISCHUNK(o0, f28, f30, g3)
+-finish_f30:	UNEVEN_VISCHUNK(o0, f30, f0,  g3)
+-finish_f32:	FINISH_VISCHUNK(o0, f32, f34, g3)
+-finish_f34:	FINISH_VISCHUNK(o0, f34, f36, g3)
+-finish_f36:	FINISH_VISCHUNK(o0, f36, f38, g3)
+-finish_f38:	FINISH_VISCHUNK(o0, f38, f40, g3)
+-finish_f40:	FINISH_VISCHUNK(o0, f40, f42, g3)
+-finish_f42:	FINISH_VISCHUNK(o0, f42, f44, g3)
+-finish_f44:	FINISH_VISCHUNK(o0, f44, f46, g3)
+-finish_f46:	UNEVEN_VISCHUNK_LAST(o0, f46, f0,  g3)
+-vis_out_slk:
+-#ifdef __KERNEL__
+-	srl		asi_src, 3, %g5				! IEU0	Group
+-	xor		asi_src, ASI_BLK_XOR1, asi_src		! IEU1
+-	xor		asi_src, %g5, asi_src			! IEU0	Group
+-#endif
+-vis_slk:ASI_SETSRC_NOBLK					! LSU	Group
+-	EXVIS3(LDDF	[%o1] ASINORMAL, %f2)			! Load	Group
+-	add		%o1, 8, %o1				! IEU0
+-	subcc		%g3, 8, %g3				! IEU1
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	faligndata	%f0, %f2, %f8				! GRU	Group
+-	EXVIS4(STDF	%f8, [%o0] ASINORMAL)			! Store
+-	bl,pn		%xcc, vis_out_slp			! CTI
+-	 add		%o0, 8, %o0				! IEU0	Group
+-	ASI_SETSRC_NOBLK					! LSU	Group
+-	EXVIS3(LDDF	[%o1] ASINORMAL, %f0)			! Load	Group
+-	add		%o1, 8, %o1				! IEU0
+-	subcc		%g3, 8, %g3				! IEU1
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	faligndata	%f2, %f0, %f8				! GRU	Group
+-	EXVIS4(STDF	%f8, [%o0] ASINORMAL)			! Store
+-	bge,pt		%xcc, vis_slk				! CTI
+-	 add		%o0, 8, %o0				! IEU0	Group
+-vis_out_slp:
+-#ifdef __KERNEL__
+-	brz,pt		%o2, vis_ret				! CTI	Group
+-	 mov		%g1, %o1				! IEU0
+-	ba,pt		%xcc, vis_slp+4				! CTI	Group
+-	 ASI_SETSRC_NOBLK					! LSU	Group
+-#endif
+-vis_out:brz,pt		%o2, vis_ret				! CTI	Group
+-	 mov		%g1, %o1				! IEU0
+-#ifdef __KERNEL__
+-	srl		asi_src, 3, %g5				! IEU0	Group
+-	xor		asi_src, ASI_BLK_XOR1, asi_src		! IEU1
+-	xor		asi_src, %g5, asi_src			! IEU0	Group
+-#endif
+-vis_slp:ASI_SETSRC_NOBLK					! LSU	Group
+-	EXO2(LDUB	[%o1] ASINORMAL, %g5)			! LOAD
+-	add		%o1, 1, %o1				! IEU0
+-	add		%o0, 1, %o0				! IEU1
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	subcc		%o2, 1, %o2				! IEU1
+-	bne,pt		%xcc, vis_slp				! CTI
+-	 EX(STB		%g5, [%o0 - 1] ASINORMAL,
+-			add %o2, 1)				! Store	Group
+-vis_ret:membar		#StoreLoad | #StoreStore		! LSU	Group
+-	FPU_CLEAN_RETL
+-
+-
+-__memcpy_short:
+-	andcc		%o2, 1, %g0				! IEU1	Group
+-	be,pt		%icc, 2f				! CTI
+-1:	 ASI_SETSRC_NOBLK					! LSU	Group
+-	EXO2(LDUB	[%o1] ASINORMAL, %g5)			! LOAD	Group
+-	add		%o1, 1, %o1				! IEU0
+-	add		%o0, 1, %o0				! IEU1
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	subcc		%o2, 1, %o2				! IEU1	Group
+-	be,pn		%xcc, short_ret				! CTI
+-	 EX(STB		%g5, [%o0 - 1] ASINORMAL,
+-			add %o2, 1)				! Store
+-2:	ASI_SETSRC_NOBLK					! LSU	Group
+-	EXO2(LDUB	[%o1] ASINORMAL, %g5)			! LOAD	Group
+-	add		%o0, 2, %o0				! IEU0
+-	EX2(LDUB	[%o1 + 1] ASINORMAL, %o5,
+-			sub %o0, 2, %o0,
+-			add %o2, %g0)				! LOAD	Group
+-	add		%o1, 2, %o1				! IEU0
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	subcc		%o2, 2, %o2				! IEU1	Group
+-	EX(STB		%g5, [%o0 - 2] ASINORMAL,
+-			add %o2, 2)				! Store
+-	bne,pt		%xcc, 2b				! CTI
+-	 EX(STB		%o5, [%o0 - 1] ASINORMAL,
+-			add %o2, 1)				! Store
+-short_ret:
+-	NORMAL_RETL
+-
+-#ifndef __KERNEL__
+-memcpy_private:
+-memcpy:
+-#ifndef REGS_64BIT
+-	srl		%o2, 0, %o2				! IEU1	Group
+-#endif	
+-	brz,pn		%o2, short_ret				! CTI	Group
+-	 mov		%o0, %g6				! IEU0
+-#endif
+-__memcpy_entry:
+-	cmp		%o2, 15					! IEU1	Group
+-	bleu,pn		%xcc, __memcpy_short			! CTI
+-	 cmp		%o2, (64 * 6)				! IEU1	Group
+-	bgeu,pn		%xcc, VIS_enter				! CTI
+-	 andcc		%o0, 7, %g2				! IEU1	Group
+-	sub		%o0, %o1, %g5				! IEU0
+-	andcc		%g5, 3, %o5				! IEU1	Group
+-	bne,pn		%xcc, memcpy_noVIS_misaligned		! CTI
+-	 andcc		%o1, 3, %g0				! IEU1	Group
+-#ifdef REGS_64BIT
+-	be,a,pt		%xcc, 3f				! CTI
+-	 andcc		%o1, 4, %g0				! IEU1	Group
+-	andcc		%o1, 1, %g0				! IEU1	Group
+-#else /* !REGS_64BIT */
+-	be,pt		%xcc, 5f				! CTI
+-	 andcc		%o1, 1, %g0				! IEU1	Group
+-#endif /* !REGS_64BIT */
+-	be,pn		%xcc, 4f				! CTI
+-	 andcc		%o1, 2, %g0				! IEU1	Group
+-	ASI_SETSRC_NOBLK					! LSU	Group
+-	EXO2(LDUB	[%o1] ASINORMAL, %g2)			! Load	Group
+-	add		%o1, 1, %o1				! IEU0
+-	add		%o0, 1, %o0				! IEU1
+-	sub		%o2, 1, %o2				! IEU0	Group
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	bne,pn		%xcc, 5f				! CTI	Group
+-	 EX(STB		%g2, [%o0 - 1] ASINORMAL,
+-			add %o2, 1)				! Store
+-4:	ASI_SETSRC_NOBLK					! LSU	Group
+-	EXO2(LDUH	[%o1] ASINORMAL, %g2)			! Load	Group
+-	add		%o1, 2, %o1				! IEU0
+-	add		%o0, 2, %o0				! IEU1
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	sub		%o2, 2, %o2				! IEU0
+-	EX(STH		%g2, [%o0 - 2] ASINORMAL,
+-			add %o2, 2)				! Store	Group + bubble
+-#ifdef REGS_64BIT
+-5:	andcc		%o1, 4, %g0				! IEU1
+-3:	be,a,pn		%xcc, 2f				! CTI
+-	 andcc		%o2, -128, %g7				! IEU1	Group
+-	ASI_SETSRC_NOBLK					! LSU	Group
+-	EXO2(LDUW	[%o1] ASINORMAL, %g5)			! Load	Group
+-	add		%o1, 4, %o1				! IEU0
+-	add		%o0, 4, %o0				! IEU1
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	sub		%o2, 4, %o2				! IEU0	Group
+-	EX(STW		%g5, [%o0 - 4] ASINORMAL,
+-			add %o2, 4)				! Store
+-	andcc		%o2, -128, %g7				! IEU1	Group
+-2:	be,pn		%xcc, 3f				! CTI
+-	 andcc		%o0, 4, %g0				! IEU1	Group
+-	be,pn		%xcc, 82f + 4				! CTI	Group
+-#else /* !REGS_64BIT */
+-5:	andcc		%o2, -128, %g7				! IEU1
+-	be,a,pn		%xcc, 41f				! CTI
+-	 andcc		%o2, 0x70, %g7				! IEU1	Group
+-#endif /* !REGS_64BIT */
+-5:	MOVE_BIGCHUNK(o1, o0, 0x00, g1, g3, g5, o5)
+-	MOVE_BIGCHUNK(o1, o0, 0x20, g1, g3, g5, o5)
+-	MOVE_BIGCHUNK(o1, o0, 0x40, g1, g3, g5, o5)
+-	MOVE_BIGCHUNK(o1, o0, 0x60, g1, g3, g5, o5)
+-	EXT(5b,35f,VIScopyfixup1)
+-35:	subcc		%g7, 128, %g7				! IEU1	Group
+-	add		%o1, 128, %o1				! IEU0
+-	bne,pt		%xcc, 5b				! CTI
+-	 add		%o0, 128, %o0				! IEU0	Group
+-3:	andcc		%o2, 0x70, %g7				! IEU1	Group
+-41:	be,pn		%xcc, 80f				! CTI
+-	 andcc		%o2, 8, %g0				! IEU1	Group
+-#ifdef __KERNEL__
+-79:	sethi		%hi(80f), %o5				! IEU0
+-	sll		%g7, 1, %g5				! IEU0	Group
+-	add		%o1, %g7, %o1				! IEU1
+-	srl		%g7, 1, %g2				! IEU0  Group
+-	sub		%o5, %g5, %o5				! IEU1
+-	sub		%o5, %g2, %o5				! IEU0  Group
+-	jmpl		%o5 + %lo(80f), %g0			! CTI	Group brk forced
+-	 add		%o0, %g7, %o0				! IEU0	Group
+-#else
+-								! Clk1 8-(
+-								! Clk2 8-(
+-								! Clk3 8-(
+-								! Clk4 8-(
+-79:	rd		%pc, %o5				! PDU	Group
+-	sll		%g7, 1, %g5				! IEU0	Group
+-	add		%o1, %g7, %o1				! IEU1
+-	sub		%o5, %g5, %o5				! IEU0  Group
+-	jmpl		%o5 + %lo(80f - 79b), %g0		! CTI	Group brk forced
+-	 add		%o0, %g7, %o0				! IEU0	Group
+-#endif
+-36:	MOVE_LASTCHUNK(o1, o0, 0x60, g2, g3, g5, o5)
+-	MOVE_LASTCHUNK(o1, o0, 0x50, g2, g3, g5, o5)
+-	MOVE_LASTCHUNK(o1, o0, 0x40, g2, g3, g5, o5)
+-	MOVE_LASTCHUNK(o1, o0, 0x30, g2, g3, g5, o5)
+-	MOVE_LASTCHUNK(o1, o0, 0x20, g2, g3, g5, o5)
+-	MOVE_LASTCHUNK(o1, o0, 0x10, g2, g3, g5, o5)
+-	MOVE_LASTCHUNK(o1, o0, 0x00, g2, g3, g5, o5)
+-	EXT(36b,80f,VIScopyfixup2)
+-80:	be,pt		%xcc, 81f				! CTI
+-	 andcc		%o2, 4, %g0				! IEU1
+-#ifdef REGS_64BIT
+-	ASI_SETSRC_NOBLK					! LSU	Group
+-	EX(LDX		[%o1] ASINORMAL, %g2,
+-			and %o2, 0xf)				! Load	Group
+-	add		%o0, 8, %o0				! IEU0
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	EX(STW		%g2, [%o0 - 0x4] ASINORMAL,
+-			and %o2, 0xf)				! Store	Group
+-	add		%o1, 8, %o1				! IEU1
+-	srlx		%g2, 32, %g2				! IEU0	Group
+-	EX2(STW		%g2, [%o0 - 0x8] ASINORMAL,
+-			and %o2, 0xf, %o2,
+-			sub %o2, 4)				! Store
+-#else /* !REGS_64BIT */
+-	lduw		[%o1], %g2				! Load	Group
+-	add		%o0, 8, %o0				! IEU0
+-	lduw		[%o1 + 0x4], %g3			! Load	Group
+-	add		%o1, 8, %o1				! IEU0
+-	stw		%g2, [%o0 - 0x8]			! Store	Group
+-	stw		%g3, [%o0 - 0x4]			! Store	Group
+-#endif /* !REGS_64BIT */
+-81:	be,pt		%xcc, 1f				! CTI
+-	 andcc		%o2, 2, %g0				! IEU1	Group
+-	ASI_SETSRC_NOBLK					! LSU	Group
+-	EX(LDUW		[%o1] ASINORMAL, %g2,
+-			and %o2, 0x7)				! Load	Group
+-	add		%o1, 4, %o1				! IEU0
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	EX(STW		%g2, [%o0] ASINORMAL,
+-			and %o2, 0x7)				! Store	Group
+-	add		%o0, 4, %o0				! IEU0
+-1:	be,pt		%xcc, 1f				! CTI
+-	 andcc		%o2, 1, %g0				! IEU1	Group
+-	ASI_SETSRC_NOBLK					! LSU	Group
+-	EX(LDUH		[%o1] ASINORMAL, %g2,
+-			and %o2, 0x3)				! Load	Group
+-	add		%o1, 2, %o1				! IEU0
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	EX(STH		%g2, [%o0] ASINORMAL,
+-			and %o2, 0x3)				! Store	Group
+-	add		%o0, 2, %o0				! IEU0
+-1:	be,pt		%xcc, normal_retl			! CTI
+-	 nop							! IEU1
+-	ASI_SETSRC_NOBLK					! LSU	Group
+-	EX(LDUB		[%o1] ASINORMAL, %g2,
+-			add %g0, 1)				! Load	Group
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	EX(STB		%g2, [%o0] ASINORMAL,
+-			add %g0, 1)				! Store	Group + bubble
+-normal_retl:
+-	NORMAL_RETL
+-
+-#ifdef REGS_64BIT
+-82:	MOVE_BIGALIGNCHUNK(o1, o0, 0x00, g1, g3, g5, o5)
+-	MOVE_BIGALIGNCHUNK(o1, o0, 0x40, g1, g3, g5, o5)
+-	EXT(82b,37f,VIScopyfixup3)
+-37:	subcc		%g7, 128, %g7				! IEU1	Group
+-	add		%o1, 128, %o1				! IEU0
+-	bne,pt		%xcc, 82b				! CTI
+-	 add		%o0, 128, %o0				! IEU0	Group
+-	andcc		%o2, 0x70, %g7				! IEU1
+-	be,pn		%xcc, 84f				! CTI
+-	 andcc		%o2, 8, %g0				! IEU1	Group
+-#ifdef __KERNEL__
+-83:	srl		%g7, 1, %g5				! IEU0
+-	sethi		%hi(84f), %o5				! IEU0	Group
+-	add		%g7, %g5, %g5				! IEU1
+-	add		%o1, %g7, %o1				! IEU0	Group
+-	sub		%o5, %g5, %o5				! IEU1
+-	jmpl		%o5 + %lo(84f), %g0			! CTI	Group brk forced
+-	 add		%o0, %g7, %o0				! IEU0	Group
+-#else
+-								! Clk1 8-(
+-								! Clk2 8-(
+-								! Clk3 8-(
+-								! Clk4 8-(
+-83:	rd		%pc, %o5				! PDU	Group
+-	add		%o1, %g7, %o1				! IEU0	Group
+-	sub		%o5, %g7, %o5				! IEU1
+-	jmpl		%o5 + %lo(84f - 83b), %g0		! CTI	Group brk forced
+-	 add		%o0, %g7, %o0				! IEU0	Group
+-#endif
+-38:	MOVE_LASTALIGNCHUNK(o1, o0, 0x60, g2, g3)
+-	MOVE_LASTALIGNCHUNK(o1, o0, 0x50, g2, g3)
+-	MOVE_LASTALIGNCHUNK(o1, o0, 0x40, g2, g3)
+-	MOVE_LASTALIGNCHUNK(o1, o0, 0x30, g2, g3)
+-	MOVE_LASTALIGNCHUNK(o1, o0, 0x20, g2, g3)
+-	MOVE_LASTALIGNCHUNK(o1, o0, 0x10, g2, g3)
+-	MOVE_LASTALIGNCHUNK(o1, o0, 0x00, g2, g3)
+-	EXT(38b,84f,VIScopyfixup4)
+-84:	be,pt		%xcc, 85f				! CTI	Group
+-	 andcc		%o2, 4, %g0				! IEU1
+-	ASI_SETSRC_NOBLK					! LSU	Group
+-	EX(LDX		[%o1] ASINORMAL, %g2,
+-			and %o2, 0xf)				! Load	Group
+-	add		%o0, 8, %o0				! IEU0
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	add		%o1, 8, %o1				! IEU0	Group
+-	EX(STX		%g2, [%o0 - 0x8] ASINORMAL,
+-			and %o2, 0xf)				! Store
+-85:	be,pt		%xcc, 1f				! CTI
+-	 andcc		%o2, 2, %g0				! IEU1	Group
+-	ASI_SETSRC_NOBLK					! LSU	Group
+-	EX(LDUW		[%o1] ASINORMAL, %g2,
+-			and %o2, 0x7)				! Load	Group
+-	add		%o0, 4, %o0				! IEU0
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	add		%o1, 4, %o1				! IEU0	Group
+-	EX(STW		%g2, [%o0 - 0x4] ASINORMAL,
+-			and %o2, 0x7)				! Store
+-1:	be,pt		%xcc, 1f				! CTI
+-	 andcc		%o2, 1, %g0				! IEU1	Group
+-	ASI_SETSRC_NOBLK					! LSU	Group
+-	EX(LDUH		[%o1] ASINORMAL, %g2,
+-			and %o2, 0x3)				! Load	Group
+-	add		%o0, 2, %o0				! IEU0
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	add		%o1, 2, %o1				! IEU0	Group
+-	EX(STH		%g2, [%o0 - 0x2] ASINORMAL,
+-			and %o2, 0x3)				! Store
+-1:	be,pt		%xcc, 1f				! CTI
+-	 nop							! IEU0	Group
+-	ASI_SETSRC_NOBLK					! LSU	Group
+-	EX(LDUB		[%o1] ASINORMAL, %g2,
+-			add %g0, 1)				! Load	Group
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	EX(STB		%g2, [%o0] ASINORMAL,
+-			add %g0, 1)				! Store	Group + bubble
+-1:	NORMAL_RETL
+-#endif	/* REGS_64BIT */
+-
+-memcpy_noVIS_misaligned:
+-	brz,pt			%g2, 2f				! CTI	Group
+-	 mov			8, %g1				! IEU0
+-	sub			%g1, %g2, %g2			! IEU0	Group
+-	sub			%o2, %g2, %o2			! IEU0	Group
+-1:	ASI_SETSRC_NOBLK					! LSU	Group
+-	EX(LDUB			[%o1] ASINORMAL, %g5,
+-				add %o2, %g2)			! Load	Group
+-	add			%o1, 1, %o1			! IEU0
+-	add			%o0, 1, %o0			! IEU1
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	subcc			%g2, 1, %g2			! IEU1	Group
+-	bne,pt			%xcc, 1b			! CTI
+-	 EX2(STB		%g5, [%o0 - 1] ASINORMAL,
+-				add %o2, %g2, %o2,
+-				add %o2, 1)			! Store
+-2:
+-#ifdef __KERNEL__
+-	VISEntry
+-#endif
+-	andn			%o2, 7, %g5 			! IEU0	Group
+-	and			%o2, 7, %o2			! IEU1
+-	fmovd			%f0, %f2			! FPU
+-	ASI_SETSRC_NOBLK					! LSU	Group
+-	alignaddr		%o1, %g0, %g1			! GRU	Group
+-	EXO2(LDDF		[%g1] ASINORMAL, %f4)		! Load	Group
+-1:	EX(LDDF			[%g1 + 0x8] ASINORMAL, %f6,
+-				add %o2, %g5)			! Load	Group
+-	add			%g1, 0x8, %g1			! IEU0	Group
+-	subcc			%g5, 8, %g5			! IEU1
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	faligndata		%f4, %f6, %f0			! GRU	Group
+-	EX2(STDF		%f0, [%o0] ASINORMAL,
+-				add %o2, %g5, %o2,
+-				add %o2, 8)			! Store
+-	add			%o1, 8, %o1			! IEU0	Group
+-	be,pn			%xcc, end_cruft			! CTI
+-	 add			%o0, 8, %o0			! IEU1
+-	ASI_SETSRC_NOBLK					! LSU	Group
+-	EX(LDDF			[%g1 + 0x8] ASINORMAL, %f4,
+-				add %o2, %g5)			! Load	Group
+-	add			%g1, 8, %g1			! IEU0
+-	subcc			%g5, 8, %g5			! IEU1
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	faligndata		%f6, %f4, %f0			! GRU	Group
+-	EX2(STDF		%f0, [%o0] ASINORMAL,
+-				add %o2, %g5, %o2,
+-				add %o2, 8)			! Store
+-	add			%o1, 8, %o1			! IEU0
+-	ASI_SETSRC_NOBLK					! LSU	Group
+-	bne,pn			%xcc, 1b			! CTI	Group
+-	 add			%o0, 8, %o0			! IEU0
+-end_cruft:
+-	brz,pn			%o2, fpu_retl			! CTI	Group
+-#ifndef __KERNEL__
+-	 nop							! IEU0
+-#else
+-	 ASI_SETSRC_NOBLK					! LSU	Group
+-#endif
+-	EXO2(LDUB	[%o1] ASINORMAL, %g5)			! LOAD
+-	add		%o1, 1, %o1				! IEU0
+-	add		%o0, 1, %o0				! IEU1
+-	ASI_SETDST_NOBLK					! LSU	Group
+-	subcc		%o2, 1, %o2				! IEU1
+-	bne,pt		%xcc, vis_slp				! CTI
+-	 EX(STB		%g5, [%o0 - 1] ASINORMAL,
+-			add %o2, 1)				! Store	Group
+-fpu_retl:
+-	FPU_RETL
+-
+-#ifdef __KERNEL__
+-		.section	.fixup
+-		.align		4
+-VIScopyfixup_reto2:
+-		mov		%o2, %o1
+-VIScopyfixup_ret:
+-		/* If this is copy_from_user(), zero out the rest of the
+-		 * kernel buffer.
+-		 */
+-		ldub		[%g6 + TI_CURRENT_DS], %o4
+-		andcc		asi_src, 0x1, %g0
+-		be,pt		%icc, 1f
+-		 VISExit
+-		andcc		asi_dest, 0x1, %g0
+-		bne,pn		%icc, 1f
+-		 nop
+-		save		%sp, -160, %sp
+-		mov		%i0, %o0
+-		call		__bzero
+-		 mov		%i1, %o1
+-		restore
+-1:		mov		%o1, %o0
+-		retl
+-		 wr		%o4, %g0, %asi
+-VIScopyfixup1:	subcc		%g2, 18, %g2
+-		add		%o0, 32, %o0
+-		bgeu,a,pt	%icc, VIScopyfixup1
+-		 sub		%g7, 32, %g7
+-		sub		%o0, 32, %o0
+-		rd		%pc, %g5
+-		add		%g2, (18 + 16), %g2
+-		ldub		[%g5 + %g2], %g2
+-		ba,a,pt		%xcc, 2f
+-.byte		0, 0, 0, 0, 0, 0, 0, 4, 4, 8, 12, 12, 16, 20, 20, 24, 28, 28
+-		.align		4
+-VIScopyfixup2:	mov		(7 * 16), %g7
+-1:		subcc		%g2, 10, %g2
+-		bgeu,a,pt	%icc, 1b
+-		 sub		%g7, 16, %g7
+-		sub		%o0, %g7, %o0
+-		rd		%pc, %g5
+-		add		%g2, (10 + 16), %g2
+-		ldub		[%g5 + %g2], %g2
+-		ba,a,pt		%xcc, 4f
+-.byte		0, 0, 0, 0, 0, 4, 4, 8, 12, 12
+-		.align		4
+-VIScopyfixup3:	subcc		%g2, 10, %g2
+-		add		%o0, 32, %o0
+-		bgeu,a,pt	%icc, VIScopyfixup3
+-		 sub		%g7, 32, %g7
+-		sub		%o0, 32, %o0
+-		rd		%pc, %g5
+-		add		%g2, (10 + 16), %g2
+-		ldub		[%g5 + %g2], %g2
+-		ba,a,pt		%xcc, 2f
+-.byte		0, 0, 0, 0, 0, 0, 0, 8, 16, 24
+-		.align		4
+-2:		and		%o2, 0x7f, %o2
+-		sub		%g7, %g2, %g7
+-		ba,pt		%xcc, VIScopyfixup_ret
+-		 add		%g7, %o2, %o1
+-VIScopyfixup4:	mov		(7 * 16), %g7
+-3:		subcc		%g2, 6, %g2
+-		bgeu,a,pt	%icc, 3b
+-		 sub		%g7, 16, %g7
+-		sub		%o0, %g7, %o0
+-		rd		%pc, %g5
+-		add		%g2, (6 + 16), %g2
+-		ldub		[%g5 + %g2], %g2
+-		ba,a,pt		%xcc, 4f
+-.byte		0, 0, 0, 0, 0, 8
+-		.align		4
+-4:		and		%o2, 0xf, %o2
+-		sub		%g7, %g2, %g7
+-		ba,pt		%xcc, VIScopyfixup_ret
+-		 add		%g7, %o2, %o1
+-VIScopyfixup_vis2:
+-		sub		%o2, 0x40, %o2
+-VIScopyfixup_vis0:
+-		add		%o2, 0x80, %o2
+-VIScopyfixup_vis1:
+-		add		%g7, %g3, %g7
+-		ba,pt		%xcc, VIScopyfixup_ret
+-		 add		%o2, %g7, %o1
+-VIScopyfixup_vis4:
+-		add		%g3, 8, %g3
+-VIScopyfixup_vis3:
+-		add		%g3, 8, %g3
+-		ba,pt		%xcc, VIScopyfixup_ret
+-		 add		%o2, %g3, %o1
+-#endif
+-
+-#ifdef __KERNEL__
+-		.text
+-		.align		32
+-
+-		.globl		__memmove
+-		.type		__memmove, at function
+-
+-		.globl		memmove
+-		.type		memmove, at function
+-
+-memmove:
+-__memmove:	cmp		%o0, %o1
+-		blu,pt		%xcc, memcpy_private
+-		 sub		%o0, %o1, %g5
+-		add		%o1, %o2, %g3
+-		cmp		%g3, %o0
+-		bleu,pt		%xcc, memcpy_private
+-		 add		%o1, %o2, %g5
+-		add		%o0, %o2, %o5
+-
+-		sub		%g5, 1, %o1
+-		sub		%o5, 1, %o0
+-1:		ldub		[%o1], %g5
+-		subcc		%o2, 1, %o2
+-		sub		%o1, 1, %o1
+-		stb		%g5, [%o0]
+-		bne,pt		%icc, 1b
+-		 sub		%o0, 1, %o0
+-
+-		retl
+-		 clr		%o0
+-#endif
+diff -Nru a/arch/sparc64/lib/bitops.S b/arch/sparc64/lib/bitops.S
+--- a/arch/sparc64/lib/bitops.S	2004-08-26 13:29:59 +02:00
++++ b/arch/sparc64/lib/bitops.S	2004-08-26 13:29:59 +02:00
+@@ -64,41 +64,3 @@
+ 2:	retl
+ 	 membar	#StoreLoad | #StoreStore
+ 	nop
+-
+-	.globl	___test_and_set_le_bit
+-___test_and_set_le_bit:	/* %o0=nr, %o1=addr */
+-	srlx	%o0, 5, %g1
+-	mov	1, %g5
+-	sllx	%g1, 2, %g3
+-	and	%o0, 31, %g2
+-	sllx	%g5, %g2, %g5
+-	add	%o1, %g3, %o1
+-	lduwa	[%o1] ASI_PL, %g7
+-1:	andcc	%g7, %g5, %o0
+-	bne,pn	%icc, 2f
+-	 xor	%g7, %g5, %g1
+-	casa	[%o1] ASI_PL, %g7, %g1
+-	cmp	%g7, %g1
+-	bne,a,pn %icc, 1b
+-	 lduwa	[%o1] ASI_PL, %g7
+-2:	retl
+-	 membar	#StoreLoad | #StoreStore
+-
+-	.globl	___test_and_clear_le_bit
+-___test_and_clear_le_bit:	/* %o0=nr, %o1=addr */
+-	srlx	%o0, 5, %g1
+-	mov	1, %g5
+-	sllx	%g1, 2, %g3
+-	and	%o0, 31, %g2
+-	sllx	%g5, %g2, %g5
+-	add	%o1, %g3, %o1
+-	lduwa	[%o1] ASI_PL, %g7
+-1:	andcc	%g7, %g5, %o0
+-	be,pn	%icc, 2f
+-	 xor	%g7, %g5, %g1
+-	casa	[%o1] ASI_PL, %g7, %g1
+-	cmp	%g7, %g1
+-	bne,a,pn %icc, 1b
+-	 lduwa	[%o1] ASI_PL, %g7
+-2:	retl
+-	 membar	#StoreLoad | #StoreStore
+diff -Nru a/arch/sparc64/lib/copy_in_user.S b/arch/sparc64/lib/copy_in_user.S
+--- /dev/null	Wed Dec 31 16:00:00 196900
++++ b/arch/sparc64/lib/copy_in_user.S	2004-08-26 13:29:59 +02:00
+@@ -0,0 +1,114 @@
++/* copy_in_user.S: Copy from userspace to userspace.
++ *
++ * Copyright (C) 1999, 2000, 2004 David S. Miller (davem at redhat.com)
++ */
++
++#include <asm/asi.h>
++
++#define XCC xcc
++
++#define EX(x,y)			\
++98:	x,y;			\
++	.section .fixup;	\
++	.align 4;		\
++99:	retl;			\
++	 mov 1, %o0;		\
++	.section __ex_table;	\
++	.align 4;		\
++	.word 98b, 99b;		\
++	.text;			\
++	.align 4;
++
++	.register	%g2,#scratch
++	.register	%g3,#scratch
++
++	.text
++	.align	32
++
++	/* Don't try to get too fancy here, just nice and
++	 * simple.  This is predominantly used for well aligned
++	 * small copies in the compat layer.  It is also used
++	 * to copy register windows around during thread cloning.
++	 */
++
++	.globl	___copy_in_user
++___copy_in_user:	/* %o0=dst, %o1=src, %o2=len */
++	/* Writing to %asi is _expensive_ so we hardcode it.
++	 * Reading %asi to check for KERNEL_DS is comparatively
++	 * cheap.
++	 */
++	rd		%asi, %g1
++	cmp		%g1, ASI_AIUS
++	bne,pn		%icc, memcpy_user_stub
++	 nop
++
++	cmp		%o2, 0
++	be,pn		%XCC, 85f
++	 or		%o0, %o1, %o3
++	cmp		%o2, 16
++	bleu,a,pn	%XCC, 80f
++	 or		%o3, %o2, %o3
++
++	/* 16 < len <= 64 */
++	andcc		%o3, 0x7, %g0
++	bne,pn		%XCC, 90f
++	 sub		%o0, %o1, %o3
++
++	andn		%o2, 0x7, %o4
++	and		%o2, 0x7, %o2
++1:	subcc		%o4, 0x8, %o4
++	EX(ldxa [%o1] %asi, %o5)
++	EX(stxa %o5, [%o1 + %o3] ASI_AIUS)
++	bgu,pt		%XCC, 1b
++	 add		%o1, 0x8, %o1
++	andcc		%o2, 0x4, %g0
++	be,pt		%XCC, 1f
++	 nop
++	sub		%o2, 0x4, %o2
++	EX(lduwa [%o1] %asi, %o5)
++	EX(stwa %o5, [%o1 + %o3] ASI_AIUS)
++	add		%o1, 0x4, %o1
++1:	cmp		%o2, 0
++	be,pt		%XCC, 85f
++	 nop
++	ba,pt		%xcc, 90f
++	 nop
++
++80:	/* 0 < len <= 16 */
++	andcc		%o3, 0x3, %g0
++	bne,pn		%XCC, 90f
++	 sub		%o0, %o1, %o3
++
++82:
++	subcc		%o2, 4, %o2
++	EX(lduwa [%o1] %asi, %g1)
++	EX(stwa %g1, [%o1 + %o3] ASI_AIUS)
++	bgu,pt		%XCC, 82b
++	 add		%o1, 4, %o1
++
++85:	retl
++	 clr		%o0
++
++	.align	32
++90:
++	subcc		%o2, 1, %o2
++	EX(lduba [%o1] %asi, %g1)
++	EX(stba %g1, [%o1 + %o3] ASI_AIUS)
++	bgu,pt		%XCC, 90b
++	 add		%o1, 1, %o1
++	retl
++	 clr		%o0
++
++	/* Act like copy_{to,in}_user(), ie. return zero instead
++	 * of original destination pointer.  This is invoked when
++	 * copy_{to,in}_user() finds that %asi is kernel space.
++	 */
++	.globl		memcpy_user_stub
++memcpy_user_stub:
++	save		%sp, -192, %sp
++	mov		%i0, %o0
++	mov		%i1, %o1
++	call		memcpy
++	 mov		%i2, %o2
++	ret
++	 restore	%g0, %g0, %o0
+diff -Nru a/arch/sparc64/lib/memmove.S b/arch/sparc64/lib/memmove.S
+--- /dev/null	Wed Dec 31 16:00:00 196900
++++ b/arch/sparc64/lib/memmove.S	2004-08-26 13:29:59 +02:00
+@@ -0,0 +1,31 @@
++/* memmove.S: Simple memmove implementation.
++ *
++ * Copyright (C) 1997, 2004 David S. Miller (davem at redhat.com)
++ * Copyright (C) 1996, 1997, 1998, 1999 Jakub Jelinek (jj at ultra.linux.cz)
++ */
++
++	.text
++	.align	32
++	.globl	memmove
++memmove:
++	mov		%o0, %g1
++	cmp		%o0, %o1
++	blu,pt		%xcc, memcpy
++	 sub		%o0, %o1, %g5
++	add		%o1, %o2, %g3
++	cmp		%g3, %o0
++	bleu,pt		%xcc, memcpy
++	 add		%o1, %o2, %g5
++	add		%o0, %o2, %o5
++
++	sub		%g5, 1, %o1
++	sub		%o5, 1, %o0
++1:	ldub		[%o1], %g5
++	subcc		%o2, 1, %o2
++	sub		%o1, 1, %o1
++	stb		%g5, [%o0]
++	bne,pt		%icc, 1b
++	 sub		%o0, 1, %o0
++
++	retl
++	 mov		%g1, %o0
+diff -Nru a/arch/sparc64/lib/strlen.S b/arch/sparc64/lib/strlen.S
+--- a/arch/sparc64/lib/strlen.S	2004-08-26 13:29:59 +02:00
++++ b/arch/sparc64/lib/strlen.S	2004-08-26 13:29:59 +02:00
+@@ -9,9 +9,8 @@
+ #define HI_MAGIC 0x80808080
+ 
+ 	.align	32
+-	.global strlen, __strlen
++	.global strlen
+ strlen:
+-__strlen:
+ 	mov	%o0, %o1
+ 	andcc	%o0, 3, %g0
+ 	be,pt	%icc, 9f
+diff -Nru a/arch/sparc64/lib/strncmp.S b/arch/sparc64/lib/strncmp.S
+--- a/arch/sparc64/lib/strncmp.S	2004-08-26 13:29:59 +02:00
++++ b/arch/sparc64/lib/strncmp.S	2004-08-26 13:29:59 +02:00
+@@ -8,8 +8,7 @@
+ 
+ 	.text
+ 	.align 4
+-	.global __strncmp, strncmp
+-__strncmp:
++	.global strncmp
+ strncmp:
+ 	brlez,pn %o2, 3f
+ 	 lduba	[%o0] (ASI_PNF), %o3
+diff -Nru a/arch/sparc64/lib/user_fixup.c b/arch/sparc64/lib/user_fixup.c
+--- /dev/null	Wed Dec 31 16:00:00 196900
++++ b/arch/sparc64/lib/user_fixup.c	2004-08-26 13:29:59 +02:00
+@@ -0,0 +1,68 @@
++/* user_fixup.c: Fix up user copy faults.
++ *
++ * Copyright (C) 2004 David S. Miller <davem at redhat.com>
++ */
++
++#include <linux/compiler.h>
++#include <linux/kernel.h>
++#include <linux/string.h>
++#include <linux/errno.h>
++#include <asm/uaccess.h>
++
++/* Calculating the exact fault address when using
++ * block loads and stores can be very complicated.
++ * Instead of trying to be clever and handling all
++ * of the cases, just fix things up simply here.
++ */
++
++unsigned long copy_from_user_fixup(void *to, const void __user *from, unsigned long size)
++{
++	char *dst = to;
++	const char __user *src = from;
++
++	while (size--) {
++		if (__get_user(*dst, src))
++			break;
++		dst++;
++		src++;
++	}
++
++	if (size)
++		memset(dst, 0, size);
++
++	return size;
++}
++
++unsigned long copy_to_user_fixup(void __user *to, const void *from, unsigned long size)
++{
++	char __user *dst = to;
++	const char *src = from;
++
++	while (size--) {
++		if (__put_user(*src, dst))
++			break;
++		dst++;
++		src++;
++	}
++
++	return size;
++}
++
++unsigned long copy_in_user_fixup(void __user *to, void __user *from, unsigned long size)
++{
++	char __user *dst = to;
++	char __user *src = from;
++
++	while (size--) {
++		char tmp;
++
++		if (__get_user(tmp, src))
++			break;
++		if (__put_user(tmp, dst))
++			break;
++		dst++;
++		src++;
++	}
++
++	return size;
++}
+diff -Nru a/include/asm-sparc64/bitops.h b/include/asm-sparc64/bitops.h
+--- a/include/asm-sparc64/bitops.h	2004-08-26 13:29:59 +02:00
++++ b/include/asm-sparc64/bitops.h	2004-08-26 13:29:59 +02:00
+@@ -228,13 +228,10 @@
+ #define find_first_zero_bit(addr, size) \
+         find_next_zero_bit((addr), (size), 0)
+ 
+-extern long ___test_and_set_le_bit(int nr, volatile unsigned long *addr);
+-extern long ___test_and_clear_le_bit(int nr, volatile unsigned long *addr);
+-
+-#define test_and_set_le_bit(nr,addr)	({___test_and_set_le_bit(nr,addr)!=0;})
+-#define test_and_clear_le_bit(nr,addr)	({___test_and_clear_le_bit(nr,addr)!=0;})
+-#define set_le_bit(nr,addr)		((void)___test_and_set_le_bit(nr,addr))
+-#define clear_le_bit(nr,addr)		((void)___test_and_clear_le_bit(nr,addr))
++#define test_and_set_le_bit(nr,addr)	\
++	({ ___test_and_set_bit((nr) ^ 0x38, (addr)) != 0; })
++#define test_and_clear_le_bit(nr,addr)	\
++	({ ___test_and_clear_bit((nr) ^ 0x38, (addr)) != 0; })
+ 
+ static __inline__ int test_le_bit(int nr, __const__ unsigned long * addr)
+ {
+@@ -253,22 +250,30 @@
+ 
+ #ifdef __KERNEL__
+ 
+-#define ext2_set_bit(nr,addr)		test_and_set_le_bit((nr),(unsigned long *)(addr))
+-#define ext2_set_bit_atomic(lock,nr,addr) test_and_set_le_bit((nr),(unsigned long *)(addr))
+-#define ext2_clear_bit(nr,addr)		test_and_clear_le_bit((nr),(unsigned long *)(addr))
+-#define ext2_clear_bit_atomic(lock,nr,addr) test_and_clear_le_bit((nr),(unsigned long *)(addr))
+-#define ext2_test_bit(nr,addr)		test_le_bit((nr),(unsigned long *)(addr))
++#define ext2_set_bit(nr,addr)	\
++	test_and_set_le_bit((nr),(unsigned long *)(addr))
++#define ext2_set_bit_atomic(lock,nr,addr) \
++	test_and_set_le_bit((nr),(unsigned long *)(addr))
++#define ext2_clear_bit(nr,addr)	\
++	test_and_clear_le_bit((nr),(unsigned long *)(addr))
++#define ext2_clear_bit_atomic(lock,nr,addr) \
++	test_and_clear_le_bit((nr),(unsigned long *)(addr))
++#define ext2_test_bit(nr,addr)	\
++	test_le_bit((nr),(unsigned long *)(addr))
+ #define ext2_find_first_zero_bit(addr, size) \
+ 	find_first_zero_le_bit((unsigned long *)(addr), (size))
+ #define ext2_find_next_zero_bit(addr, size, off) \
+ 	find_next_zero_le_bit((unsigned long *)(addr), (size), (off))
+ 
+ /* Bitmap functions for the minix filesystem.  */
+-#define minix_test_and_set_bit(nr,addr)	test_and_set_bit((nr),(unsigned long *)(addr))
+-#define minix_set_bit(nr,addr)		set_bit((nr),(unsigned long *)(addr))
++#define minix_test_and_set_bit(nr,addr)	\
++	test_and_set_bit((nr),(unsigned long *)(addr))
++#define minix_set_bit(nr,addr)	\
++	set_bit((nr),(unsigned long *)(addr))
+ #define minix_test_and_clear_bit(nr,addr) \
+ 	test_and_clear_bit((nr),(unsigned long *)(addr))
+-#define minix_test_bit(nr,addr)		test_bit((nr),(unsigned long *)(addr))
++#define minix_test_bit(nr,addr)	\
++	test_bit((nr),(unsigned long *)(addr))
+ #define minix_find_first_zero_bit(addr,size) \
+ 	find_first_zero_bit((unsigned long *)(addr),(size))
+ 
+diff -Nru a/include/asm-sparc64/string.h b/include/asm-sparc64/string.h
+--- a/include/asm-sparc64/string.h	2004-08-26 13:29:59 +02:00
++++ b/include/asm-sparc64/string.h	2004-08-26 13:29:59 +02:00
+@@ -15,35 +15,25 @@
+ 
+ #include <asm/asi.h>
+ 
+-extern void __memmove(void *,const void *,__kernel_size_t);
+ extern void *__memset(void *,int,__kernel_size_t);
+-extern void *__builtin_memset(void *,int,__kernel_size_t);
+ 
+ #ifndef EXPORT_SYMTAB_STROPS
+ 
+ /* First the mem*() things. */
+-#define __HAVE_ARCH_BCOPY
+ #define __HAVE_ARCH_MEMMOVE
+-
+-#undef memmove
+-#define memmove(_to, _from, _n) \
+-({ \
+-	void *_t = (_to); \
+-	__memmove(_t, (_from), (_n)); \
+-	_t; \
+-})
++extern void *memmove(void *, const void *, __kernel_size_t);
+ 
+ #define __HAVE_ARCH_MEMCPY
+-
+-extern void * memcpy(void *,const void *,__kernel_size_t);
++extern void *memcpy(void *, const void *, __kernel_size_t);
+ 
+ #define __HAVE_ARCH_MEMSET
++extern void *__builtin_memset(void *,int,__kernel_size_t);
+ 
+ static inline void *__constant_memset(void *s, int c, __kernel_size_t count)
+ {
+ 	extern __kernel_size_t __bzero(void *, __kernel_size_t);
+ 
+-	if(!c) {
++	if (!c) {
+ 		__bzero(s, count);
+ 		return s;
+ 	} else
+@@ -61,19 +51,19 @@
+ #define __HAVE_ARCH_MEMSCAN
+ 
+ #undef memscan
+-#define memscan(__arg0, __char, __arg2)						\
+-({										\
+-	extern void *__memscan_zero(void *, size_t);				\
+-	extern void *__memscan_generic(void *, int, size_t);			\
+-	void *__retval, *__addr = (__arg0);					\
+-	size_t __size = (__arg2);						\
+-										\
+-	if(__builtin_constant_p(__char) && !(__char))				\
+-		__retval = __memscan_zero(__addr, __size);			\
+-	else									\
+-		__retval = __memscan_generic(__addr, (__char), __size);		\
+-										\
+-	__retval;								\
++#define memscan(__arg0, __char, __arg2)					\
++({									\
++	extern void *__memscan_zero(void *, size_t);			\
++	extern void *__memscan_generic(void *, int, size_t);		\
++	void *__retval, *__addr = (__arg0);				\
++	size_t __size = (__arg2);					\
++									\
++	if(__builtin_constant_p(__char) && !(__char))			\
++		__retval = __memscan_zero(__addr, __size);		\
++	else								\
++		__retval = __memscan_generic(__addr, (__char), __size);	\
++									\
++	__retval;							\
+ })
+ 
+ #define __HAVE_ARCH_MEMCMP
+@@ -81,73 +71,10 @@
+ 
+ /* Now the str*() stuff... */
+ #define __HAVE_ARCH_STRLEN
+-
+-extern __kernel_size_t __strlen(const char *);
+ extern __kernel_size_t strlen(const char *);
+ 
+ #define __HAVE_ARCH_STRNCMP
+-
+-extern int __strncmp(const char *, const char *, __kernel_size_t);
+-
+-static inline int __constant_strncmp(const char *src, const char *dest, __kernel_size_t count)
+-{
+-	register int retval;
+-	switch(count) {
+-	case 0: return 0;
+-	case 1: return (src[0] - dest[0]);
+-	case 2: retval = (src[0] - dest[0]);
+-		if(!retval && src[0])
+-		  retval = (src[1] - dest[1]);
+-		return retval;
+-	case 3: retval = (src[0] - dest[0]);
+-		if(!retval && src[0]) {
+-		  retval = (src[1] - dest[1]);
+-		  if(!retval && src[1])
+-		    retval = (src[2] - dest[2]);
+-		}
+-		return retval;
+-	case 4: retval = (src[0] - dest[0]);
+-		if(!retval && src[0]) {
+-		  retval = (src[1] - dest[1]);
+-		  if(!retval && src[1]) {
+-		    retval = (src[2] - dest[2]);
+-		    if (!retval && src[2])
+-		      retval = (src[3] - dest[3]);
+-		  }
+-		}
+-		return retval;
+-	case 5: retval = (src[0] - dest[0]);
+-		if(!retval && src[0]) {
+-		  retval = (src[1] - dest[1]);
+-		  if(!retval && src[1]) {
+-		    retval = (src[2] - dest[2]);
+-		    if (!retval && src[2]) {
+-		      retval = (src[3] - dest[3]);
+-		      if (!retval && src[3])
+-		        retval = (src[4] - dest[4]);
+-		    }
+-		  }
+-		}
+-		return retval;
+-	default:
+-		retval = (src[0] - dest[0]);
+-		if(!retval && src[0]) {
+-		  retval = (src[1] - dest[1]);
+-		  if(!retval && src[1]) {
+-		    retval = (src[2] - dest[2]);
+-		    if(!retval && src[2])
+-		      retval = __strncmp(src+3,dest+3,count-3);
+-		  }
+-		}
+-		return retval;
+-	}
+-}
+-
+-#undef strncmp
+-#define strncmp(__arg0, __arg1, __arg2)	\
+-(__builtin_constant_p(__arg2) ?	\
+- __constant_strncmp(__arg0, __arg1, __arg2) : \
+- __strncmp(__arg0, __arg1, __arg2))
++extern int strncmp(const char *, const char *, __kernel_size_t);
+ 
+ #endif /* !EXPORT_SYMTAB_STROPS */
+ 
+diff -Nru a/include/asm-sparc64/uaccess.h b/include/asm-sparc64/uaccess.h
+--- a/include/asm-sparc64/uaccess.h	2004-08-26 13:29:59 +02:00
++++ b/include/asm-sparc64/uaccess.h	2004-08-26 13:29:59 +02:00
+@@ -252,18 +252,50 @@
+ 
+ extern int __get_user_bad(void);
+ 
+-extern unsigned long __copy_from_user(void *to, const void __user *from,
+-				      unsigned long size);
++extern unsigned long ___copy_from_user(void *to, const void __user *from,
++				       unsigned long size);
++extern unsigned long copy_from_user_fixup(void *to, const void __user *from,
++					  unsigned long size);
++static inline unsigned long copy_from_user(void *to, const void __user *from,
++					   unsigned long size)
++{
++	unsigned long ret = ___copy_from_user(to, from, size);
+ 
+-extern unsigned long __copy_to_user(void __user *to, const void *from,
+-				    unsigned long size);
++	if (ret)
++		ret = copy_from_user_fixup(to, from, size);
++	return ret;
++}
++#define __copy_from_user copy_from_user
+ 
+-extern unsigned long __copy_in_user(void __user *to, const void __user *from,
+-				    unsigned long size);
++extern unsigned long ___copy_to_user(void __user *to, const void *from,
++				     unsigned long size);
++extern unsigned long copy_to_user_fixup(void __user *to, const void *from,
++					unsigned long size);
++static inline unsigned long copy_to_user(void __user *to, const void *from,
++					 unsigned long size)
++{
++	unsigned long ret = ___copy_to_user(to, from, size);
+ 
+-#define copy_from_user __copy_from_user
+-#define copy_to_user __copy_to_user
+-#define copy_in_user __copy_in_user
++	if (ret)
++		ret = copy_to_user_fixup(to, from, size);
++	return ret;
++}
++#define __copy_to_user copy_to_user
++
++extern unsigned long ___copy_in_user(void __user *to, const void __user *from,
++				     unsigned long size);
++extern unsigned long copy_in_user_fixup(void __user *to, void __user *from,
++					unsigned long size);
++static inline unsigned long copy_in_user(void __user *to, void __user *from,
++					 unsigned long size)
++{
++	unsigned long ret = ___copy_in_user(to, from, size);
++
++	if (ret)
++		ret = copy_in_user_fixup(to, from, size);
++	return ret;
++}
++#define __copy_in_user copy_in_user
+ 
+ extern unsigned long __bzero_noasi(void __user *, unsigned long);
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sys_select-user_copy-check.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sys_select-user_copy-check.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/sys_select-user_copy-check.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,82 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: copy_to_user checking in select.c
+## DP: Patch author: Andrew Morton
+## DP: Upstream status: upstream
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: akpm (BitKeeper)
+# cset: 1.1832.32.65 (2.6) key=412f733cwgNgG-GzFSS_p4dLKImgpQ
+# inclusion: upstream
+# descrition: [PATCH] copy_to_user checking in select.c
+# revision date: Fri, 12 Nov 2004 17:38:48 +0900
+#
+# rset: ChangeSet|1.1832.32.64..1.1832.32.65
+# rset: fs/select.c|1.22..1.23
+# rset: include/linux/poll.h|1.10..1.11
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/08/27 10:45:32-07:00 akpm at osdl.org 
+#   [PATCH] copy_to_user checking in select.c
+#   
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# include/linux/poll.h
+#   2004/08/27 00:02:39-07:00 akpm at osdl.org +5 -3
+#   copy_to_user checking in select.c
+# 
+# fs/select.c
+#   2004/08/27 00:02:39-07:00 akpm at osdl.org +4 -3
+#   copy_to_user checking in select.c
+# 
+diff -Nru a/fs/select.c b/fs/select.c
+--- a/fs/select.c	2004-11-12 17:38:48 +09:00
++++ b/fs/select.c	2004-11-12 17:38:48 +09:00
+@@ -373,9 +373,10 @@
+ 		ret = 0;
+ 	}
+ 
+-	set_fd_set(n, inp, fds.res_in);
+-	set_fd_set(n, outp, fds.res_out);
+-	set_fd_set(n, exp, fds.res_ex);
++	if (set_fd_set(n, inp, fds.res_in) ||
++	    set_fd_set(n, outp, fds.res_out) ||
++	    set_fd_set(n, exp, fds.res_ex))
++		ret = -EFAULT;
+ 
+ out:
+ 	select_bits_free(bits, size);
+diff -Nru a/include/linux/poll.h b/include/linux/poll.h
+--- a/include/linux/poll.h	2004-11-12 17:38:48 +09:00
++++ b/include/linux/poll.h	2004-11-12 17:38:48 +09:00
+@@ -5,6 +5,7 @@
+ 
+ #ifdef __KERNEL__
+ 
++#include <linux/compiler.h>
+ #include <linux/wait.h>
+ #include <linux/string.h>
+ #include <linux/mm.h>
+@@ -81,11 +82,12 @@
+ 	return 0;
+ }
+ 
+-static inline
+-void set_fd_set(unsigned long nr, void __user *ufdset, unsigned long *fdset)
++static inline unsigned long __must_check
++set_fd_set(unsigned long nr, void __user *ufdset, unsigned long *fdset)
+ {
+ 	if (ufdset)
+-		__copy_to_user(ufdset, fdset, FDS_BYTES(nr));
++		return __copy_to_user(ufdset, fdset, FDS_BYTES(nr));
++	return 0;
+ }
+ 
+ static inline

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tcp_default_win_scale.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tcp_default_win_scale.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tcp_default_win_scale.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,22 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Switch /proc/sys/net/ipv4/tcp_default_win_scale default back to 0
+## DP: Patch author: Christoph Hellwig <hch at lst.de>
+## DP: Upstream status: local hack to work around broken systems other than Linux
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- kernel-source-2.6.8-orig/net/ipv4/tcp.c	2004-08-14 07:36:33.000000000 +0200
++++ kernel-source-2.6.8/net/ipv4/tcp.c	2004-09-18 14:29:00.692973688 +0200
+@@ -276,7 +276,7 @@
+ 
+ atomic_t tcp_orphan_count = ATOMIC_INIT(0);
+ 
+-int sysctl_tcp_default_win_scale = 7;
++int sysctl_tcp_default_win_scale = 0;
+ 
+ int sysctl_tcp_mem[3];
+ int sysctl_tcp_wmem[3] = { 4 * 1024, 16 * 1024, 128 * 1024 };

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tg3-update.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tg3-update.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tg3-update.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,1546 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Update tg3 driver to upstream BK as of 2004/09/21 (modulo firmware)
+## DP: Patch author: David Miller <davem at redhat.com> (+ addition contributors)
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- kernel-source-2.6.8/drivers/net/tg3.c	2004-09-13 05:28:07.000000000 +0200
++++ linux-2.5/drivers/net/tg3.c	2004-09-18 13:46:34.949986280 +0200
+@@ -60,8 +60,8 @@
+ 
+ #define DRV_MODULE_NAME		"tg3"
+ #define PFX DRV_MODULE_NAME	": "
+-#define DRV_MODULE_VERSION	"3.8"
+-#define DRV_MODULE_RELDATE	"July 14, 2004"
++#define DRV_MODULE_VERSION	"3.10"
++#define DRV_MODULE_RELDATE	"September 14, 2004"
+ 
+ #define TG3_DEF_MAC_MODE	0
+ #define TG3_DEF_RX_MODE		0
+@@ -445,9 +445,14 @@
+ 		       0x1f);
+ 	tp->pci_clock_ctrl = clock_ctrl;
+ 
+-	if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 &&
+-	    GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750 &&
+-	    (orig_clock_ctrl & CLOCK_CTRL_44MHZ_CORE) != 0) {
++	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ||
++	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) {
++		if (orig_clock_ctrl & CLOCK_CTRL_625_CORE) {
++			tw32_f(TG3PCI_CLOCK_CTRL,
++			       clock_ctrl | CLOCK_CTRL_625_CORE);
++			udelay(40);
++		}
++	} else if ((orig_clock_ctrl & CLOCK_CTRL_44MHZ_CORE) != 0) {
+ 		tw32_f(TG3PCI_CLOCK_CTRL,
+ 		     clock_ctrl |
+ 		     (CLOCK_CTRL_44MHZ_CORE | CLOCK_CTRL_ALTCLK));
+@@ -983,7 +988,7 @@
+ 		tp->link_config.orig_autoneg = tp->link_config.autoneg;
+ 	}
+ 
+-	if (tp->phy_id != PHY_ID_SERDES) {
++	if (!(tp->tg3_flags2 & TG3_FLG2_PHY_SERDES)) {
+ 		tp->link_config.speed = SPEED_10;
+ 		tp->link_config.duplex = DUPLEX_HALF;
+ 		tp->link_config.autoneg = AUTONEG_ENABLE;
+@@ -995,7 +1000,7 @@
+ 	if (tp->tg3_flags & TG3_FLAG_WOL_ENABLE) {
+ 		u32 mac_mode;
+ 
+-		if (tp->phy_id != PHY_ID_SERDES) {
++		if (!(tp->tg3_flags2 & TG3_FLG2_PHY_SERDES)) {
+ 			tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x5a);
+ 			udelay(40);
+ 
+@@ -1117,29 +1122,33 @@
+ 	u32 old_rx_mode = tp->rx_mode;
+ 	u32 old_tx_mode = tp->tx_mode;
+ 
+-	if (local_adv & ADVERTISE_PAUSE_CAP) {
+-		if (local_adv & ADVERTISE_PAUSE_ASYM) {
+-			if (remote_adv & LPA_PAUSE_CAP)
+-				new_tg3_flags |=
+-					(TG3_FLAG_RX_PAUSE |
+-					 TG3_FLAG_TX_PAUSE);
+-			else if (remote_adv & LPA_PAUSE_ASYM)
+-				new_tg3_flags |=
+-					(TG3_FLAG_RX_PAUSE);
+-		} else {
+-			if (remote_adv & LPA_PAUSE_CAP)
+-				new_tg3_flags |=
+-					(TG3_FLAG_RX_PAUSE |
+-					 TG3_FLAG_TX_PAUSE);
++	if (tp->tg3_flags & TG3_FLAG_PAUSE_AUTONEG) {
++		if (local_adv & ADVERTISE_PAUSE_CAP) {
++			if (local_adv & ADVERTISE_PAUSE_ASYM) {
++				if (remote_adv & LPA_PAUSE_CAP)
++					new_tg3_flags |=
++						(TG3_FLAG_RX_PAUSE |
++					 	TG3_FLAG_TX_PAUSE);
++				else if (remote_adv & LPA_PAUSE_ASYM)
++					new_tg3_flags |=
++						(TG3_FLAG_RX_PAUSE);
++			} else {
++				if (remote_adv & LPA_PAUSE_CAP)
++					new_tg3_flags |=
++						(TG3_FLAG_RX_PAUSE |
++					 	TG3_FLAG_TX_PAUSE);
++			}
++		} else if (local_adv & ADVERTISE_PAUSE_ASYM) {
++			if ((remote_adv & LPA_PAUSE_CAP) &&
++		    	(remote_adv & LPA_PAUSE_ASYM))
++				new_tg3_flags |= TG3_FLAG_TX_PAUSE;
+ 		}
+-	} else if (local_adv & ADVERTISE_PAUSE_ASYM) {
+-		if ((remote_adv & LPA_PAUSE_CAP) &&
+-		    (remote_adv & LPA_PAUSE_ASYM))
+-			new_tg3_flags |= TG3_FLAG_TX_PAUSE;
+-	}
+ 
+-	tp->tg3_flags &= ~(TG3_FLAG_RX_PAUSE | TG3_FLAG_TX_PAUSE);
+-	tp->tg3_flags |= new_tg3_flags;
++		tp->tg3_flags &= ~(TG3_FLAG_RX_PAUSE | TG3_FLAG_TX_PAUSE);
++		tp->tg3_flags |= new_tg3_flags;
++	} else {
++		new_tg3_flags = tp->tg3_flags;
++	}
+ 
+ 	if (new_tg3_flags & TG3_FLAG_RX_PAUSE)
+ 		tp->rx_mode |= RX_MODE_FLOW_CTRL_ENABLE;
+@@ -1490,6 +1499,18 @@
+ 	current_speed = SPEED_INVALID;
+ 	current_duplex = DUPLEX_INVALID;
+ 
++	if (tp->tg3_flags2 & TG3_FLG2_CAPACITIVE_COUPLING) {
++		u32 val;
++
++		tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x4007);
++		tg3_readphy(tp, MII_TG3_AUX_CTRL, &val);
++		if (!(val & (1 << 10))) {
++			val |= (1 << 10);
++			tg3_writephy(tp, MII_TG3_AUX_CTRL, val);
++			goto relink;
++		}
++	}
++
+ 	bmsr = 0;
+ 	for (i = 0; i < 100; i++) {
+ 		tg3_readphy(tp, MII_BMSR, &bmsr);
+@@ -1569,7 +1590,7 @@
+ 			tg3_setup_flow_control(tp, local_adv, remote_adv);
+ 		}
+ 	}
+-
++relink:
+ 	if (current_link_up == 0) {
+ 		u32 tmp;
+ 
+@@ -1619,7 +1640,7 @@
+ 	tw32_f(MAC_MODE, tp->mac_mode);
+ 	udelay(40);
+ 
+-	if (tp->tg3_flags & (TG3_FLAG_USE_LINKCHG_REG | TG3_FLAG_POLL_SERDES)) {
++	if (tp->tg3_flags & TG3_FLAG_USE_LINKCHG_REG) {
+ 		/* Polled via timer. */
+ 		tw32_f(MAC_EVENT, 0);
+ 	} else {
+@@ -1968,62 +1989,264 @@
+ static int fiber_autoneg(struct tg3 *tp, u32 *flags)
+ {
+ 	int res = 0;
++	struct tg3_fiber_aneginfo aninfo;
++	int status = ANEG_FAILED;
++	unsigned int tick;
++	u32 tmp;
+ 
+-	if (tp->tg3_flags2 & TG3_FLG2_HW_AUTONEG) {
+-		u32 dig_status;
++	tw32_f(MAC_TX_AUTO_NEG, 0);
+ 
+-		dig_status = tr32(SG_DIG_STATUS);
+-		*flags = 0;
+-		if (dig_status & SG_DIG_PARTNER_ASYM_PAUSE)
+-			*flags |= MR_LP_ADV_ASYM_PAUSE;
+-		if (dig_status & SG_DIG_PARTNER_PAUSE_CAPABLE)
+-			*flags |= MR_LP_ADV_SYM_PAUSE;
+-
+-		if ((dig_status & SG_DIG_AUTONEG_COMPLETE) &&
+-		    !(dig_status & (SG_DIG_AUTONEG_ERROR |
+-				    SG_DIG_PARTNER_FAULT_MASK)))
+-			res = 1;
+-	} else {
+-		struct tg3_fiber_aneginfo aninfo;
+-		int status = ANEG_FAILED;
+-		unsigned int tick;
+-		u32 tmp;
++	tmp = tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK;
++	tw32_f(MAC_MODE, tmp | MAC_MODE_PORT_MODE_GMII);
++	udelay(40);
+ 
+-		tw32_f(MAC_TX_AUTO_NEG, 0);
++	tw32_f(MAC_MODE, tp->mac_mode | MAC_MODE_SEND_CONFIGS);
++	udelay(40);
+ 
+-		tmp = tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK;
+-		tw32_f(MAC_MODE, tmp | MAC_MODE_PORT_MODE_GMII);
+-		udelay(40);
++	memset(&aninfo, 0, sizeof(aninfo));
++	aninfo.flags |= MR_AN_ENABLE;
++	aninfo.state = ANEG_STATE_UNKNOWN;
++	aninfo.cur_time = 0;
++	tick = 0;
++	while (++tick < 195000) {
++		status = tg3_fiber_aneg_smachine(tp, &aninfo);
++		if (status == ANEG_DONE || status == ANEG_FAILED)
++			break;
+ 
+-		tw32_f(MAC_MODE, tp->mac_mode | MAC_MODE_SEND_CONFIGS);
+-		udelay(40);
++		udelay(1);
++	}
+ 
+-		memset(&aninfo, 0, sizeof(aninfo));
+-		aninfo.flags |= MR_AN_ENABLE;
+-		aninfo.state = ANEG_STATE_UNKNOWN;
+-		aninfo.cur_time = 0;
+-		tick = 0;
+-		while (++tick < 195000) {
+-			status = tg3_fiber_aneg_smachine(tp, &aninfo);
+-			if (status == ANEG_DONE || status == ANEG_FAILED)
+-				break;
++	tp->mac_mode &= ~MAC_MODE_SEND_CONFIGS;
++	tw32_f(MAC_MODE, tp->mac_mode);
++	udelay(40);
+ 
+-			udelay(1);
++	*flags = aninfo.flags;
++
++	if (status == ANEG_DONE &&
++	    (aninfo.flags & (MR_AN_COMPLETE | MR_LINK_OK |
++			     MR_LP_ADV_FULL_DUPLEX)))
++		res = 1;
++
++	return res;
++}
++
++static void tg3_init_bcm8002(struct tg3 *tp)
++{
++	u32 mac_status = tr32(MAC_STATUS);
++	int i;
++
++	/* Reset when initting first time or we have a link. */
++	if ((tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) &&
++	    !(mac_status & MAC_STATUS_PCS_SYNCED))
++		return;
++
++	/* Set PLL lock range. */
++	tg3_writephy(tp, 0x16, 0x8007);
++
++	/* SW reset */
++	tg3_writephy(tp, MII_BMCR, BMCR_RESET);
++
++	/* Wait for reset to complete. */
++	/* XXX schedule_timeout() ... */
++	for (i = 0; i < 500; i++)
++		udelay(10);
++
++	/* Config mode; select PMA/Ch 1 regs. */
++	tg3_writephy(tp, 0x10, 0x8411);
++
++	/* Enable auto-lock and comdet, select txclk for tx. */
++	tg3_writephy(tp, 0x11, 0x0a10);
++
++	tg3_writephy(tp, 0x18, 0x00a0);
++	tg3_writephy(tp, 0x16, 0x41ff);
++
++	/* Assert and deassert POR. */
++	tg3_writephy(tp, 0x13, 0x0400);
++	udelay(40);
++	tg3_writephy(tp, 0x13, 0x0000);
++
++	tg3_writephy(tp, 0x11, 0x0a50);
++	udelay(40);
++	tg3_writephy(tp, 0x11, 0x0a10);
++
++	/* Wait for signal to stabilize */
++	/* XXX schedule_timeout() ... */
++	for (i = 0; i < 15000; i++)
++		udelay(10);
++
++	/* Deselect the channel register so we can read the PHYID
++	 * later.
++	 */
++	tg3_writephy(tp, 0x10, 0x8011);
++}
++
++static int tg3_setup_fiber_hw_autoneg(struct tg3 *tp, u32 mac_status)
++{
++	u32 sg_dig_ctrl, sg_dig_status;
++	u32 serdes_cfg, expected_sg_dig_ctrl;
++	int workaround, port_a;
++	int current_link_up;
++
++	serdes_cfg = 0;
++	expected_sg_dig_ctrl = 0;
++	workaround = 0;
++	port_a = 1;
++	current_link_up = 0;
++
++	if (tp->pci_chip_rev_id != CHIPREV_ID_5704_A0 &&
++	    tp->pci_chip_rev_id != CHIPREV_ID_5704_A1) {
++		workaround = 1;
++		if (tr32(TG3PCI_DUAL_MAC_CTRL) & DUAL_MAC_CTRL_ID)
++			port_a = 0;
++
++		serdes_cfg = tr32(MAC_SERDES_CFG) &
++			((1 << 23) | (1 << 22) | (1 << 21) | (1 << 20));
++	}
++
++	sg_dig_ctrl = tr32(SG_DIG_CTRL);
++
++	if (tp->link_config.autoneg != AUTONEG_ENABLE) {
++		if (sg_dig_ctrl & (1 << 31)) {
++			if (workaround) {
++				u32 val = serdes_cfg;
++
++				if (port_a)
++					val |= 0xc010880;
++				else
++					val |= 0x4010880;
++				tw32_f(MAC_SERDES_CFG, val);
++			}
++			tw32_f(SG_DIG_CTRL, 0x01388400);
++		}
++		if (mac_status & MAC_STATUS_PCS_SYNCED) {
++			tg3_setup_flow_control(tp, 0, 0);
++			current_link_up = 1;
+ 		}
++		goto out;
++	}
+ 
+-		tp->mac_mode &= ~MAC_MODE_SEND_CONFIGS;
+-		tw32_f(MAC_MODE, tp->mac_mode);
+-		udelay(40);
++	/* Want auto-negotiation.  */
++	expected_sg_dig_ctrl = 0x81388400;
++
++	/* Pause capability */
++	expected_sg_dig_ctrl |= (1 << 11);
++
++	/* Asymettric pause */
++	expected_sg_dig_ctrl |= (1 << 12);
++
++	if (sg_dig_ctrl != expected_sg_dig_ctrl) {
++		if (workaround)
++			tw32_f(MAC_SERDES_CFG, serdes_cfg | 0xc011880);
++		tw32_f(SG_DIG_CTRL, expected_sg_dig_ctrl | (1 << 30));
++		udelay(5);
++		tw32_f(SG_DIG_CTRL, expected_sg_dig_ctrl);
++
++		tp->tg3_flags2 |= TG3_FLG2_PHY_JUST_INITTED;
++	} else if (mac_status & (MAC_STATUS_PCS_SYNCED |
++				 MAC_STATUS_SIGNAL_DET)) {
++		sg_dig_status = tr32(SG_DIG_STATUS);
++
++		if ((sg_dig_status & (1 << 1)) &&
++		    (mac_status & MAC_STATUS_PCS_SYNCED)) {
++			u32 local_adv, remote_adv;
++
++			local_adv = ADVERTISE_PAUSE_CAP;
++			remote_adv = 0;
++			if (sg_dig_status & (1 << 19))
++				remote_adv |= LPA_PAUSE_CAP;
++			if (sg_dig_status & (1 << 20))
++				remote_adv |= LPA_PAUSE_ASYM;
++
++			tg3_setup_flow_control(tp, local_adv, remote_adv);
++			current_link_up = 1;
++			tp->tg3_flags2 &= ~TG3_FLG2_PHY_JUST_INITTED;
++		} else if (!(sg_dig_status & (1 << 1))) {
++			if (tp->tg3_flags2 & TG3_FLG2_PHY_JUST_INITTED)
++				tp->tg3_flags2 &= ~TG3_FLG2_PHY_JUST_INITTED;
++			else {
++				if (workaround) {
++					u32 val = serdes_cfg;
++
++					if (port_a)
++						val |= 0xc010880;
++					else
++						val |= 0x4010880;
++
++					tw32_f(MAC_SERDES_CFG, val);
++				}
+ 
+-		*flags = aninfo.flags;
++				tw32_f(SG_DIG_CTRL, 0x01388400);
++				udelay(40);
+ 
+-		if (status == ANEG_DONE &&
+-		    (aninfo.flags & (MR_AN_COMPLETE | MR_LINK_OK |
+-				     MR_LP_ADV_FULL_DUPLEX)))
+-			res = 1;
++				mac_status = tr32(MAC_STATUS);
++				if (mac_status & MAC_STATUS_PCS_SYNCED) {
++					tg3_setup_flow_control(tp, 0, 0);
++					current_link_up = 1;
++				}
++			}
++		}
+ 	}
+ 
+-	return res;
++out:
++	return current_link_up;
++}
++
++static int tg3_setup_fiber_by_hand(struct tg3 *tp, u32 mac_status)
++{
++	int current_link_up = 0;
++
++ 	if (!(mac_status & MAC_STATUS_PCS_SYNCED)) {
++		tp->tg3_flags &= ~TG3_FLAG_GOT_SERDES_FLOWCTL;
++		goto out;
++	}
++
++	if (tp->link_config.autoneg == AUTONEG_ENABLE) {
++		u32 flags;
++		int i;
++  
++		if (fiber_autoneg(tp, &flags)) {
++			u32 local_adv, remote_adv;
++
++			local_adv = ADVERTISE_PAUSE_CAP;
++			remote_adv = 0;
++			if (flags & MR_LP_ADV_SYM_PAUSE)
++				remote_adv |= LPA_PAUSE_CAP;
++			if (flags & MR_LP_ADV_ASYM_PAUSE)
++				remote_adv |= LPA_PAUSE_ASYM;
++
++			tg3_setup_flow_control(tp, local_adv, remote_adv);
++
++			tp->tg3_flags |= TG3_FLAG_GOT_SERDES_FLOWCTL;
++			current_link_up = 1;
++		}
++		for (i = 0; i < 30; i++) {
++			udelay(20);
++			tw32_f(MAC_STATUS,
++			       (MAC_STATUS_SYNC_CHANGED |
++				MAC_STATUS_CFG_CHANGED));
++			udelay(40);
++			if ((tr32(MAC_STATUS) &
++			     (MAC_STATUS_SYNC_CHANGED |
++			      MAC_STATUS_CFG_CHANGED)) == 0)
++				break;
++		}
++
++		mac_status = tr32(MAC_STATUS);
++		if (current_link_up == 0 &&
++		    (mac_status & MAC_STATUS_PCS_SYNCED) &&
++		    !(mac_status & MAC_STATUS_RCVD_CFG))
++			current_link_up = 1;
++	} else {
++		/* Forcing 1000FD link up. */
++		current_link_up = 1;
++		tp->tg3_flags |= TG3_FLAG_GOT_SERDES_FLOWCTL;
++
++		tw32_f(MAC_MODE, (tp->mac_mode | MAC_MODE_SEND_CONFIGS));
++		udelay(40);
++	}
++
++out:
++	return current_link_up;
+ }
+ 
+ static int tg3_setup_fiber_phy(struct tg3 *tp, int force_reset)
+@@ -2031,6 +2254,7 @@
+ 	u32 orig_pause_cfg;
+ 	u16 orig_active_speed;
+ 	u8 orig_active_duplex;
++	u32 mac_status;
+ 	int current_link_up;
+ 	int i;
+ 
+@@ -2040,118 +2264,43 @@
+ 	orig_active_speed = tp->link_config.active_speed;
+ 	orig_active_duplex = tp->link_config.active_duplex;
+ 
+-	tp->mac_mode &= ~(MAC_MODE_PORT_MODE_MASK | MAC_MODE_HALF_DUPLEX);
+-	tp->mac_mode |= MAC_MODE_PORT_MODE_TBI;
+-	tw32_f(MAC_MODE, tp->mac_mode);
+-	udelay(40);
+-
+-	if (tp->tg3_flags2 & TG3_FLG2_HW_AUTONEG) {
+-		/* Allow time for the hardware to auto-negotiate (195ms) */
+-		unsigned int tick = 0;
+-
+-		while (++tick < 195000) { 
+-			if (tr32(SG_DIG_STATUS) & SG_DIG_AUTONEG_COMPLETE)
+-				break;
+-			udelay(1);
++	if (!(tp->tg3_flags2 & TG3_FLG2_HW_AUTONEG) &&
++	    netif_carrier_ok(tp->dev) &&
++	    (tp->tg3_flags & TG3_FLAG_INIT_COMPLETE)) {
++		mac_status = tr32(MAC_STATUS);
++		mac_status &= (MAC_STATUS_PCS_SYNCED |
++			       MAC_STATUS_SIGNAL_DET |
++			       MAC_STATUS_CFG_CHANGED |
++			       MAC_STATUS_RCVD_CFG);
++		if (mac_status == (MAC_STATUS_PCS_SYNCED |
++				   MAC_STATUS_SIGNAL_DET)) {
++			tw32_f(MAC_STATUS, (MAC_STATUS_SYNC_CHANGED |
++					    MAC_STATUS_CFG_CHANGED));
++			return 0;
+ 		}
+-		if (tick >= 195000)
+-			printk(KERN_INFO PFX "%s: HW autoneg failed !\n",
+-			    tp->dev->name);
+ 	}
+ 
+-	/* Reset when initting first time or we have a link. */
+-	if (!(tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) ||
+-	    (tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED)) {
+-		/* Set PLL lock range. */
+-		tg3_writephy(tp, 0x16, 0x8007);
+-
+-		/* SW reset */
+-		tg3_writephy(tp, MII_BMCR, BMCR_RESET);
+-
+-		/* Wait for reset to complete. */
+-		/* XXX schedule_timeout() ... */
+-		for (i = 0; i < 500; i++)
+-			udelay(10);
+-
+-		/* Config mode; select PMA/Ch 1 regs. */
+-		tg3_writephy(tp, 0x10, 0x8411);
+-
+-		/* Enable auto-lock and comdet, select txclk for tx. */
+-		tg3_writephy(tp, 0x11, 0x0a10);
+-
+-		tg3_writephy(tp, 0x18, 0x00a0);
+-		tg3_writephy(tp, 0x16, 0x41ff);
++	tw32_f(MAC_TX_AUTO_NEG, 0);
+ 
+-		/* Assert and deassert POR. */
+-		tg3_writephy(tp, 0x13, 0x0400);
+-		udelay(40);
+-		tg3_writephy(tp, 0x13, 0x0000);
+-
+-		tg3_writephy(tp, 0x11, 0x0a50);
+-		udelay(40);
+-		tg3_writephy(tp, 0x11, 0x0a10);
++	tp->mac_mode &= ~(MAC_MODE_PORT_MODE_MASK | MAC_MODE_HALF_DUPLEX);
++	tp->mac_mode |= MAC_MODE_PORT_MODE_TBI;
++	tw32_f(MAC_MODE, tp->mac_mode);
++	udelay(40);
+ 
+-		/* Wait for signal to stabilize */
+-		/* XXX schedule_timeout() ... */
+-		for (i = 0; i < 15000; i++)
+-			udelay(10);
++	if (tp->phy_id == PHY_ID_BCM8002)
++		tg3_init_bcm8002(tp);
+ 
+-		/* Deselect the channel register so we can read the PHYID
+-		 * later.
+-		 */
+-		tg3_writephy(tp, 0x10, 0x8011);
+-	}
+-
+-	/* Enable link change interrupt unless serdes polling.  */
+-	if (!(tp->tg3_flags & TG3_FLAG_POLL_SERDES))
+-		tw32_f(MAC_EVENT, MAC_EVENT_LNKSTATE_CHANGED);
+-	else
+-		tw32_f(MAC_EVENT, 0);
++	/* Enable link change event even when serdes polling.  */
++	tw32_f(MAC_EVENT, MAC_EVENT_LNKSTATE_CHANGED);
+ 	udelay(40);
+ 
+ 	current_link_up = 0;
+- 	if (tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED) {
+-		if (tp->link_config.autoneg == AUTONEG_ENABLE) {
+-			u32 flags;
+-  
+-			if (fiber_autoneg(tp, &flags)) {
+-				u32 local_adv, remote_adv;
+-
+-				local_adv = ADVERTISE_PAUSE_CAP;
+-				remote_adv = 0;
+-				if (flags & MR_LP_ADV_SYM_PAUSE)
+-  					remote_adv |= LPA_PAUSE_CAP;
+-				if (flags & MR_LP_ADV_ASYM_PAUSE)
+-					remote_adv |= LPA_PAUSE_ASYM;
++	mac_status = tr32(MAC_STATUS);
+ 
+-				tg3_setup_flow_control(tp, local_adv, remote_adv);
+-
+-				tp->tg3_flags |=
+-					TG3_FLAG_GOT_SERDES_FLOWCTL;
+-				current_link_up = 1;
+-			}
+-			for (i = 0; i < 60; i++) {
+-				udelay(20);
+-				tw32_f(MAC_STATUS,
+-				     (MAC_STATUS_SYNC_CHANGED |
+-				      MAC_STATUS_CFG_CHANGED));
+-				udelay(40);
+-				if ((tr32(MAC_STATUS) &
+-				     (MAC_STATUS_SYNC_CHANGED |
+-				      MAC_STATUS_CFG_CHANGED)) == 0)
+-					break;
+-			}
+-			if (current_link_up == 0 &&
+-			    (tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED)) {
+-				current_link_up = 1;
+-			}
+-		} else {
+-			/* Forcing 1000FD link up. */
+-			current_link_up = 1;
+-			tp->tg3_flags |= TG3_FLAG_GOT_SERDES_FLOWCTL;
+-		}
+-	} else
+-		tp->tg3_flags &= ~TG3_FLAG_GOT_SERDES_FLOWCTL;
++	if (tp->tg3_flags2 & TG3_FLG2_HW_AUTONEG)
++		current_link_up = tg3_setup_fiber_hw_autoneg(tp, mac_status);
++	else
++		current_link_up = tg3_setup_fiber_by_hand(tp, mac_status);
+ 
+ 	tp->mac_mode &= ~MAC_MODE_LINK_POLARITY;
+ 	tw32_f(MAC_MODE, tp->mac_mode);
+@@ -2162,19 +2311,24 @@
+ 		 (tp->hw_status->status & ~SD_STATUS_LINK_CHG));
+ 
+ 	for (i = 0; i < 100; i++) {
+-		udelay(20);
+-		tw32_f(MAC_STATUS,
+-		     (MAC_STATUS_SYNC_CHANGED |
+-		      MAC_STATUS_CFG_CHANGED));
+-		udelay(40);
+-		if ((tr32(MAC_STATUS) &
+-		     (MAC_STATUS_SYNC_CHANGED |
+-		      MAC_STATUS_CFG_CHANGED)) == 0)
++		tw32_f(MAC_STATUS, (MAC_STATUS_SYNC_CHANGED |
++				    MAC_STATUS_CFG_CHANGED));
++		udelay(5);
++		if ((tr32(MAC_STATUS) & (MAC_STATUS_SYNC_CHANGED |
++					 MAC_STATUS_CFG_CHANGED)) == 0)
+ 			break;
+ 	}
+ 
+-	if ((tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED) == 0)
++	mac_status = tr32(MAC_STATUS);
++	if ((mac_status & MAC_STATUS_PCS_SYNCED) == 0) {
+ 		current_link_up = 0;
++		if (tp->link_config.autoneg == AUTONEG_ENABLE) {
++			tw32_f(MAC_MODE, (tp->mac_mode |
++					  MAC_MODE_SEND_CONFIGS));
++			udelay(1);
++			tw32_f(MAC_MODE, tp->mac_mode);
++		}
++	}
+ 
+ 	if (current_link_up == 1) {
+ 		tp->link_config.active_speed = SPEED_1000;
+@@ -2206,15 +2360,6 @@
+ 			tg3_link_report(tp);
+ 	}
+ 
+-	if ((tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED) == 0) {
+-		tw32_f(MAC_MODE, tp->mac_mode | MAC_MODE_LINK_POLARITY);
+-		udelay(40);
+-		if (tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) {
+-			tw32_f(MAC_MODE, tp->mac_mode);
+-			udelay(40);
+-		}
+-	}
+-
+ 	return 0;
+ }
+ 
+@@ -2222,7 +2367,7 @@
+ {
+ 	int err;
+ 
+-	if (tp->phy_id == PHY_ID_SERDES) {
++	if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) {
+ 		err = tg3_setup_fiber_phy(tp, force_reset);
+ 	} else {
+ 		err = tg3_setup_copper_phy(tp, force_reset);
+@@ -2741,11 +2886,11 @@
+ 	tg3_halt(tp);
+ 	tg3_init_hw(tp);
+ 
++	tg3_netif_start(tp);
++
+ 	spin_unlock(&tp->tx_lock);
+ 	spin_unlock_irq(&tp->lock);
+ 
+-	tg3_netif_start(tp);
+-
+ 	if (restart_timer)
+ 		mod_timer(&tp->timer, jiffies + 1);
+ }
+@@ -2815,6 +2960,7 @@
+ 			dma_addr_t mapping, int len, u32 flags,
+ 			u32 mss_and_is_end)
+ {
++	struct tg3_tx_buffer_desc *txd = &tp->tx_ring[entry];
+ 	int is_end = (mss_and_is_end & 0x1);
+ 	u32 mss = (mss_and_is_end >> 1);
+ 	u32 vlan_tag = 0;
+@@ -2826,35 +2972,11 @@
+ 		flags &= 0xffff;
+ 	}
+ 	vlan_tag |= (mss << TXD_MSS_SHIFT);
+-	if (tp->tg3_flags & TG3_FLAG_HOST_TXDS) {
+-		struct tg3_tx_buffer_desc *txd = &tp->tx_ring[entry];
+ 
+-		txd->addr_hi = ((u64) mapping >> 32);
+-		txd->addr_lo = ((u64) mapping & 0xffffffff);
+-		txd->len_flags = (len << TXD_LEN_SHIFT) | flags;
+-		txd->vlan_tag = vlan_tag << TXD_VLAN_TAG_SHIFT;
+-	} else {
+-		struct tx_ring_info *txr = &tp->tx_buffers[entry];
+-		unsigned long txd;
+-
+-		txd = (tp->regs +
+-		       NIC_SRAM_WIN_BASE +
+-		       NIC_SRAM_TX_BUFFER_DESC);
+-		txd += (entry * TXD_SIZE);
+-
+-		/* Save some PIOs */
+-		if (sizeof(dma_addr_t) != sizeof(u32))
+-			writel(((u64) mapping >> 32),
+-			       txd + TXD_ADDR + TG3_64BIT_REG_HIGH);
+-
+-		writel(((u64) mapping & 0xffffffff),
+-		       txd + TXD_ADDR + TG3_64BIT_REG_LOW);
+-		writel(len << TXD_LEN_SHIFT | flags, txd + TXD_LEN_FLAGS);
+-		if (txr->prev_vlan_tag != vlan_tag) {
+-			writel(vlan_tag << TXD_VLAN_TAG_SHIFT, txd + TXD_VLAN_TAG);
+-			txr->prev_vlan_tag = vlan_tag;
+-		}
+-	}
++	txd->addr_hi = ((u64) mapping >> 32);
++	txd->addr_lo = ((u64) mapping & 0xffffffff);
++	txd->len_flags = (len << TXD_LEN_SHIFT) | flags;
++	txd->vlan_tag = vlan_tag << TXD_VLAN_TAG_SHIFT;
+ }
+ 
+ static inline int tg3_4g_overflow_test(dma_addr_t mapping, int len)
+@@ -3043,19 +3169,7 @@
+ 	}
+ 
+ 	/* Packets are ready, update Tx producer idx local and on card. */
+-	if (tp->tg3_flags & TG3_FLAG_HOST_TXDS) {
+-		tw32_tx_mbox((MAILBOX_SNDHOST_PROD_IDX_0 +
+-			      TG3_64BIT_REG_LOW), entry);
+-	} else {
+-		/* First, make sure tg3 sees last descriptor fully
+-		 * in SRAM.
+-		 */
+-		if (tp->tg3_flags & TG3_FLAG_MBOX_WRITE_REORDER)
+-			tr32(MAILBOX_SNDNIC_PROD_IDX_0 + TG3_64BIT_REG_LOW);
+-
+-		tw32_tx_mbox((MAILBOX_SNDNIC_PROD_IDX_0 +
+-			      TG3_64BIT_REG_LOW), entry);
+-	}
++	tw32_tx_mbox((MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW), entry);
+ 
+ 	tp->tx_prod = entry;
+ 	if (TX_BUFFS_AVAIL(tp) <= (MAX_SKB_FRAGS + 1))
+@@ -3105,9 +3219,10 @@
+ 
+ 	tg3_init_hw(tp);
+ 
++	tg3_netif_start(tp);
++
+ 	spin_unlock(&tp->tx_lock);
+ 	spin_unlock_irq(&tp->lock);
+-	tg3_netif_start(tp);
+ 
+ 	return 0;
+ }
+@@ -3193,7 +3308,6 @@
+  */
+ static void tg3_init_rings(struct tg3 *tp)
+ {
+-	unsigned long start, end;
+ 	u32 i;
+ 
+ 	/* Free up all the SKBs. */
+@@ -3203,21 +3317,7 @@
+ 	memset(tp->rx_std, 0, TG3_RX_RING_BYTES);
+ 	memset(tp->rx_jumbo, 0, TG3_RX_JUMBO_RING_BYTES);
+ 	memset(tp->rx_rcb, 0, TG3_RX_RCB_RING_BYTES(tp));
+-
+-	if (tp->tg3_flags & TG3_FLAG_HOST_TXDS) {
+-		memset(tp->tx_ring, 0, TG3_TX_RING_BYTES);
+-	} else {
+-		start = (tp->regs +
+-			 NIC_SRAM_WIN_BASE +
+-			 NIC_SRAM_TX_BUFFER_DESC);
+-		end = start + TG3_TX_RING_BYTES;
+-		while (start < end) {
+-			writel(0, start);
+-			start += 4;
+-		}
+-		for (i = 0; i < TG3_TX_RING_SIZE; i++)
+-			tp->tx_buffers[i].prev_vlan_tag = 0;
+-	}
++	memset(tp->tx_ring, 0, TG3_TX_RING_BYTES);
+ 
+ 	/* Initialize invariants of the rings, we only set this
+ 	 * stuff once.  This works because the card does not
+@@ -3348,15 +3448,10 @@
+ 	if (!tp->rx_rcb)
+ 		goto err_out;
+ 
+-	if (tp->tg3_flags & TG3_FLAG_HOST_TXDS) {
+-		tp->tx_ring = pci_alloc_consistent(tp->pdev, TG3_TX_RING_BYTES,
+-						   &tp->tx_desc_mapping);
+-		if (!tp->tx_ring)
+-			goto err_out;
+-	} else {
+-		tp->tx_ring = NULL;
+-		tp->tx_desc_mapping = 0;
+-	}
++	tp->tx_ring = pci_alloc_consistent(tp->pdev, TG3_TX_RING_BYTES,
++					   &tp->tx_desc_mapping);
++	if (!tp->tx_ring)
++		goto err_out;
+ 
+ 	tp->hw_status = pci_alloc_consistent(tp->pdev,
+ 					     TG3_HW_STATUS_SIZE,
+@@ -3598,6 +3693,8 @@
+ 	}
+ }
+ 
++static void tg3_stop_fw(struct tg3 *);
++
+ /* tp->lock is held. */
+ static int tg3_chip_reset(struct tg3 *tp)
+ {
+@@ -3605,7 +3702,7 @@
+ 	u32 flags_save;
+ 	int i;
+ 
+-	if (!(tp->tg3_flags2 & TG3_FLG2_SUN_5704))
++	if (!(tp->tg3_flags2 & TG3_FLG2_SUN_570X))
+ 		tg3_nvram_lock(tp);
+ 
+ 	/*
+@@ -3700,6 +3797,11 @@
+ 
+ 	tw32(MEMARB_MODE, MEMARB_MODE_ENABLE);
+ 
++	if (tp->pci_chip_rev_id == CHIPREV_ID_5750_A3) {
++		tg3_stop_fw(tp);
++		tw32(0x5000, 0x400);
++	}
++
+ 	tw32(GRC_MODE, tp->grc_mode);
+ 
+ 	if (tp->pci_chip_rev_id == CHIPREV_ID_5705_A0) {
+@@ -3716,7 +3818,7 @@
+ 		tw32(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl);
+ 	}
+ 
+-	if (tp->phy_id == PHY_ID_SERDES) {
++	if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) {
+ 		tp->mac_mode = MAC_MODE_PORT_MODE_TBI;
+ 		tw32_f(MAC_MODE, tp->mac_mode);
+ 	} else
+@@ -3731,7 +3833,7 @@
+ 		udelay(10);
+ 	}
+ 	if (i >= 100000 &&
+-	    !(tp->tg3_flags2 & TG3_FLG2_SUN_5704)) {
++	    !(tp->tg3_flags2 & TG3_FLG2_SUN_570X)) {
+ 		printk(KERN_ERR PFX "tg3_reset_hw timed out for %s, "
+ 		       "firmware will not restart magic=%08x\n",
+ 		       tp->dev->name, val);
+@@ -4314,10 +4915,7 @@
+ 			  GRC_MODE_4X_NIC_SEND_RINGS |
+ 			  GRC_MODE_NO_TX_PHDR_CSUM |
+ 			  GRC_MODE_NO_RX_PHDR_CSUM);
+-	if (tp->tg3_flags & TG3_FLAG_HOST_TXDS)
+-		tp->grc_mode |= GRC_MODE_HOST_SENDBDS;
+-	else
+-		tp->grc_mode |= GRC_MODE_4X_NIC_SEND_RINGS;
++	tp->grc_mode |= GRC_MODE_HOST_SENDBDS;
+ 	if (tp->tg3_flags & TG3_FLAG_NO_TX_PSEUDO_CSUM)
+ 		tp->grc_mode |= GRC_MODE_NO_TX_PHDR_CSUM;
+ 	if (tp->tg3_flags & TG3_FLAG_NO_RX_PSEUDO_CSUM)
+@@ -4470,18 +5068,11 @@
+ 	tw32_mailbox(MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW, 0);
+ 	tw32_tx_mbox(MAILBOX_SNDNIC_PROD_IDX_0 + TG3_64BIT_REG_LOW, 0);
+ 
+-	if (tp->tg3_flags & TG3_FLAG_HOST_TXDS) {
+-		tg3_set_bdinfo(tp, NIC_SRAM_SEND_RCB,
+-			       tp->tx_desc_mapping,
+-			       (TG3_TX_RING_SIZE <<
+-				BDINFO_FLAGS_MAXLEN_SHIFT),
+-			       NIC_SRAM_TX_BUFFER_DESC);
+-	} else {
+-		tg3_set_bdinfo(tp, NIC_SRAM_SEND_RCB,
+-			       0,
+-			       BDINFO_FLAGS_DISABLED,
+-			       NIC_SRAM_TX_BUFFER_DESC);
+-	}
++	tg3_set_bdinfo(tp, NIC_SRAM_SEND_RCB,
++		       tp->tx_desc_mapping,
++		       (TG3_TX_RING_SIZE <<
++			BDINFO_FLAGS_MAXLEN_SHIFT),
++		       NIC_SRAM_TX_BUFFER_DESC);
+ 
+ 	/* There is only one receive return ring on 5705/5750, no need
+ 	 * to explicitly disable the others.
+@@ -4747,14 +5338,14 @@
+ 	tw32(MAC_LED_CTRL, tp->led_ctrl);
+ 
+ 	tw32(MAC_MI_STAT, MAC_MI_STAT_LNKSTAT_ATTN_ENAB);
+-	if (tp->phy_id == PHY_ID_SERDES) {
++	if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) {
+ 		tw32_f(MAC_RX_MODE, RX_MODE_RESET);
+ 		udelay(10);
+ 	}
+ 	tw32_f(MAC_RX_MODE, tp->rx_mode);
+ 	udelay(10);
+ 
+-	if (tp->phy_id == PHY_ID_SERDES) {
++	if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) {
+ 		if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) {
+ 			/* Set drive transmission level to 1.2V  */
+ 			val = tr32(MAC_SERDES_CFG);
+@@ -4772,22 +5363,8 @@
+ 	tw32_f(MAC_LOW_WMARK_MAX_RX_FRAME, 2);
+ 
+ 	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 &&
+-	    tp->phy_id == PHY_ID_SERDES) {
+-		/* Enable hardware link auto-negotiation */
+-		u32 digctrl, txctrl;
+-
+-		digctrl = SG_DIG_USING_HW_AUTONEG | SG_DIG_CRC16_CLEAR_N |
+-		    SG_DIG_LOCAL_DUPLEX_STATUS | SG_DIG_LOCAL_LINK_STATUS |
+-		    (2 << SG_DIG_SPEED_STATUS_SHIFT) | SG_DIG_FIBER_MODE |
+-		    SG_DIG_GBIC_ENABLE;
+-
+-		txctrl = tr32(MAC_SERDES_CFG);
+-		tw32_f(MAC_SERDES_CFG, txctrl | MAC_SERDES_CFG_EDGE_SELECT);
+-		tw32_f(SG_DIG_CTRL, digctrl | SG_DIG_SOFT_RESET);
+-		tr32(SG_DIG_CTRL);
+-		udelay(5);
+-		tw32_f(SG_DIG_CTRL, digctrl);
+-
++	    (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES)) {
++		/* Use hardware link auto-negotiation */
+ 		tp->tg3_flags2 |= TG3_FLG2_HW_AUTONEG;
+ 	}
+ 
+@@ -4795,7 +5372,7 @@
+ 	if (err)
+ 		return err;
+ 
+-	if (tp->phy_id != PHY_ID_SERDES) {
++	if (!(tp->tg3_flags2 & TG3_FLG2_PHY_SERDES)) {
+ 		u32 tmp;
+ 
+ 		/* Clear CRC stats. */
+@@ -4987,7 +5564,8 @@
+ 				need_setup = 1;
+ 			}
+ 			if (! netif_carrier_ok(tp->dev) &&
+-			    (mac_stat & MAC_STATUS_PCS_SYNCED)) {
++			    (mac_stat & (MAC_STATUS_PCS_SYNCED |
++					 MAC_STATUS_SIGNAL_DET))) {
+ 				need_setup = 1;
+ 			}
+ 			if (need_setup) {
+@@ -5040,8 +5618,8 @@
+ 	spin_unlock(&tp->tx_lock);
+ 	spin_unlock_irq(&tp->lock);
+ 
+-	/* If you move this call, make sure TG3_FLAG_HOST_TXDS in
+-	 * tp->tg3_flags is accurate at that new place.
++	/* The placement of this call is tied
++	 * to the setup and use of Host TX descriptors.
+ 	 */
+ 	err = tg3_alloc_consistent(tp);
+ 	if (err)
+@@ -5383,7 +5961,7 @@
+ {
+ 	struct tg3_hw_stats *hw_stats = tp->hw_stats;
+ 
+-	if (tp->phy_id != PHY_ID_SERDES &&
++	if (!(tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) &&
+ 	    (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 ||
+ 	     GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701)) {
+ 		unsigned long flags;
+@@ -5814,7 +6394,7 @@
+ 		cmd->supported |= (SUPPORTED_1000baseT_Half |
+ 				   SUPPORTED_1000baseT_Full);
+ 
+-	if (tp->phy_id != PHY_ID_SERDES)
++	if (!(tp->tg3_flags2 & TG3_FLG2_PHY_SERDES))
+ 		cmd->supported |= (SUPPORTED_100baseT_Half |
+ 				  SUPPORTED_100baseT_Full |
+ 				  SUPPORTED_10baseT_Half |
+@@ -5843,7 +6423,7 @@
+ 	    tp->link_config.phy_is_low_power)
+ 		return -EAGAIN;
+ 
+-	if (tp->phy_id == PHY_ID_SERDES) {
++	if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) {
+ 		/* These are the only valid advertisement bits allowed.  */
+ 		if (cmd->autoneg == AUTONEG_ENABLE &&
+ 		    (cmd->advertising & ~(ADVERTISED_1000baseT_Half |
+@@ -5901,7 +6481,7 @@
+ 	if (wol->wolopts & ~WAKE_MAGIC)
+ 		return -EINVAL;
+ 	if ((wol->wolopts & WAKE_MAGIC) &&
+-	    tp->phy_id == PHY_ID_SERDES &&
++	    tp->tg3_flags2 & TG3_FLG2_PHY_SERDES &&
+ 	    !(tp->tg3_flags & TG3_FLAG_SERDES_WOL_CAP))
+ 		return -EINVAL;
+   
+@@ -5997,10 +6577,9 @@
+ 
+ 	tg3_halt(tp);
+ 	tg3_init_hw(tp);
+-	netif_wake_queue(tp->dev);
++	tg3_netif_start(tp);
+ 	spin_unlock(&tp->tx_lock);
+ 	spin_unlock_irq(&tp->lock);
+-	tg3_netif_start(tp);
+   
+ 	return 0;
+ }
+@@ -6010,8 +6589,8 @@
+ 	struct tg3 *tp = netdev_priv(dev);
+   
+ 	epause->autoneg = (tp->tg3_flags & TG3_FLAG_PAUSE_AUTONEG) != 0;
+-	epause->rx_pause = (tp->tg3_flags & TG3_FLAG_PAUSE_RX) != 0;
+-	epause->tx_pause = (tp->tg3_flags & TG3_FLAG_PAUSE_TX) != 0;
++	epause->rx_pause = (tp->tg3_flags & TG3_FLAG_RX_PAUSE) != 0;
++	epause->tx_pause = (tp->tg3_flags & TG3_FLAG_TX_PAUSE) != 0;
+ }
+   
+ static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam *epause)
+@@ -6026,18 +6605,18 @@
+ 	else
+ 		tp->tg3_flags &= ~TG3_FLAG_PAUSE_AUTONEG;
+ 	if (epause->rx_pause)
+-		tp->tg3_flags |= TG3_FLAG_PAUSE_RX;
++		tp->tg3_flags |= TG3_FLAG_RX_PAUSE;
+ 	else
+-		tp->tg3_flags &= ~TG3_FLAG_PAUSE_RX;
++		tp->tg3_flags &= ~TG3_FLAG_RX_PAUSE;
+ 	if (epause->tx_pause)
+-		tp->tg3_flags |= TG3_FLAG_PAUSE_TX;
++		tp->tg3_flags |= TG3_FLAG_TX_PAUSE;
+ 	else
+-		tp->tg3_flags &= ~TG3_FLAG_PAUSE_TX;
++		tp->tg3_flags &= ~TG3_FLAG_TX_PAUSE;
+ 	tg3_halt(tp);
+ 	tg3_init_hw(tp);
++	tg3_netif_start(tp);
+ 	spin_unlock(&tp->tx_lock);
+ 	spin_unlock_irq(&tp->lock);
+-	tg3_netif_start(tp);
+   
+ 	return 0;
+ }
+@@ -6124,7 +6703,7 @@
+ 	case SIOCGMIIREG: {
+ 		u32 mii_regval;
+ 
+-		if (tp->phy_id == PHY_ID_SERDES)
++		if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES)
+ 			break;			/* We have no PHY */
+ 
+ 		spin_lock_irq(&tp->lock);
+@@ -6137,7 +6716,7 @@
+ 	}
+ 
+ 	case SIOCSMIIREG:
+-		if (tp->phy_id == PHY_ID_SERDES)
++		if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES)
+ 			break;			/* We have no PHY */
+ 
+ 		if (!capable(CAP_NET_ADMIN))
+@@ -6224,7 +6803,7 @@
+ {
+ 	int j;
+ 
+-	if (tp->tg3_flags2 & TG3_FLG2_SUN_5704)
++	if (tp->tg3_flags2 & TG3_FLG2_SUN_570X)
+ 		return;
+ 
+ 	tw32_f(GRC_EEPROM_ADDR,
+@@ -6311,8 +6890,8 @@
+ {
+ 	int i;
+ 
+-	if (tp->tg3_flags2 & TG3_FLG2_SUN_5704) {
+-		printk(KERN_ERR PFX "Attempt to do nvram_read on Sun 5704\n");
++	if (tp->tg3_flags2 & TG3_FLG2_SUN_570X) {
++		printk(KERN_ERR PFX "Attempt to do nvram_read on Sun 570X\n");
+ 		return -EINVAL;
+ 	}
+ 
+@@ -6374,10 +6953,10 @@
+ 	{ PCI_VENDOR_ID_BROADCOM, 0x1644, PHY_ID_BCM5401 }, /* BCM95700A6 */
+ 	{ PCI_VENDOR_ID_BROADCOM, 0x0001, PHY_ID_BCM5701 }, /* BCM95701A5 */
+ 	{ PCI_VENDOR_ID_BROADCOM, 0x0002, PHY_ID_BCM8002 }, /* BCM95700T6 */
+-	{ PCI_VENDOR_ID_BROADCOM, 0x0003, PHY_ID_SERDES  }, /* BCM95700A9 */
++	{ PCI_VENDOR_ID_BROADCOM, 0x0003, 0 },		    /* BCM95700A9 */
+ 	{ PCI_VENDOR_ID_BROADCOM, 0x0005, PHY_ID_BCM5701 }, /* BCM95701T1 */
+ 	{ PCI_VENDOR_ID_BROADCOM, 0x0006, PHY_ID_BCM5701 }, /* BCM95701T8 */
+-	{ PCI_VENDOR_ID_BROADCOM, 0x0007, PHY_ID_SERDES  }, /* BCM95701A7 */
++	{ PCI_VENDOR_ID_BROADCOM, 0x0007, 0 },		    /* BCM95701A7 */
+ 	{ PCI_VENDOR_ID_BROADCOM, 0x0008, PHY_ID_BCM5701 }, /* BCM95701A10 */
+ 	{ PCI_VENDOR_ID_BROADCOM, 0x8008, PHY_ID_BCM5701 }, /* BCM95701A12 */
+ 	{ PCI_VENDOR_ID_BROADCOM, 0x0009, PHY_ID_BCM5703 }, /* BCM95703Ax1 */
+@@ -6386,7 +6965,7 @@
+ 	/* 3com boards. */
+ 	{ PCI_VENDOR_ID_3COM, 0x1000, PHY_ID_BCM5401 }, /* 3C996T */
+ 	{ PCI_VENDOR_ID_3COM, 0x1006, PHY_ID_BCM5701 }, /* 3C996BT */
+-	{ PCI_VENDOR_ID_3COM, 0x1004, PHY_ID_SERDES  }, /* 3C996SX */
++	{ PCI_VENDOR_ID_3COM, 0x1004, 0 },		/* 3C996SX */
+ 	{ PCI_VENDOR_ID_3COM, 0x1007, PHY_ID_BCM5701 }, /* 3C1000T */
+ 	{ PCI_VENDOR_ID_3COM, 0x1008, PHY_ID_BCM5701 }, /* 3C940BR01 */
+ 
+@@ -6399,37 +6978,43 @@
+ 	/* Compaq boards. */
+ 	{ PCI_VENDOR_ID_COMPAQ, 0x007c, PHY_ID_BCM5701 }, /* BANSHEE */
+ 	{ PCI_VENDOR_ID_COMPAQ, 0x009a, PHY_ID_BCM5701 }, /* BANSHEE_2 */
+-	{ PCI_VENDOR_ID_COMPAQ, 0x007d, PHY_ID_SERDES  }, /* CHANGELING */
++	{ PCI_VENDOR_ID_COMPAQ, 0x007d, 0 },		  /* CHANGELING */
+ 	{ PCI_VENDOR_ID_COMPAQ, 0x0085, PHY_ID_BCM5701 }, /* NC7780 */
+ 	{ PCI_VENDOR_ID_COMPAQ, 0x0099, PHY_ID_BCM5701 }, /* NC7780_2 */
+ 
+ 	/* IBM boards. */
+-	{ PCI_VENDOR_ID_IBM, 0x0281, PHY_ID_SERDES } /* IBM??? */
++	{ PCI_VENDOR_ID_IBM, 0x0281, 0 } /* IBM??? */
+ };
+ 
+-static int __devinit tg3_phy_probe(struct tg3 *tp)
++static inline struct subsys_tbl_ent *lookup_by_subsys(struct tg3 *tp)
+ {
+-	u32 eeprom_phy_id, hw_phy_id_1, hw_phy_id_2;
+-	u32 hw_phy_id, hw_phy_id_masked;
+-	u32 val;
+-	int i, eeprom_signature_found, err;
++	int i;
+ 
+-	tp->phy_id = PHY_ID_INVALID;
+ 	for (i = 0; i < ARRAY_SIZE(subsys_id_to_phy_id); i++) {
+ 		if ((subsys_id_to_phy_id[i].subsys_vendor ==
+ 		     tp->pdev->subsystem_vendor) &&
+ 		    (subsys_id_to_phy_id[i].subsys_devid ==
+-		     tp->pdev->subsystem_device)) {
+-			tp->phy_id = subsys_id_to_phy_id[i].phy_id;
+-			break;
+-		}
++		     tp->pdev->subsystem_device))
++			return &subsys_id_to_phy_id[i];
+ 	}
++	return NULL;
++}
+ 
++static int __devinit tg3_phy_probe(struct tg3 *tp)
++{
++	u32 eeprom_phy_id, hw_phy_id_1, hw_phy_id_2;
++	u32 hw_phy_id, hw_phy_id_masked;
++	u32 val;
++	int eeprom_signature_found, eeprom_phy_serdes, err;
++
++	tp->phy_id = PHY_ID_INVALID;
+ 	eeprom_phy_id = PHY_ID_INVALID;
++	eeprom_phy_serdes = 0;
+ 	eeprom_signature_found = 0;
+ 	tg3_read_mem(tp, NIC_SRAM_DATA_SIG, &val);
+ 	if (val == NIC_SRAM_DATA_SIG_MAGIC) {
+ 		u32 nic_cfg, led_cfg;
++		u32 nic_phy_id, cfg2;
+ 
+ 		tg3_read_mem(tp, NIC_SRAM_DATA_CFG, &nic_cfg);
+ 		tp->nic_sram_data_cfg = nic_cfg;
+@@ -6437,21 +7022,19 @@
+ 		eeprom_signature_found = 1;
+ 
+ 		if ((nic_cfg & NIC_SRAM_DATA_CFG_PHY_TYPE_MASK) ==
+-		    NIC_SRAM_DATA_CFG_PHY_TYPE_FIBER) {
+-			eeprom_phy_id = PHY_ID_SERDES;
+-		} else {
+-			u32 nic_phy_id;
++		    NIC_SRAM_DATA_CFG_PHY_TYPE_FIBER)
++			eeprom_phy_serdes = 1;
+ 
+-			tg3_read_mem(tp, NIC_SRAM_DATA_PHY_ID, &nic_phy_id);
+-			if (nic_phy_id != 0) {
+-				u32 id1 = nic_phy_id & NIC_SRAM_DATA_PHY_ID1_MASK;
+-				u32 id2 = nic_phy_id & NIC_SRAM_DATA_PHY_ID2_MASK;
+-
+-				eeprom_phy_id  = (id1 >> 16) << 10;
+-				eeprom_phy_id |= (id2 & 0xfc00) << 16;
+-				eeprom_phy_id |= (id2 & 0x03ff) <<  0;
+-			}
+-		}
++		tg3_read_mem(tp, NIC_SRAM_DATA_PHY_ID, &nic_phy_id);
++		if (nic_phy_id != 0) {
++			u32 id1 = nic_phy_id & NIC_SRAM_DATA_PHY_ID1_MASK;
++			u32 id2 = nic_phy_id & NIC_SRAM_DATA_PHY_ID2_MASK;
++
++			eeprom_phy_id  = (id1 >> 16) << 10;
++			eeprom_phy_id |= (id2 & 0xfc00) << 16;
++			eeprom_phy_id |= (id2 & 0x03ff) <<  0;
++		} else
++			eeprom_phy_id = 0;
+ 
+ 		if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) {
+ 			tg3_read_mem(tp, NIC_SRAM_DATA_CFG_2, &led_cfg);
+@@ -6513,6 +7096,10 @@
+ 		}
+ 		if (nic_cfg & NIC_SRAM_DATA_CFG_FIBER_WOL)
+ 			tp->tg3_flags |= TG3_FLAG_SERDES_WOL_CAP;
++
++		tg3_read_mem(tp, NIC_SRAM_DATA_PHY_ID, &cfg2);
++		if (cfg2 & (1 << 17))
++			tp->tg3_flags2 |= TG3_FLG2_CAPACITIVE_COUPLING;
+ 	}
+ 
+ 	/* Reading the PHY ID register can conflict with ASF
+@@ -6539,20 +7126,31 @@
+ 
+ 	if (!err && KNOWN_PHY_ID(hw_phy_id_masked)) {
+ 		tp->phy_id = hw_phy_id;
++		if (hw_phy_id_masked == PHY_ID_BCM8002)
++			tp->tg3_flags2 |= TG3_FLG2_PHY_SERDES;
+ 	} else {
+-		/* phy_id currently holds the value found in the
+-		 * subsys_id_to_phy_id[] table or PHY_ID_INVALID
+-		 * if a match was not found there.
+-		 */
+-		if (tp->phy_id == PHY_ID_INVALID) {
+-			if (!eeprom_signature_found ||
+-			    !KNOWN_PHY_ID(eeprom_phy_id & PHY_ID_MASK))
+-				return -ENODEV;
++		if (eeprom_signature_found) {
+ 			tp->phy_id = eeprom_phy_id;
++			if (eeprom_phy_serdes)
++				tp->tg3_flags2 |= TG3_FLG2_PHY_SERDES;
++		} else {
++			struct subsys_tbl_ent *p;
++
++			/* No eeprom signature?  Try the hardcoded
++			 * subsys device table.
++			 */
++			p = lookup_by_subsys(tp);
++			if (!p)
++				return -ENODEV;
++
++			tp->phy_id = p->phy_id;
++			if (!tp->phy_id ||
++			    tp->phy_id == PHY_ID_BCM8002)
++				tp->tg3_flags2 |= TG3_FLG2_PHY_SERDES;
+ 		}
+ 	}
+ 
+-	if (tp->phy_id != PHY_ID_SERDES &&
++	if (!(tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) &&
+ 	    !(tp->tg3_flags & TG3_FLAG_ENABLE_ASF)) {
+ 		u32 bmsr, adv_reg, tg3_ctrl;
+ 
+@@ -6609,7 +7207,7 @@
+ 	if (!eeprom_signature_found)
+ 		tp->led_ctrl = LED_CTRL_MODE_PHY_1;
+ 
+-	if (tp->phy_id == PHY_ID_SERDES)
++	if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES)
+ 		tp->link_config.advertising =
+ 			(ADVERTISED_1000baseT_Half |
+ 			 ADVERTISED_1000baseT_Full |
+@@ -6628,11 +7226,11 @@
+ 	unsigned char vpd_data[256];
+ 	int i;
+ 
+-	if (tp->tg3_flags2 & TG3_FLG2_SUN_5704) {
++	if (tp->tg3_flags2 & TG3_FLG2_SUN_570X) {
+ 		/* Sun decided not to put the necessary bits in the
+ 		 * NVRAM of their onboard tg3 parts :(
+ 		 */
+-		strcpy(tp->board_part_number, "Sun 5704");
++		strcpy(tp->board_part_number, "Sun 570X");
+ 		return;
+ 	}
+ 
+@@ -6693,27 +7291,21 @@
+ }
+ 
+ #ifdef CONFIG_SPARC64
+-static int __devinit tg3_is_sun_5704(struct tg3 *tp)
++static int __devinit tg3_is_sun_570X(struct tg3 *tp)
+ {
+ 	struct pci_dev *pdev = tp->pdev;
+ 	struct pcidev_cookie *pcp = pdev->sysdata;
+ 
+ 	if (pcp != NULL) {
+ 		int node = pcp->prom_node;
+-		u32 venid, devid;
++		u32 venid;
+ 		int err;
+ 
+ 		err = prom_getproperty(node, "subsystem-vendor-id",
+ 				       (char *) &venid, sizeof(venid));
+ 		if (err == 0 || err == -1)
+ 			return 0;
+-		err = prom_getproperty(node, "subsystem-id",
+-				       (char *) &devid, sizeof(devid));
+-		if (err == 0 || err == -1)
+-			return 0;
+-
+-		if (venid == PCI_VENDOR_ID_SUN &&
+-		    devid == PCI_DEVICE_ID_TIGON3_5704)
++		if (venid == PCI_VENDOR_ID_SUN)
+ 			return 1;
+ 	}
+ 	return 0;
+@@ -6730,8 +7322,8 @@
+ 	int err;
+ 
+ #ifdef CONFIG_SPARC64
+-	if (tg3_is_sun_5704(tp))
+-		tp->tg3_flags2 |= TG3_FLG2_SUN_5704;
++	if (tg3_is_sun_570X(tp))
++		tp->tg3_flags2 |= TG3_FLG2_SUN_570X;
+ #endif
+ 
+ 	/* If we have an AMD 762 or Intel ICH/ICH0/ICH2 chipset, write
+@@ -6976,32 +7568,17 @@
+ 	udelay(50);
+ 	tg3_nvram_init(tp);
+ 
+-	/* Always use host TXDs, it performs better in particular
+-	 * with multi-frag packets.  The tests below are kept here
+-	 * as documentation should we change this decision again
+-	 * in the future.
+-	 */
+-	tp->tg3_flags |= TG3_FLAG_HOST_TXDS;
+-
+-#if 0
+-	/* Determine if TX descriptors will reside in
+-	 * main memory or in the chip SRAM.
+-	 */
+-	if ((tp->tg3_flags & TG3_FLAG_PCIX_TARGET_HWBUG) != 0 ||
+-	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ||
+-	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750)
+-		tp->tg3_flags |= TG3_FLAG_HOST_TXDS;
+-#endif
+-
+ 	grc_misc_cfg = tr32(GRC_MISC_CFG);
+ 	grc_misc_cfg &= GRC_MISC_CFG_BOARD_ID_MASK;
+ 
++	/* Broadcom's driver says that CIOBE multisplit has a bug */
++#if 0
+ 	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 &&
+ 	    grc_misc_cfg == GRC_MISC_CFG_BOARD_ID_5704CIOBE) {
+ 		tp->tg3_flags |= TG3_FLAG_SPLIT_MODE;
+ 		tp->split_mode_max_reqs = SPLIT_MODE_5704_MAX_REQ;
+ 	}
+-
++#endif
+ 	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 &&
+ 	    (grc_misc_cfg == GRC_MISC_CFG_BOARD_ID_5788 ||
+ 	     grc_misc_cfg == GRC_MISC_CFG_BOARD_ID_5788M))
+@@ -7028,7 +7605,7 @@
+ 
+ 	tg3_read_partno(tp);
+ 
+-	if (tp->phy_id == PHY_ID_SERDES) {
++	if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) {
+ 		tp->tg3_flags &= ~TG3_FLAG_USE_MI_INTERRUPT;
+ 	} else {
+ 		if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700)
+@@ -7051,13 +7628,13 @@
+ 	 * upon subsystem IDs.
+ 	 */
+ 	if (tp->pdev->subsystem_vendor == PCI_VENDOR_ID_DELL &&
+-	    tp->phy_id != PHY_ID_SERDES) {
++	    !(tp->tg3_flags2 & TG3_FLG2_PHY_SERDES)) {
+ 		tp->tg3_flags |= (TG3_FLAG_USE_MI_INTERRUPT |
+ 				  TG3_FLAG_USE_LINKCHG_REG);
+ 	}
+ 
+ 	/* For all SERDES we poll the MAC status register. */
+-	if (tp->phy_id == PHY_ID_SERDES)
++	if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES)
+ 		tp->tg3_flags |= TG3_FLAG_POLL_SERDES;
+ 	else
+ 		tp->tg3_flags &= ~TG3_FLAG_POLL_SERDES;
+@@ -7128,7 +7705,7 @@
+ 
+ 	mac_offset = 0x7c;
+ 	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 &&
+-	    !(tp->tg3_flags & TG3_FLG2_SUN_5704)) {
++	    !(tp->tg3_flags & TG3_FLG2_SUN_570X)) {
+ 		if (tr32(TG3PCI_DUAL_MAC_CTRL) & DUAL_MAC_CTRL_ID)
+ 			mac_offset = 0xcc;
+ 		if (tg3_nvram_lock(tp))
+@@ -7150,7 +7727,7 @@
+ 		dev->dev_addr[5] = (lo >>  0) & 0xff;
+ 	}
+ 	/* Next, try NVRAM. */
+-	else if (!(tp->tg3_flags & TG3_FLG2_SUN_5704) &&
++	else if (!(tp->tg3_flags & TG3_FLG2_SUN_570X) &&
+ 		 !tg3_nvram_read(tp, mac_offset + 0, &hi) &&
+ 		 !tg3_nvram_read(tp, mac_offset + 4, &lo)) {
+ 		dev->dev_addr[0] = ((hi >> 16) & 0xff);
+@@ -7492,8 +8069,8 @@
+ 	case PHY_ID_BCM5704:	return "5704";
+ 	case PHY_ID_BCM5705:	return "5705";
+ 	case PHY_ID_BCM5750:	return "5750";
+-	case PHY_ID_BCM8002:	return "8002";
+-	case PHY_ID_SERDES:	return "serdes";
++	case PHY_ID_BCM8002:	return "8002/serdes";
++	case 0:			return "serdes";
+ 	default:		return "unknown";
+ 	};
+ }
+@@ -7785,6 +8339,9 @@
+ 	if (tp->tg3_flags2 & TG3_FLG2_IS_5788)
+ 		dev->features &= ~NETIF_F_HIGHDMA;
+ 
++	/* flow control autonegotiation is default behavior */
++	tp->tg3_flags |= TG3_FLAG_PAUSE_AUTONEG;
++
+ 	err = register_netdev(dev);
+ 	if (err) {
+ 		printk(KERN_ERR PFX "Cannot register net device, "
+@@ -7816,11 +8373,10 @@
+ 		printk("%2.2x%c", dev->dev_addr[i],
+ 		       i == 5 ? '\n' : ':');
+ 
+-	printk(KERN_INFO "%s: HostTXDS[%d] RXcsums[%d] LinkChgREG[%d] "
++	printk(KERN_INFO "%s: RXcsums[%d] LinkChgREG[%d] "
+ 	       "MIirq[%d] ASF[%d] Split[%d] WireSpeed[%d] "
+ 	       "TSOcap[%d] \n",
+ 	       dev->name,
+-	       (tp->tg3_flags & TG3_FLAG_HOST_TXDS) != 0,
+ 	       (tp->tg3_flags & TG3_FLAG_RX_CHECKSUMS) != 0,
+ 	       (tp->tg3_flags & TG3_FLAG_USE_LINKCHG_REG) != 0,
+ 	       (tp->tg3_flags & TG3_FLAG_USE_MI_INTERRUPT) != 0,
+@@ -7899,11 +8455,11 @@
+ 		tp->timer.expires = jiffies + tp->timer_offset;
+ 		add_timer(&tp->timer);
+ 
+-		spin_unlock(&tp->tx_lock);
+-		spin_unlock_irq(&tp->lock);
+-
+ 		netif_device_attach(dev);
+ 		tg3_netif_start(tp);
++
++		spin_unlock(&tp->tx_lock);
++		spin_unlock_irq(&tp->lock);
+ 	}
+ 
+ 	return err;
+@@ -7936,11 +8492,11 @@
+ 
+ 	tg3_enable_ints(tp);
+ 
++	tg3_netif_start(tp);
++
+ 	spin_unlock(&tp->tx_lock);
+ 	spin_unlock_irq(&tp->lock);
+ 
+-	tg3_netif_start(tp);
+-
+ 	return 0;
+ }
+ 
+--- kernel-source-2.6.8/drivers/net/tg3.h	2004-08-14 07:36:18.000000000 +0200
++++ linux-2.5/drivers/net/tg3.h	2004-09-18 13:46:34.954985520 +0200
+@@ -124,6 +124,7 @@
+ #define  CHIPREV_ID_5705_A3		 0x3003
+ #define  CHIPREV_ID_5750_A0		 0x4000
+ #define  CHIPREV_ID_5750_A1		 0x4001
++#define  CHIPREV_ID_5750_A3		 0x4003
+ #define  GET_ASIC_REV(CHIP_REV_ID)	((CHIP_REV_ID) >> 12)
+ #define   ASIC_REV_5700			 0x07
+ #define   ASIC_REV_5701			 0x00
+@@ -1548,7 +1549,7 @@
+  * exist only in the cards on-chip SRAM.  All 16 send bds are under
+  * the same mode, they may not be configured individually.
+  *
+- * The mode we use is controlled by TG3_FLAG_HOST_TXDS in tp->tg3_flags.
++ * This driver always uses host memory TX descriptors.
+  *
+  * To use host memory TX descriptors:
+  *	1) Set GRC_MODE_HOST_SENDBDS in GRC_MODE register.
+@@ -2004,7 +2005,6 @@
+ 
+ 	spinlock_t			tx_lock;
+ 
+-	/* TX descs are only used if TG3_FLAG_HOST_TXDS is set. */
+ 	struct tg3_tx_buffer_desc	*tx_ring;
+ 	struct tx_ring_info		*tx_buffers;
+ 	dma_addr_t			tx_desc_mapping;
+@@ -2040,7 +2040,6 @@
+ 
+ 	u32				rx_offset;
+ 	u32				tg3_flags;
+-#define TG3_FLAG_HOST_TXDS		0x00000001
+ #define TG3_FLAG_TXD_MBOX_HWBUG		0x00000002
+ #define TG3_FLAG_RX_CHECKSUMS		0x00000004
+ #define TG3_FLAG_USE_LINKCHG_REG	0x00000008
+@@ -2070,15 +2069,13 @@
+ #define TG3_FLAG_JUMBO_ENABLE		0x00800000
+ #define TG3_FLAG_10_100_ONLY		0x01000000
+ #define TG3_FLAG_PAUSE_AUTONEG		0x02000000
+-#define TG3_FLAG_PAUSE_RX		0x04000000
+-#define TG3_FLAG_PAUSE_TX		0x08000000
+ #define TG3_FLAG_BROKEN_CHECKSUMS	0x10000000
+ #define TG3_FLAG_GOT_SERDES_FLOWCTL	0x20000000
+ #define TG3_FLAG_SPLIT_MODE		0x40000000
+ #define TG3_FLAG_INIT_COMPLETE		0x80000000
+ 	u32				tg3_flags2;
+ #define TG3_FLG2_RESTART_TIMER		0x00000001
+-#define TG3_FLG2_SUN_5704		0x00000002
++#define TG3_FLG2_SUN_570X		0x00000002
+ #define TG3_FLG2_NO_ETH_WIRE_SPEED	0x00000004
+ #define TG3_FLG2_IS_5788		0x00000008
+ #define TG3_FLG2_MAX_RXPEND_64		0x00000010
+@@ -2089,6 +2086,9 @@
+ #define TG3_FLG2_PCI_EXPRESS		0x00000200
+ #define TG3_FLG2_ASF_NEW_HANDSHAKE	0x00000400
+ #define TG3_FLG2_HW_AUTONEG		0x00000800
++#define TG3_FLG2_PHY_JUST_INITTED	0x00001000
++#define TG3_FLG2_PHY_SERDES		0x00002000
++#define TG3_FLG2_CAPACITIVE_COUPLING	0x00004000
+ 
+ 	u32				split_mode_max_reqs;
+ #define SPLIT_MODE_5704_MAX_REQ		3
+@@ -2136,7 +2136,6 @@
+ #define PHY_ID_BCM5705			0x600081a0
+ #define PHY_ID_BCM5750			0x60008180
+ #define PHY_ID_BCM8002			0x60010140
+-#define PHY_ID_SERDES			0xfeedbee0
+ #define PHY_ID_INVALID			0xffffffff
+ #define PHY_ID_REV_MASK			0x0000000f
+ #define PHY_REV_BCM5401_B0		0x1
+@@ -2159,7 +2158,7 @@
+ 	 (X) == PHY_ID_BCM5411 || (X) == PHY_ID_BCM5701 || \
+ 	 (X) == PHY_ID_BCM5703 || (X) == PHY_ID_BCM5704 || \
+ 	 (X) == PHY_ID_BCM5705 || (X) == PHY_ID_BCM5750 || \
+-	 (X) == PHY_ID_BCM8002 || (X) == PHY_ID_SERDES)
++	 (X) == PHY_ID_BCM8002)
+ 
+ 	struct tg3_hw_stats		*hw_stats;
+ 	dma_addr_t			stats_mapping;

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,4671 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: tty locking cleanup and fixes [CAN-2004-0814]
+## DP: Patch author: Alan Cox <alan at redhat.com>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+# (Modified to apply to the Debian tree)
+#
+# ChangeSet
+#   2004/09/29 14:05:39-07:00 alan at redhat.com 
+#   [PATCH] tty locking cleanup and fixes
+#   
+#   No problems reported other than Linus typo in an unbuildable driver from
+#   the last one.
+#   
+#   This one adds tty_ldisc_flush and also makes tty_wakeup do the queue
+#   wake as discussed with Paul.  I've then propagated these functions
+#   through all the drivers.  This means most drivers don't know about the
+#   ldisc locking and instead call generic functions that look after it. 
+#   The result is the removal of a lot of duplicate code both for ldisc
+#   referencing and historical code for handling tty ldisc wakeup semantics.
+#   
+#   A nice side effect is that by adding versions of the two helpers we can
+#   switch most of the drivers over before changing the core tty code if
+#   preferred.
+#   
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# Documentation/tty.txt
+#   2004/09/23 14:55:33-07:00 alan at redhat.com +0 -0
+#   BitKeeper file /home/torvalds/v2.6/linux/Documentation/tty.txt
+# 
+# Documentation/tty.txt
+#   2004/09/23 14:55:33-07:00 alan at redhat.com +194 -0
+#   tty locking cleanup and fixes
+# 
+# drivers/bluetooth/hci_ldisc.c
+#   2004/09/29 07:59:59-07:00 alan at redhat.com +4 -4
+#   tty locking cleanup and fixes
+# 
+# drivers/char/amiserial.c
+#   2004/09/29 07:55:00-07:00 alan at redhat.com +4 -8
+#   tty locking cleanup and fixes
+# 
+# drivers/char/cyclades.c
+#   2004/09/29 07:55:23-07:00 alan at redhat.com +3 -9
+#   tty locking cleanup and fixes
+# 
+# drivers/char/epca.c
+#   2004/09/29 07:56:25-07:00 alan at redhat.com +6 -15
+#   tty locking cleanup and fixes
+# 
+# drivers/char/esp.c
+#   2004/09/29 07:57:09-07:00 alan at redhat.com +3 -10
+#   tty locking cleanup and fixes
+# 
+# drivers/char/generic_serial.c
+#   2004/09/29 07:57:36-07:00 alan at redhat.com +6 -10
+#   tty locking cleanup and fixes
+# 
+# drivers/char/hvc_console.c
+#   2004/09/29 07:58:02-07:00 alan at redhat.com +1 -4
+#   tty locking cleanup and fixes
+# 
+# drivers/char/hvcs.c
+#   2004/09/29 07:58:22-07:00 alan at redhat.com +1 -4
+#   tty locking cleanup and fixes
+# 
+# drivers/char/isicom.c
+#   2004/09/29 07:53:12-07:00 alan at redhat.com +5 -9
+#   tty locking cleanup and fixes
+# 
+# drivers/char/moxa.c
+#   2004/09/29 07:52:41-07:00 alan at redhat.com +5 -11
+#   tty locking cleanup and fixes
+# 
+# drivers/char/mxser.c
+#   2004/09/29 07:52:25-07:00 alan at redhat.com +4 -8
+#   tty locking cleanup and fixes
+# 
+# drivers/char/n_tty.c
+#   2004/09/23 02:35:50-07:00 alan at redhat.com +329 -53
+#   tty locking cleanup and fixes
+# 
+# drivers/char/pcmcia/synclink_cs.c
+#   2004/09/17 10:03:37-07:00 alan at redhat.com +40 -19
+#   tty locking cleanup and fixes
+# 
+# drivers/char/pcxx.c
+#   2004/09/29 07:51:34-07:00 alan at redhat.com +5 -31
+#   tty locking cleanup and fixes
+# 
+# drivers/char/pty.c
+#   2004/09/29 07:50:22-07:00 alan at redhat.com +5 -4
+#   tty locking cleanup and fixes
+# 
+# drivers/char/riscom8.c
+#   2004/09/29 07:49:21-07:00 alan at redhat.com +4 -8
+#   tty locking cleanup and fixes
+# 
+# drivers/char/rocket.c
+#   2004/09/29 07:48:58-07:00 alan at redhat.com +14 -12
+#   tty locking cleanup and fixes
+# 
+# drivers/char/selection.c
+#   2004/09/14 06:29:10-07:00 alan at redhat.com +5 -0
+#   tty locking cleanup and fixes
+# 
+# drivers/char/ser_a2232.c
+#   2004/09/29 07:48:01-07:00 alan at redhat.com +1 -4
+#   tty locking cleanup and fixes
+# 
+# drivers/char/serial167.c
+#   2004/09/29 07:58:42-07:00 alan at redhat.com +3 -19
+#   tty locking cleanup and fixes
+# 
+# drivers/char/serial_tx3912.c
+#   2004/09/29 07:46:27-07:00 alan at redhat.com +1 -4
+#   tty locking cleanup and fixes
+# 
+# drivers/char/specialix.c
+#   2004/09/29 07:44:24-07:00 alan at redhat.com +4 -11
+#   tty locking cleanup and fixes
+# 
+# drivers/char/stallion.c
+#   2004/09/29 07:45:05-07:00 alan at redhat.com +3 -10
+#   tty locking cleanup and fixes
+# 
+# drivers/char/sx.c
+#   2004/09/29 07:45:44-07:00 alan at redhat.com +1 -4
+#   tty locking cleanup and fixes
+# 
+# drivers/char/synclink.c
+#   2004/09/29 07:43:45-07:00 alan at redhat.com +30 -23
+#   tty locking cleanup and fixes
+# 
+# drivers/char/synclinkmp.c
+#   2004/09/29 07:43:18-07:00 alan at redhat.com +28 -21
+#   tty locking cleanup and fixes
+# 
+# drivers/char/tty_io.c
+#   2004/09/29 07:34:49-07:00 alan at redhat.com +549 -88
+#   tty locking cleanup and fixes
+# 
+# drivers/char/tty_ioctl.c
+#   2004/09/21 07:05:41-07:00 alan at redhat.com +54 -14
+#   tty locking cleanup and fixes
+# 
+# drivers/char/viocons.c
+#   2004/09/29 07:42:21-07:00 alan at redhat.com +1 -4
+#   tty locking cleanup and fixes
+# 
+# drivers/char/vme_scc.c
+#   2004/09/29 07:41:51-07:00 alan at redhat.com +2 -6
+#   tty locking cleanup and fixes
+# 
+# drivers/char/vt_ioctl.c
+#   2004/09/29 07:40:49-07:00 alan at redhat.com +1 -2
+#   tty locking cleanup and fixes
+# 
+# drivers/isdn/capi/capi.c
+#   2004/09/29 08:03:13-07:00 alan at redhat.com +50 -40
+#   tty locking cleanup and fixes
+# 
+# drivers/isdn/i4l/isdn_tty.c
+#   2004/09/29 08:02:20-07:00 alan at redhat.com +6 -15
+#   tty locking cleanup and fixes
+# 
+# drivers/macintosh/macserial.c
+#   2004/09/29 08:04:16-07:00 alan at redhat.com +4 -12
+#   tty locking cleanup and fixes
+# 
+# drivers/net/hamradio/mkiss.c
+#   2004/09/29 08:06:10-07:00 alan at redhat.com +0 -2
+#   tty locking cleanup and fixes
+# 
+# drivers/net/irda/irtty-sir.c
+#   2004/09/29 07:39:12-07:00 alan at redhat.com +0 -7
+#   tty locking cleanup and fixes
+# 
+# drivers/net/ppp_async.c
+#   2004/09/15 07:47:59-07:00 alan at redhat.com +15 -3
+#   tty locking cleanup and fixes
+# 
+# drivers/net/ppp_synctty.c
+#   2004/09/15 07:54:02-07:00 alan at redhat.com +2 -0
+#   tty locking cleanup and fixes
+# 
+# drivers/net/slip.c
+#   2004/09/29 08:05:25-07:00 alan at redhat.com +15 -9
+#   tty locking cleanup and fixes
+# 
+# drivers/net/wan/pc300_tty.c
+#   2004/09/29 08:08:45-07:00 alan at redhat.com +16 -19
+#   tty locking cleanup and fixes
+# 
+# drivers/net/wan/sdla_chdlc.c
+#   2004/09/29 08:10:14-07:00 alan at redhat.com +8 -12
+#   tty locking cleanup and fixes
+# 
+# drivers/net/wireless/strip.c
+#   2004/09/29 08:10:42-07:00 alan at redhat.com +0 -2
+#   tty locking cleanup and fixes
+# 
+# drivers/s390/char/con3215.c
+#   2004/09/29 14:05:29-07:00 alan at redhat.com +2 -8
+#   tty locking cleanup and fixes
+# 
+# drivers/s390/char/sclp_tty.c
+#   2004/09/29 08:12:17-07:00 alan at redhat.com +1 -4
+#   tty locking cleanup and fixes
+# 
+# drivers/s390/char/sclp_vt220.c
+#   2004/09/29 08:12:32-07:00 alan at redhat.com +1 -4
+#   tty locking cleanup and fixes
+# 
+# drivers/s390/net/ctctty.c
+#   2004/09/29 08:13:20-07:00 alan at redhat.com +3 -9
+#   tty locking cleanup and fixes
+# 
+# drivers/sbus/char/aurora.c
+#   2004/09/29 08:14:11-07:00 alan at redhat.com +3 -10
+#   tty locking cleanup and fixes
+# 
+# drivers/serial/68328serial.c
+#   2004/09/29 07:35:45-07:00 alan at redhat.com +7 -10
+#   tty locking cleanup and fixes
+# 
+# drivers/serial/68360serial.c
+#   2004/09/29 07:36:25-07:00 alan at redhat.com +4 -12
+#   tty locking cleanup and fixes
+# 
+# drivers/serial/mcfserial.c
+#   2004/09/29 07:37:48-07:00 alan at redhat.com +6 -11
+#   tty locking cleanup and fixes
+# 
+# drivers/serial/serial_core.c
+#   2004/09/29 07:34:42-07:00 alan at redhat.com +8 -18
+#   tty locking cleanup and fixes
+# 
+# drivers/tc/zs.c
+#   2004/09/29 08:14:57-07:00 alan at redhat.com +3 -10
+#   tty locking cleanup and fixes
+# 
+# drivers/usb/class/bluetty.c
+#   2004/09/29 08:15:44-07:00 alan at redhat.com +2 -9
+#   tty locking cleanup and fixes
+# 
+# drivers/usb/class/cdc-acm.c
+#   2004/09/29 08:16:12-07:00 alan at redhat.com +1 -6
+#   tty locking cleanup and fixes
+# 
+# drivers/usb/serial/digi_acceleport.c
+#   2004/09/29 08:16:47-07:00 alan at redhat.com +2 -10
+#   tty locking cleanup and fixes
+# 
+# drivers/usb/serial/empeg.c
+#   2004/09/29 08:17:28-07:00 alan at redhat.com +3 -1
+#   tty locking cleanup and fixes
+# 
+# drivers/usb/serial/io_edgeport.c
+#   2004/09/29 08:17:53-07:00 alan at redhat.com +1 -6
+#   tty locking cleanup and fixes
+# 
+# drivers/usb/serial/io_ti.c
+#   2004/09/29 08:18:10-07:00 alan at redhat.com +1 -6
+#   tty locking cleanup and fixes
+# 
+# drivers/usb/serial/ir-usb.c
+#   2004/09/23 02:37:21-07:00 alan at redhat.com +4 -0
+#   tty locking cleanup and fixes
+# 
+# drivers/usb/serial/keyspan_pda.c
+#   2004/09/29 08:18:58-07:00 alan at redhat.com +1 -7
+#   tty locking cleanup and fixes
+# 
+# drivers/usb/serial/mct_u232.c
+#   2004/09/29 08:19:27-07:00 alan at redhat.com +1 -5
+#   tty locking cleanup and fixes
+# 
+# drivers/usb/serial/usb-serial.c
+#   2004/09/29 08:19:42-07:00 alan at redhat.com +1 -6
+#   tty locking cleanup and fixes
+# 
+# drivers/usb/serial/whiteheat.c
+#   2004/09/29 08:20:08-07:00 alan at redhat.com +1 -2
+#   tty locking cleanup and fixes
+# 
+# fs/proc/proc_tty.c
+#   2004/09/14 06:32:09-07:00 alan at redhat.com +6 -6
+#   tty locking cleanup and fixes
+# 
+# include/linux/tty.h
+#   2004/09/29 07:32:34-07:00 alan at redhat.com +25 -14
+#   tty locking cleanup and fixes
+# 
+# include/linux/tty_ldisc.h
+#   2004/09/21 09:21:28-07:00 alan at redhat.com +10 -0
+#   tty locking cleanup and fixes
+# 
+diff -urN kernel-source-2.6.8-2.6.8.orig/Documentation/tty.txt kernel-source-2.6.8-2.6.8/Documentation/tty.txt
+--- kernel-source-2.6.8-2.6.8.orig/Documentation/tty.txt	1969-12-31 17:00:00.000000000 -0700
++++ kernel-source-2.6.8-2.6.8/Documentation/tty.txt	2004-10-16 15:51:00.000000000 -0600
+@@ -0,0 +1,194 @@
++
++			The Lockronomicon
++
++Your guide to the ancient and twisted locking policies of the tty layer and
++the warped logic behind them. Beware all ye who read on.
++
++FIXME: still need to work out the full set of BKL assumptions and document
++them so they can eventually be killed off.
++
++
++Line Discipline
++---------------
++
++Line disciplines are registered with tty_register_ldisc() passing the
++discipline number and the ldisc structure. At the point of registration the 
++discipline must be ready to use and it is possible it will get used before
++the call returns success. If the call returns an error then it won't get
++called. Do not re-use ldisc numbers as they are part of the userspace ABI
++and writing over an existing ldisc will cause demons to eat your computer.
++After the return the ldisc data has been copied so you may free your own 
++copy of the structure. You must not re-register over the top of the line
++discipline even with the same data or your computer again will be eaten by
++demons.
++
++In order to remove a line discipline call tty_register_ldisc passing NULL.
++In ancient times this always worked. In modern times the function will
++return -EBUSY if the ldisc is currently in use. Since the ldisc referencing
++code manages the module counts this should not usually be a concern.
++
++Heed this warning: the reference count field of the registered copies of the
++tty_ldisc structure in the ldisc table counts the number of lines using this
++discipline. The reference count of the tty_ldisc structure within a tty 
++counts the number of active users of the ldisc at this instant. In effect it
++counts the number of threads of execution within an ldisc method (plus those
++about to enter and exit although this detail matters not).
++
++Line Discipline Methods
++-----------------------
++
++TTY side interfaces:
++
++close()		-	This is called on a terminal when the line
++			discipline is being unplugged. At the point of
++			execution no further users will enter the
++			ldisc code for this tty. Can sleep.
++
++open()		-	Called when the line discipline is attached to
++			the terminal. No other call into the line
++			discipline for this tty will occur until it
++			completes successfully. Can sleep.
++
++write()		-	A process is writing data from user space
++			through the line discipline. Multiple write calls
++			are serialized by the tty layer for the ldisc. May
++			sleep.
++
++flush_buffer()	-	May be called at any point between open and close.
++
++chars_in_buffer() -	Report the number of bytes in the buffer.
++
++set_termios()	-	Called on termios structure changes. The caller
++			passes the old termios data and the current data
++			is in the tty. Called under the termios lock so
++			may not sleep. Serialized against itself only.
++
++read()		-	Move data from the line discipline to the user.
++			Multiple read calls may occur in parallel and the
++			ldisc must deal with serialization issues. May 
++			sleep.
++
++poll()		-	Check the status for the poll/select calls. Multiple
++			poll calls may occur in parallel. May sleep.
++
++ioctl()		-	Called when an ioctl is handed to the tty layer
++			that might be for the ldisc. Multiple ioctl calls
++			may occur in parallel. May sleep. 
++
++Driver Side Interfaces:
++
++receive_buf()	-	Hand buffers of bytes from the driver to the ldisc
++			for processing. Semantics currently rather
++			mysterious 8(
++
++receive_room()	-	Can be called by the driver layer at any time when
++			the ldisc is opened. The ldisc must be able to
++			handle the reported amount of data at that instant.
++			Synchronization between active receive_buf and
++			receive_room calls is down to the driver not the
++			ldisc. Must not sleep.
++
++write_wakeup()	-	May be called at any point between open and close.
++			The TTY_DO_WRITE_WAKEUP flag indicates if a call
++			is needed but always races versus calls. Thus the
++			ldisc must be careful about setting order and to
++			handle unexpected calls. Must not sleep.
++
++
++Locking
++
++Callers to the line discipline functions from the tty layer are required to
++take line discipline locks. The same is true of calls from the driver side
++but not yet enforced.
++
++Three calls are now provided
++
++	ldisc = tty_ldisc_ref(tty);
++
++takes a handle to the line discipline in the tty and returns it. If no ldisc
++is currently attached or the ldisc is being closed and re-opened at this
++point then NULL is returned. While this handle is held the ldisc will not
++change or go away.
++
++	tty_ldisc_deref(ldisc)
++
++Returns the ldisc reference and allows the ldisc to be closed. Returning the
++reference takes away your right to call the ldisc functions until you take
++a new reference.
++
++	ldisc = tty_ldisc_ref_wait(tty);
++
++Performs the same function as tty_ldisc_ref except that it will wait for an
++ldisc change to complete and then return a reference to the new ldisc. 
++
++While these functions are slightly slower than the old code they should have
++minimal impact as most receive logic uses the flip buffers and they only
++need to take a reference when they push bits up through the driver.
++
++A caution: The ldisc->open(), ldisc->close() and driver->set_ldisc 
++functions are called with the ldisc unavailable. Thus tty_ldisc_ref will
++fail in this situation if used within these functions. Ldisc and driver
++code calling its own functions must be careful in this case. 
++
++
++Driver Interface
++----------------
++
++open()		-	Called when a device is opened. May sleep
++
++close()		-	Called when a device is closed. At the point of
++			return from this call the driver must make no 
++			further ldisc calls of any kind. May sleep
++
++write()		-	Called to write bytes to the device. May not
++			sleep. May occur in parallel in special cases. 
++			Because this includes panic paths drivers generally
++			shouldn't try and do clever locking here.
++
++put_char()	-	Stuff a single character onto the queue. The
++			driver is guaranteed following up calls to
++			flush_chars.
++
++flush_chars()	-	Ask the kernel to write put_char queue
++
++write_room()	-	Return the number of characters tht can be stuffed
++			into the port buffers without overflow (or less).
++			The ldisc is responsible for being intelligent
++ 			about multi-threading of write_room/write calls
++
++ioctl()		-	Called when an ioctl may be for the driver
++
++set_termios()	-	Called on termios change, may get parallel calls,
++			may block for now (may change that)
++
++set_ldisc()	-	Notifier for discipline change. At the point this 
++			is done the discipline is not yet usable. Can now
++			sleep (I think)
++
++throttle()	-	Called by the ldisc to ask the driver to do flow
++			control.  Serialization including with unthrottle
++			is the job of the ldisc layer.
++
++unthrottle()	-	Called by the ldisc to ask the driver to stop flow
++			control.
++
++stop()		-	Ldisc notifier to the driver to stop output. As with
++			throttle the serializations with start() are down
++			to the ldisc layer.
++
++start()		-	Ldisc notifier to the driver to start output.
++
++hangup()	-	Ask the tty driver to cause a hangup initiated
++			from the host side. [Can sleep ??]
++
++break_ctl()	-	Send RS232 break. Can sleep. Can get called in
++			parallel, driver must serialize (for now), and
++			with write calls.
++
++wait_until_sent() -	Wait for characters to exit the hardware queue
++			of the driver. Can sleep
++
++send_xchar()	  -	Send XON/XOFF and if possible jump the queue with
++			it in order to get fast flow control responses.
++			Cannot sleep ??
++
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/bluetooth/hci_ldisc.c kernel-source-2.6.8-2.6.8/drivers/bluetooth/hci_ldisc.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/bluetooth/hci_ldisc.c	2004-08-13 23:37:38.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/bluetooth/hci_ldisc.c	2004-10-16 15:51:00.000000000 -0600
+@@ -188,9 +188,7 @@
+ 	}
+ 
+ 	/* Flush any pending characters in the driver and discipline. */
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
+-
++	tty_ldisc_flush(tty);
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
+ 
+@@ -280,7 +278,9 @@
+ 
+ 	spin_lock_init(&hu->rx_lock);
+ 
+-	/* Flush any pending characters in the driver and line discipline */
++	/* Flush any pending characters in the driver and line discipline. */
++	/* FIXME: why is this needed. Note don't use ldisc_ref here as the
++	   open path is before the ldisc is referencable */
+ 	if (tty->ldisc.flush_buffer)
+ 		tty->ldisc.flush_buffer(tty);
+ 
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/amiserial.c kernel-source-2.6.8-2.6.8/drivers/char/amiserial.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/amiserial.c	2004-08-13 23:38:10.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/amiserial.c	2004-10-16 15:51:00.000000000 -0600
+@@ -557,9 +557,7 @@
+ 		return;
+ 
+ 	if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) {
+-		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-		    tty->ldisc.write_wakeup)
+-			(tty->ldisc.write_wakeup)(tty);
++		tty_wakeup(tty);
+ 		wake_up_interruptible(&tty->write_wait);
+ 	}
+ }
+@@ -1023,9 +1021,7 @@
+ 	info->xmit.head = info->xmit.tail = 0;
+ 	local_irq_restore(flags);
+ 	wake_up_interruptible(&tty->write_wait);
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
++	tty_wakeup(tty);
+ }
+ 
+ /*
+@@ -1564,8 +1560,8 @@
+ 	shutdown(info);
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
++		
++	tty_ldisc_flush(tty);
+ 	tty->closing = 0;
+ 	info->event = 0;
+ 	info->tty = 0;
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/cyclades.c kernel-source-2.6.8-2.6.8/drivers/char/cyclades.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/cyclades.c	2004-08-13 23:36:32.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/cyclades.c	2004-10-16 15:51:00.000000000 -0600
+@@ -970,10 +970,7 @@
+ 	wake_up_interruptible(&info->delta_msr_wait);
+     }
+     if (test_and_clear_bit(Cy_EVENT_WRITE_WAKEUP, &info->event)) {
+-        if((tty->flags & (1<< TTY_DO_WRITE_WAKEUP))
+-        && tty->ldisc.write_wakeup){
+-            (tty->ldisc.write_wakeup)(tty);
+-        }
++        tty_wakeup(tty);
+         wake_up_interruptible(&tty->write_wait);
+     }
+ #ifdef Z_WAKE
+@@ -2850,8 +2847,7 @@
+     shutdown(info);
+     if (tty->driver->flush_buffer)
+         tty->driver->flush_buffer(tty);
+-    if (tty->ldisc.flush_buffer)
+-        tty->ldisc.flush_buffer(tty);
++    tty_ldisc_flush(tty);        
+     CY_LOCK(info, flags);
+ 
+     tty->closing = 0;
+@@ -4554,10 +4550,8 @@
+ 	}
+ 	CY_UNLOCK(info, flags);
+     }
++    tty_wakeup(tty);
+     wake_up_interruptible(&tty->write_wait);
+-    if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP))
+-	&& tty->ldisc.write_wakeup)
+-	    (tty->ldisc.write_wakeup)(tty);
+ } /* cy_flush_buffer */
+ 
+ 
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/epca.c kernel-source-2.6.8-2.6.8/drivers/char/epca.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/epca.c	2004-08-13 23:37:14.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/epca.c	2004-10-16 15:51:00.000000000 -0600
+@@ -551,9 +551,7 @@
+ 		if (tty->driver->flush_buffer)
+ 			tty->driver->flush_buffer(tty);
+ 
+-		if (tty->ldisc.flush_buffer)
+-			tty->ldisc.flush_buffer(tty);
+-
++		tty_ldisc_flush(tty);
+ 		shutdown(ch);
+ 		tty->closing = 0;
+ 		ch->event = 0;
+@@ -657,10 +655,7 @@
+ 		cli();
+ 		if (tty->driver->flush_buffer)
+ 			tty->driver->flush_buffer(tty);
+-
+-		if (tty->ldisc.flush_buffer)
+-			tty->ldisc.flush_buffer(tty);
+-
++		tty_ldisc_flush(tty);
+ 		shutdown(ch);
+ 
+ 		ch->tty   = NULL;
+@@ -1120,8 +1115,7 @@
+ 	restore_flags(flags);
+ 
+ 	wake_up_interruptible(&tty->write_wait);
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
++	tty_wakeup(tty);
+ 
+ } /* End pc_flush_buffer */
+ 
+@@ -2262,9 +2256,7 @@
+ 				{ /* Begin if LOWWAIT */
+ 
+ 					ch->statusflags &= ~LOWWAIT;
+-					if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-						  tty->ldisc.write_wakeup)
+-						(tty->ldisc.write_wakeup)(tty);
++					tty_wakeup(tty);
+ 					wake_up_interruptible(&tty->write_wait);
+ 
+ 				} /* End if LOWWAIT */
+@@ -2281,9 +2273,7 @@
+ 				{ /* Begin if EMPTYWAIT */
+ 
+ 					ch->statusflags &= ~EMPTYWAIT;
+-					if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-						  tty->ldisc.write_wakeup)
+-						(tty->ldisc.write_wakeup)(tty);
++					tty_wakeup(tty);
+ 
+ 					wake_up_interruptible(&tty->write_wait);
+ 
+@@ -3136,6 +3126,7 @@
+ 			}
+ 			else 
+ 			{
++				/* ldisc lock already held in ioctl */
+ 				if (tty->ldisc.flush_buffer)
+ 					tty->ldisc.flush_buffer(tty);
+ 			}
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/esp.c kernel-source-2.6.8-2.6.8/drivers/char/esp.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/esp.c	2004-08-13 23:36:11.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/esp.c	2004-10-16 15:51:00.000000000 -0600
+@@ -762,10 +762,7 @@
+ 		return;
+ 
+ 	if (test_and_clear_bit(ESP_EVENT_WRITE_WAKEUP, &info->event)) {
+-		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-		    tty->ldisc.write_wakeup)
+-			(tty->ldisc.write_wakeup)(tty);
+-		wake_up_interruptible(&tty->write_wait);
++		tty_wakeup(tty);
+ 	}
+ }
+ 
+@@ -1370,10 +1367,7 @@
+ 	cli();
+ 	info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
+ 	sti();
+-	wake_up_interruptible(&tty->write_wait);
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
++	tty_wakeup(tty);
+ }
+ 
+ /*
+@@ -2069,8 +2063,7 @@
+ 	shutdown(info);
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
++	tty_ldisc_flush(tty);
+ 	tty->closing = 0;
+ 	info->event = 0;
+ 	info->tty = NULL;
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/generic_serial.c kernel-source-2.6.8-2.6.8/drivers/char/generic_serial.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/generic_serial.c	2004-08-13 23:36:58.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/generic_serial.c	2004-10-16 15:51:00.000000000 -0600
+@@ -436,9 +436,7 @@
+ 	restore_flags(flags);
+ 
+ 	wake_up_interruptible(&tty->write_wait);
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
++	tty_wakeup(tty);
+ 	func_exit ();
+ }
+ 
+@@ -578,9 +576,7 @@
+ 	if (!tty) return;
+ 
+ 	if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &port->event)) {
+-		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-		    tty->ldisc.write_wakeup)
+-			(tty->ldisc.write_wakeup)(tty);
++		tty_wakeup(tty);
+ 		wake_up_interruptible(&tty->write_wait);
+ 	}
+ 	func_exit ();
+@@ -694,8 +690,8 @@
+ {
+ 	unsigned long flags;
+ 	struct gs_port *port;
+-
+-	func_enter ();
++	
++	func_enter ()
+ 
+ 	if (!tty) return;
+ 
+@@ -760,8 +756,8 @@
+ 
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
++		
++	tty_ldisc_flush(tty);
+ 	tty->closing = 0;
+ 
+ 	port->event = 0;
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/hvc_console.c kernel-source-2.6.8-2.6.8/drivers/char/hvc_console.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/hvc_console.c	2004-08-13 23:37:39.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/hvc_console.c	2004-10-16 15:52:53.000000000 -0600
+@@ -248,10 +248,7 @@
+ 
+ 		if (hp->do_wakeup) {
+ 			hp->do_wakeup = 0;
+-			if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP))
+-			    && tty->ldisc.write_wakeup)
+-				(tty->ldisc.write_wakeup)(tty);
+-			wake_up_interruptible(&tty->write_wait);
++			tty_wakeup(tty);
+ 		}
+ 	}
+ 
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/hvcs.c kernel-source-2.6.8-2.6.8/drivers/char/hvcs.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/hvcs.c	2004-08-13 23:37:14.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/hvcs.c	2004-10-16 15:51:00.000000000 -0600
+@@ -393,10 +393,7 @@
+ 			 * a non-existent tty.
+ 			 */
+ 			if (tty) {
+-				if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP))
+-						&& tty->ldisc.write_wakeup)
+-					(tty->ldisc.write_wakeup) (tty);
+-				wake_up_interruptible(&tty->write_wait);
++				tty_wakeup(tty);
+ 			}
+ 		}
+ 	}
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/isicom.c kernel-source-2.6.8-2.6.8/drivers/char/isicom.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/isicom.c	2004-08-13 23:36:12.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/isicom.c	2004-10-16 15:51:00.000000000 -0600
+@@ -484,10 +484,8 @@
+ 	
+ 	if (!tty)
+ 		return;
+-	
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
++
++	tty_wakeup(tty);	
+ 	wake_up_interruptible(&tty->write_wait);
+ } 		
+  		
+@@ -1119,8 +1117,8 @@
+ 	isicom_shutdown_port(port);
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
++		
++	tty_ldisc_flush(tty);
+ 	tty->closing = 0;
+ 	port->tty = NULL;
+ 	if (port->blocked_open) {
+@@ -1563,9 +1561,7 @@
+ 	restore_flags(flags);
+ 	
+ 	wake_up_interruptible(&tty->write_wait);
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
++	tty_wakeup(tty);
+ }
+ 
+ 
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/moxa.c kernel-source-2.6.8-2.6.8/drivers/char/moxa.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/moxa.c	2004-08-13 23:38:04.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/moxa.c	2004-10-16 15:51:00.000000000 -0600
+@@ -618,8 +618,8 @@
+ 
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
++	tty_ldisc_flush(tty);
++			
+ 	tty->closing = 0;
+ 	ch->event = 0;
+ 	ch->tty = NULL;
+@@ -693,9 +693,7 @@
+ 	if (ch == NULL)
+ 		return;
+ 	MoxaPortFlushData(ch->port, 1);
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup) (tty);
++	tty_wakeup(tty);
+ 	wake_up_interruptible(&tty->write_wait);
+ }
+ 
+@@ -954,9 +952,7 @@
+ 				if (MoxaPortTxQueue(ch->port) <= WAKEUP_CHARS) {
+ 					if (!tp->stopped) {
+ 						ch->statusflags &= ~LOWWAIT;
+-						if ((tp->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-						  tp->ldisc.write_wakeup)
+-							(tp->ldisc.write_wakeup) (tp);
++						tty_wakeup(tty);
+ 						wake_up_interruptible(&tp->write_wait);
+ 					}
+ 				}
+@@ -1123,9 +1119,7 @@
+ 	if (ch->tty && (ch->statusflags & EMPTYWAIT)) {
+ 		if (MoxaPortTxQueue(ch->port) == 0) {
+ 			ch->statusflags &= ~EMPTYWAIT;
+-			if ((ch->tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-			    ch->tty->ldisc.write_wakeup)
+-				(ch->tty->ldisc.write_wakeup) (ch->tty);
++			tty_wakeup(tty);
+ 			wake_up_interruptible(&ch->tty->write_wait);
+ 			return;
+ 		}
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/mxser.c kernel-source-2.6.8-2.6.8/drivers/char/mxser.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/mxser.c	2004-08-13 23:37:26.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/mxser.c	2004-10-16 15:51:00.000000000 -0600
+@@ -678,9 +678,7 @@
+ 	tty = info->tty;
+ 	if (tty) {
+ 		if (test_and_clear_bit(MXSER_EVENT_TXLOW, &info->event)) {
+-			if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-			    tty->ldisc.write_wakeup)
+-				(tty->ldisc.write_wakeup) (tty);
++			tty_wakeup(tty);
+ 			wake_up_interruptible(&tty->write_wait);
+ 		}
+ 		if (test_and_clear_bit(MXSER_EVENT_HANGUP, &info->event)) {
+@@ -817,8 +815,8 @@
+ 	mxser_shutdown(info);
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
++	tty_ldisc_flush(tty);
++
+ 	tty->closing = 0;
+ 	info->event = 0;
+ 	info->tty = NULL;
+@@ -976,9 +974,7 @@
+ 	info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
+ 	restore_flags(flags);
+ 	wake_up_interruptible(&tty->write_wait);
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup) (tty);
++	tty_wakeup(tty);
+ }
+ 
+ static int mxser_ioctl(struct tty_struct *tty, struct file *file,
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/n_tty.c kernel-source-2.6.8-2.6.8/drivers/char/n_tty.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/n_tty.c	2004-08-13 23:36:11.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/n_tty.c	2004-10-16 15:51:00.000000000 -0600
+@@ -99,11 +99,18 @@
+ 	spin_unlock_irqrestore(&tty->read_lock, flags);
+ }
+ 
+-/* 
+- * Check whether to call the driver.unthrottle function.
+- * We test the TTY_THROTTLED bit first so that it always
+- * indicates the current state.
++/**
++ *	check_unthrottle	-	allow new receive data
++ *	@tty; tty device
++ *
++ *	Check whether to call the driver.unthrottle function.
++ *	We test the TTY_THROTTLED bit first so that it always
++ *	indicates the current state. The decision about whether
++ *	it is worth allowing more input has been taken by the caller.
++ *	Can sleep, may be called under the atomic_read semaphore but
++ *	this is not guaranteed.
+  */
++ 
+ static void check_unthrottle(struct tty_struct * tty)
+ {
+ 	if (tty->count &&
+@@ -112,10 +119,13 @@
+ 		tty->driver->unthrottle(tty);
+ }
+ 
+-/*
+- * Reset the read buffer counters, clear the flags, 
+- * and make sure the driver is unthrottled. Called
+- * from n_tty_open() and n_tty_flush_buffer().
++/**
++ *	reset_buffer_flags	-	reset buffer state
++ *	@tty: terminal to reset
++ *
++ *	Reset the read buffer counters, clear the flags, 
++ *	and make sure the driver is unthrottled. Called
++ *	from n_tty_open() and n_tty_flush_buffer().
+  */
+ static void reset_buffer_flags(struct tty_struct *tty)
+ {
+@@ -129,9 +139,19 @@
+ 	check_unthrottle(tty);
+ }
+ 
+-/*
+- * Flush the input buffer
++/**
++ *	n_tty_flush_buffer	-	clean input queue
++ *	@tty:	terminal device
++ *
++ *	Flush the input buffer. Called when the line discipline is
++ *	being closed, when the tty layer wants the buffer flushed (eg
++ *	at hangup) or when the N_TTY line discipline internally has to
++ *	clean the pending queue (for example some signals).
++ *
++ *	FIXME: tty->ctrl_status is not spinlocked and relies on
++ *	lock_kernel() still.
+  */
++ 
+ void n_tty_flush_buffer(struct tty_struct * tty)
+ {
+ 	/* clear everything and unthrottle the driver */
+@@ -146,9 +166,14 @@
+ 	}
+ }
+ 
+-/*
+- * Return number of characters buffered to be delivered to user
++/**
++ *	n_tty_chars_in_buffer	-	report available bytes
++ *	@tty: tty device
++ *
++ *	Report the number of characters buffered to be delivered to user
++ *	at this instant in time. 
+  */
++ 
+ ssize_t n_tty_chars_in_buffer(struct tty_struct *tty)
+ {
+ 	unsigned long flags;
+@@ -166,20 +191,47 @@
+ 	return n;
+ }
+ 
++/**
++ *	is_utf8_continuation	-	utf8 multibyte check
++ *	@c: byte to check
++ *
++ *	Returns true if the utf8 character 'c' is a multibyte continuation
++ *	character. We use this to correctly compute the on screen size
++ *	of the character when printing
++ */
++ 
+ static inline int is_utf8_continuation(unsigned char c)
+ {
+ 	return (c & 0xc0) == 0x80;
+ }
+ 
++/**
++ *	is_continuation		-	multibyte check
++ *	@c: byte to check
++ *
++ *	Returns true if the utf8 character 'c' is a multibyte continuation
++ *	character and the terminal is in unicode mode.
++ */
++ 
+ static inline int is_continuation(unsigned char c, struct tty_struct *tty)
+ {
+ 	return I_IUTF8(tty) && is_utf8_continuation(c);
+ }
+ 
+-/*
+- * Perform OPOST processing.  Returns -1 when the output device is
+- * full and the character must be retried.
++/**
++ *	opost			-	output post processor
++ *	@c: character (or partial unicode symbol)
++ *	@tty: terminal device
++ *
++ *	Perform OPOST processing.  Returns -1 when the output device is
++ *	full and the character must be retried. Note that Linux currently
++ *	ignores TABDLY, CRDLY, VTDLY, FFDLY and NLDLY. They simply aren't
++ *	relevant in the world today. If you ever need them, add them here.
++ *
++ *	Called from both the receive and transmit sides and can be called
++ *	re-entrantly. Relies on lock_kernel() still.
+  */
++ 
+ static int opost(unsigned char c, struct tty_struct *tty)
+ {
+ 	int	space, spaces;
+@@ -239,10 +291,20 @@
+ 	return 0;
+ }
+ 
+-/*
+- * opost_block --- to speed up block console writes, among other
+- * things.
++/**
++ *	opost_block		-	block postprocess
++ *	@tty: terminal device
++ *	@inbuf: user buffer
++ *	@nr: number of bytes
++ *
++ *	This path is used to speed up block console writes, among other
++ *	things when processing blocks of output data. It handles only
++ *	the simple cases normally found and helps to generate blocks of
++ *	symbols for the console driver and thus improve performance.
++ *
++ *	Called from write_chan under the tty layer write lock.
+  */
++ 
+ static ssize_t opost_block(struct tty_struct * tty,
+ 		       const unsigned char __user * inbuf, unsigned int nr)
+ {
+@@ -304,13 +366,27 @@
+ }
+ 
+ 
+-
++/**
++ *	put_char	-	write character to driver
++ *	@c: character (or part of unicode symbol)
++ *	@tty: terminal device
++ *
++ *	Queue a byte to the driver layer for output
++ */
++ 
+ static inline void put_char(unsigned char c, struct tty_struct *tty)
+ {
+ 	tty->driver->put_char(tty, c);
+ }
+ 
+-/* Must be called only when L_ECHO(tty) is true. */
++/**
++ *	echo_char	-	echo characters
++ *	@c: unicode byte to echo
++ *	@tty: terminal device
++ *
++ *	Echo user input back onto the screen. This must be called only when 
++ *	L_ECHO(tty) is true. Called from the driver receive_buf path.
++ */
+ 
+ static void echo_char(unsigned char c, struct tty_struct *tty)
+ {
+@@ -331,6 +407,16 @@
+ 	}
+ }
+ 
++/**
++ *	eraser		-	handle erase function
++ *	@c: character input
++ *	@tty: terminal device
++ *
++ *	Perform erase and neccessary output when an erase character is
++ *	present in the stream from the driver layer. Handles the complexities
++ *	of UTF-8 multibyte symbols.
++ */
++ 
+ static void eraser(unsigned char c, struct tty_struct *tty)
+ {
+ 	enum { ERASE, WERASE, KILL } kill_type;
+@@ -463,6 +549,18 @@
+ 		finish_erasing(tty);
+ }
+ 
++/**
++ *	isig		-	handle the ISIG optio
++ *	@sig: signal
++ *	@tty: terminal
++ *	@flush: force flush
++ *
++ *	Called when a signal is being sent due to terminal input. This
++ *	may caus terminal flushing to take place according to the termios
++ *	settings and character used. Called from the driver receive_buf
++ *	path so serialized.
++ */
++ 
+ static inline void isig(int sig, struct tty_struct *tty, int flush)
+ {
+ 	if (tty->pgrp > 0)
+@@ -474,6 +572,16 @@
+ 	}
+ }
+ 
++/**
++ *	n_tty_receive_break	-	handle break
++ *	@tty: terminal
++ *
++ *	An RS232 break event has been hit in the incoming bitstream. This
++ *	can cause a variety of events depending upon the termios settings.
++ *
++ *	Called from the receive_buf path so single threaded.
++ */
++ 
+ static inline void n_tty_receive_break(struct tty_struct *tty)
+ {
+ 	if (I_IGNBRK(tty))
+@@ -490,19 +598,40 @@
+ 	wake_up_interruptible(&tty->read_wait);
+ }
+ 
++/**
++ *	n_tty_receive_overrun	-	handle overrun reporting
++ *	@tty: terminal
++ *
++ *	Data arrived faster than we could process it. While the tty
++ *	driver has flagged this the bits that were missed are gone
++ *	forever.
++ *
++ *	Called from the receive_buf path so single threaded. Does not
++ *	need locking as num_overrun and overrun_time are function
++ *	private.
++ */
++ 
+ static inline void n_tty_receive_overrun(struct tty_struct *tty)
+ {
+ 	char buf[64];
+ 
+ 	tty->num_overrun++;
+ 	if (time_before(tty->overrun_time, jiffies - HZ)) {
+-		printk("%s: %d input overrun(s)\n", tty_name(tty, buf),
++		printk(KERN_WARNING "%s: %d input overrun(s)\n", tty_name(tty, buf),
+ 		       tty->num_overrun);
+ 		tty->overrun_time = jiffies;
+ 		tty->num_overrun = 0;
+ 	}
+ }
+ 
++/**
++ *	n_tty_receive_parity_error	-	error notifier
++ *	@tty: terminal device
++ *	@c: character
++ *
++ *	Process a parity error and queue the right data to indicate
++ *	the error case if neccessary. Locking as per n_tty_receive_buf.
++ */
+ static inline void n_tty_receive_parity_error(struct tty_struct *tty,
+ 					      unsigned char c)
+ {
+@@ -520,6 +649,16 @@
+ 	wake_up_interruptible(&tty->read_wait);
+ }
+ 
++/**
++ *	n_tty_receive_char	-	perform processing
++ *	@tty: terminal device
++ *	@c: character
++ *
++ *	Process an individual character of input received from the driver.
++ *	This is serialized with respect to itself by the rules for the 
++ *	driver above.
++ */
++
+ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c)
+ {
+ 	unsigned long flags;
+@@ -711,6 +850,16 @@
+ 	put_tty_queue(c, tty);
+ }	
+ 
++/**
++ *	n_tty_receive_room	-	receive space
++ *	@tty: terminal
++ *
++ *	Called by the driver to find out how much data it is
++ *	permitted to feed to the line discipline without any being lost
++ *	and thus to manage flow control. Not serialized. Answers for the
++ *	"instant".
++ */
++ 
+ static int n_tty_receive_room(struct tty_struct *tty)
+ {
+ 	int	left = N_TTY_BUF_SIZE - tty->read_cnt - 1;
+@@ -729,10 +878,13 @@
+ 	return 0;
+ }
+ 
+-/*
+- * Required for the ptys, serial driver etc. since processes
+- * that attach themselves to the master and rely on ASYNC
+- * IO must be woken up
++/**
++ *	n_tty_write_wakeup	-	asynchronous I/O notifier
++ *	@tty: tty device
++ *
++ *	Required for the ptys, serial driver etc. since processes
++ *	that attach themselves to the master and rely on ASYNC
++ *	IO must be woken up
+  */
+ 
+ static void n_tty_write_wakeup(struct tty_struct *tty)
+@@ -745,6 +897,19 @@
+ 	return;
+ }
+ 
++/**
++ *	n_tty_receive_buf	-	data receive
++ *	@tty: terminal device
++ *	@cp: buffer
++ *	@fp: flag buffer
++ *	@count: characters
++ *
++ *	Called by the terminal driver when a block of characters has
++ *	been received. This function must be called from soft contexts
++ *	not from interrupt context. The driver is responsible for making
++ *	calls one at a time and in order (or using flush_to_ldisc)
++ */
++ 
+ static void n_tty_receive_buf(struct tty_struct *tty, const unsigned char *cp,
+ 			      char *fp, int count)
+ {
+@@ -828,6 +993,18 @@
+ 	        current->sighand->action[sig-1].sa.sa_handler == SIG_IGN);
+ }
+ 
++/**
++ *	n_tty_set_termios	-	termios data changed
++ *	@tty: terminal
++ *	@old: previous data
++ *
++ *	Called by the tty layer when the user changes termios flags so
++ *	that the line discipline can plan ahead. This function cannot sleep
++ *	and is protected from re-entry by the tty layer. The user is 
++ *	guaranteed that this function will not be re-entered or in progress
++ *	when the ldisc is closed.
++ */
++ 
+ static void n_tty_set_termios(struct tty_struct *tty, struct termios * old)
+ {
+ 	if (!tty)
+@@ -843,7 +1020,6 @@
+ 	    I_ICRNL(tty) || I_INLCR(tty) || L_ICANON(tty) ||
+ 	    I_IXON(tty) || L_ISIG(tty) || L_ECHO(tty) ||
+ 	    I_PARMRK(tty)) {
+-		local_irq_disable(); // FIXME: is this safe?
+ 		memset(tty->process_char_map, 0, 256/8);
+ 
+ 		if (I_IGNCR(tty) || I_ICRNL(tty))
+@@ -879,7 +1055,6 @@
+ 			set_bit(SUSP_CHAR(tty), tty->process_char_map);
+ 		}
+ 		clear_bit(__DISABLED_CHAR, tty->process_char_map);
+-		local_irq_enable(); // FIXME: is this safe?
+ 		tty->raw = 0;
+ 		tty->real_raw = 0;
+ 	} else {
+@@ -893,6 +1068,16 @@
+ 	}
+ }
+ 
++/**
++ *	n_tty_close		-	close the ldisc for this tty
++ *	@tty: device
++ *
++ *	Called from the terminal layer when this line discipline is 
++ *	being shut down, either because of a close or becsuse of a 
++ *	discipline change. The function will not be called while other
++ *	ldisc methods are in progress.
++ */
++ 
+ static void n_tty_close(struct tty_struct *tty)
+ {
+ 	n_tty_flush_buffer(tty);
+@@ -902,11 +1087,22 @@
+ 	}
+ }
+ 
++/**
++ *	n_tty_open		-	open an ldisc
++ *	@tty: terminal to open
++ *
++ *	Called when this line discipline is being attached to the 
++ *	terminal device. Can sleep. Called serialized so that no
++ *	other events will occur in parallel. No further open will occur
++ *	until a close.
++ */
++
+ static int n_tty_open(struct tty_struct *tty)
+ {
+ 	if (!tty)
+ 		return -EINVAL;
+ 
++	/* This one is ugly. Currently a malloc failure here can panic */
+ 	if (!tty->read_buf) {
+ 		tty->read_buf = alloc_buf();
+ 		if (!tty->read_buf)
+@@ -932,14 +1128,23 @@
+ 	return 0;
+ }
+ 
+-/*
+- * Helper function to speed up read_chan.  It is only called when
+- * ICANON is off; it copies characters straight from the tty queue to
+- * user space directly.  It can be profitably called twice; once to
+- * drain the space from the tail pointer to the (physical) end of the
+- * buffer, and once to drain the space from the (physical) beginning of
+- * the buffer to head pointer.
++/**
++ * 	copy_from_read_buf	-	copy read data directly
++ *	@tty: terminal device
++ *	@b: user data
++ *	@nr: size of data
++ *
++ *	Helper function to speed up read_chan.  It is only called when
++ *	ICANON is off; it copies characters straight from the tty queue to
++ *	user space directly.  It can be profitably called twice; once to
++ *	drain the space from the tail pointer to the (physical) end of the
++ *	buffer, and once to drain the space from the (physical) beginning of
++ *	the buffer to head pointer.
++ *
++ *	Called under the tty->atomic_read sem and with TTY_DONT_FLIP set
++ *
+  */
++ 
+ static inline int copy_from_read_buf(struct tty_struct *tty,
+ 				      unsigned char __user **b,
+ 				      size_t *nr)
+@@ -970,25 +1175,18 @@
+ 
+ extern ssize_t redirected_tty_write(struct file *,const char *,size_t,loff_t *);
+ 
+-static ssize_t read_chan(struct tty_struct *tty, struct file *file,
+-			 unsigned char __user *buf, size_t nr)
++/**
++ *	job_control		-	check job control
++ *	@tty: tty
++ *	@file: file handle
++ *
++ *	Perform job control management checks on this file/tty descriptor
++ *	and if appropriate send any needed signals and return a negative 
++ *	error code if action should be taken.
++ */
++ 
++static int job_control(struct tty_struct *tty, struct file *file)
+ {
+-	unsigned char __user *b = buf;
+-	DECLARE_WAITQUEUE(wait, current);
+-	int c;
+-	int minimum, time;
+-	ssize_t retval = 0;
+-	ssize_t size;
+-	long timeout;
+-	unsigned long flags;
+-
+-do_it_again:
+-
+-	if (!tty->read_buf) {
+-		printk("n_tty_read_chan: called with read_buf == NULL?!?\n");
+-		return -EIO;
+-	}
+-
+ 	/* Job control check -- must be done at start and after
+ 	   every sleep (POSIX.1 7.1.1.4). */
+ 	/* NOTE: not yet done after every sleep pending a thorough
+@@ -1006,7 +1204,48 @@
+ 			return -ERESTARTSYS;
+ 		}
+ 	}
++	return 0;
++}
++ 
++
++/**
++ *	read_chan		-	read function for tty
++ *	@tty: tty device
++ *	@file: file object
++ *	@buf: userspace buffer pointer
++ *	@nr: size of I/O
++ *
++ *	Perform reads for the line discipline. We are guaranteed that the
++ *	line discipline will not be closed under us but we may get multiple
++ *	parallel readers and must handle this ourselves. We may also get
++ *	a hangup. Always called in user context, may sleep.
++ *
++ *	This code must be sure never to sleep through a hangup.
++ */
++ 
++static ssize_t read_chan(struct tty_struct *tty, struct file *file,
++			 unsigned char __user *buf, size_t nr)
++{
++	unsigned char __user *b = buf;
++	DECLARE_WAITQUEUE(wait, current);
++	int c;
++	int minimum, time;
++	ssize_t retval = 0;
++	ssize_t size;
++	long timeout;
++	unsigned long flags;
++
++do_it_again:
++
++	if (!tty->read_buf) {
++		printk("n_tty_read_chan: called with read_buf == NULL?!?\n");
++		return -EIO;
++	}
+ 
++	c = job_control(tty, file);
++	if(c < 0)
++		return c;
++	
+ 	minimum = time = 0;
+ 	timeout = MAX_SCHEDULE_TIMEOUT;
+ 	if (!tty->icanon) {
+@@ -1028,6 +1267,9 @@
+ 		}
+ 	}
+ 
++	/*
++	 *	Internal serialization of reads.
++	 */
+ 	if (file->f_flags & O_NONBLOCK) {
+ 		if (down_trylock(&tty->atomic_read))
+ 			return -EAGAIN;
+@@ -1177,6 +1419,21 @@
+ 	return retval;
+ }
+ 
++/**
++ *	write_chan		-	write function for tty
++ *	@tty: tty device
++ *	@file: file object
++ *	@buf: userspace buffer pointer
++ *	@nr: size of I/O
++ *
++ *	Write function of the terminal device. This is serialized with
++ *	respect to other write callers but not to termios changes, reads
++ *	and other such events. We must be careful with N_TTY as the receive
++ *	code will echo characters, thus calling driver write methods.
++ *
++ *	This code must be sure never to sleep through a hangup.
++ */
++ 
+ static ssize_t write_chan(struct tty_struct * tty, struct file * file,
+ 			  const unsigned char __user * buf, size_t nr)
+ {
+@@ -1246,7 +1503,25 @@
+ 	return (b - buf) ? b - buf : retval;
+ }
+ 
+-/* Called without the kernel lock held - fine */
++/**
++ *	normal_poll		-	poll method for N_TTY
++ *	@tty: terminal device
++ *	@file: file accessing it
++ *	@wait: poll table
++ *
++ *	Called when the line discipline is asked to poll() for data or
++ *	for special events. This code is not serialized with respect to
++ *	other events save open/close.
++ *
++ *	This code must be sure never to sleep through a hangup.
++ *	Called without the kernel lock held - fine
++ *
++ *	FIXME: if someone changes the VMIN or discipline settings for the
++ *	terminal while another process is in poll() the poll does not
++ *	recompute the new limits. Possibly set_termios should issue
++ *	a read wakeup to fix this bug.
++ */
++ 
+ static unsigned int normal_poll(struct tty_struct * tty, struct file * file, poll_table *wait)
+ {
+ 	unsigned int mask = 0;
+@@ -1287,6 +1562,7 @@
+ 	n_tty_ioctl,		/* ioctl */
+ 	n_tty_set_termios,	/* set_termios */
+ 	normal_poll,		/* poll */
++	NULL,			/* hangup */
+ 	n_tty_receive_buf,	/* receive_buf */
+ 	n_tty_receive_room,	/* receive_room */
+ 	n_tty_write_wakeup	/* write_wakeup */
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/pcmcia/synclink_cs.c kernel-source-2.6.8-2.6.8/drivers/char/pcmcia/synclink_cs.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/pcmcia/synclink_cs.c	2004-08-13 23:36:45.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/pcmcia/synclink_cs.c	2004-10-16 15:51:00.000000000 -0600
+@@ -531,6 +531,40 @@
+ 	return mgslpc_get_text_ptr;
+ }
+ 
++/**
++ * line discipline callback wrappers
++ *
++ * The wrappers maintain line discipline references
++ * while calling into the line discipline.
++ *
++ * ldisc_flush_buffer - flush line discipline receive buffers
++ * ldisc_receive_buf  - pass receive data to line discipline
++ */
++
++static void ldisc_flush_buffer(struct tty_struct *tty)
++{
++	struct tty_ldisc *ld = tty_ldisc_ref(tty);
++	if (ld) {
++		if (ld->flush_buffer)
++			ld->flush_buffer(tty);
++		tty_ldisc_deref(ld);
++	}
++}
++
++static void ldisc_receive_buf(struct tty_struct *tty,
++			      const __u8 *data, char *flags, int count)
++{
++	struct tty_ldisc *ld;
++	if (!tty)
++		return;
++	ld = tty_ldisc_ref(tty);
++	if (ld) {
++		if (ld->receive_buf)
++			ld->receive_buf(tty, data, flags, count);
++		tty_ldisc_deref(ld);
++	}
++}
++
+ static dev_link_t *mgslpc_attach(void)
+ {
+     MGSLPC_INFO *info;
+@@ -984,13 +1018,7 @@
+ 		printk("bh_transmit() entry on %s\n", info->device_name);
+ 
+ 	if (tty) {
+-		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-		    tty->ldisc.write_wakeup) {
+-			if ( debug_level >= DEBUG_LEVEL_BH )
+-				printk( "%s(%d):calling ldisc.write_wakeup on %s\n",
+-					__FILE__,__LINE__,info->device_name);
+-			(tty->ldisc.write_wakeup)(tty);
+-		}
++		tty_wakeup(tty);
+ 		wake_up_interruptible(&tty->write_wait);
+ 	}
+ }
+@@ -1875,11 +1903,9 @@
+ 	info->tx_count = info->tx_put = info->tx_get = 0;
+ 	del_timer(&info->tx_timer);	
+ 	spin_unlock_irqrestore(&info->lock,flags);
+-	
++
+ 	wake_up_interruptible(&tty->write_wait);
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
++	tty_wakeup(tty);
+ }
+ 
+ /* Send a high-priority XON/XOFF character
+@@ -2588,9 +2614,8 @@
+ 
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
+-		
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
++
++	ldisc_flush_buffer(tty);
+ 		
+ 	shutdown(info);
+ 	
+@@ -4059,11 +4084,7 @@
+ 			} 
+ 			else
+ #endif
+-			{
+-				/* Call the line discipline receive callback directly. */
+-				if (tty && tty->ldisc.receive_buf)
+-					tty->ldisc.receive_buf(tty, buf->data, info->flag_buf, framesize);
+-			}
++				ldisc_receive_buf(tty, buf->data, info->flag_buf, framesize);
+ 		}
+ 	}
+ 
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/pcxx.c kernel-source-2.6.8-2.6.8/drivers/char/pcxx.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/pcxx.c	2004-08-13 23:37:15.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/pcxx.c	2004-10-16 15:51:00.000000000 -0600
+@@ -538,28 +538,11 @@
+ 	
+ 		if(tty->driver->flush_buffer)
+ 			tty->driver->flush_buffer(tty);
+-		if(tty->ldisc.flush_buffer)
+-			tty->ldisc.flush_buffer(tty);
++		tty_ldisc_flush(tty);
+ 		shutdown(info);
+ 		tty->closing = 0;
+ 		info->event = 0;
+ 		info->tty = NULL;
+-#ifndef MODULE
+-/* ldiscs[] is not available in a MODULE
+-** worth noting that while I'm not sure what this hunk of code is supposed
+-** to do, it is not present in the serial.c driver.  Hmmm.  If you know,
+-** please send me a note.  brian at ilinx.com
+-** Don't know either what this is supposed to do christoph at lameter.com.
+-*/
+-		if(tty->ldisc.num != ldiscs[N_TTY].num) {
+-			if(tty->ldisc.close)
+-				(tty->ldisc.close)(tty);
+-			tty->ldisc = ldiscs[N_TTY];
+-			tty->termios->c_line = N_TTY;
+-			if(tty->ldisc.open)
+-				(tty->ldisc.open)(tty);
+-		}
+-#endif
+ 		if(info->blocked_open) {
+ 			if(info->close_delay) {
+ 				current->state = TASK_INTERRUPTIBLE;
+@@ -800,9 +783,7 @@
+ 	memoff(ch);
+ 	restore_flags(flags);
+ 
+-	wake_up_interruptible(&tty->write_wait);
+-	if((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
++	tty_wakeup(tty);
+ }
+ 
+ static void pcxe_flush_chars(struct tty_struct *tty)
+@@ -1675,10 +1656,7 @@
+ 			if (event & LOWTX_IND) {
+ 				if (ch->statusflags & LOWWAIT) {
+ 					ch->statusflags &= ~LOWWAIT;
+-					if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-						tty->ldisc.write_wakeup)
+-						(tty->ldisc.write_wakeup)(tty);
+-					wake_up_interruptible(&tty->write_wait);
++					tty_wakeup(tty);
+ 				}
+ 			}
+ 
+@@ -1686,10 +1664,7 @@
+ 				ch->statusflags &= ~TXBUSY;
+ 				if (ch->statusflags & EMPTYWAIT) {
+ 					ch->statusflags &= ~EMPTYWAIT;
+-					if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-						tty->ldisc.write_wakeup)
+-						(tty->ldisc.write_wakeup)(tty);
+-					wake_up_interruptible(&tty->write_wait);
++					tty_wakeup(tty);
+ 				}
+ 			}
+ 		}
+@@ -2165,8 +2140,7 @@
+ 				tty_wait_until_sent(tty, 0);
+ 			}
+ 			else {
+-				if(tty->ldisc.flush_buffer)
+-					tty->ldisc.flush_buffer(tty);
++				tty_ldisc_flush(tty);
+ 			}
+ 
+ 			/* Fall Thru */
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/pty.c kernel-source-2.6.8-2.6.8/drivers/char/pty.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/pty.c	2004-08-13 23:36:44.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/pty.c	2004-10-16 15:51:00.000000000 -0600
+@@ -91,10 +91,7 @@
+ 	if (!o_tty)
+ 		return;
+ 
+-	if ((o_tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    o_tty->ldisc.write_wakeup)
+-		(o_tty->ldisc.write_wakeup)(o_tty);
+-	wake_up_interruptible(&o_tty->write_wait);
++	tty_wakeup(o_tty);
+ 	set_bit(TTY_THROTTLED, &tty->flags);
+ }
+ 
+@@ -107,6 +104,10 @@
+  *   (2) avoid redundant copying for cases where count >> receive_room
+  * N.B. Calls from user space may now return an error code instead of
+  * a count.
++ *
++ * FIXME: Our pty_write method is called with our ldisc lock held but
++ * not our partners. We can't just take the other one blindly without
++ * risking deadlocks.  There is also the small matter of TTY_DONT_FLIP
+  */
+ static int pty_write(struct tty_struct * tty, int from_user,
+ 		       const unsigned char *buf, int count)
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/riscom8.c kernel-source-2.6.8-2.6.8/drivers/char/riscom8.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/riscom8.c	2004-08-13 23:36:57.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/riscom8.c	2004-10-16 15:51:00.000000000 -0600
+@@ -1127,8 +1127,8 @@
+ 	rc_shutdown_port(bp, port);
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
++	tty_ldisc_flush(tty);
++
+ 	tty->closing = 0;
+ 	port->event = 0;
+ 	port->tty = NULL;
+@@ -1301,9 +1301,7 @@
+ 	restore_flags(flags);
+ 	
+ 	wake_up_interruptible(&tty->write_wait);
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
++	tty_wakeup(tty);
+ }
+ 
+ static int rc_tiocmget(struct tty_struct *tty, struct file *file)
+@@ -1644,9 +1642,7 @@
+ 		return;
+ 
+ 	if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &port->event)) {
+-		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-		    tty->ldisc.write_wakeup)
+-			(tty->ldisc.write_wakeup)(tty);
++		tty_wakeup(tty);
+ 		wake_up_interruptible(&tty->write_wait);
+ 	}
+ }
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/rocket.c kernel-source-2.6.8-2.6.8/drivers/char/rocket.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/rocket.c	2004-08-13 23:37:26.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/rocket.c	2004-10-16 15:51:00.000000000 -0600
+@@ -250,12 +250,16 @@
+ 			  CHANNEL_t * cp, unsigned int ChanStatus)
+ {
+ 	unsigned int CharNStat;
+-	int ToRecv, wRecv, space, count;
++	int ToRecv, wRecv, space = 0, count;
+ 	unsigned char *cbuf;
+ 	char *fbuf;
++	struct tty_ldisc *ld;
++
++	ld = tty_ldisc_ref(tty);
+ 
+ 	ToRecv = sGetRxCnt(cp);
+-	space = tty->ldisc.receive_room(tty);
++	if (ld)
++		space = ld->receive_room(tty);
+ 	if (space > 2 * TTY_FLIPBUF_SIZE)
+ 		space = 2 * TTY_FLIPBUF_SIZE;
+ 	cbuf = tty->flip.char_buf;
+@@ -354,7 +358,8 @@
+ 		count += ToRecv;
+ 	}
+ 	/*  Push the data up to the tty layer */
+-	tty->ldisc.receive_buf(tty, tty->flip.char_buf, tty->flip.flag_buf, count);
++	ld->receive_buf(tty, tty->flip.char_buf, tty->flip.flag_buf, count);
++	tty_ldisc_deref(ld);
+ }
+ 
+ /*
+@@ -408,8 +413,7 @@
+ 		clear_bit((info->aiop * 8) + info->chan, (void *) &xmit_flags[info->board]);
+ 
+ 	if (info->xmit_cnt < WAKEUP_CHARS) {
+-		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup)
+-			(tty->ldisc.write_wakeup) (tty);
++		tty_wakeup(tty);
+ 		wake_up_interruptible(&tty->write_wait);
+ #ifdef ROCKETPORT_HAVE_POLL_WAIT
+ 		wake_up_interruptible(&tty->poll_wait);
+@@ -1022,7 +1026,7 @@
+ 	unsigned long flags;
+ 	int timeout;
+ 	CHANNEL_t *cp;
+-
++	
+ 	if (rocket_paranoia_check(info, "rp_close"))
+ 		return;
+ 
+@@ -1101,8 +1105,8 @@
+ 
+ 	if (TTY_DRIVER_FLUSH_BUFFER_EXISTS(tty))
+ 		TTY_DRIVER_FLUSH_BUFFER(tty);
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
++		
++	tty_ldisc_flush(tty);
+ 
+ 	clear_bit((info->aiop * 8) + info->chan, (void *) &xmit_flags[info->board]);
+ 
+@@ -1731,8 +1735,7 @@
+ 	
+ end:
+  	if (info->xmit_cnt < WAKEUP_CHARS) {
+-		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP))  && tty->ldisc.write_wakeup)
+-			(tty->ldisc.write_wakeup) (tty);
++ 		tty_wakeup(tty);
+ 		wake_up_interruptible(&tty->write_wait);
+ #ifdef ROCKETPORT_HAVE_POLL_WAIT
+ 		wake_up_interruptible(&tty->poll_wait);
+@@ -1806,8 +1809,7 @@
+ #ifdef ROCKETPORT_HAVE_POLL_WAIT
+ 	wake_up_interruptible(&tty->poll_wait);
+ #endif
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup) (tty);
++	tty_wakeup(tty);
+ 
+ 	cp = &info->channel;
+ 	sFlushTxFIFO(cp);
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/selection.c kernel-source-2.6.8-2.6.8/drivers/char/selection.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/selection.c	2004-08-13 23:38:04.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/selection.c	2004-10-16 15:51:01.000000000 -0600
+@@ -281,12 +281,15 @@
+ {
+ 	struct vt_struct *vt = (struct vt_struct *) tty->driver_data;
+ 	int	pasted = 0, count;
++	struct  tty_ldisc *ld;
+ 	DECLARE_WAITQUEUE(wait, current);
+ 
+ 	acquire_console_sem();
+ 	poke_blanked_console();
+ 	release_console_sem();
+ 
++	ld = tty_ldisc_ref_wait(tty);
++	
+ 	add_wait_queue(&vt->paste_wait, &wait);
+ 	while (sel_buffer && sel_buffer_lth > pasted) {
+ 		set_current_state(TASK_INTERRUPTIBLE);
+@@ -301,6 +304,8 @@
+ 	}
+ 	remove_wait_queue(&vt->paste_wait, &wait);
+ 	current->state = TASK_RUNNING;
++
++	tty_ldisc_deref(ld);
+ 	return 0;
+ }
+ 
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/ser_a2232.c kernel-source-2.6.8-2.6.8/drivers/char/ser_a2232.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/ser_a2232.c	2004-08-13 23:36:33.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/ser_a2232.c	2004-10-16 15:51:01.000000000 -0600
+@@ -599,10 +599,7 @@
+ 					
+ 				/* WakeUp if output buffer runs low */
+ 				if ((port->gs.xmit_cnt <= port->gs.wakeup_chars) && port->gs.tty) {
+-					if ((port->gs.tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && port->gs.tty->ldisc.write_wakeup){
+-						(port->gs.tty->ldisc.write_wakeup)(port->gs.tty);
+-					}
+-					wake_up_interruptible(&port->gs.tty->write_wait);
++					tty_wakeup(port->gs.tty);
+ 				}
+ 			} // if the port is used
+ 		} // for every port on the board
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/serial167.c kernel-source-2.6.8-2.6.8/drivers/char/serial167.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/serial167.c	2004-08-13 23:36:56.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/serial167.c	2004-10-16 15:51:01.000000000 -0600
+@@ -760,11 +760,7 @@
+ 	wake_up_interruptible(&info->open_wait);
+     }
+     if (test_and_clear_bit(Cy_EVENT_WRITE_WAKEUP, &info->event)) {
+-	if((tty->flags & (1<< TTY_DO_WRITE_WAKEUP))
+-	&& tty->ldisc.write_wakeup){
+-	    (tty->ldisc.write_wakeup)(tty);
+-	}
+-	wake_up_interruptible(&tty->write_wait);
++    	tty_wakeup(tty);
+     }
+ } /* do_softint */
+ 
+@@ -1343,10 +1339,7 @@
+     local_irq_save(flags);
+ 	info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
+     local_irq_restore(flags);
+-    wake_up_interruptible(&tty->write_wait);
+-    if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP))
+-    && tty->ldisc.write_wakeup)
+-	(tty->ldisc.write_wakeup)(tty);
++    tty_wakeup(tty);
+ } /* cy_flush_buffer */
+ 
+ 
+@@ -1846,18 +1839,9 @@
+     shutdown(info);
+     if (tty->driver->flush_buffer)
+ 	tty->driver->flush_buffer(tty);
+-    if (tty->ldisc.flush_buffer)
+-	tty->ldisc.flush_buffer(tty);
++    tty_ldisc_flush(tty);
+     info->event = 0;
+     info->tty = 0;
+-    if (tty->ldisc.num != ldiscs[N_TTY].num) {
+-	if (tty->ldisc.close)
+-	    (tty->ldisc.close)(tty);
+-	tty->ldisc = ldiscs[N_TTY];
+-	tty->termios->c_line = N_TTY;
+-	if (tty->ldisc.open)
+-	    (tty->ldisc.open)(tty);
+-    }
+     if (info->blocked_open) {
+ 	if (info->close_delay) {
+ 	    current->state = TASK_INTERRUPTIBLE;
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/serial_tx3912.c kernel-source-2.6.8-2.6.8/drivers/char/serial_tx3912.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/serial_tx3912.c	2004-08-13 23:36:58.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/serial_tx3912.c	2004-10-16 15:51:01.000000000 -0600
+@@ -191,12 +191,9 @@
+ 	}
+ 	
+         if (port->gs.xmit_cnt <= port->gs.wakeup_chars) {
+-                if ((port->gs.tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-                    port->gs.tty->ldisc.write_wakeup)
+-                        (port->gs.tty->ldisc.write_wakeup)(port->gs.tty);
++        	tty_wakeup(port->gs.tty);
+                 rs_dprintk (TX3912_UART_DEBUG_TRANSMIT, "Waking up.... ldisc (%d)....\n",
+                             port->gs.wakeup_chars); 
+-                wake_up_interruptible(&port->gs.tty->write_wait);
+        	}	
+ }
+ 
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/specialix.c kernel-source-2.6.8-2.6.8/drivers/char/specialix.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/specialix.c	2004-08-13 23:37:40.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/specialix.c	2004-10-16 15:51:01.000000000 -0600
+@@ -1468,8 +1468,7 @@
+ 	sx_shutdown_port(bp, port);
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
++	tty_ldisc_flush(tty);
+ 	tty->closing = 0;
+ 	port->event = 0;
+ 	port->tty = NULL;
+@@ -1646,10 +1645,8 @@
+ 	port->xmit_cnt = port->xmit_head = port->xmit_tail = 0;
+ 	restore_flags(flags);
+ 	
++	tty_wakeup(tty);
+ 	wake_up_interruptible(&tty->write_wait);
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
+ }
+ 
+ 
+@@ -2052,12 +2049,8 @@
+ 	if(!(tty = port->tty)) 
+ 		return;
+ 
+-	if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &port->event)) {
+-		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-		    tty->ldisc.write_wakeup)
+-			(tty->ldisc.write_wakeup)(tty);
+-		wake_up_interruptible(&tty->write_wait);
+-	}
++	if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &port->event))
++		tty_wakeup(tty);
+ }
+ 
+ static struct tty_operations sx_ops = {
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/stallion.c kernel-source-2.6.8-2.6.8/drivers/char/stallion.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/stallion.c	2004-08-13 23:37:37.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/stallion.c	2004-10-16 15:51:01.000000000 -0600
+@@ -1197,8 +1197,7 @@
+ 		portp->tx.tail = (char *) NULL;
+ 	}
+ 	set_bit(TTY_IO_ERROR, &tty->flags);
+-	if (tty->ldisc.flush_buffer)
+-		(tty->ldisc.flush_buffer)(tty);
++	tty_ldisc_flush(tty);
+ 
+ 	tty->closing = 0;
+ 	portp->tty = (struct tty_struct *) NULL;
+@@ -1809,10 +1808,7 @@
+ 		return;
+ 
+ 	stl_flush(portp);
+-	wake_up_interruptible(&tty->write_wait);
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
++	tty_wakeup(tty);
+ }
+ 
+ /*****************************************************************************/
+@@ -2193,10 +2189,7 @@
+ 
+ 	lock_kernel();
+ 	if (test_bit(ASYI_TXLOW, &portp->istate)) {
+-		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-		    tty->ldisc.write_wakeup)
+-			(tty->ldisc.write_wakeup)(tty);
+-		wake_up_interruptible(&tty->write_wait);
++		tty_wakeup(tty);
+ 	}
+ 	if (test_bit(ASYI_DCDCHANGE, &portp->istate)) {
+ 		clear_bit(ASYI_DCDCHANGE, &portp->istate);
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/sx.c kernel-source-2.6.8-2.6.8/drivers/char/sx.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/sx.c	2004-08-13 23:36:56.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/sx.c	2004-10-16 15:51:01.000000000 -0600
+@@ -1046,12 +1046,9 @@
+ 	}
+ 
+ 	if ((port->gs.xmit_cnt <= port->gs.wakeup_chars) && port->gs.tty) {
+-		if ((port->gs.tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-		    port->gs.tty->ldisc.write_wakeup)
+-			(port->gs.tty->ldisc.write_wakeup)(port->gs.tty);
++		tty_wakeup(port->gs.tty);
+ 		sx_dprintk (SX_DEBUG_TRANSMIT, "Waking up.... ldisc (%d)....\n",
+ 		            port->gs.wakeup_chars); 
+-		wake_up_interruptible(&port->gs.tty->write_wait);
+ 	}
+ 
+ 	clear_bit (SX_PORT_TRANSMIT_LOCK, &port->locks);
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/synclink.c kernel-source-2.6.8-2.6.8/drivers/char/synclink.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/synclink.c	2004-08-13 23:36:46.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/synclink.c	2004-10-16 15:51:01.000000000 -0600
+@@ -993,6 +993,29 @@
+ 	return 0;
+ }
+ 
++/**
++ * line discipline callback wrappers
++ *
++ * The wrappers maintain line discipline references
++ * while calling into the line discipline.
++ *
++ * ldisc_receive_buf  - pass receive data to line discipline
++ */
++
++static void ldisc_receive_buf(struct tty_struct *tty,
++			      const __u8 *data, char *flags, int count)
++{
++	struct tty_ldisc *ld;
++	if (!tty)
++		return;
++	ld = tty_ldisc_ref(tty);
++	if (ld) {
++		if (ld->receive_buf)
++			ld->receive_buf(tty, data, flags, count);
++		tty_ldisc_deref(ld);
++	}
++}
++
+ /* mgsl_stop()		throttle (stop) transmitter
+  * 	
+  * Arguments:		tty	pointer to tty info structure
+@@ -1153,13 +1176,7 @@
+ 			__FILE__,__LINE__,info->device_name);
+ 
+ 	if (tty) {
+-		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-		    tty->ldisc.write_wakeup) {
+-			if ( debug_level >= DEBUG_LEVEL_BH )
+-				printk( "%s(%d):calling ldisc.write_wakeup on %s\n",
+-					__FILE__,__LINE__,info->device_name);
+-			(tty->ldisc.write_wakeup)(tty);
+-		}
++		tty_wakeup(tty);
+ 		wake_up_interruptible(&tty->write_wait);
+ 	}
+ 
+@@ -2415,11 +2432,8 @@
+ 	spin_unlock_irqrestore(&info->irq_spinlock,flags);
+ 	
+ 	wake_up_interruptible(&tty->write_wait);
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
+-		
+-}	/* end of mgsl_flush_buffer() */
++	tty_wakeup(tty);
++}
+ 
+ /* mgsl_send_xchar()
+  *
+@@ -3253,9 +3267,8 @@
+ 
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
+-		
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
++
++	tty_ldisc_flush(tty);
+ 		
+ 	shutdown(info);
+ 	
+@@ -6830,11 +6843,7 @@
+ 			} 
+ 			else
+ #endif
+-			{
+-				/* Call the line discipline receive callback directly. */
+-				if ( tty && tty->ldisc.receive_buf )
+-				tty->ldisc.receive_buf(tty, info->intermediate_rxbuffer, info->flag_buf, framesize);
+-			}
++				ldisc_receive_buf(tty, info->intermediate_rxbuffer, info->flag_buf, framesize);
+ 		}
+ 	}
+ 	/* Free the buffers used by this frame. */
+@@ -7006,9 +7015,7 @@
+ 			memcpy( info->intermediate_rxbuffer, pBufEntry->virt_addr, framesize);
+ 			info->icount.rxok++;
+ 
+-			/* Call the line discipline receive callback directly. */
+-			if ( tty && tty->ldisc.receive_buf )
+-				tty->ldisc.receive_buf(tty, info->intermediate_rxbuffer, info->flag_buf, framesize);
++			ldisc_receive_buf(tty, info->intermediate_rxbuffer, info->flag_buf, framesize);
+ 		}
+ 
+ 		/* Free the buffers used by this frame. */
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/synclinkmp.c kernel-source-2.6.8-2.6.8/drivers/char/synclinkmp.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/synclinkmp.c	2004-08-13 23:36:32.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/synclinkmp.c	2004-10-16 15:51:01.000000000 -0600
+@@ -722,6 +722,29 @@
+ 	return 0;
+ }
+ 
++/**
++ * line discipline callback wrappers
++ *
++ * The wrappers maintain line discipline references
++ * while calling into the line discipline.
++ *
++ * ldisc_receive_buf  - pass receive data to line discipline
++ */
++
++static void ldisc_receive_buf(struct tty_struct *tty,
++			      const __u8 *data, char *flags, int count)
++{
++	struct tty_ldisc *ld;
++	if (!tty)
++		return;
++	ld = tty_ldisc_ref(tty);
++	if (ld) {
++		if (ld->receive_buf)
++			ld->receive_buf(tty, data, flags, count);
++		tty_ldisc_deref(ld);
++	}
++}
++
+ /* tty callbacks */
+ 
+ /* Called when a port is opened.  Init and enable port.
+@@ -869,8 +892,7 @@
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
+ 
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
++	tty_ldisc_flush(tty);
+ 
+ 	shutdown(info);
+ 
+@@ -1275,9 +1297,7 @@
+ 	spin_unlock_irqrestore(&info->lock,flags);
+ 
+ 	wake_up_interruptible(&tty->write_wait);
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
++	tty_wakeup(tty);
+ }
+ 
+ /* throttle (stop) transmitter
+@@ -1941,13 +1961,7 @@
+ 			__FILE__,__LINE__,info->device_name);
+ 
+ 	if (tty) {
+-		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-		    tty->ldisc.write_wakeup) {
+-			if ( debug_level >= DEBUG_LEVEL_BH )
+-				printk( "%s(%d):%s calling ldisc.write_wakeup\n",
+-					__FILE__,__LINE__,info->device_name);
+-			(tty->ldisc.write_wakeup)(tty);
+-		}
++		tty_wakeup(tty);
+ 		wake_up_interruptible(&tty->write_wait);
+ 	}
+ }
+@@ -4869,15 +4883,8 @@
+ 			}
+ 			else
+ #endif
+-			{
+-				if ( tty && tty->ldisc.receive_buf ) {
+-					/* Call the line discipline receive callback directly. */
+-					tty->ldisc.receive_buf(tty,
+-						info->tmp_rx_buf,
+-						info->flag_buf,
+-						framesize);
+-				}
+-			}
++				ldisc_receive_buf(tty,info->tmp_rx_buf,
++						  info->flag_buf, framesize);
+ 		}
+ 	}
+ 	/* Free the buffers used by this frame. */
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/tty_io.c kernel-source-2.6.8-2.6.8/drivers/char/tty_io.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/tty_io.c	2004-10-16 15:50:22.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/tty_io.c	2004-10-16 15:59:13.000000000 -0600
+@@ -92,6 +92,7 @@
+ #include <linux/smp_lock.h>
+ #include <linux/device.h>
+ #include <linux/idr.h>
++#include <linux/wait.h>
+ 
+ #include <asm/uaccess.h>
+ #include <asm/system.h>
+@@ -120,11 +121,17 @@
+ 
+ EXPORT_SYMBOL(tty_std_termios);
+ 
++/* This list gets poked at by procfs and various bits of boot up code. This
++   could do with some rationalisation such as pulling the tty proc function
++   into this file */
++   
+ LIST_HEAD(tty_drivers);			/* linked list of tty drivers */
+-struct tty_ldisc ldiscs[NR_LDISCS];	/* line disc dispatch table	*/
+ 
+-/* Semaphore to protect creating and releasing a tty */
++/* Semaphore to protect creating and releasing a tty. This is shared with
++   vt.c for deeply disgusting hack reasons */
+ DECLARE_MUTEX(tty_sem);
++/* Lock for tty_termios changes - private to tty_io/tty_ioctl */
++spinlock_t tty_termios_lock = SPIN_LOCK_UNLOCKED;
+ 
+ #ifdef CONFIG_UNIX98_PTYS
+ extern struct tty_driver *ptm_driver;	/* Unix98 pty masters; for /dev/ptmx */
+@@ -224,65 +231,324 @@
+ 	return 0;
+ }
+ 
++/*
++ *	This is probably overkill for real world processors but
++ *	they are not on hot paths so a little discipline won't do 
++ *	any harm.
++ */
++ 
++static void tty_set_termios_ldisc(struct tty_struct *tty, int num)
++{
++	unsigned long flags;
++	spin_lock_irqsave(&tty_termios_lock, flags);
++	tty->termios->c_line = num;
++	spin_unlock_irqrestore(&tty_termios_lock, flags);
++}
++
++/*
++ *	This guards the refcounted line discipline lists. The lock
++ *	must be taken with irqs off because there are hangup path
++ *	callers who will do ldisc lookups and cannot sleep.
++ */
++ 
++static spinlock_t tty_ldisc_lock = SPIN_LOCK_UNLOCKED;
++static DECLARE_WAIT_QUEUE_HEAD(tty_ldisc_wait);
++static struct tty_ldisc tty_ldiscs[NR_LDISCS];	/* line disc dispatch table	*/
++
+ int tty_register_ldisc(int disc, struct tty_ldisc *new_ldisc)
+ {
++	unsigned long flags;
++	int ret = 0;
++	
+ 	if (disc < N_TTY || disc >= NR_LDISCS)
+ 		return -EINVAL;
+ 	
++	spin_lock_irqsave(&tty_ldisc_lock, flags);
+ 	if (new_ldisc) {
+-		ldiscs[disc] = *new_ldisc;
+-		ldiscs[disc].flags |= LDISC_FLAG_DEFINED;
+-		ldiscs[disc].num = disc;
+-	} else
+-		memset(&ldiscs[disc], 0, sizeof(struct tty_ldisc));
++		tty_ldiscs[disc] = *new_ldisc;
++		tty_ldiscs[disc].num = disc;
++		tty_ldiscs[disc].flags |= LDISC_FLAG_DEFINED;
++		tty_ldiscs[disc].refcount = 0;
++	} else {
++		if(tty_ldiscs[disc].refcount)
++			ret = -EBUSY;
++		else
++			tty_ldiscs[disc].flags &= ~LDISC_FLAG_DEFINED;
++	}
++	spin_unlock_irqrestore(&tty_ldisc_lock, flags);
+ 	
+-	return 0;
++	return ret;
+ }
+ 
+ EXPORT_SYMBOL(tty_register_ldisc);
+ 
+-/* Set the discipline of a tty line. */
++struct tty_ldisc *tty_ldisc_get(int disc)
++{
++	unsigned long flags;
++	struct tty_ldisc *ld;
++
++	if (disc < N_TTY || disc >= NR_LDISCS)
++		return NULL;
++	
++	spin_lock_irqsave(&tty_ldisc_lock, flags);
++
++	ld = &tty_ldiscs[disc];
++	/* Check the entry is defined */
++	if(ld->flags & LDISC_FLAG_DEFINED)
++	{
++		/* If the module is being unloaded we can't use it */
++		if (!try_module_get(ld->owner))
++		       	ld = NULL;
++		else /* lock it */
++			ld->refcount++;
++	}
++	else
++		ld = NULL;
++	spin_unlock_irqrestore(&tty_ldisc_lock, flags);
++	return ld;
++}
++
++EXPORT_SYMBOL_GPL(tty_ldisc_get);
++
++void tty_ldisc_put(int disc)
++{
++	struct tty_ldisc *ld;
++	unsigned long flags;
++	
++	if (disc < N_TTY || disc >= NR_LDISCS)
++		BUG();
++		
++	spin_lock_irqsave(&tty_ldisc_lock, flags);
++	ld = &tty_ldiscs[disc];
++	if(ld->refcount == 0)
++		BUG();
++	ld->refcount --;
++	module_put(ld->owner);
++	spin_unlock_irqrestore(&tty_ldisc_lock, flags);
++}
++	
++EXPORT_SYMBOL_GPL(tty_ldisc_put);
++
++void tty_ldisc_assign(struct tty_struct *tty, struct tty_ldisc *ld)
++{
++	tty->ldisc = *ld;
++	tty->ldisc.refcount = 0;
++}
++
++/**
++ *	tty_ldisc_try		-	internal helper
++ *	@tty: the tty
++ *
++ *	Make a single attempt to grab and bump the refcount on
++ *	the tty ldisc. Return 0 on failure or 1 on success. This is
++ *	used to implement both the waiting and non waiting versions
++ *	of tty_ldisc_ref
++ */
++
++static int tty_ldisc_try(struct tty_struct *tty)
++{
++	unsigned long flags;
++	struct tty_ldisc *ld;
++	int ret = 0;
++	
++	spin_lock_irqsave(&tty_ldisc_lock, flags);
++	ld = &tty->ldisc;
++	if(test_bit(TTY_LDISC, &tty->flags))
++	{
++		ld->refcount++;
++		ret = 1;
++	}
++	spin_unlock_irqrestore(&tty_ldisc_lock, flags);
++	return ret;
++}
++
++/**
++ *	tty_ldisc_ref_wait	-	wait for the tty ldisc
++ *	@tty: tty device
++ *
++ *	Dereference the line discipline for the terminal and take a 
++ *	reference to it. If the line discipline is in flux then 
++ *	wait patiently until it changes.
++ *
++ *	Note: Must not be called from an IRQ/timer context. The caller
++ *	must also be careful not to hold other locks that will deadlock
++ *	against a discipline change, such as an existing ldisc reference
++ *	(which we check for)
++ */
++ 
++struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *tty)
++{
++	/* wait_event is a macro */
++	wait_event(tty_ldisc_wait, tty_ldisc_try(tty));
++	if(tty->ldisc.refcount == 0)
++		printk(KERN_ERR "tty_ldisc_ref_wait\n");
++	return &tty->ldisc;
++}
++
++EXPORT_SYMBOL_GPL(tty_ldisc_ref_wait);
++
++/**
++ *	tty_ldisc_ref		-	get the tty ldisc
++ *	@tty: tty device
++ *
++ *	Dereference the line discipline for the terminal and take a 
++ *	reference to it. If the line discipline is in flux then 
++ *	return NULL. Can be called from IRQ and timer functions.
++ */
++ 
++struct tty_ldisc *tty_ldisc_ref(struct tty_struct *tty)
++{
++	if(tty_ldisc_try(tty))
++		return &tty->ldisc;
++	return NULL;
++}
++
++EXPORT_SYMBOL_GPL(tty_ldisc_ref);
++
++/**
++ *	tty_ldisc_deref		-	free a tty ldisc reference
++ *	@ld: reference to free up
++ *
++ *	Undoes the effect of tty_ldisc_ref or tty_ldisc_ref_wait. May
++ *	be called in IRQ context.
++ */
++ 
++void tty_ldisc_deref(struct tty_ldisc *ld)
++{
++	unsigned long flags;
++
++	if(ld == NULL)
++		BUG();
++		
++	spin_lock_irqsave(&tty_ldisc_lock, flags);
++	if(ld->refcount == 0)
++		printk(KERN_ERR "tty_ldisc_deref: no references.\n");
++	else
++		ld->refcount--;
++	if(ld->refcount == 0)
++		wake_up(&tty_ldisc_wait);
++	spin_unlock_irqrestore(&tty_ldisc_lock, flags);
++}
++
++EXPORT_SYMBOL_GPL(tty_ldisc_deref);
++
++/**
++ *	tty_ldisc_enable	-	allow ldisc use
++ *	@tty: terminal to activate ldisc on
++ *
++ *	Set the TTY_LDISC flag when the line discipline can be called
++ *	again. Do neccessary wakeups for existing sleepers.
++ *
++ *	Note: nobody should set this bit except via this function. Clearing
++ *	directly is allowed.
++ */
++
++static void tty_ldisc_enable(struct tty_struct *tty)
++{
++	set_bit(TTY_LDISC, &tty->flags);
++	wake_up(&tty_ldisc_wait);
++}
++	
++/**
++ *	tty_set_ldisc		-	set line discipline
++ *	@tty: the terminal to set
++ *	@ldisc: the line discipline
++ *
++ *	Set the discipline of a tty line. Must be called from a process
++ *	context.
++ */
++ 
+ static int tty_set_ldisc(struct tty_struct *tty, int ldisc)
+ {
+ 	int	retval = 0;
+ 	struct	tty_ldisc o_ldisc;
+ 	char buf[64];
++	int work;
++	unsigned long flags;
++	struct tty_ldisc *ld;
+ 
+ 	if ((ldisc < N_TTY) || (ldisc >= NR_LDISCS))
+ 		return -EINVAL;
++
++restart:
++
++	if (tty->ldisc.num == ldisc)
++		return 0;	/* We are already in the desired discipline */
++	
++	ld = tty_ldisc_get(ldisc);
+ 	/* Eduardo Blanco <ejbs at cs.cs.com.uy> */
+ 	/* Cyrus Durgin <cider at speakeasy.org> */
+-	if (!(ldiscs[ldisc].flags & LDISC_FLAG_DEFINED)) {
++	if (ld == NULL) {
+ 		request_module("tty-ldisc-%d", ldisc);
++		ld = tty_ldisc_get(ldisc);
+ 	}
+-	if (!(ldiscs[ldisc].flags & LDISC_FLAG_DEFINED))
++	if (ld == NULL)
+ 		return -EINVAL;
+ 
+-	if (tty->ldisc.num == ldisc)
+-		return 0;	/* We are already in the desired discipline */
+-
+-	if (!try_module_get(ldiscs[ldisc].owner))
+-	       	return -EINVAL;
+-	
+ 	o_ldisc = tty->ldisc;
+ 
+ 	tty_wait_until_sent(tty, 0);
++
++	/*
++	 *	Make sure we don't change while someone holds a
++	 *	reference to the line discipline. The TTY_LDISC bit
++	 *	prevents anyone taking a reference once it is clear.
++	 *	We need the lock to avoid racing reference takers.
++	 */
++	 
++	spin_lock_irqsave(&tty_ldisc_lock, flags);
++	if(tty->ldisc.refcount)
++	{
++		/* Free the new ldisc we grabbed. Must drop the lock
++		   first. */
++		spin_unlock_irqrestore(&tty_ldisc_lock, flags);
++		tty_ldisc_put(ldisc);
++		/*
++		 * There are several reasons we may be busy, including
++		 * random momentary I/O traffic. We must therefore
++		 * retry. We could distinguish between blocking ops
++		 * and retries if we made tty_ldisc_wait() smarter. That
++		 * is up for discussion.
++		 */
++		if(wait_event_interruptible(tty_ldisc_wait, tty->ldisc.refcount == 0) < 0)
++			return -ERESTARTSYS;			
++		goto restart;
++	}
++	clear_bit(TTY_LDISC, &tty->flags);	
++	clear_bit(TTY_DONT_FLIP, &tty->flags);
++	spin_unlock_irqrestore(&tty_ldisc_lock, flags);
+ 	
++	/*
++	 *	From this point on we know nobody has an ldisc
++	 *	usage reference, nor can they obtain one until
++	 *	we say so later on.
++	 */
++	 
++	work = cancel_delayed_work(&tty->flip.work);
++	/*
++	 * Wait for ->hangup_work and ->flip.work handlers to terminate
++	 */
++	 
++	flush_scheduled_work();
+ 	/* Shutdown the current discipline. */
+ 	if (tty->ldisc.close)
+ 		(tty->ldisc.close)(tty);
+ 
+ 	/* Now set up the new line discipline. */
+-	tty->ldisc = ldiscs[ldisc];
+-	tty->termios->c_line = ldisc;
++	tty_ldisc_assign(tty, ld);
++	tty_set_termios_ldisc(tty, ldisc);
+ 	if (tty->ldisc.open)
+ 		retval = (tty->ldisc.open)(tty);
+ 	if (retval < 0) {
+-		tty->ldisc = o_ldisc;
+-		tty->termios->c_line = tty->ldisc.num;
++		tty_ldisc_put(ldisc);
++		/* There is an outstanding reference here so this is safe */
++		tty_ldisc_assign(tty, tty_ldisc_get(o_ldisc.num));
++		tty_set_termios_ldisc(tty, tty->ldisc.num);
+ 		if (tty->ldisc.open && (tty->ldisc.open(tty) < 0)) {
+-			tty->ldisc = ldiscs[N_TTY];
+-			tty->termios->c_line = N_TTY;
++			tty_ldisc_put(o_ldisc.num);
++			/* This driver is always present */
++			tty_ldisc_assign(tty, tty_ldisc_get(N_TTY));
++			tty_set_termios_ldisc(tty, N_TTY);
+ 			if (tty->ldisc.open) {
+ 				int r = tty->ldisc.open(tty);
+ 
+@@ -292,12 +558,27 @@
+ 					      tty_name(tty, buf), r);
+ 			}
+ 		}
+-	} else {
+-		module_put(o_ldisc.owner);
+ 	}
++	/* At this point we hold a reference to the new ldisc and a
++	   a reference to the old ldisc. If we ended up flipping back
++	   to the existing ldisc we have two references to it */
+ 	
+ 	if (tty->ldisc.num != o_ldisc.num && tty->driver->set_ldisc)
+ 		tty->driver->set_ldisc(tty);
++		
++	tty_ldisc_put(o_ldisc.num);
++	
++	/*
++	 *	Allow ldisc referencing to occur as soon as the driver
++	 *	ldisc callback completes.
++	 */
++	 
++	tty_ldisc_enable(tty);
++	
++	/* Restart it in case no characters kick it off. Safe if
++	   already running */
++	if(work)
++		schedule_delayed_work(&tty->flip.work, 1);
+ 	return retval;
+ }
+ 
+@@ -413,6 +694,53 @@
+ 
+ static spinlock_t redirect_lock = SPIN_LOCK_UNLOCKED;
+ static struct file *redirect;
++
++/**
++ *	tty_wakeup	-	request more data
++ *	@tty: terminal
++ *
++ *	Internal and external helper for wakeups of tty. This function
++ *	informs the line discipline if present that the driver is ready
++ *	to receive more output data.
++ */
++ 
++void tty_wakeup(struct tty_struct *tty)
++{
++	struct tty_ldisc *ld;
++	
++	if (test_bit(TTY_DO_WRITE_WAKEUP, &tty->flags)) {
++		ld = tty_ldisc_ref(tty);
++		if(ld) {
++			if(ld->write_wakeup)
++				ld->write_wakeup(tty);
++			tty_ldisc_deref(ld);
++		}
++	}
++	wake_up_interruptible(&tty->write_wait);
++}
++
++EXPORT_SYMBOL_GPL(tty_wakeup);
++
++/**
++ *	tty_ldisc_flush	-	flush line discipline queue
++ *	@tty: tty
++ *
++ *	Flush the line discipline queue (if any) for this tty. If there
++ *	is no line discipline active this is a no-op.
++ */
++ 
++void tty_ldisc_flush(struct tty_struct *tty)
++{
++	struct tty_ldisc *ld = tty_ldisc_ref(tty);
++	if(ld) {
++		if(ld->flush_buffer)
++			ld->flush_buffer(tty);
++		tty_ldisc_deref(ld);
++	}
++}
++
++EXPORT_SYMBOL_GPL(tty_ldisc_flush);
++	
+ /*
+  * This can be called by the "eventd" kernel thread.  That is process synchronous,
+  * but doesn't hold any locks, so we need to make sure we have the appropriate
+@@ -424,6 +752,7 @@
+ 	struct file * cons_filp = NULL;
+ 	struct file *filp, *f = NULL;
+ 	struct task_struct *p;
++	struct tty_ldisc *ld;
+ 	struct pid *pid;
+ 	int    closecount = 0, n;
+ 
+@@ -442,6 +771,7 @@
+ 	
+ 	check_tty_count(tty, "do_tty_hangup");
+ 	file_list_lock();
++	/* This breaks for file handles being sent over AF_UNIX sockets ? */
+ 	list_for_each_entry(filp, &tty->tty_files, f_list) {
+ 		if (filp->f_op->write == redirected_tty_write)
+ 			cons_filp = filp;
+@@ -454,21 +784,25 @@
+ 	file_list_unlock();
+ 	
+ 	/* FIXME! What are the locking issues here? This may me overdoing things..
+-	* this question is especially important now that we've removed the irqlock. */
+-	{
+-		unsigned long flags;
++	 * this question is especially important now that we've removed the irqlock. */
+ 
+-		local_irq_save(flags); // FIXME: is this safe?
+-		if (tty->ldisc.flush_buffer)
+-			tty->ldisc.flush_buffer(tty);
++	ld = tty_ldisc_ref(tty);
++	if(ld != NULL)	/* We may have no line discipline at this point */
++	{
++		if (ld->flush_buffer)
++			ld->flush_buffer(tty);
+ 		if (tty->driver->flush_buffer)
+ 			tty->driver->flush_buffer(tty);
+ 		if ((test_bit(TTY_DO_WRITE_WAKEUP, &tty->flags)) &&
+-		    tty->ldisc.write_wakeup)
+-			(tty->ldisc.write_wakeup)(tty);
+-		local_irq_restore(flags); // FIXME: is this safe?
++		    ld->write_wakeup)
++			ld->write_wakeup(tty);
++		if (ld->hangup)
++			ld->hangup(tty);
+ 	}
+ 
++	/* FIXME: Once we trust the LDISC code better we can wait here for
++	   ldisc completion and fix the driver call race */
++	   
+ 	wake_up_interruptible(&tty->write_wait);
+ 	wake_up_interruptible(&tty->read_wait);
+ 
+@@ -477,22 +811,19 @@
+ 	 * N_TTY.
+ 	 */
+ 	if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS)
++	{
++		unsigned long flags;
++		spin_lock_irqsave(&tty_termios_lock, flags);
+ 		*tty->termios = tty->driver->init_termios;
+-	if (tty->ldisc.num != ldiscs[N_TTY].num) {
+-		if (tty->ldisc.close)
+-			(tty->ldisc.close)(tty);
+-		module_put(tty->ldisc.owner);
+-		
+-		tty->ldisc = ldiscs[N_TTY];
+-		tty->termios->c_line = N_TTY;
+-		if (tty->ldisc.open) {
+-			int i = (tty->ldisc.open)(tty);
+-			if (i < 0)
+-				printk(KERN_ERR "do_tty_hangup: N_TTY open: "
+-						"error %d\n", -i);
+-		}
++		spin_unlock_irqrestore(&tty_termios_lock, flags);
+ 	}
+ 	
++	/* Defer ldisc switch */
++	/* tty_deferred_ldisc_switch(N_TTY);
++	
++	  This should get done automatically when the port closes and
++	  tty_release is called */
++	
+ 	read_lock(&tasklist_lock);
+ 	if (tty->session > 0) {
+ 		struct list_head *l;
+@@ -525,6 +856,17 @@
+ 				tty->driver->close(tty, cons_filp);
+ 	} else if (tty->driver->hangup)
+ 		(tty->driver->hangup)(tty);
++		
++	/* We don't want to have driver/ldisc interactions beyond
++	   the ones we did here. The driver layer expects no
++	   calls after ->hangup() from the ldisc side. However we
++	   can't yet guarantee all that */
++
++	set_bit(TTY_HUPPED, &tty->flags);
++	if (ld) {
++		tty_ldisc_enable(tty);
++		tty_ldisc_deref(ld);
++	}
+ 	unlock_kernel();
+ 	if (f)
+ 		fput(f);
+@@ -641,9 +983,9 @@
+ 	}
+ 	if (tty->driver->start)
+ 		(tty->driver->start)(tty);
+-	if ((test_bit(TTY_DO_WRITE_WAKEUP, &tty->flags)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
++
++	/* If we have a running line discipline it may need kicking */
++	tty_wakeup(tty);
+ 	wake_up_interruptible(&tty->write_wait);
+ }
+ 
+@@ -655,6 +997,7 @@
+ 	int i;
+ 	struct tty_struct * tty;
+ 	struct inode *inode;
++	struct tty_ldisc *ld;
+ 
+ 	tty = (struct tty_struct *)file->private_data;
+ 	inode = file->f_dentry->d_inode;
+@@ -663,11 +1006,15 @@
+ 	if (!tty || (test_bit(TTY_IO_ERROR, &tty->flags)))
+ 		return -EIO;
+ 
++	/* We want to wait for the line discipline to sort out in this
++	   situation */
++	ld = tty_ldisc_ref_wait(tty);
+ 	lock_kernel();
+-	if (tty->ldisc.read)
+-		i = (tty->ldisc.read)(tty,file,buf,count);
++	if (ld->read)
++		i = (ld->read)(tty,file,buf,count);
+ 	else
+ 		i = -EIO;
++	tty_ldisc_deref(ld);
+ 	unlock_kernel();
+ 	if (i > 0)
+ 		inode->i_atime = CURRENT_TIME;
+@@ -729,16 +1076,23 @@
+ {
+ 	struct tty_struct * tty;
+ 	struct inode *inode = file->f_dentry->d_inode;
+-
++	ssize_t ret;
++	struct tty_ldisc *ld;
++	
+ 	tty = (struct tty_struct *)file->private_data;
+ 	if (tty_paranoia_check(tty, inode, "tty_write"))
+ 		return -EIO;
+ 	if (!tty || !tty->driver->write || (test_bit(TTY_IO_ERROR, &tty->flags)))
+ 		return -EIO;
+-	if (!tty->ldisc.write)
+-		return -EIO;
+-	return do_tty_write(tty->ldisc.write, tty, file,
++
++	ld = tty_ldisc_ref_wait(tty);		
++	if (!ld->write)
++		ret = -EIO;
++	else
++		ret = do_tty_write(ld->write, tty, file,
+ 			    (const unsigned char __user *)buf, count);
++	tty_ldisc_deref(ld);
++	return ret;
+ }
+ 
+ ssize_t redirected_tty_write(struct file * file, const char __user * buf, size_t count,
+@@ -924,6 +1278,7 @@
+ 	 * If we fail here just call release_mem to clean up.  No need
+ 	 * to decrement the use counts, as release_mem doesn't care.
+ 	 */
++
+ 	if (tty->ldisc.open) {
+ 		retval = (tty->ldisc.open)(tty);
+ 		if (retval)
+@@ -936,7 +1291,9 @@
+ 				(tty->ldisc.close)(tty);
+ 			goto release_mem_out;
+ 		}
++		tty_ldisc_enable(o_tty);
+ 	}
++	tty_ldisc_enable(tty);
+ 	goto success;
+ 
+ 	/*
+@@ -965,6 +1322,9 @@
+ 	tty->count++;
+ 	tty->driver = driver; /* N.B. why do this every time?? */
+ 
++	/* FIXME */
++	if(!test_bit(TTY_LDISC, &tty->flags))
++		printk(KERN_ERR "init_dev but no ldisc\n");
+ success:
+ 	*ret_tty = tty;
+ 	
+@@ -1068,6 +1428,7 @@
+ 	int	devpts_master, devpts;
+ 	int	idx;
+ 	char	buf[64];
++	unsigned long flags;
+ 	
+ 	tty = (struct tty_struct *)filp->private_data;
+ 	if (tty_paranoia_check(tty, filp->f_dentry->d_inode, "release_dev"))
+@@ -1144,7 +1505,6 @@
+ 		}
+ 	}
+ #endif
+-
+ 	if (tty->driver->close)
+ 		tty->driver->close(tty, filp);
+ 
+@@ -1268,36 +1628,58 @@
+ #ifdef TTY_DEBUG_HANGUP
+ 	printk(KERN_DEBUG "freeing tty structure...");
+ #endif
+-
+ 	/*
+ 	 * Prevent flush_to_ldisc() from rescheduling the work for later.  Then
+-	 * kill any delayed work.
++	 * kill any delayed work. As this is the final close it does not
++	 * race with the set_ldisc code path.
+ 	 */
++	clear_bit(TTY_LDISC, &tty->flags);
+ 	clear_bit(TTY_DONT_FLIP, &tty->flags);
+ 	cancel_delayed_work(&tty->flip.work);
+ 
+ 	/*
+ 	 * Wait for ->hangup_work and ->flip.work handlers to terminate
+ 	 */
++	 
+ 	flush_scheduled_work();
+-
++	
++	/*
++	 * Wait for any short term users (we know they are just driver
++	 * side waiters as the file is closing so user count on the file
++	 * side is zero.
++	 */
++	spin_lock_irqsave(&tty_ldisc_lock, flags);
++	while(tty->ldisc.refcount)
++	{
++		spin_unlock_irqrestore(&tty_ldisc_lock, flags);
++		wait_event(tty_ldisc_wait, tty->ldisc.refcount == 0);
++		spin_lock_irqsave(&tty_ldisc_lock, flags);
++	}
++	spin_unlock_irqrestore(&tty_ldisc_lock, flags);
+ 	/*
+ 	 * Shutdown the current line discipline, and reset it to N_TTY.
+ 	 * N.B. why reset ldisc when we're releasing the memory??
++	 *
++	 * FIXME: this MUST get fixed for the new reflocking
+ 	 */
+ 	if (tty->ldisc.close)
+ 		(tty->ldisc.close)(tty);
+-	module_put(tty->ldisc.owner);
++	tty_ldisc_put(tty->ldisc.num);
+ 	
+-	tty->ldisc = ldiscs[N_TTY];
+-	tty->termios->c_line = N_TTY;
++	/*
++	 *	Switch the line discipline back
++	 */
++	tty_ldisc_assign(tty, tty_ldisc_get(N_TTY));
++	tty_set_termios_ldisc(tty,N_TTY); 
+ 	if (o_tty) {
++		/* FIXME: could o_tty be in setldisc here ? */
++		clear_bit(TTY_LDISC, &o_tty->flags);
+ 		if (o_tty->ldisc.close)
+ 			(o_tty->ldisc.close)(o_tty);
+-		module_put(o_tty->ldisc.owner);
+-		o_tty->ldisc = ldiscs[N_TTY];
++		tty_ldisc_put(o_tty->ldisc.num);
++		tty_ldisc_assign(o_tty, tty_ldisc_get(N_TTY));
++		tty_set_termios_ldisc(o_tty,N_TTY); 
+ 	}
+-
+ 	/*
+ 	 * The release_mem function takes care of the details of clearing
+ 	 * the slots and preserving the termios structure.
+@@ -1337,6 +1719,7 @@
+ 	unsigned short saved_flags = filp->f_flags;
+ 
+ 	nonseekable_open(inode, filp);
++	
+ retry_open:
+ 	noctty = filp->f_flags & O_NOCTTY;
+ 	index  = -1;
+@@ -1500,14 +1883,18 @@
+ static unsigned int tty_poll(struct file * filp, poll_table * wait)
+ {
+ 	struct tty_struct * tty;
++	struct tty_ldisc *ld;
++	int ret = 0;
+ 
+ 	tty = (struct tty_struct *)filp->private_data;
+ 	if (tty_paranoia_check(tty, filp->f_dentry->d_inode, "tty_poll"))
+ 		return 0;
+-
+-	if (tty->ldisc.poll)
+-		return (tty->ldisc.poll)(tty, filp, wait);
+-	return 0;
++		
++	ld = tty_ldisc_ref_wait(tty);
++	if (ld->poll)
++		ret = (ld->poll)(tty, filp, wait);
++	tty_ldisc_deref(ld);
++	return ret;
+ }
+ 
+ static int tty_fasync(int fd, struct file * filp, int on)
+@@ -1539,12 +1926,15 @@
+ static int tiocsti(struct tty_struct *tty, char __user *p)
+ {
+ 	char ch, mbz = 0;
+-
++	struct tty_ldisc *ld;
++	
+ 	if ((current->signal->tty != tty) && !capable(CAP_SYS_ADMIN))
+ 		return -EPERM;
+ 	if (get_user(ch, p))
+ 		return -EFAULT;
+-	tty->ldisc.receive_buf(tty, &ch, &mbz, 1);
++	ld = tty_ldisc_ref_wait(tty);
++	ld->receive_buf(tty, &ch, &mbz, 1);
++	tty_ldisc_deref(ld);
+ 	return 0;
+ }
+ 
+@@ -1793,6 +2183,7 @@
+ 	struct tty_struct *tty, *real_tty;
+ 	void __user *p = (void __user *)arg;
+ 	int retval;
++	struct tty_ldisc *ld;
+ 	
+ 	tty = (struct tty_struct *)file->private_data;
+ 	if (tty_paranoia_check(tty, inode, "tty_ioctl"))
+@@ -1882,6 +2273,7 @@
+ 		case TIOCGSID:
+ 			return tiocgsid(tty, real_tty, p);
+ 		case TIOCGETD:
++			/* FIXME: check this is ok */
+ 			return put_user(tty->ldisc.num, (int __user *)p);
+ 		case TIOCSETD:
+ 			return tiocsetd(tty, p);
+@@ -1920,16 +2312,19 @@
+ 			return tty_tiocmset(tty, file, cmd, p);
+ 	}
+ 	if (tty->driver->ioctl) {
+-		int retval = (tty->driver->ioctl)(tty, file, cmd, arg);
++		retval = (tty->driver->ioctl)(tty, file, cmd, arg);
+ 		if (retval != -ENOIOCTLCMD)
+ 			return retval;
+ 	}
+-	if (tty->ldisc.ioctl) {
+-		int retval = (tty->ldisc.ioctl)(tty, file, cmd, arg);
+-		if (retval != -ENOIOCTLCMD)
+-			return retval;
++	ld = tty_ldisc_ref_wait(tty);
++	retval = -EINVAL;
++	if (ld->ioctl) {
++		retval = ld->ioctl(tty, file, cmd, arg);
++		if (retval == -ENOIOCTLCMD)
++			retval = -EINVAL;
+ 	}
+-	return -EINVAL;
++	tty_ldisc_deref(ld);
++	return retval;
+ }
+ 
+ 
+@@ -1964,14 +2359,21 @@
+ 	int session;
+ 	int		i;
+ 	struct file	*filp;
++	struct tty_ldisc *disc;
+ 	
+ 	if (!tty)
+ 		return;
+ 	session  = tty->session;
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
++	
++	/* We don't want an ldisc switch during this */
++	disc = tty_ldisc_ref(tty);
++	if (disc && disc->flush_buffer)
++		disc->flush_buffer(tty);
++	tty_ldisc_deref(disc);
++
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
++	
+ 	read_lock(&tasklist_lock);
+ 	for_each_task_pid(session, PIDTYPE_SID, p, l, pid) {
+ 		if (p->signal->tty == tty || session > 0) {
+@@ -2023,24 +2425,29 @@
+ 
+ /*
+  * This routine is called out of the software interrupt to flush data
+- * from the flip buffer to the line discipline.
++ * from the flip buffer to the line discipline. 
+  */
++ 
+ static void flush_to_ldisc(void *private_)
+ {
+ 	struct tty_struct *tty = (struct tty_struct *) private_;
+ 	unsigned char	*cp;
+ 	char		*fp;
+ 	int		count;
+-	unsigned long flags;
++	unsigned long 	flags;
++	struct tty_ldisc *disc;
++
++	disc = tty_ldisc_ref(tty);
++	if (disc == NULL)	/*  !TTY_LDISC */
++		return;
+ 
+ 	if (test_bit(TTY_DONT_FLIP, &tty->flags)) {
+ 		/*
+ 		 * Do it after the next timer tick:
+ 		 */
+ 		schedule_delayed_work(&tty->flip.work, 1);
+-		return;
++		goto out;
+ 	}
+-
+ 	spin_lock_irqsave(&tty->read_lock, flags);
+ 	if (tty->flip.buf_num) {
+ 		cp = tty->flip.char_buf + TTY_FLIPBUF_SIZE;
+@@ -2059,7 +2466,31 @@
+ 	tty->flip.count = 0;
+ 	spin_unlock_irqrestore(&tty->read_lock, flags);
+ 
+-	tty->ldisc.receive_buf(tty, cp, fp, count);
++	disc->receive_buf(tty, cp, fp, count);
++out:
++	tty_ldisc_deref(disc);
++}
++
++/*
++ *	Call the ldisc flush directly from a driver. This function may
++ *	return an error and need retrying by the user.
++ */
++
++int tty_push_data(struct tty_struct *tty, unsigned char *cp, unsigned char *fp, int count)
++{
++	int ret = 0;
++	struct tty_ldisc *disc;
++	
++	disc = tty_ldisc_ref(tty);
++	if(test_bit(TTY_DONT_FLIP, &tty->flags))
++		ret = -EAGAIN;
++	else if(disc == NULL)
++		ret = -EIO;
++	else
++		disc->receive_buf(tty, cp, fp, count);
++	tty_ldisc_deref(disc);
++	return ret;
++	
+ }
+ 
+ /*
+@@ -2081,9 +2512,20 @@
+ 
+ static int n_baud_table = ARRAY_SIZE(baud_table);
+ 
++/**
++ *	tty_termios_baud_rate
++ *	@termios: termios structure
++ *
++ *	Convert termios baud rate data into a speed. This should be called
++ *	with the termios lock held if this termios is a terminal termios
++ *	structure. May change the termios data.
++ */
++ 
+ int tty_termios_baud_rate(struct termios *termios)
+ {
+-	unsigned int cbaud = termios->c_cflag & CBAUD;
++	unsigned int cbaud;
++	
++	cbaud = termios->c_cflag & CBAUD;
+ 
+ 	if (cbaud & CBAUDEX) {
+ 		cbaud &= ~CBAUDEX;
+@@ -2093,12 +2535,20 @@
+ 		else
+ 			cbaud += 15;
+ 	}
+-
+ 	return baud_table[cbaud];
+ }
+ 
+ EXPORT_SYMBOL(tty_termios_baud_rate);
+ 
++/**
++ *	tty_get_baud_rate	-	get tty bit rates
++ *	@tty: tty to query
++ *
++ *	Returns the baud rate as an integer for this terminal. The
++ *	termios lock must be held by the caller and the terminal bit
++ *	flags may be updated.
++ */
++ 
+ int tty_get_baud_rate(struct tty_struct *tty)
+ {
+ 	int baud = tty_termios_baud_rate(tty->termios);
+@@ -2117,6 +2567,17 @@
+ 
+ EXPORT_SYMBOL(tty_get_baud_rate);
+ 
++/**
++ *	tty_flip_buffer_push	-	terminal
++ *	@tty: tty to push
++ *
++ *	Queue a push of the terminal flip buffers to the line discipline. This
++ *	function must not be called from IRQ context if tty->low_latency is set.
++ *
++ *	In the event of the queue being busy for flipping the work will be
++ *	held off and retried later.
++ */
++
+ void tty_flip_buffer_push(struct tty_struct *tty)
+ {
+ 	if (tty->low_latency)
+@@ -2134,7 +2595,7 @@
+ {
+ 	memset(tty, 0, sizeof(struct tty_struct));
+ 	tty->magic = TTY_MAGIC;
+-	tty->ldisc = ldiscs[N_TTY];
++	tty_ldisc_assign(tty, tty_ldisc_get(N_TTY));
+ 	tty->pgrp = -1;
+ 	tty->flip.char_buf_ptr = tty->flip.char_buf;
+ 	tty->flip.flag_buf_ptr = tty->flip.flag_buf;
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/tty_ioctl.c kernel-source-2.6.8-2.6.8/drivers/char/tty_ioctl.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/tty_ioctl.c	2004-08-13 23:38:10.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/tty_ioctl.c	2004-10-16 15:51:01.000000000 -0600
+@@ -29,6 +29,8 @@
+ 
+ #undef	DEBUG
+ 
++extern spinlock_t tty_termios_lock;
++
+ /*
+  * Internal flag options for termios setting behavior
+  */
+@@ -98,8 +100,18 @@
+ {
+ 	int canon_change;
+ 	struct termios old_termios = *tty->termios;
++	struct tty_ldisc *ld;
++	unsigned long flags;
++	
++	/*
++	 *	Perform the actual termios internal changes under lock.
++	 */
++	 
++
++	/* FIXME: we need to decide on some locking/ordering semantics
++	   for the set_termios notification eventually */
++	spin_lock_irqsave(&tty_termios_lock, flags);
+ 
+-	local_irq_disable(); // FIXME: is this safe?
+ 	*tty->termios = *new_termios;
+ 	unset_locked_termios(tty->termios, &old_termios, tty->termios_locked);
+ 	canon_change = (old_termios.c_lflag ^ tty->termios->c_lflag) & ICANON;
+@@ -109,12 +121,13 @@
+ 		tty->canon_data = 0;
+ 		tty->erasing = 0;
+ 	}
+-	local_irq_enable(); // FIXME: is this safe?
++	
++	
+ 	if (canon_change && !L_ICANON(tty) && tty->read_cnt)
+ 		/* Get characters left over from canonical mode. */
+ 		wake_up_interruptible(&tty->read_wait);
+ 
+-	/* see if packet mode change of state */
++	/* See if packet mode change of state. */
+ 
+ 	if (tty->link && tty->link->packet) {
+ 		int old_flow = ((old_termios.c_iflag & IXON) &&
+@@ -132,17 +145,23 @@
+ 			wake_up_interruptible(&tty->link->read_wait);
+ 		}
+ 	}
+-
++	   
+ 	if (tty->driver->set_termios)
+ 		(*tty->driver->set_termios)(tty, &old_termios);
+ 
+-	if (tty->ldisc.set_termios)
+-		(*tty->ldisc.set_termios)(tty, &old_termios);
++	ld = tty_ldisc_ref(tty);
++	if (ld != NULL) {
++		if (ld->set_termios)
++			(ld->set_termios)(tty, &old_termios);
++		tty_ldisc_deref(ld);
++	}
++	spin_unlock_irqrestore(&tty_termios_lock, flags);
+ }
+ 
+ static int set_termios(struct tty_struct * tty, void __user *arg, int opt)
+ {
+ 	struct termios tmp_termios;
++	struct tty_ldisc *ld;
+ 	int retval = tty_check_change(tty);
+ 
+ 	if (retval)
+@@ -159,9 +178,14 @@
+ 			return -EFAULT;
+ 	}
+ 
+-	if ((opt & TERMIOS_FLUSH) && tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
+-
++	ld = tty_ldisc_ref(tty);
++	
++	if (ld != NULL) {
++		if ((opt & TERMIOS_FLUSH) && ld->flush_buffer)
++			ld->flush_buffer(tty);
++		tty_ldisc_deref(ld);
++	}
++	
+ 	if (opt & TERMIOS_WAIT) {
+ 		tty_wait_until_sent(tty, 0);
+ 		if (signal_pending(current))
+@@ -225,12 +249,16 @@
+ static int get_sgttyb(struct tty_struct * tty, struct sgttyb __user * sgttyb)
+ {
+ 	struct sgttyb tmp;
++	unsigned long flags;
+ 
++	spin_lock_irqsave(&tty_termios_lock, flags);
+ 	tmp.sg_ispeed = 0;
+ 	tmp.sg_ospeed = 0;
+ 	tmp.sg_erase = tty->termios->c_cc[VERASE];
+ 	tmp.sg_kill = tty->termios->c_cc[VKILL];
+ 	tmp.sg_flags = get_sgflags(tty);
++	spin_unlock_irqrestore(&tty_termios_lock, flags);
++	
+ 	return copy_to_user(sgttyb, &tmp, sizeof(tmp)) ? -EFAULT : 0;
+ }
+ 
+@@ -269,12 +297,16 @@
+ 	retval = tty_check_change(tty);
+ 	if (retval)
+ 		return retval;
+-	termios =  *tty->termios;
++	
+ 	if (copy_from_user(&tmp, sgttyb, sizeof(tmp)))
+ 		return -EFAULT;
++		
++	spin_lock_irqsave(&tty_termios_lock, flags);
++	termios =  *tty->termios;
+ 	termios.c_cc[VERASE] = tmp.sg_erase;
+ 	termios.c_cc[VKILL] = tmp.sg_kill;
+ 	set_sgflags(&termios, tmp.sg_flags);
++	spin_unlock_irqrestore(&tty_termios_lock, flags);
+ 	change_termios(tty, &termios);
+ 	return 0;
+ }
+@@ -365,6 +397,8 @@
+ 	struct tty_struct * real_tty;
+ 	void __user *p = (void __user *)arg;
+ 	int retval;
++	struct tty_ldisc *ld;
++	unsigned long flags;
+ 
+ 	if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
+ 	    tty->driver->subtype == PTY_TYPE_MASTER)
+@@ -443,22 +477,26 @@
+ 			retval = tty_check_change(tty);
+ 			if (retval)
+ 				return retval;
++				
++			ld = tty_ldisc_ref(tty);
+ 			switch (arg) {
+ 			case TCIFLUSH:
+-				if (tty->ldisc.flush_buffer)
+-					tty->ldisc.flush_buffer(tty);
++				if (ld->flush_buffer)
++					ld->flush_buffer(tty);
+ 				break;
+ 			case TCIOFLUSH:
+-				if (tty->ldisc.flush_buffer)
+-					tty->ldisc.flush_buffer(tty);
++				if (ld->flush_buffer)
++					ld->flush_buffer(tty);
+ 				/* fall through */
+ 			case TCOFLUSH:
+ 				if (tty->driver->flush_buffer)
+ 					tty->driver->flush_buffer(tty);
+ 				break;
+ 			default:
++				tty_ldisc_deref(ld);
+ 				return -EINVAL;
+ 			}
++			tty_ldisc_deref(ld);
+ 			return 0;
+ 		case TIOCOUTQ:
+ 			return put_user(tty->driver->chars_in_buffer ?
+@@ -504,9 +542,11 @@
+ 		case TIOCSSOFTCAR:
+ 			if (get_user(arg, (unsigned int __user *) arg))
+ 				return -EFAULT;
++			spin_lock_irqsave(&tty_termios_lock, flags);
+ 			tty->termios->c_cflag =
+ 				((tty->termios->c_cflag & ~CLOCAL) |
+ 				 (arg ? CLOCAL : 0));
++			spin_unlock_irqrestore(&tty_termios_lock, flags);
+ 			return 0;
+ 		default:
+ 			return -ENOIOCTLCMD;
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/viocons.c kernel-source-2.6.8-2.6.8/drivers/char/viocons.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/viocons.c	2004-08-13 23:36:10.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/viocons.c	2004-10-16 15:51:01.000000000 -0600
+@@ -422,10 +422,7 @@
+ 			pi->overflowMessage = 0;
+ 
+ 		if (pi->tty) {
+-			if ((pi->tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-			    (pi->tty->ldisc.write_wakeup))
+-				(pi->tty->ldisc.write_wakeup)(pi->tty);
+-			wake_up_interruptible(&pi->tty->write_wait);
++			tty_wakeup(pi->tty);
+ 		}
+ 	}
+ 
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/vme_scc.c kernel-source-2.6.8-2.6.8/drivers/char/vme_scc.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/vme_scc.c	2004-08-13 23:36:11.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/vme_scc.c	2004-10-16 15:51:01.000000000 -0600
+@@ -544,12 +544,8 @@
+ 		SCCwrite(COMMAND_REG, CR_TX_PENDING_RESET);   /* disable tx_int on next tx underrun? */
+ 		port->gs.flags &= ~GS_TX_INTEN;
+ 	}
+-	if (port->gs.tty && port->gs.xmit_cnt <= port->gs.wakeup_chars) {
+-		if ((port->gs.tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-				port->gs.tty->ldisc.write_wakeup)
+-			(port->gs.tty->ldisc.write_wakeup)(port->gs.tty);
+-		wake_up_interruptible(&port->gs.tty->write_wait);
+-	}
++	if (port->gs.tty && port->gs.xmit_cnt <= port->gs.wakeup_chars)
++		tty_wakeup(port->gs.tty);
+ 
+ 	SCCwrite_NB(COMMAND_REG, CR_HIGHEST_IUS_RESET);
+ 	return IRQ_HANDLED;
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/char/vt_ioctl.c kernel-source-2.6.8-2.6.8/drivers/char/vt_ioctl.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/char/vt_ioctl.c	2004-08-13 23:37:26.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/char/vt_ioctl.c	2004-10-16 15:51:01.000000000 -0600
+@@ -536,8 +536,7 @@
+ 		  default:
+ 			return -EINVAL;
+ 		}
+-		if (tty->ldisc.flush_buffer)
+-			tty->ldisc.flush_buffer(tty);
++		tty_ldisc_flush(tty);
+ 		return 0;
+ 
+ 	case KDGKBMODE:
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/isdn/capi/capi.c kernel-source-2.6.8-2.6.8/drivers/isdn/capi/capi.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/isdn/capi/capi.c	2004-08-13 23:38:04.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/isdn/capi/capi.c	2004-10-16 15:51:01.000000000 -0600
+@@ -436,51 +436,62 @@
+ 	struct sk_buff *nskb;
+ 	int datalen;
+ 	u16 errcode, datahandle;
+-
++	struct tty_ldisc *ld;
++	
+ 	datalen = skb->len - CAPIMSG_LEN(skb->data);
+-	if (mp->tty) {
+-		if (mp->tty->ldisc.receive_buf == 0) {
+-			printk(KERN_ERR "capi: ldisc has no receive_buf function\n");
+-			return -1;
+-		}
+-		if (mp->ttyinstop) {
++	if (mp->tty == NULL)
++	{
++#ifdef _DEBUG_DATAFLOW
++		printk(KERN_DEBUG "capi: currently no receiver\n");
++#endif
++		return -1;
++	}
++	
++	ld = tty_ldisc_ref(mp->tty);
++	if (ld == NULL)
++		return -1;
++	if (ld->receive_buf == NULL) {
+ #if defined(_DEBUG_DATAFLOW) || defined(_DEBUG_TTYFUNCS)
+-			printk(KERN_DEBUG "capi: recv tty throttled\n");
++		printk(KERN_DEBUG "capi: ldisc has no receive_buf function\n");
+ #endif
+-			return -1;
+-		}
+-		if (mp->tty->ldisc.receive_room &&
+-		    mp->tty->ldisc.receive_room(mp->tty) < datalen) {
++		goto bad;
++	}
++	if (mp->ttyinstop) {
+ #if defined(_DEBUG_DATAFLOW) || defined(_DEBUG_TTYFUNCS)
+-			printk(KERN_DEBUG "capi: no room in tty\n");
++		printk(KERN_DEBUG "capi: recv tty throttled\n");
+ #endif
+-			return -1;
+-		}
+-		if ((nskb = gen_data_b3_resp_for(mp, skb)) == 0) {
+-			printk(KERN_ERR "capi: gen_data_b3_resp failed\n");
+-			return -1;
+-		}
+-		datahandle = CAPIMSG_U16(skb->data,CAPIMSG_BASELEN+4);
+-		errcode = capi20_put_message(mp->ap, nskb);
+-		if (errcode != CAPI_NOERROR) {
+-			printk(KERN_ERR "capi: send DATA_B3_RESP failed=%x\n",
+-					errcode);
+-			kfree_skb(nskb);
+-			return -1;
+-		}
+-		(void)skb_pull(skb, CAPIMSG_LEN(skb->data));
+-#ifdef _DEBUG_DATAFLOW
+-		printk(KERN_DEBUG "capi: DATA_B3_RESP %u len=%d => ldisc\n",
+-					datahandle, skb->len);
++		goto bad;
++	}
++	if (ld->receive_room &&
++	    ld->receive_room(mp->tty) < datalen) {
++#if defined(_DEBUG_DATAFLOW) || defined(_DEBUG_TTYFUNCS)
++		printk(KERN_DEBUG "capi: no room in tty\n");
+ #endif
+-		mp->tty->ldisc.receive_buf(mp->tty, skb->data, NULL, skb->len);
+-		kfree_skb(skb);
+-		return 0;
+-
++		goto bad;
++	}
++	if ((nskb = gen_data_b3_resp_for(mp, skb)) == 0) {
++		printk(KERN_ERR "capi: gen_data_b3_resp failed\n");
++		goto bad;
++	}
++	datahandle = CAPIMSG_U16(skb->data,CAPIMSG_BASELEN+4);
++	errcode = capi20_put_message(mp->ap, nskb);
++	if (errcode != CAPI_NOERROR) {
++		printk(KERN_ERR "capi: send DATA_B3_RESP failed=%x\n",
++				errcode);
++		kfree_skb(nskb);
++		goto bad;
+ 	}
++	(void)skb_pull(skb, CAPIMSG_LEN(skb->data));
+ #ifdef _DEBUG_DATAFLOW
+-	printk(KERN_DEBUG "capi: currently no receiver\n");
++	printk(KERN_DEBUG "capi: DATA_B3_RESP %u len=%d => ldisc\n",
++				datahandle, skb->len);
+ #endif
++	ld->receive_buf(mp->tty, skb->data, NULL, skb->len);
++	kfree_skb(skb);
++	tty_ldisc_deref(ld);
++	return 0;
++bad:
++	tty_ldisc_deref(ld);
+ 	return -1;
+ }
+ 
+@@ -614,6 +625,7 @@
+ 
+ 
+ 	if (CAPIMSG_SUBCOMMAND(skb->data) == CAPI_IND) {
++		
+ 		datahandle = CAPIMSG_U16(skb->data, CAPIMSG_BASELEN+4+4+2);
+ #ifdef _DEBUG_DATAFLOW
+ 		printk(KERN_DEBUG "capi_signal: DATA_B3_IND %u len=%d\n",
+@@ -633,10 +645,8 @@
+ #endif
+ 		kfree_skb(skb);
+ 		(void)capiminor_del_ack(mp, datahandle);
+-		if (mp->tty) {
+-			if (mp->tty->ldisc.write_wakeup)
+-				mp->tty->ldisc.write_wakeup(mp->tty);
+-		}
++		if (mp->tty)
++			tty_wakeup(tty);
+ 		(void)handle_minor_send(mp);
+ 
+ 	} else {
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/isdn/i4l/isdn_tty.c kernel-source-2.6.8-2.6.8/drivers/isdn/i4l/isdn_tty.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/isdn/i4l/isdn_tty.c	2004-08-13 23:37:27.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/isdn/i4l/isdn_tty.c	2004-10-16 15:51:01.000000000 -0600
+@@ -296,10 +296,7 @@
+ 		info->send_outstanding++;
+ 		info->msr &= ~UART_MSR_CTS;
+ 		info->lsr &= ~UART_LSR_TEMT;
+-		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-		    tty->ldisc.write_wakeup)
+-			(tty->ldisc.write_wakeup) (tty);
+-		wake_up_interruptible(&tty->write_wait);
++		tty_wakeup(tty);
+ 		return;
+ 	}
+ 	if (slen < 0) {
+@@ -1174,10 +1171,7 @@
+ 						/* If DLE decoding results in zero-transmit, but
+ 						 * c originally was non-zero, do a wakeup.
+ 						 */
+-						if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-						 tty->ldisc.write_wakeup)
+-							(tty->ldisc.write_wakeup) (tty);
+-						wake_up_interruptible(&tty->write_wait);
++						tty_wakeup(tty);
+ 						info->msr |= UART_MSR_CTS;
+ 						info->lsr |= UART_LSR_TEMT;
+ 					}
+@@ -1290,9 +1284,7 @@
+ 	isdn_tty_cleanup_xmit(info);
+ 	info->xmit_count = 0;
+ 	wake_up_interruptible(&tty->write_wait);
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup) (tty);
++	tty_wakeup(tty);
+ }
+ 
+ static void
+@@ -1747,10 +1739,10 @@
+ 	}
+ 	dev->modempoll--;
+ 	isdn_tty_shutdown(info);
++	
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
++	tty_ldisc_flush(tty);
+ 	info->tty = NULL;
+ 	info->ncarrier = 0;
+ 	tty->closing = 0;
+@@ -2681,8 +2673,7 @@
+ 		if ((info->flags & ISDN_ASYNC_CLOSING) || (!info->tty)) {
+ 			return;
+ 		}
+-		if (info->tty->ldisc.flush_buffer)
+-			info->tty->ldisc.flush_buffer(info->tty);
++		tty_ldisc_flush(tty);
+ 		if ((info->flags & ISDN_ASYNC_CHECK_CD) &&
+ 		    (!((info->flags & ISDN_ASYNC_CALLOUT_ACTIVE) &&
+ 		       (info->flags & ISDN_ASYNC_CALLOUT_NOHUP)))) {
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/macintosh/macserial.c kernel-source-2.6.8-2.6.8/drivers/macintosh/macserial.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/macintosh/macserial.c	2004-08-13 23:38:08.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/macintosh/macserial.c	2004-10-16 15:51:01.000000000 -0600
+@@ -713,12 +713,8 @@
+ 	if (!tty)
+ 		return;
+ 
+-	if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) {
+-		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-		    tty->ldisc.write_wakeup)
+-			(tty->ldisc.write_wakeup)(tty);
+-		wake_up_interruptible(&tty->write_wait);
+-	}
++	if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event))
++		tty_wakeup(tty);
+ }
+ 
+ static int startup(struct mac_serial * info)
+@@ -1564,10 +1560,7 @@
+ 	spin_lock_irqsave(&info->lock, flags);
+ 	info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
+ 	spin_unlock_irqrestore(&info->lock, flags);
+-	wake_up_interruptible(&tty->write_wait);
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
++	tty_wakeup(tty);
+ }
+ 
+ /*
+@@ -1994,8 +1987,7 @@
+ 
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
++	tty_ldisc_flush(tty);
+ 	tty->closing = 0;
+ 	info->event = 0;
+ 	info->tty = 0;
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/net/hamradio/mkiss.c kernel-source-2.6.8-2.6.8/drivers/net/hamradio/mkiss.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/net/hamradio/mkiss.c	2004-08-13 23:38:08.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/net/hamradio/mkiss.c	2004-10-16 15:51:01.000000000 -0600
+@@ -602,8 +602,6 @@
+ 
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
+ 
+ 	/* Restore default settings */
+ 	ax->dev->type = ARPHRD_AX25;
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/net/irda/irtty-sir.c kernel-source-2.6.8-2.6.8/drivers/net/irda/irtty-sir.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/net/irda/irtty-sir.c	2004-08-13 23:36:10.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/net/irda/irtty-sir.c	2004-10-16 15:51:01.000000000 -0600
+@@ -509,13 +509,6 @@
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
+ 	
+-/* from old irtty - but what is it good for?
+- * we _are_ the ldisc and we _don't_ implement flush_buffer!
+- *
+- *	if (tty->ldisc.flush_buffer)
+- *		tty->ldisc.flush_buffer(tty);
+- */
+-
+ 	/* apply mtt override */
+ 	sir_tty_drv.qos_mtt_bits = qos_mtt_bits;
+ 
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/net/ppp_async.c kernel-source-2.6.8-2.6.8/drivers/net/ppp_async.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/net/ppp_async.c	2004-08-13 23:37:37.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/net/ppp_async.c	2004-10-16 15:51:01.000000000 -0600
+@@ -122,6 +122,9 @@
+  * frees the memory that ppp_asynctty_receive is using.  The best
+  * way to fix this is to use a rwlock in the tty struct, but for now
+  * we use a single global rwlock for all ttys in ppp line discipline.
++ *
++ * FIXME: this is no longer true. The _close path for the ldisc is 
++ * now guaranteed to be sane. 
+  */
+ static rwlock_t disc_data_lock = RW_LOCK_UNLOCKED;
+ 
+@@ -144,7 +147,8 @@
+ }
+ 
+ /*
+- * Called when a tty is put into PPP line discipline.
++ * Called when a tty is put into PPP line discipline. Called in process
++ * context.
+  */
+ static int
+ ppp_asynctty_open(struct tty_struct *tty)
+@@ -255,6 +259,11 @@
+ 	return -EAGAIN;
+ }
+ 
++/*
++ * Called in process context only. May be re-entered by multiple
++ * ioctl calling threads.
++ */
++ 
+ static int
+ ppp_asynctty_ioctl(struct tty_struct *tty, struct file *file,
+ 		   unsigned int cmd, unsigned long arg)
+@@ -716,7 +725,8 @@
+ 
+ /*
+  * Flush output from our internal buffers.
+- * Called for the TCFLSH ioctl.
++ * Called for the TCFLSH ioctl. Can be entered in parallel
++ * but this is covered by the xmit_lock.
+  */
+ static void
+ ppp_async_flush_output(struct asyncppp *ap)
+@@ -816,7 +826,9 @@
+ 		skb_trim(skb, 0);
+ }
+ 
+-/* called when the tty driver has data for us. */
++/* Called when the tty driver has data for us. Runs parallel with the
++   other ldisc functions but will not be re-entered */
++
+ static void
+ ppp_async_input(struct asyncppp *ap, const unsigned char *buf,
+ 		char *flags, int count)
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/net/ppp_synctty.c kernel-source-2.6.8-2.6.8/drivers/net/ppp_synctty.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/net/ppp_synctty.c	2004-08-13 23:36:56.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/net/ppp_synctty.c	2004-10-16 15:51:01.000000000 -0600
+@@ -175,6 +175,8 @@
+  * frees the memory that ppp_synctty_receive is using.  The best
+  * way to fix this is to use a rwlock in the tty struct, but for now
+  * we use a single global rwlock for all ttys in ppp line discipline.
++ *
++ * FIXME: Fixed in tty_io nowdays.
+  */
+ static rwlock_t disc_data_lock = RW_LOCK_UNLOCKED;
+ 
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/net/slip.c kernel-source-2.6.8-2.6.8/drivers/net/slip.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/net/slip.c	2004-08-13 23:38:10.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/net/slip.c	2004-10-16 15:51:01.000000000 -0600
+@@ -672,7 +672,9 @@
+  * Handle the 'receiver data ready' interrupt.
+  * This function is called by the 'tty_io' module in the kernel when
+  * a block of SLIP data has been received, which can now be decapsulated
+- * and sent on to some IP layer for further processing.
++ * and sent on to some IP layer for further processing. This will not
++ * be re-entered while running but other ldisc functions may be called
++ * in parallel
+  */
+  
+ static void slip_receive_buf(struct tty_struct *tty, const unsigned char *cp, char *fp, int count)
+@@ -841,9 +843,11 @@
+  * SLIP line discipline is called for.  Because we are
+  * sure the tty line exists, we only have to link it to
+  * a free SLIP channel...
++ *
++ * Called in process context serialized from other ldisc calls.
+  */
+-static int
+-slip_open(struct tty_struct *tty)
++
++static int slip_open(struct tty_struct *tty)
+ {
+ 	struct slip *sl;
+ 	int err;
+@@ -876,11 +880,11 @@
+ 	tty->disc_data = sl;
+ 	sl->line = tty_devnum(tty);
+ 	sl->pid = current->pid;
++	
++	/* FIXME: already done before we were called - seems this can go */
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
+-
++		
+ 	if (!test_bit(SLF_INUSE, &sl->flags)) {
+ 		/* Perform the low-level SLIP initialization. */
+ 		if ((err = sl_alloc_bufs(sl, SL_MTU)) != 0)
+@@ -923,6 +927,9 @@
+ }
+ 
+ /*
++
++  FIXME: 1,2 are fixed 3 was never true anyway.
++  
+    Let me to blame a bit.
+    1. TTY module calls this funstion on soft interrupt.
+    2. TTY module calls this function WITH MASKED INTERRUPTS!
+@@ -941,9 +948,8 @@
+ 
+ /*
+  * Close down a SLIP channel.
+- * This means flushing out any pending queues, and then restoring the
+- * TTY line discipline to what it was before it got hooked to SLIP
+- * (which usually is TTY again).
++ * This means flushing out any pending queues, and then returning. This
++ * call is serialized against other ldisc functions.
+  */
+ static void
+ slip_close(struct tty_struct *tty)
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/net/wan/pc300_tty.c kernel-source-2.6.8-2.6.8/drivers/net/wan/pc300_tty.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/net/wan/pc300_tty.c	2004-08-13 23:36:57.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/net/wan/pc300_tty.c	2004-10-16 15:51:01.000000000 -0600
+@@ -634,14 +634,8 @@
+ 	}
+ 
+ 	CPC_TTY_DBG("%s: call wake_up_interruptible\n",cpc_tty->name);
+-	
+-	wake_up_interruptible(&tty->write_wait); 
+-
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup){
+-		CPC_TTY_DBG("%s: call line disc. wake up\n",cpc_tty->name);
+-		tty->ldisc.write_wakeup(tty); 
+-	} 
+ 
++	tty_wakeup(tty);	
+ 	return; 
+ } 
+ 
+@@ -692,9 +686,11 @@
+ 	st_cpc_tty_area *cpc_tty; 
+ 	volatile st_cpc_rx_buf * buf;
+ 	char flags=0,flg_rx=1; 
++	struct tty_ldisc *ld;
+ 
+ 	if (cpc_tty_cnt == 0) return;
+ 
++	
+ 	for (i=0; (i < 4) && flg_rx ; i++) {
+ 		flg_rx = 0;
+ 		port = (int) data;
+@@ -702,11 +698,18 @@
+ 			cpc_tty = &cpc_tty_area[port];
+ 		
+ 			if ((buf=cpc_tty->buf_rx.first) != 0) {
+-															
+-				if (cpc_tty->tty && (cpc_tty->tty->ldisc.receive_buf)) { 
+-					CPC_TTY_DBG("%s: call line disc. receive_buf\n",cpc_tty->name);
+-					cpc_tty->tty->ldisc.receive_buf(cpc_tty->tty, (char *)(buf->data), 
+-					&flags, buf->size);
++				
++				if(cpc_tty->tty)
++				{											
++					ld = tty_ldisc_ref(cpc_tty);
++					if(ld)
++					{
++						if (ld->receive_buf)) {
++							CPC_TTY_DBG("%s: call line disc. receive_buf\n",cpc_tty->name);
++							ld->receive_buf(cpc_tty->tty, (char *)(buf->data), &flags, buf->size);
++						}
++						tty_ldisc_deref(ld);
++					}
+ 				}	
+ 				cpc_tty->buf_rx.first = cpc_tty->buf_rx.first->next;
+ 				kfree((unsigned char *)buf);
+@@ -910,13 +913,7 @@
+ 		CPC_TTY_DBG("%s: the interface is not opened\n",cpc_tty->name);
+ 		return; 
+ 	}
+-
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup){
+-		CPC_TTY_DBG("%s:call line disc. wakeup\n",cpc_tty->name);
+-		tty->ldisc.write_wakeup (tty); 
+-	}
+-
+-	wake_up_interruptible(&tty->write_wait); 
++	tty_wakeup(tty);
+ }
+ 
+ /*
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/net/wan/sdla_chdlc.c kernel-source-2.6.8-2.6.8/drivers/net/wan/sdla_chdlc.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/net/wan/sdla_chdlc.c	2004-08-13 23:36:58.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/net/wan/sdla_chdlc.c	2004-10-16 15:51:01.000000000 -0600
+@@ -3628,11 +3628,7 @@
+ 	if ((tty=card->tty)==NULL)
+ 		return;
+ 	
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup){
+-		(tty->ldisc.write_wakeup)(tty);
+-	}
+-	wake_up_interruptible(&tty->write_wait);
++	tty_wakeup(tty);
+ #if defined(SERIAL_HAVE_POLL_WAIT)
+ 	wake_up_interruptible(&tty->poll_wait);
+ #endif	
+@@ -3857,6 +3853,7 @@
+ 	char fp=0;
+ 	struct tty_struct *tty;
+ 	int i;
++	struct tty_ldisc *ld;
+ 	
+ 	if (!card->tty_open){
+ 		dbg_printk(KERN_INFO "%s: TTY not open during receive\n",
+@@ -3944,8 +3941,11 @@
+ 			len -= offset;
+ 		}
+ 		sdla_peek(&card->hw, addr, card->tty_rx+offset, len);
+-		if (tty->ldisc.receive_buf){
+-			tty->ldisc.receive_buf(tty,card->tty_rx,&fp,olen);
++		ld = tty_ldisc_ref(tty);
++		if (ld) {
++			if (ld->receive_buf)
++				ld->receive_buf(tty,card->tty_rx,&fp,olen);
++			tty_ldisc_deref(ld);
+ 		}else{
+ 			if (net_ratelimit()){
+ 				printk(KERN_INFO 
+@@ -4252,14 +4252,10 @@
+ 	if (!tty)
+ 		return;
+ 	
+-	wake_up_interruptible(&tty->write_wait);
+ #if defined(SERIAL_HAVE_POLL_WAIT)
+ 	wake_up_interruptible(&tty->poll_wait);
+ #endif
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
+-
++	tty_wakeup(tty);
+ 	return;
+ }
+ 
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/net/wireless/strip.c kernel-source-2.6.8-2.6.8/drivers/net/wireless/strip.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/net/wireless/strip.c	2004-08-13 23:37:26.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/net/wireless/strip.c	2004-10-16 15:51:01.000000000 -0600
+@@ -2661,8 +2661,6 @@
+ 	tty->disc_data = strip_info;
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
+ 
+ 	/*
+ 	 * Restore default settings
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/s390/char/con3215.c kernel-source-2.6.8-2.6.8/drivers/s390/char/con3215.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/s390/char/con3215.c	2004-08-13 23:37:26.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/s390/char/con3215.c	2004-10-16 15:51:01.000000000 -0600
+@@ -366,10 +366,7 @@
+ 	tty = raw->tty;
+ 	if (tty != NULL &&
+ 	    RAW3215_BUFFER_SIZE - raw->count >= RAW3215_MIN_SPACE) {
+-		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-		    tty->ldisc.write_wakeup)
+-			(tty->ldisc.write_wakeup)(tty);
+-		wake_up_interruptible(&tty->write_wait);
++	    	tty_wakeup(tty);
+ 	}
+ }
+ 
+@@ -1055,10 +1052,7 @@
+ 
+ 	raw = (struct raw3215_info *) tty->driver_data;
+ 	raw3215_flush_buffer(raw);
+-	wake_up_interruptible(&tty->write_wait);
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
++	tty_wakeup(tty);
+ }
+ 
+ /*
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/s390/char/sclp_tty.c kernel-source-2.6.8-2.6.8/drivers/s390/char/sclp_tty.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/s390/char/sclp_tty.c	2004-08-13 23:38:11.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/s390/char/sclp_tty.c	2004-10-16 15:51:01.000000000 -0600
+@@ -277,10 +277,7 @@
+ 	wake_up(&sclp_tty_waitq);
+ 	/* check if the tty needs a wake up call */
+ 	if (sclp_tty != NULL) {
+-		if ((sclp_tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-		    sclp_tty->ldisc.write_wakeup)
+-			(sclp_tty->ldisc.write_wakeup)(sclp_tty);
+-		wake_up_interruptible(&sclp_tty->write_wait);
++		tty_wakeup(tty);
+ 	}
+ }
+ 
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/s390/char/sclp_vt220.c kernel-source-2.6.8-2.6.8/drivers/s390/char/sclp_vt220.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/s390/char/sclp_vt220.c	2004-08-13 23:36:44.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/s390/char/sclp_vt220.c	2004-10-16 15:51:01.000000000 -0600
+@@ -139,10 +139,7 @@
+ 	wake_up(&sclp_vt220_waitq);
+ 	/* Check if the tty needs a wake up call */
+ 	if (sclp_vt220_tty != NULL) {
+-		if ((sclp_vt220_tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-		    (sclp_vt220_tty->ldisc.write_wakeup != NULL))
+-			(sclp_vt220_tty->ldisc.write_wakeup)(sclp_vt220_tty);
+-		wake_up_interruptible(&sclp_vt220_tty->write_wait);
++		tty_wakeup(tty);
+ 	}
+ }
+ 
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/s390/net/ctctty.c kernel-source-2.6.8-2.6.8/drivers/s390/net/ctctty.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/s390/net/ctctty.c	2004-08-13 23:37:14.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/s390/net/ctctty.c	2004-10-16 15:51:01.000000000 -0600
+@@ -307,10 +307,7 @@
+ 
+ 		info->flags &= ~CTC_ASYNC_TX_LINESTAT;
+ 		if (tty) {
+-			if (wake && (tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-			    tty->ldisc.write_wakeup)
+-				(tty->ldisc.write_wakeup)(tty);
+-			wake_up_interruptible(&tty->write_wait);
++			tty_wakeup(tty);
+ 		}
+ 	}
+ 	return (skb_queue_empty(&info->tx_queue) ? 0 : 1);
+@@ -589,9 +586,7 @@
+ 	info->lsr |= UART_LSR_TEMT;
+ 	spin_unlock_irqrestore(&ctc_tty_lock, flags);
+ 	wake_up_interruptible(&tty->write_wait);
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup) (tty);
++	tty_wakeup(tty);
+ ex:
+ 	DBF_TEXT_(trace, 2, "ex: %s ", __FUNCTION__);
+ 	return;
+@@ -1066,8 +1061,7 @@
+ 		skb_queue_purge(&info->tx_queue);
+ 		info->lsr |= UART_LSR_TEMT;
+ 	}
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
++	tty_ldisc_flush(tty);
+ 	info->tty = 0;
+ 	tty->closing = 0;
+ 	if (info->blocked_open) {
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/sbus/char/aurora.c kernel-source-2.6.8-2.6.8/drivers/sbus/char/aurora.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/sbus/char/aurora.c	2004-08-13 23:36:17.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/sbus/char/aurora.c	2004-10-16 15:51:01.000000000 -0600
+@@ -1531,8 +1531,7 @@
+ 	aurora_shutdown_port(bp, port);
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
++	tty_ldisc_flush(tty);
+ 	tty->closing = 0;
+ 	port->event = 0;
+ 	port->tty = 0;
+@@ -1743,10 +1742,7 @@
+ 	port->xmit_cnt = port->xmit_head = port->xmit_tail = 0;
+ 	restore_flags(flags);
+ 	
+-	wake_up_interruptible(&tty->write_wait);
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
++	tty_wakeup(tty);
+ #ifdef AURORA_DEBUG
+ 	printk("aurora_flush_buffer: end\n");
+ #endif
+@@ -2223,10 +2219,7 @@
+ 		return;
+ 
+ 	if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &port->event)) {
+-		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-		    tty->ldisc.write_wakeup)
+-			(tty->ldisc.write_wakeup)(tty);
+-		wake_up_interruptible(&tty->write_wait);
++		tty_wakeup(tty);
+ 	}
+ #ifdef AURORA_DEBUG
+ 	printk("do_softint: end\n");
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/serial/68328serial.c kernel-source-2.6.8-2.6.8/drivers/serial/68328serial.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/serial/68328serial.c	2004-08-13 23:38:08.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/serial/68328serial.c	2004-10-16 15:51:01.000000000 -0600
+@@ -435,10 +435,7 @@
+ 		return;
+ #if 0
+ 	if (clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) {
+-		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-		    tty->ldisc.write_wakeup)
+-			(tty->ldisc.write_wakeup)(tty);
+-		wake_up_interruptible(&tty->write_wait);
++		tty_wakeup(tty);
+ 	}
+ #endif   
+ }
+@@ -858,10 +855,7 @@
+ 	cli();
+ 	info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
+ 	sti();
+-	wake_up_interruptible(&tty->write_wait);
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
++	tty_wakeup(tty);
+ }
+ 
+ /*
+@@ -1185,11 +1179,13 @@
+ 	shutdown(info);
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
++		
++	tty_ldisc_flush(tty);
+ 	tty->closing = 0;
+ 	info->event = 0;
+ 	info->tty = 0;
++#warning "This is not and has never been valid so fix it"	
++#if 0
+ 	if (tty->ldisc.num != ldiscs[N_TTY].num) {
+ 		if (tty->ldisc.close)
+ 			(tty->ldisc.close)(tty);
+@@ -1198,6 +1194,7 @@
+ 		if (tty->ldisc.open)
+ 			(tty->ldisc.open)(tty);
+ 	}
++#endif	
+ 	if (info->blocked_open) {
+ 		if (info->close_delay) {
+ 			current->state = TASK_INTERRUPTIBLE;
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/serial/68360serial.c kernel-source-2.6.8-2.6.8/drivers/serial/68360serial.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/serial/68360serial.c	2004-08-13 23:38:04.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/serial/68360serial.c	2004-10-16 15:51:01.000000000 -0600
+@@ -700,12 +700,8 @@
+ 	if (!tty)
+ 		return;
+ 
+-	if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) {
+-		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-		    tty->ldisc.write_wakeup)
+-			(tty->ldisc.write_wakeup)(tty);
+-		wake_up_interruptible(&tty->write_wait);
+-	}
++	if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event))
++		tty_wakeup(tty);
+ }
+ 
+ 
+@@ -1152,10 +1148,7 @@
+ 	/* There is nothing to "flush", whatever we gave the CPM
+ 	 * is on its way out.
+ 	 */
+-	wake_up_interruptible(&tty->write_wait);
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
++	tty_wakeup(tty);
+ 	info->flags &= ~TX_WAKEUP;
+ }
+ 
+@@ -1716,8 +1709,7 @@
+ 	shutdown(info);
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
++	tty_ldisc_flush(tty);		
+ 	tty->closing = 0;
+ 	info->event = 0;
+ 	info->tty = 0;
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/serial/mcfserial.c kernel-source-2.6.8-2.6.8/drivers/serial/mcfserial.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/serial/mcfserial.c	2004-08-13 23:36:56.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/serial/mcfserial.c	2004-10-16 15:51:01.000000000 -0600
+@@ -424,11 +424,7 @@
+ 	tty = info->tty;
+ 	if (!tty)
+ 		return;
+-
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
+-	wake_up_interruptible(&tty->write_wait);
++	tty_wakeup(tty);
+ }
+ 
+ 
+@@ -835,10 +831,7 @@
+ 	info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
+ 	local_irq_restore(flags);
+ 
+-	wake_up_interruptible(&tty->write_wait);
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
++	tty_wakeup(tty);
+ }
+ 
+ /*
+@@ -1232,11 +1225,12 @@
+ 	shutdown(info);
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
++	tty_ldisc_flush(tty);
++	
+ 	tty->closing = 0;
+ 	info->event = 0;
+ 	info->tty = 0;
++#if 0	
+ 	if (tty->ldisc.num != ldiscs[N_TTY].num) {
+ 		if (tty->ldisc.close)
+ 			(tty->ldisc.close)(tty);
+@@ -1245,6 +1239,7 @@
+ 		if (tty->ldisc.open)
+ 			(tty->ldisc.open)(tty);
+ 	}
++#endif	
+ 	if (info->blocked_open) {
+ 		if (info->close_delay) {
+ 			current->state = TASK_INTERRUPTIBLE;
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/serial/serial_core.c kernel-source-2.6.8-2.6.8/drivers/serial/serial_core.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/serial/serial_core.c	2004-08-13 23:36:32.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/serial/serial_core.c	2004-10-16 15:51:01.000000000 -0600
+@@ -107,15 +107,7 @@
+ static void uart_tasklet_action(unsigned long data)
+ {
+ 	struct uart_state *state = (struct uart_state *)data;
+-	struct tty_struct *tty;
+-
+-	tty = state->info->tty;
+-	if (tty) {
+-		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-		    tty->ldisc.write_wakeup)
+-			tty->ldisc.write_wakeup(tty);
+-		wake_up_interruptible(&tty->write_wait);
+-	}
++	tty_wakeup(state->info->tty);
+ }
+ 
+ static inline void
+@@ -581,10 +573,7 @@
+ 	spin_lock_irqsave(&port->lock, flags);
+ 	uart_circ_clear(&state->info->xmit);
+ 	spin_unlock_irqrestore(&port->lock, flags);
+-	wake_up_interruptible(&tty->write_wait);
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
++	tty_wakeup(tty);
+ }
+ 
+ /*
+@@ -1216,7 +1205,7 @@
+ {
+ 	struct uart_state *state = tty->driver_data;
+ 	struct uart_port *port;
+-
++	
+ 	BUG_ON(!kernel_locked());
+ 
+ 	if (!state || !state->port)
+@@ -1239,12 +1228,12 @@
+ 		 * one, we've got real problems, since it means the
+ 		 * serial port won't be shutdown.
+ 		 */
+-		printk("uart_close: bad serial port count; tty->count is 1, "
++		printk(KERN_ERR "uart_close: bad serial port count; tty->count is 1, "
+ 		       "state->count is %d\n", state->count);
+ 		state->count = 1;
+ 	}
+ 	if (--state->count < 0) {
+-		printk("rs_close: bad serial port count for %s: %d\n",
++		printk(KERN_ERR "uart_close: bad serial port count for %s: %d\n",
+ 		       tty->name, state->count);
+ 		state->count = 0;
+ 	}
+@@ -1280,8 +1269,9 @@
+ 
+ 	uart_shutdown(state);
+ 	uart_flush_buffer(tty);
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
++
++	tty_ldisc_flush(tty);	
++	
+ 	tty->closing = 0;
+ 	state->info->tty = NULL;
+ 
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/tc/zs.c kernel-source-2.6.8-2.6.8/drivers/tc/zs.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/tc/zs.c	2004-08-13 23:37:39.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/tc/zs.c	2004-10-16 15:51:01.000000000 -0600
+@@ -683,10 +683,7 @@
+ 		return;
+ 
+ 	if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) {
+-		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-		    tty->ldisc.write_wakeup)
+-			(tty->ldisc.write_wakeup)(tty);
+-		wake_up_interruptible(&tty->write_wait);
++		tty_wakeup(tty);
+ 	}
+ }
+ 
+@@ -1010,10 +1007,7 @@
+ 	cli();
+ 	info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
+ 	sti();
+-	wake_up_interruptible(&tty->write_wait);
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-	    tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
++	tty_wakeup(tty);
+ }
+ 
+ /*
+@@ -1407,8 +1401,7 @@
+ 	shutdown(info);
+ 	if (tty->driver->flush_buffer)
+ 		tty->driver->flush_buffer(tty);
+-	if (tty->ldisc.flush_buffer)
+-		tty->ldisc.flush_buffer(tty);
++	tty_ldisc_flush(tty);
+ 	tty->closing = 0;
+ 	info->event = 0;
+ 	info->tty = 0;
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/usb/class/bluetty.c kernel-source-2.6.8-2.6.8/drivers/usb/class/bluetty.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/usb/class/bluetty.c	2004-08-13 23:37:37.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/usb/class/bluetty.c	2004-10-16 15:51:01.000000000 -0600
+@@ -992,17 +992,10 @@
+ 
+ 	dbg("%s", __FUNCTION__);
+ 
+-	if (!bluetooth) {
++	if (!bluetooth)
+ 		return;
+-	}
+-
+-	tty = bluetooth->tty;
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) {
+-		dbg("%s - write wakeup call.", __FUNCTION__);
+-		(tty->ldisc.write_wakeup)(tty);
+-	}
+ 
+-	wake_up_interruptible(&tty->write_wait);
++	tty_wakeup(&bluetooth->tty);
+ }
+ 
+ 
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/usb/class/cdc-acm.c kernel-source-2.6.8-2.6.8/drivers/usb/class/cdc-acm.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/usb/class/cdc-acm.c	2004-08-13 23:37:15.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/usb/class/cdc-acm.c	2004-10-16 15:51:01.000000000 -0600
+@@ -248,16 +248,11 @@
+ static void acm_softint(void *private)
+ {
+ 	struct acm *acm = private;
+-	struct tty_struct *tty = acm->tty;
+ 	dbg("Entering acm_softint.\n");
+ 	
+ 	if (!ACM_READY(acm))
+ 		return;
+-
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup)
+-		(tty->ldisc.write_wakeup)(tty);
+-
+-	wake_up_interruptible(&tty->write_wait);
++	tty_wakeup(acm->tty);
+ }
+ 
+ /*
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/usb/serial/digi_acceleport.c kernel-source-2.6.8-2.6.8/drivers/usb/serial/digi_acceleport.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/usb/serial/digi_acceleport.c	2004-08-13 23:36:57.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/usb/serial/digi_acceleport.c	2004-10-16 15:51:01.000000000 -0600
+@@ -624,14 +624,7 @@
+ 	wake_up_interruptible( &port->write_wait );
+ 
+ 	/* wake up line discipline */
+-	if( (tty->flags & (1 << TTY_DO_WRITE_WAKEUP))
+-	&& tty->ldisc.write_wakeup )
+-		(tty->ldisc.write_wakeup)(tty);
+-
+-	/* wake up other tty processes */
+-	wake_up_interruptible( &tty->write_wait );
+-	/* For 2.2.16 backport -- wake_up_interruptible( &tty->poll_wait ); */
+-
++	tty_wakeup(tty);
+ }
+ 
+ 
+@@ -1569,8 +1562,7 @@
+ 	/* flush driver and line discipline buffers */
+ 	if( tty->driver->flush_buffer )
+ 		tty->driver->flush_buffer( tty );
+-	if( tty->ldisc.flush_buffer )
+-		tty->ldisc.flush_buffer( tty );
++	tty_ldisc_flush(tty);
+ 
+ 	if (port->serial->dev) {
+ 		/* wait for transmit idle */
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/usb/serial/empeg.c kernel-source-2.6.8-2.6.8/drivers/usb/serial/empeg.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/usb/serial/empeg.c	2004-08-13 23:38:08.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/usb/serial/empeg.c	2004-10-16 15:51:01.000000000 -0600
+@@ -516,7 +516,9 @@
+ 	 */
+ 	port->tty->low_latency = 1;
+ 
+-	/* Notify the tty driver that the termios have changed. */
++	/* Notify the tty driver that the termios have changed.
++	   FIXME: Why - the ldisc will do this anyway and NULL is not
++	   a valid previous state */
+ 	port->tty->ldisc.set_termios(port->tty, NULL);
+ 
+ 	return;
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/usb/serial/io_edgeport.c kernel-source-2.6.8-2.6.8/drivers/usb/serial/io_edgeport.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/usb/serial/io_edgeport.c	2004-08-13 23:36:14.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/usb/serial/io_edgeport.c	2004-10-16 15:51:01.000000000 -0600
+@@ -900,12 +900,7 @@
+ 
+ 	if (tty && edge_port->open) {
+ 		/* let the tty driver wakeup if it has a special write_wakeup function */
+-		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) {
+-			(tty->ldisc.write_wakeup)(tty);
+-		}
+-
+-		/* tell the tty driver that something has changed */
+-		wake_up_interruptible(&tty->write_wait);
++		tty_wakeup(tty);
+ 	}
+ 
+ 	// Release the Write URB
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/usb/serial/io_ti.c kernel-source-2.6.8-2.6.8/drivers/usb/serial/io_ti.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/usb/serial/io_ti.c	2004-08-13 23:38:08.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/usb/serial/io_ti.c	2004-10-16 15:51:01.000000000 -0600
+@@ -1804,12 +1804,7 @@
+ 	tty = port->tty;
+ 	if (tty) {
+ 		/* let the tty driver wakeup if it has a special write_wakeup function */
+-		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) {
+-			(tty->ldisc.write_wakeup)(tty);
+-		}
+-
+-		/* tell the tty driver that something has changed */
+-		wake_up_interruptible(&tty->write_wait);
++		tty_wakeup(tty);
+ 	}
+ }
+ 
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/usb/serial/ir-usb.c kernel-source-2.6.8-2.6.8/drivers/usb/serial/ir-usb.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/usb/serial/ir-usb.c	2004-08-13 23:36:57.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/usb/serial/ir-usb.c	2004-10-16 15:51:01.000000000 -0600
+@@ -449,6 +449,10 @@
+ 			 */
+ 			tty = port->tty;
+ 
++			/*
++			 *	FIXME: must not do this in IRQ context,
++			 *	must honour TTY_DONT_FLIP
++			 */
+ 			tty->ldisc.receive_buf(
+ 				tty,
+ 				data+1,
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/usb/serial/keyspan_pda.c kernel-source-2.6.8-2.6.8/drivers/usb/serial/keyspan_pda.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/usb/serial/keyspan_pda.c	2004-08-13 23:37:25.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/usb/serial/keyspan_pda.c	2004-10-16 15:51:01.000000000 -0600
+@@ -186,13 +186,7 @@
+ 	wake_up_interruptible( &port->write_wait );
+ 
+ 	/* wake up line discipline */
+-	if( (tty->flags & (1 << TTY_DO_WRITE_WAKEUP))
+-	&& tty->ldisc.write_wakeup )
+-		(tty->ldisc.write_wakeup)(tty);
+-
+-	/* wake up other tty processes */
+-	wake_up_interruptible( &tty->write_wait );
+-	/* For 2.2.16 backport -- wake_up_interruptible( &tty->poll_wait ); */
++	tty_wakeup(tty);
+ }
+ 
+ static void keyspan_pda_request_unthrottle( struct usb_serial *serial )
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/usb/serial/mct_u232.c kernel-source-2.6.8-2.6.8/drivers/usb/serial/mct_u232.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/usb/serial/mct_u232.c	2004-08-13 23:37:25.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/usb/serial/mct_u232.c	2004-10-16 15:51:01.000000000 -0600
+@@ -579,11 +579,7 @@
+ 
+ 	if (write_blocking) {
+ 		wake_up_interruptible(&port->write_wait);
+-		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
+-		    tty->ldisc.write_wakeup)
+-			(tty->ldisc.write_wakeup)(tty);
+-		wake_up_interruptible(&tty->write_wait);
+-		
++		tty_wakeup(tty);
+ 	} else {
+ 		/* from generic_write_bulk_callback */
+ 		schedule_work(&port->work);
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/usb/serial/usb-serial.c kernel-source-2.6.8-2.6.8/drivers/usb/serial/usb-serial.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/usb/serial/usb-serial.c	2004-08-13 23:38:11.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/usb/serial/usb-serial.c	2004-10-16 15:51:01.000000000 -0600
+@@ -755,12 +755,7 @@
+ 	if (!tty)
+ 		return;
+ 
+-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) {
+-		dbg("%s - write wakeup call.", __FUNCTION__);
+-		(tty->ldisc.write_wakeup)(tty);
+-	}
+-
+-	wake_up_interruptible(&tty->write_wait);
++	tty_wakeup(tty);
+ }
+ 
+ static void destroy_serial(struct kref *kref)
+diff -urN kernel-source-2.6.8-2.6.8.orig/drivers/usb/serial/whiteheat.c kernel-source-2.6.8-2.6.8/drivers/usb/serial/whiteheat.c
+--- kernel-source-2.6.8-2.6.8.orig/drivers/usb/serial/whiteheat.c	2004-08-13 23:36:45.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/drivers/usb/serial/whiteheat.c	2004-10-16 15:51:01.000000000 -0600
+@@ -668,8 +668,7 @@
+ 
+ 	if (port->tty->driver->flush_buffer)
+ 		port->tty->driver->flush_buffer(port->tty);
+-	if (port->tty->ldisc.flush_buffer)
+-		port->tty->ldisc.flush_buffer(port->tty);
++	tty_ldisc_flush(port->tty);
+ 
+ 	firm_report_tx_done(port);
+ 
+diff -urN kernel-source-2.6.8-2.6.8.orig/fs/proc/proc_tty.c kernel-source-2.6.8-2.6.8/fs/proc/proc_tty.c
+--- kernel-source-2.6.8-2.6.8.orig/fs/proc/proc_tty.c	2004-08-13 23:36:56.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/fs/proc/proc_tty.c	2004-10-16 15:51:01.000000000 -0600
+@@ -15,9 +15,6 @@
+ #include <linux/seq_file.h>
+ #include <asm/bitops.h>
+ 
+-extern struct tty_ldisc ldiscs[];
+-
+-
+ static int tty_ldiscs_read_proc(char *page, char **start, off_t off,
+ 				int count, int *eof, void *data);
+ 
+@@ -159,12 +156,15 @@
+ 	int	i;
+ 	int	len = 0;
+ 	off_t	begin = 0;
+-
++	struct tty_ldisc *ld;
++	
+ 	for (i=0; i < NR_LDISCS; i++) {
+-		if (!(ldiscs[i].flags & LDISC_FLAG_DEFINED))
++		ld = tty_ldisc_get(i);
++		if (ld == NULL)
+ 			continue;
+ 		len += sprintf(page+len, "%-10s %2d\n",
+-			       ldiscs[i].name ? ldiscs[i].name : "???", i);
++			       ld->name ? ld->name : "???", i);
++		tty_ldisc_put(i);
+ 		if (len+begin > off+count)
+ 			break;
+ 		if (len+begin < off) {
+diff -urN kernel-source-2.6.8-2.6.8.orig/include/linux/tty.h kernel-source-2.6.8-2.6.8/include/linux/tty.h
+--- kernel-source-2.6.8-2.6.8.orig/include/linux/tty.h	2004-08-13 23:36:58.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/include/linux/tty.h	2004-10-16 15:51:01.000000000 -0600
+@@ -306,26 +306,27 @@
+  * tty->write.  Thus, you must use the inline functions set_bit() and
+  * clear_bit() to make things atomic.
+  */
+-#define TTY_THROTTLED 0
+-#define TTY_IO_ERROR 1
+-#define TTY_OTHER_CLOSED 2
+-#define TTY_EXCLUSIVE 3
+-#define TTY_DEBUG 4
+-#define TTY_DO_WRITE_WAKEUP 5
+-#define TTY_PUSH 6
+-#define TTY_CLOSING 7
+-#define TTY_DONT_FLIP 8
+-#define TTY_HW_COOK_OUT 14
+-#define TTY_HW_COOK_IN 15
+-#define TTY_PTY_LOCK 16
+-#define TTY_NO_WRITE_SPLIT 17
++#define TTY_THROTTLED 		0	/* Call unthrottle() at threshold min */
++#define TTY_IO_ERROR 		1	/* Canse an I/O error (may be no ldisc too) */
++#define TTY_OTHER_CLOSED 	2	/* Other side (if any) has closed */
++#define TTY_EXCLUSIVE 		3	/* Exclusive open mode */
++#define TTY_DEBUG 		4	/* Debugging */
++#define TTY_DO_WRITE_WAKEUP 	5	/* Call write_wakeup after queuing new */
++#define TTY_PUSH 		6	/* n_tty private */
++#define TTY_CLOSING 		7	/* ->close() in progress */
++#define TTY_DONT_FLIP 		8	/* Defer buffer flip */
++#define TTY_LDISC 		9	/* Line discipline attached */
++#define TTY_HW_COOK_OUT 	14	/* Hardware can do output cooking */
++#define TTY_HW_COOK_IN 		15	/* Hardware can do input cooking */
++#define TTY_PTY_LOCK 		16	/* pty private */
++#define TTY_NO_WRITE_SPLIT 	17	/* Preserve write boundaries to driver */
++#define TTY_HUPPED 		18	/* Post driver->hangup() */
+ 
+ #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty))
+ 
+ extern void tty_write_flush(struct tty_struct *);
+ 
+ extern struct termios tty_std_termios;
+-extern struct tty_ldisc ldiscs[];
+ extern int fg_console, last_console, want_console;
+ 
+ extern int kmsg_redirect;
+@@ -362,6 +363,16 @@
+ extern int tty_get_baud_rate(struct tty_struct *tty);
+ extern int tty_termios_baud_rate(struct termios *termios);
+ 
++extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *);
++extern void tty_ldisc_deref(struct tty_ldisc *);
++extern struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *);
++
++extern struct tty_ldisc *tty_ldisc_get(int);
++extern void tty_ldisc_put(int);
++
++extern void tty_wakeup(struct tty_struct *tty);
++extern void tty_ldisc_flush(struct tty_struct *tty);
++
+ struct semaphore;
+ extern struct semaphore tty_sem;
+ 
+diff -urN kernel-source-2.6.8-2.6.8.orig/include/linux/tty_ldisc.h kernel-source-2.6.8-2.6.8/include/linux/tty_ldisc.h
+--- kernel-source-2.6.8-2.6.8.orig/include/linux/tty_ldisc.h	2004-08-13 23:38:09.000000000 -0600
++++ kernel-source-2.6.8-2.6.8/include/linux/tty_ldisc.h	2004-10-16 15:51:01.000000000 -0600
+@@ -95,6 +95,13 @@
+  * 	that line discpline should try to send more characters to the
+  * 	low-level driver for transmission.  If the line discpline does
+  * 	not have any more data to send, it can just return.
++ *
++ * int (*hangup)(struct tty_struct *)
++ *
++ *	Called on a hangup. Tells the discipline that it should
++ *	cease I/O to the tty driver. Can sleep. The driver should
++ *	seek to perform this action quickly but should wait until
++ *	any pending driver I/O is completed.
+  */
+ 
+ #include <linux/fs.h>
+@@ -122,6 +129,7 @@
+ 	void	(*set_termios)(struct tty_struct *tty, struct termios * old);
+ 	unsigned int (*poll)(struct tty_struct *, struct file *,
+ 			     struct poll_table_struct *);
++	int	(*hangup)(struct tty_struct *tty);
+ 	
+ 	/*
+ 	 * The following routines are called from below.
+@@ -132,6 +140,8 @@
+ 	void	(*write_wakeup)(struct tty_struct *);
+ 
+ 	struct  module *owner;
++	
++	int refcount;
+ };
+ 
+ #define TTY_LDISC_MAGIC	0x5403

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes2.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes2.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes2.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,39 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: fix typo in tty locking cleanup and fixes [CAN-2004-0814]
+## DP: Patch author: Alan Cox <alan at redhat.com>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/09/30 08:41:12-07:00 alan at redhat.com 
+#   [PATCH] fix typo in capi driver
+#   
+#   I didn't have ISDN builds on in my tree for some reason hence missing these
+#   two from the tidy ups at the end. Marcel Holtmann also came up with the
+#   same fixes although I didnt find that email until I did these.
+#   
+#   Signed-off-by: Alan Cox
+# 
+# drivers/isdn/capi/capi.c
+#   2004/09/30 06:00:58-07:00 alan at redhat.com +1 -1
+#   fix typo in capi driver
+# 
+diff -Nru a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
+--- a/drivers/isdn/capi/capi.c	2004-10-19 21:47:13 -07:00
++++ b/drivers/isdn/capi/capi.c	2004-10-19 21:47:13 -07:00
+@@ -646,7 +646,7 @@
+ 		kfree_skb(skb);
+ 		(void)capiminor_del_ack(mp, datahandle);
+ 		if (mp->tty)
+-			tty_wakeup(tty);
++			tty_wakeup(mp->tty);
+ 		(void)handle_minor_send(mp);
+ 
+ 	} else {

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes3.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes3.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes3.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,54 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: intermediate cleanup of the previous tty locking fixes
+## DP: Patch author: Linus Torvalds <torvalds at ppc970.osdl.org>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/02 12:09:43-07:00 torvalds at ppc970.osdl.org 
+#   Partially undo Alan's recent tty locking fixes: the termios
+#   lock must not be held across the driver/ldisc downcalls.
+#   
+#   Some drivers need to set device state (baudrate etc) and may
+#   need to sleep.
+# 
+# drivers/char/tty_ioctl.c
+#   2004/10/02 12:09:36-07:00 torvalds at ppc970.osdl.org +7 -1
+#   Partially undo Alan's recent tty locking fixes: the termios
+#   lock must not be held across the driver/ldisc downcalls.
+#   
+#   Some drivers need to set device state (baudrate etc) and may
+#   need to sleep.
+# 
+diff -Nru a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c
+--- a/drivers/char/tty_ioctl.c	2004-10-20 22:58:21 -07:00
++++ b/drivers/char/tty_ioctl.c	2004-10-20 22:58:21 -07:00
+@@ -145,6 +145,13 @@
+ 			wake_up_interruptible(&tty->link->read_wait);
+ 		}
+ 	}
++
++	/*
++	 * Fixme! We should really try to protect the driver and ldisc
++	 * termios usage too. But they need to be able to sleep, so
++	 * the global termios spinlock is not the right thing.
++	 */
++	spin_unlock_irqrestore(&tty_termios_lock, flags);
+ 	   
+ 	if (tty->driver->set_termios)
+ 		(*tty->driver->set_termios)(tty, &old_termios);
+@@ -155,7 +162,6 @@
+ 			(ld->set_termios)(tty, &old_termios);
+ 		tty_ldisc_deref(ld);
+ 	}
+-	spin_unlock_irqrestore(&tty_termios_lock, flags);
+ }
+ 
+ static int set_termios(struct tty_struct * tty, void __user *arg, int opt)

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes4.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes4.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes4.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,228 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: intermediate cleanup of the previous tty locking fixes
+## DP: Patch author: Linus Torvalds <torvalds at ppc970.osdl.org>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/02 15:46:35-07:00 alan at lxorguk.ukuu.org.uk 
+#   [PATCH] Update termios to use per tty semaphore
+#   
+#   This makes the agreed change of termios locking to be semaphore based
+#   sleep locking. This is needed for USB in particular as it has to use
+#   messaging to issue terminal mode changes.
+#   
+#   This code passes Torvalds test grades 0, 1 and 2 (it looks ok, it
+#   compiles and it booted). It does mean that a driver cannot take an
+#   atomic peek at termios data during an interrupt. Nobody seems to be
+#   doing this although some of the driver receive paths for line
+#   disciplines will eventually want to (n_tty currently doesn't do this
+#   locked on the receive path). Since the ldisc is given a chance to copy
+#   any essential bits on the ->set_termios path this seems not to be a
+#   problem.
+# 
+# Documentation/tty.txt
+#   2004/10/02 15:45:19-07:00 alan at lxorguk.ukuu.org.uk +4 -4
+#   Update termios to use per tty semaphore
+# 
+# drivers/char/tty_io.c
+#   2004/10/02 15:45:19-07:00 alan at lxorguk.ukuu.org.uk +5 -8
+#   Update termios to use per tty semaphore
+# 
+# drivers/char/tty_ioctl.c
+#   2004/10/02 15:45:19-07:00 alan at lxorguk.ukuu.org.uk +9 -20
+#   Update termios to use per tty semaphore
+# 
+# include/linux/tty.h
+#   2004/10/02 15:45:22-07:00 alan at lxorguk.ukuu.org.uk +1 -0
+#   Update termios to use per tty semaphore
+# 
+diff -Nru a/Documentation/tty.txt b/Documentation/tty.txt
+--- a/Documentation/tty.txt	2004-10-20 22:29:56 -07:00
++++ b/Documentation/tty.txt	2004-10-20 22:29:56 -07:00
+@@ -60,8 +60,8 @@
+ 
+ set_termios()	-	Called on termios structure changes. The caller
+ 			passes the old termios data and the current data
+-			is in the tty. Called under the termios lock so
+-			may not sleep. Serialized against itself only.
++			is in the tty. Called under the termios semaphore so
++			allowed to sleep. Serialized against itself only.
+ 
+ read()		-	Move data from the line discipline to the user.
+ 			Multiple read calls may occur in parallel and the
+@@ -158,8 +158,8 @@
+ 
+ ioctl()		-	Called when an ioctl may be for the driver
+ 
+-set_termios()	-	Called on termios change, may get parallel calls,
+-			may block for now (may change that)
++set_termios()	-	Called on termios change, serialized against
++			itself by a semaphore. May sleep.
+ 
+ set_ldisc()	-	Notifier for discipline change. At the point this 
+ 			is done the discipline is not yet usable. Can now
+diff -Nru a/drivers/char/tty_io.c b/drivers/char/tty_io.c
+--- a/drivers/char/tty_io.c	2004-10-20 22:29:56 -07:00
++++ b/drivers/char/tty_io.c	2004-10-20 22:29:56 -07:00
+@@ -130,8 +130,6 @@
+ /* Semaphore to protect creating and releasing a tty. This is shared with
+    vt.c for deeply disgusting hack reasons */
+ DECLARE_MUTEX(tty_sem);
+-/* Lock for tty_termios changes - private to tty_io/tty_ioctl */
+-spinlock_t tty_termios_lock = SPIN_LOCK_UNLOCKED;
+ 
+ #ifdef CONFIG_UNIX98_PTYS
+ extern struct tty_driver *ptm_driver;	/* Unix98 pty masters; for /dev/ptmx */
+@@ -239,10 +237,9 @@
+  
+ static void tty_set_termios_ldisc(struct tty_struct *tty, int num)
+ {
+-	unsigned long flags;
+-	spin_lock_irqsave(&tty_termios_lock, flags);
++	down(&tty->termios_sem);
+ 	tty->termios->c_line = num;
+-	spin_unlock_irqrestore(&tty_termios_lock, flags);
++	up(&tty->termios_sem);
+ }
+ 
+ /*
+@@ -811,10 +808,9 @@
+ 	 */
+ 	if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS)
+ 	{
+-		unsigned long flags;
+-		spin_lock_irqsave(&tty_termios_lock, flags);
++		down(&tty->termios_sem);
+ 		*tty->termios = tty->driver->init_termios;
+-		spin_unlock_irqrestore(&tty_termios_lock, flags);
++		up(&tty->termios_sem);
+ 	}
+ 	
+ 	/* Defer ldisc switch */
+@@ -2606,6 +2602,7 @@
+ 	tty->flip.flag_buf_ptr = tty->flip.flag_buf;
+ 	INIT_WORK(&tty->flip.work, flush_to_ldisc, tty);
+ 	init_MUTEX(&tty->flip.pty_sem);
++	init_MUTEX(&tty->termios_sem);
+ 	init_waitqueue_head(&tty->write_wait);
+ 	init_waitqueue_head(&tty->read_wait);
+ 	INIT_WORK(&tty->hangup_work, do_tty_hangup, tty);
+diff -Nru a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c
+--- a/drivers/char/tty_ioctl.c	2004-10-20 22:29:56 -07:00
++++ b/drivers/char/tty_ioctl.c	2004-10-20 22:29:56 -07:00
+@@ -29,8 +29,6 @@
+ 
+ #undef	DEBUG
+ 
+-extern spinlock_t tty_termios_lock;
+-
+ /*
+  * Internal flag options for termios setting behavior
+  */
+@@ -101,7 +99,6 @@
+ 	int canon_change;
+ 	struct termios old_termios = *tty->termios;
+ 	struct tty_ldisc *ld;
+-	unsigned long flags;
+ 	
+ 	/*
+ 	 *	Perform the actual termios internal changes under lock.
+@@ -110,7 +107,7 @@
+ 
+ 	/* FIXME: we need to decide on some locking/ordering semantics
+ 	   for the set_termios notification eventually */
+-	spin_lock_irqsave(&tty_termios_lock, flags);
++	down(&tty->termios_sem);
+ 
+ 	*tty->termios = *new_termios;
+ 	unset_locked_termios(tty->termios, &old_termios, tty->termios_locked);
+@@ -145,13 +142,6 @@
+ 			wake_up_interruptible(&tty->link->read_wait);
+ 		}
+ 	}
+-
+-	/*
+-	 * Fixme! We should really try to protect the driver and ldisc
+-	 * termios usage too. But they need to be able to sleep, so
+-	 * the global termios spinlock is not the right thing.
+-	 */
+-	spin_unlock_irqrestore(&tty_termios_lock, flags);
+ 	   
+ 	if (tty->driver->set_termios)
+ 		(*tty->driver->set_termios)(tty, &old_termios);
+@@ -162,6 +152,7 @@
+ 			(ld->set_termios)(tty, &old_termios);
+ 		tty_ldisc_deref(ld);
+ 	}
++	up(&tty->termios_sem);
+ }
+ 
+ static int set_termios(struct tty_struct * tty, void __user *arg, int opt)
+@@ -255,15 +246,14 @@
+ static int get_sgttyb(struct tty_struct * tty, struct sgttyb __user * sgttyb)
+ {
+ 	struct sgttyb tmp;
+-	unsigned long flags;
+ 
+-	spin_lock_irqsave(&tty_termios_lock, flags);
++	down(&tty->termios_sem);
+ 	tmp.sg_ispeed = 0;
+ 	tmp.sg_ospeed = 0;
+ 	tmp.sg_erase = tty->termios->c_cc[VERASE];
+ 	tmp.sg_kill = tty->termios->c_cc[VKILL];
+ 	tmp.sg_flags = get_sgflags(tty);
+-	spin_unlock_irqrestore(&tty_termios_lock, flags);
++	up(&tty->termios_sem);
+ 	
+ 	return copy_to_user(sgttyb, &tmp, sizeof(tmp)) ? -EFAULT : 0;
+ }
+@@ -307,13 +296,13 @@
+ 	
+ 	if (copy_from_user(&tmp, sgttyb, sizeof(tmp)))
+ 		return -EFAULT;
+-		
+-	spin_lock_irqsave(&tty_termios_lock, flags);
++
++	down(&tty->termios_sem);		
+ 	termios =  *tty->termios;
+ 	termios.c_cc[VERASE] = tmp.sg_erase;
+ 	termios.c_cc[VKILL] = tmp.sg_kill;
+ 	set_sgflags(&termios, tmp.sg_flags);
+-	spin_unlock_irqrestore(&tty_termios_lock, flags);
++	up(&tty->termios_sem);
+ 	change_termios(tty, &termios);
+ 	return 0;
+ }
+@@ -549,11 +538,11 @@
+ 		case TIOCSSOFTCAR:
+ 			if (get_user(arg, (unsigned int __user *) arg))
+ 				return -EFAULT;
+-			spin_lock_irqsave(&tty_termios_lock, flags);
++			down(&tty->termios_sem);
+ 			tty->termios->c_cflag =
+ 				((tty->termios->c_cflag & ~CLOCAL) |
+ 				 (arg ? CLOCAL : 0));
+-			spin_unlock_irqrestore(&tty_termios_lock, flags);
++			up(&tty->termios_sem);
+ 			return 0;
+ 		default:
+ 			return -ENOIOCTLCMD;
+diff -Nru a/include/linux/tty.h b/include/linux/tty.h
+--- a/include/linux/tty.h	2004-10-20 22:29:56 -07:00
++++ b/include/linux/tty.h	2004-10-20 22:29:56 -07:00
+@@ -244,6 +244,7 @@
+ 	struct tty_driver *driver;
+ 	int index;
+ 	struct tty_ldisc ldisc;
++	struct semaphore termios_sem;
+ 	struct termios *termios, *termios_locked;
+ 	char name[64];
+ 	int pgrp;

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes5.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes5.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes5.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,39 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: cleanup of the previous tty locking fixes
+## DP: Patch author: Randy Dunlap <rddunlap at osdl.org>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/09/30 08:23:15-07:00 rddunlap at osdl.org 
+#   [PATCH] pc300: remove extra paren.
+#   
+#   Remove an extra left-paren.
+#   
+#   Acked-by: Marcelo Tosatti <marcelo.tosatti at cyclades.com>
+#   Signed-off-by: Randy Dunlap <rddunlap at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# drivers/net/wan/pc300_tty.c
+#   2004/09/29 21:37:16-07:00 rddunlap at osdl.org +1 -1
+#   pc300: remove extra paren.
+# 
+diff -Nru a/drivers/net/wan/pc300_tty.c b/drivers/net/wan/pc300_tty.c
+--- a/drivers/net/wan/pc300_tty.c	2004-10-20 23:31:49 -07:00
++++ b/drivers/net/wan/pc300_tty.c	2004-10-20 23:31:49 -07:00
+@@ -704,7 +704,7 @@
+ 					ld = tty_ldisc_ref(cpc_tty);
+ 					if(ld)
+ 					{
+-						if (ld->receive_buf)) {
++						if (ld->receive_buf) {
+ 							CPC_TTY_DBG("%s: call line disc. receive_buf\n",cpc_tty->name);
+ 							ld->receive_buf(cpc_tty->tty, (char *)(buf->data), &flags, buf->size);
+ 						}

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes6.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes6.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes6.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,76 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: cleanup of the previous tty locking fixes
+## DP: Patch author: Alan Cox <alan at redhat.com
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/03 09:18:47-07:00 alan at redhat.com 
+#   [PATCH] Fix up tty patch problem with pc300 and clean up braces
+#   
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# drivers/net/wan/pc300_tty.c
+#   2004/10/02 21:05:10-07:00 alan at redhat.com +9 -10
+#   Fix up tty patch problem with pc300 and clean up braces
+# 
+diff -Nru a/drivers/net/wan/pc300_tty.c b/drivers/net/wan/pc300_tty.c
+--- a/drivers/net/wan/pc300_tty.c	2004-10-20 23:35:56 -07:00
++++ b/drivers/net/wan/pc300_tty.c	2004-10-20 23:35:56 -07:00
+@@ -192,13 +192,14 @@
+  */
+ void cpc_tty_init(pc300dev_t *pc300dev)
+ {
+-	int port, aux;
++	unsigned long port;
++	int aux;
+ 	st_cpc_tty_area * cpc_tty;
+ 
+ 	/* hdlcX - X=interface number */
+ 	port = pc300dev->dev->name[4] - '0';
+ 	if (port >= CPC_TTY_NPORTS) {
+-		printk("%s-tty: invalid interface selected (0-%i): %i", 
++		printk("%s-tty: invalid interface selected (0-%i): %li",
+ 			pc300dev->dev->name,
+ 			CPC_TTY_NPORTS-1,port);
+ 		return;
+@@ -682,7 +683,8 @@
+  */
+ static void cpc_tty_rx_work(void * data)
+ {
+-	int port, i, j;
++	unsigned long port;
++	int i, j;
+ 	st_cpc_tty_area *cpc_tty; 
+ 	volatile st_cpc_rx_buf * buf;
+ 	char flags=0,flg_rx=1; 
+@@ -693,17 +695,14 @@
+ 	
+ 	for (i=0; (i < 4) && flg_rx ; i++) {
+ 		flg_rx = 0;
+-		port = (int) data;
++		port = (unsigned long)data;
+ 		for (j=0; j < CPC_TTY_NPORTS; j++) {
+ 			cpc_tty = &cpc_tty_area[port];
+ 		
+ 			if ((buf=cpc_tty->buf_rx.first) != 0) {
+-				
+-				if(cpc_tty->tty)
+-				{											
+-					ld = tty_ldisc_ref(cpc_tty);
+-					if(ld)
+-					{
++				if(cpc_tty->tty) {
++					ld = tty_ldisc_ref(cpc_tty->tty);
++					if(ld) {
+ 						if (ld->receive_buf) {
+ 							CPC_TTY_DBG("%s: call line disc. receive_buf\n",cpc_tty->name);
+ 							ld->receive_buf(cpc_tty->tty, (char *)(buf->data), &flags, buf->size);

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes7.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes7.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes7.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,63 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: tty locking fix cleanup
+## DP: Patch author: Geert Uytterhoeven <geert at linux-m68k.org>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/01 08:04:06-07:00 geert at linux-m68k.org 
+#   [PATCH] fix up tty fall-out
+#   
+#   The two patches below (compile)fix some fall-out from the tty cleanups.
+#   
+#   Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# drivers/char/generic_serial.c
+#   2004/10/01 03:47:40-07:00 geert at linux-m68k.org +1 -1
+#   fix up tty fall-out
+# 
+# drivers/char/moxa.c
+#   2004/10/01 03:43:17-07:00 geert at linux-m68k.org +2 -2
+#   fix up tty fall-out
+# 
+diff -Nru a/drivers/char/generic_serial.c b/drivers/char/generic_serial.c
+--- a/drivers/char/generic_serial.c	2004-10-21 00:38:19 -07:00
++++ b/drivers/char/generic_serial.c	2004-10-21 00:38:19 -07:00
+@@ -691,7 +691,7 @@
+ 	unsigned long flags;
+ 	struct gs_port *port;
+ 	
+-	func_enter ()
++	func_enter ();
+ 
+ 	if (!tty) return;
+ 
+diff -Nru a/drivers/char/moxa.c b/drivers/char/moxa.c
+--- a/drivers/char/moxa.c	2004-10-21 00:38:19 -07:00
++++ b/drivers/char/moxa.c	2004-10-21 00:38:19 -07:00
+@@ -952,7 +952,7 @@
+ 				if (MoxaPortTxQueue(ch->port) <= WAKEUP_CHARS) {
+ 					if (!tp->stopped) {
+ 						ch->statusflags &= ~LOWWAIT;
+-						tty_wakeup(tty);
++						tty_wakeup(tp);
+ 						wake_up_interruptible(&tp->write_wait);
+ 					}
+ 				}
+@@ -1119,7 +1119,7 @@
+ 	if (ch->tty && (ch->statusflags & EMPTYWAIT)) {
+ 		if (MoxaPortTxQueue(ch->port) == 0) {
+ 			ch->statusflags &= ~EMPTYWAIT;
+-			tty_wakeup(tty);
++			tty_wakeup(ch->tty);
+ 			wake_up_interruptible(&ch->tty->write_wait);
+ 			return;
+ 		}

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes8.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes8.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes8.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,33 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: intermediate cleanup of the previous tty locking fixes
+## DP: Patch author: Alan Cox <alan at redhat.com>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/09/30 08:41:24-07:00 alan at redhat.com 
+#   [PATCH] Fix typo in final changes to old i4l tty code
+# 
+# drivers/isdn/i4l/isdn_tty.c
+#   2004/09/30 05:56:48-07:00 alan at redhat.com +1 -1
+#   Fix typo in final changes to old i4l tty code
+# 
+diff -Nru a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
+--- a/drivers/isdn/i4l/isdn_tty.c	2004-10-21 07:54:25 -07:00
++++ b/drivers/isdn/i4l/isdn_tty.c	2004-10-21 07:54:25 -07:00
+@@ -2673,7 +2673,7 @@
+ 		if ((info->flags & ISDN_ASYNC_CLOSING) || (!info->tty)) {
+ 			return;
+ 		}
+-		tty_ldisc_flush(tty);
++		tty_ldisc_flush(info->tty);
+ 		if ((info->flags & ISDN_ASYNC_CHECK_CD) &&
+ 		    (!((info->flags & ISDN_ASYNC_CALLOUT_ACTIVE) &&
+ 		       (info->flags & ISDN_ASYNC_CALLOUT_NOHUP)))) {

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes9.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes9.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/tty-locking-fixes9.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,12 @@
+--- kernel-source-2.6.8-2.6.8/drivers/serial/serial_core.c~	2004-11-24 11:56:39.000000000 -0800
++++ kernel-source-2.6.8-2.6.8/drivers/serial/serial_core.c	2004-11-24 11:56:50.000000000 -0800
+@@ -107,7 +107,8 @@
+ static void uart_tasklet_action(unsigned long data)
+ {
+ 	struct uart_state *state = (struct uart_state *)data;
+-	tty_wakeup(state->info->tty);
++	if (state->info->tty)
++		tty_wakeup(state->info->tty);
+ }
+ 
+ static inline void

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/unix-serialize-dgram.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/unix-serialize-dgram.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/unix-serialize-dgram.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,48 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Serialize dgram read using semaphore just like stream.
+## DP: Patch author: David S. Miller <davem at davemloft.net>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/11/15 14:04:37-08:00 davem at nuts.davemloft.net 
+#   [AF_UNIX]: Serialize dgram read using semaphore just like stream.
+#   
+#   Signed-off-by: David S. Miller <davem at davemloft.net>
+# 
+# net/unix/af_unix.c
+#   2004/11/15 14:03:52-08:00 davem at nuts.davemloft.net +5 -1
+#   [AF_UNIX]: Serialize dgram read using semaphore just like stream.
+# 
+diff -Nru a/net/unix/af_unix.c b/net/unix/af_unix.c
+--- a/net/unix/af_unix.c	2004-12-01 03:02:59 -08:00
++++ b/net/unix/af_unix.c	2004-12-01 03:02:59 -08:00
+@@ -1535,9 +1535,11 @@
+ 
+ 	msg->msg_namelen = 0;
+ 
++	down(&u->readsem);
++
+ 	skb = skb_recv_datagram(sk, flags, noblock, &err);
+ 	if (!skb)
+-		goto out;
++		goto out_unlock;
+ 
+ 	wake_up_interruptible(&u->peer_wait);
+ 
+@@ -1587,6 +1589,8 @@
+ 
+ out_free:
+ 	skb_free_datagram(sk,skb);
++out_unlock:
++	up(&u->readsem);
+ out:
+ 	return err;
+ }

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-01.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-01.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-01.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,85 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: PATCH] via-velocity: PCI ID move
+## DP: Patch author: Francois Romieu <romieu at fr.zoreil.com>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: romieu (BitKeeper)
+# cset: 1.1757.6.1 (2.6) key=40d4a9d5IfARZlR9KGSssVPEAvuatw
+# inclusion: upstream
+# descrition: [PATCH] via-velocity: PCI ID move
+# revision date: Fri, 05 Nov 2004 11:37:51 +0900
+#
+# rset: ChangeSet|1.1757.1.3..1.1757.6.1
+# rset: drivers/net/via-velocity.c|1.1..1.2
+# rset: drivers/net/via-velocity.h|1.1..1.2
+# rset: include/linux/pci_ids.h|1.167..1.168
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/06/19 17:02:13-04:00 romieu at fr.zoreil.com 
+#   [PATCH] via-velocity: PCI ID move
+#   
+#   (Note: this serie requires a -mm based kernel as the via-velocity patches
+#   are not included in Jeff's -netdev patches).
+#   
+#   
+#   
+#   PCI ID moved from the driver to the kernel database. A change for the
+#   pci.ids file project at souceforge has been submitted as well.
+# 
+# include/linux/pci_ids.h
+#   2004/06/18 15:24:53-04:00 romieu at fr.zoreil.com +1 -0
+#   via-velocity: PCI ID move
+# 
+# drivers/net/via-velocity.h
+#   2004/06/18 15:32:00-04:00 romieu at fr.zoreil.com +0 -1
+#   via-velocity: PCI ID move
+# 
+# drivers/net/via-velocity.c
+#   2004/06/18 15:32:01-04:00 romieu at fr.zoreil.com +3 -2
+#   via-velocity: PCI ID move
+# 
+diff -Nru a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
+--- a/drivers/net/via-velocity.c	2004-11-05 11:37:51 +09:00
++++ b/drivers/net/via-velocity.c	2004-11-05 11:37:51 +09:00
+@@ -289,8 +289,9 @@
+  */
+ 
+ static struct pci_device_id velocity_id_table[] __devinitdata = {
+-	{0x1106, 0x3119, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &chip_info_table[0]},
+-	{0,}
++	{PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_612X,
++	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) chip_info_table},
++	{0, }
+ };
+ 
+ MODULE_DEVICE_TABLE(pci, velocity_id_table);
+diff -Nru a/drivers/net/via-velocity.h b/drivers/net/via-velocity.h
+--- a/drivers/net/via-velocity.h	2004-11-05 11:37:51 +09:00
++++ b/drivers/net/via-velocity.h	2004-11-05 11:37:51 +09:00
+@@ -37,7 +37,6 @@
+ #define OPTION_DEFAULT      { [0 ... MAX_UNITS-1] = -1}
+ 
+ #define REV_ID_VT6110       (0)
+-#define DEVICE_ID           (0x3119)
+ 
+ #define BYTE_REG_BITS_ON(x,p)       do { writeb(readb((p))|(x),(p));} while (0)
+ #define WORD_REG_BITS_ON(x,p)       do { writew(readw((p))|(x),(p));} while (0)
+diff -Nru a/include/linux/pci_ids.h b/include/linux/pci_ids.h
+--- a/include/linux/pci_ids.h	2004-11-05 11:37:51 +09:00
++++ b/include/linux/pci_ids.h	2004-11-05 11:37:51 +09:00
+@@ -1215,6 +1215,7 @@
+ #define PCI_DEVICE_ID_VIA_8233C_0	0x3109
+ #define PCI_DEVICE_ID_VIA_8361		0x3112
+ #define PCI_DEVICE_ID_VIA_XM266		0x3116
++#define PCI_DEVICE_ID_VIA_612X		0x3119
+ #define PCI_DEVICE_ID_VIA_862X_0	0x3123
+ #define PCI_DEVICE_ID_VIA_8753_0	0x3128
+ #define PCI_DEVICE_ID_VIA_8233A		0x3147

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-02.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-02.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-02.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,64 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [PATCH] via-velocity: Rx buffers allocation rework
+## DP: Patch author: Francois Romieu <romieu at fr.zoreil.com>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: romieu (BitKeeper)
+# cset: 1.1757.6.5 (2.6) key=40d794ecl91sp3GhdHCCo9kg_q2pyg
+# inclusion: upstream
+# descrition: [PATCH] via-velocity: Rx buffers allocation rework
+# revision date: Fri, 05 Nov 2004 11:38:01 +0900
+#
+# rset: ChangeSet|1.1757.6.4..1.1757.6.5
+# rset: drivers/net/via-velocity.c|1.5..1.6
+# rset: drivers/net/via-velocity.h|1.2..1.3
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/06/21 22:09:48-04:00 romieu at fr.zoreil.com 
+#   [PATCH] via-velocity: Rx buffers allocation rework
+#   
+#   Rework of the Rx buffers allocation:
+#   - Rx irq handler (velocity_rx_srv): defer the Rx buffer allocation until
+#     the packet processing loop is done;
+#   - a separate index related to the Rx descriptor ("rd_dirty") is introduced
+#     to distinguish the first Rx descriptor whose buffer has to be refilled.
+#     This way the driver does not need to confuse this descriptor with the
+#     most recently netif()ed one. Rationale: batch + rx_copybreak;
+#   - dirty/empty Rx descriptors are identified through the whole driver
+#     via an adequate NULL pointer in the velocity_rd_info[] array (see
+#     velocity_rx_refill() and velocity_receive_frame());
+#   - Rx descriptors need to be grouped by a multiple of 4 before they can
+#     be handed back to the asic (hardware constraint). This task is moved
+#     from the Rx processing loop to the Rx refill function;
+#   - factorization of code in velocity_init_rd_ring().
+# 
+# drivers/net/via-velocity.h
+#   2004/06/21 15:38:34-04:00 romieu at fr.zoreil.com +2 -1
+#   via-velocity: Rx buffers allocation rework
+# 
+# drivers/net/via-velocity.c
+#   2004/06/21 15:40:41-04:00 romieu at fr.zoreil.com +60 -47
+#   via-velocity: Rx buffers allocation rework
+# Reoved for Debian kernel-source-2.6.8 as it is included in 1.1803.34.1
+# 
+diff -Nru a/drivers/net/via-velocity.h b/drivers/net/via-velocity.h
+--- a/drivers/net/via-velocity.h	2004-11-05 11:38:01 +09:00
++++ b/drivers/net/via-velocity.h	2004-11-05 11:38:01 +09:00
+@@ -1771,7 +1771,8 @@
+ 	struct velocity_td_info *td_infos[TX_QUEUE_NO];
+ 
+ 	int rd_curr;
+-	int rd_used;
++	int rd_dirty;
++	u32 rd_filled;
+ 	struct rx_desc *rd_ring;
+ 	struct velocity_rd_info *rd_info;	/* It's an array */
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-03.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-03.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-03.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,65 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [PATCH] #ifdef cleanups in drivers/net
+## DP: Patch author: Valdis.Kletnieks at vt.edu
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: Valdis.Kletnieks (BitKeeper)
+# cset: 1.1832.32.51 (2.6) key=412f728fHOX4au9l001ND9KcY_uR4A
+# inclusion: upstream
+# descrition: [PATCH] #ifdef cleanups in drivers/net
+# revision date: Fri, 05 Nov 2004 11:38:10 +0900
+#
+# rset: ChangeSet|1.1832.32.50..1.1832.32.51
+# rset: drivers/net/amd8111e.c|1.21..1.22
+# rset: drivers/net/via-velocity.h|1.4..1.5
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/08/27 10:42:39-07:00 Valdis.Kletnieks at vt.edu 
+#   [PATCH] #ifdef cleanups in drivers/net
+#   
+#   Here's the last of them for 2.6.9-rc1 - two more #if/#ifdef cleanups.
+#   
+#   Signed-off-by: <valdis.kletnieks at vt.edu>
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# drivers/net/via-velocity.h
+#   2004/08/27 00:02:37-07:00 Valdis.Kletnieks at vt.edu +1 -1
+#   #ifdef cleanups in drivers/net
+# 
+# drivers/net/amd8111e.c
+#   2004/08/27 00:02:37-07:00 Valdis.Kletnieks at vt.edu +1 -1
+#   #ifdef cleanups in drivers/net
+# 
+diff -Nru a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c
+--- a/drivers/net/amd8111e.c	2004-11-05 11:38:10 +09:00
++++ b/drivers/net/amd8111e.c	2004-11-05 11:38:10 +09:00
+@@ -719,7 +719,7 @@
+ 	return 0;
+ }
+ 
+-#if CONFIG_AMD8111E_NAPI 
++#ifdef CONFIG_AMD8111E_NAPI
+ /* This function handles the driver receive operation in polling mode */
+ static int amd8111e_rx_poll(struct net_device *dev, int * budget)
+ {
+diff -Nru a/drivers/net/via-velocity.h b/drivers/net/via-velocity.h
+--- a/drivers/net/via-velocity.h	2004-11-05 11:38:10 +09:00
++++ b/drivers/net/via-velocity.h	2004-11-05 11:38:10 +09:00
+@@ -1739,7 +1739,7 @@
+ 	struct net_device *dev;
+ 	struct net_device_stats stats;
+ 
+-#if CONFIG_PM
++#ifdef CONFIG_PM
+ 	u32 pci_state[16];
+ #endif
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-04.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-04.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-04.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,1048 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Merge
+## DP: Patch author: various
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: jgarzik (BitKeeper)
+# cset: 1.1803.34.1 (2.6) key=4106922eiCFuZxDC8i7Kp6IeI0SxSw
+# inclusion: upstream
+# descrition: Merge pobox.com:/spare/repo/linux-2.6
+# revision date: Fri, 05 Nov 2004 10:59:31 +0900
+#
+# rset: ChangeSet|1.1803.21.64+1.1784.1.1..1.1803.34.1
+# rset: drivers/net/via-velocity.c|1.1.1.1..1.12
+# rset: drivers/net/Kconfig|1.79.5.3..1.79.3.2
+# rset: include/linux/pci_ids.h|1.170..1.171
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/07/27 13:34:38-04:00 jgarzik at pobox.com 
+#   Merge pobox.com:/spare/repo/linux-2.6
+#   into pobox.com:/spare/repo/netdev-2.6/velocity
+# 
+# include/linux/pci_ids.h
+#   2004/07/27 13:34:33-04:00 jgarzik at pobox.com +0 -0
+#   Auto merged
+# 
+# drivers/net/via-velocity.c
+#   2004/07/27 13:34:33-04:00 jgarzik at pobox.com +0 -0
+#   Auto merged
+# 
+# drivers/net/Kconfig
+#   2004/07/27 13:34:33-04:00 jgarzik at pobox.com +0 -0
+#   Auto merged
+# 
+# ChangeSet
+#   2004/07/03 02:21:07-04:00 jgarzik at pobox.com 
+#   Merge pobox.com:/spare/repo/linux-2.6
+#   into pobox.com:/spare/repo/netdev-2.6/velocity
+# 
+# include/linux/pci_ids.h
+#   2004/07/03 02:21:04-04:00 jgarzik at pobox.com +0 -0
+#   Auto merged
+# Removed for Debian kernel-source-2.6.8
+# 
+# ChangeSet
+#   2004/07/03 02:20:30-04:00 romieu at fr.zoreil.com 
+#   [PATCH] via-velocity: use common crc16 code for WOL
+#   
+#   - use common crc16 code for WOL;
+#   - remove unused ether_crc.
+#   
+#   Signed-off-by: Francois Romieu <romieu at fr.zoreil.com>
+# 
+# drivers/net/via-velocity.c
+#   2004/06/30 16:31:05-04:00 romieu at fr.zoreil.com +4 -105
+#   via-velocity: use common crc16 code for WOL
+# 
+# drivers/net/Kconfig
+#   2004/06/30 16:31:05-04:00 romieu at fr.zoreil.com +1 -0
+#   via-velocity: use common crc16 code for WOL
+# 
+# ChangeSet
+#   2004/07/02 15:01:24-04:00 jgarzik at pobox.com 
+#   Merge pobox.com:/spare/repo/linux-2.6
+#   into pobox.com:/spare/repo/netdev-2.6/velocity
+# 
+# include/linux/pci_ids.h
+#   2004/07/02 15:01:20-04:00 jgarzik at pobox.com +0 -0
+#   Auto merged
+# Removed for Debian kernel-source-2.6.8
+# 
+# ChangeSet
+#   2004/06/22 00:37:39-04:00 akpm at osdl.org 
+#   [PATCH] via-velocity warning fixes
+#   
+#   With CONFIG_PM=n various functions (such as velocity_set_wol) are unused
+#   and we get warnings and unused code.
+#   
+#   Fix that up by moving the functions so they fall inside the callers's #ifdef
+#   CONFIG_PM.
+#   
+#   Remove now-unneeded forward declarations.
+#   
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+# 
+# drivers/net/via-velocity.c
+#   2004/06/22 00:30:35-04:00 akpm at osdl.org +94 -98
+#   via-velocity warning fixes
+# 
+# ChangeSet
+#   2004/06/21 22:10:51-04:00 romieu at fr.zoreil.com 
+#   [PATCH] via-velocity: unneeded forward declarations
+#   
+#   Removal of unneeded forward declarations.
+# 
+# drivers/net/via-velocity.c
+#   2004/06/21 17:46:19-04:00 romieu at fr.zoreil.com +0 -4
+#   via-velocity: unneeded forward declarations
+# 
+# ChangeSet
+#   2004/06/21 22:10:42-04:00 romieu at fr.zoreil.com 
+#   [PATCH] via-velocity: ordering of Rx descriptors operations
+#   
+#   Force strict ordering of operations on Rx descriptors to avoid any issue
+#   related to inline optimization.
+# 
+# drivers/net/via-velocity.c
+#   2004/06/21 16:20:35-04:00 romieu at fr.zoreil.com +2 -0
+#   via-velocity: ordering of Rx descriptors operations
+# 
+# ChangeSet
+#   2004/06/21 22:10:33-04:00 romieu at fr.zoreil.com 
+#   [PATCH] via-velocity: Rx copybreak
+#   
+#   Handle copybreak.
+#   - velocity_rx_refill() is modified to allow the processing of a Rx desc
+#     ring wherein the empty skb slots are not necessarily contiguous. Given
+#     the preceeding changes, rx_copybreak should not need anything else;
+#   - the driver does not rely on rd_info->skb_dma set to NULL any more;
+#   - pci_dma_sync_single_for_{cpu/device} changes as a bonus;
+#   - more function documentation.
+#   
+#   Some inspiration borrowed from similar r8169 code.
+# 
+# drivers/net/via-velocity.c
+#   2004/06/21 15:50:55-04:00 romieu at fr.zoreil.com +72 -19
+#   via-velocity: Rx copybreak
+# 
+# ChangeSet
+#   2004/06/21 22:09:48-04:00 romieu at fr.zoreil.com 
+#   [PATCH] via-velocity: Rx buffers allocation rework
+#   
+#   Rework of the Rx buffers allocation:
+#   - Rx irq handler (velocity_rx_srv): defer the Rx buffer allocation until
+#     the packet processing loop is done;
+#   - a separate index related to the Rx descriptor ("rd_dirty") is introduced
+#     to distinguish the first Rx descriptor whose buffer has to be refilled.
+#     This way the driver does not need to confuse this descriptor with the
+#     most recently netif()ed one. Rationale: batch + rx_copybreak;
+#   - dirty/empty Rx descriptors are identified through the whole driver
+#     via an adequate NULL pointer in the velocity_rd_info[] array (see
+#     velocity_rx_refill() and velocity_receive_frame());
+#   - Rx descriptors need to be grouped by a multiple of 4 before they can
+#     be handed back to the asic (hardware constraint). This task is moved
+#     from the Rx processing loop to the Rx refill function;
+#   - factorization of code in velocity_init_rd_ring().
+# 
+# drivers/net/via-velocity.h
+#   2004/06/21 15:38:34-04:00 romieu at fr.zoreil.com +2 -1
+#   via-velocity: Rx buffers allocation rework
+# 
+# drivers/net/via-velocity.c
+#   2004/06/21 15:40:41-04:00 romieu at fr.zoreil.com +60 -47
+#   via-velocity: Rx buffers allocation rework
+# 
+# ChangeSet
+#   2004/06/19 17:06:39-04:00 akpm at osdl.org 
+#   [PATCH] fix via-velocity oopses
+#   
+#   - Don't register the inet_addr notifier if the hardware is absent.  It
+#     oopses when other interfaces are being upped.
+#   
+#   - Mark velocity_remove1() as __devexit_p in the pci_driver table.
+#   
+#   - c99ification.
+#   
+#   
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+# 
+# drivers/net/via-velocity.c
+#   2004/06/03 02:14:38-04:00 akpm at osdl.org +18 -11
+#   fix via-velocity oopses
+# 
+# ChangeSet
+#   2004/06/19 17:02:30-04:00 romieu at fr.zoreil.com 
+#   [PATCH] via-velocity: velocity_receive_frame diets
+#   
+#   Weight loss in velocity_receive_frame():
+#   - isolate the ip header alignment tsk from velocity_receive_frame();
+#   - following p.30 of the datasheet, rdesc0.len includes the CRC length:
+#     the amount of data copied during the ip alignment can be shortened.
+# 
+# drivers/net/via-velocity.c
+#   2004/06/18 15:58:58-04:00 romieu at fr.zoreil.com +26 -10
+#   via-velocity: velocity_receive_frame diets
+# 
+# ChangeSet
+#   2004/06/19 17:02:22-04:00 romieu at fr.zoreil.com 
+#   [PATCH] via-velocity: uniformize use of OWNED_BY_NIC
+#   
+#   Introduce velocity_give_rx_desc() to uniformize the use of OWNED_BY_NIC
+#   through the driver.
+# 
+# drivers/net/via-velocity.c
+#   2004/06/18 15:34:14-04:00 romieu at fr.zoreil.com +9 -4
+#   via-velocity: uniformize use of OWNED_BY_NIC
+# 
+# ChangeSet
+#   2004/06/19 17:02:13-04:00 romieu at fr.zoreil.com 
+#   [PATCH] via-velocity: PCI ID move
+#   
+#   (Note: this serie requires a -mm based kernel as the via-velocity patches
+#   are not included in Jeff's -netdev patches).
+#   
+#   
+#   
+#   PCI ID moved from the driver to the kernel database. A change for the
+#   pci.ids file project at souceforge has been submitted as well.
+# 
+# include/linux/pci_ids.h
+#   2004/06/18 15:24:53-04:00 romieu at fr.zoreil.com +1 -0
+#   via-velocity: PCI ID move
+# Removed for Debian kernel-source-2.6.8
+# 
+# drivers/net/via-velocity.h
+#   2004/06/18 15:32:00-04:00 romieu at fr.zoreil.com +0 -1
+#   via-velocity: PCI ID move
+# 
+# drivers/net/via-velocity.c
+#   2004/06/18 15:32:01-04:00 romieu at fr.zoreil.com +3 -2
+#   via-velocity: PCI ID move
+# Removed for Debian kernel-source-2.6.8 as it is included in 1.1757.6.1
+# 
+diff -Nru a/drivers/net/Kconfig b/drivers/net/Kconfig
+--- a/drivers/net/Kconfig	2004-11-05 10:59:31 +09:00
++++ b/drivers/net/Kconfig	2004-11-05 10:59:31 +09:00
+@@ -1746,6 +1746,7 @@
+ 	tristate "VIA Velocity support"
+ 	depends on NET_PCI && PCI
+ 	select CRC32
++	select CRC16
+ 	select MII
+ 	help
+ 	  If you have a VIA "Velocity" based network card say Y here.
+diff -Nru a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
+--- a/drivers/net/via-velocity.c	2004-11-05 10:59:31 +09:00
++++ b/drivers/net/via-velocity.c	2004-11-05 10:59:31 +09:00
+@@ -78,6 +78,8 @@
+ #include <linux/ip.h>
+ #include <linux/tcp.h>
+ #include <linux/udp.h>
++#include <linux/crc16.h>
++#include <linux/crc32.h>
+ 
+ #include "via-velocity.h"
+ 
+@@ -226,7 +228,10 @@
+ 
+ VELOCITY_PARAM(int_works, "Number of packets per interrupt services");
+ 
+-static int velocity_found1(struct pci_dev *pdev, const struct pci_device_id *ent);
++static int rx_copybreak = 200;
++MODULE_PARM(rx_copybreak, "i");
++MODULE_PARM_DESC(rx_copybreak, "Copy breakpoint for copy-only-tiny-frames");
++
+ static void velocity_init_info(struct pci_dev *pdev, struct velocity_info *vptr, struct velocity_info_tbl *info);
+ static int velocity_get_pci_info(struct velocity_info *, struct pci_dev *pdev);
+ static void velocity_print_info(struct velocity_info *vptr);
+@@ -238,10 +243,8 @@
+ static struct net_device_stats *velocity_get_stats(struct net_device *dev);
+ static int velocity_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
+ static int velocity_close(struct net_device *dev);
+-static int velocity_rx_srv(struct velocity_info *vptr, int status);
+ static int velocity_receive_frame(struct velocity_info *, int idx);
+ static int velocity_alloc_rx_buf(struct velocity_info *, int idx);
+-static void velocity_init_registers(struct velocity_info *vptr, enum velocity_init_type type);
+ static void velocity_free_rd_ring(struct velocity_info *vptr);
+ static void velocity_free_tx_buf(struct velocity_info *vptr, struct velocity_td_info *);
+ static int velocity_soft_reset(struct velocity_info *vptr);
+@@ -254,12 +257,8 @@
+ static void enable_mii_autopoll(struct mac_regs * regs);
+ static int velocity_mii_read(struct mac_regs *, u8 byIdx, u16 * pdata);
+ static int velocity_mii_write(struct mac_regs *, u8 byMiiAddr, u16 data);
+-static int velocity_set_wol(struct velocity_info *vptr);
+-static void velocity_save_context(struct velocity_info *vptr, struct velocity_context *context);
+-static void velocity_restore_context(struct velocity_info *vptr, struct velocity_context *context);
+ static u32 mii_check_media_mode(struct mac_regs * regs);
+ static u32 check_connection_type(struct mac_regs * regs);
+-static void velocity_init_cam_filter(struct velocity_info *vptr);
+ static int velocity_set_media_mode(struct velocity_info *vptr, u32 mii_status);
+ 
+ #ifdef CONFIG_PM
+@@ -269,8 +268,9 @@
+ static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr);
+ 
+ static struct notifier_block velocity_inetaddr_notifier = {
+-      notifier_call:velocity_netdev_event,
++      .notifier_call	= velocity_netdev_event,
+ };
++static int velocity_notifier_registered;
+ 
+ #endif				/* CONFIG_PM */
+ 
+@@ -463,6 +464,12 @@
+ 	}
+ }
+ 
++static inline void velocity_give_rx_desc(struct rx_desc *rd)
++{
++	*(u32 *)&rd->rdesc0 = 0;
++	rd->rdesc0.owner = cpu_to_le32(OWNED_BY_NIC);
++}
++
+ /**
+  *	velocity_rx_reset	-	handle a receive reset
+  *	@vptr: velocity we are resetting
+@@ -477,13 +484,13 @@
+ 	struct mac_regs * regs = vptr->mac_regs;
+ 	int i;
+ 
+-	vptr->rd_used = vptr->rd_curr = 0;
++	vptr->rd_dirty = vptr->rd_filled = vptr->rd_curr = 0;
+ 
+ 	/*
+ 	 *	Init state, all RD entries belong to the NIC
+ 	 */
+ 	for (i = 0; i < vptr->options.numrx; ++i)
+-		vptr->rd_ring[i].rdesc0.owner = cpu_to_le32(OWNED_BY_NIC);
++		velocity_give_rx_desc(vptr->rd_ring + i);
+ 
+ 	writew(vptr->options.numrx, &regs->RBRDU);
+ 	writel(vptr->rd_pool_dma, &regs->RDBaseLo);
+@@ -776,6 +783,12 @@
+ 	
+ 	pci_set_power_state(pdev, 3);
+ out:
++#ifdef CONFIG_PM
++	if (ret == 0 && !velocity_notifier_registered) {
++		velocity_notifier_registered = 1;
++		register_inetaddr_notifier(&velocity_inetaddr_notifier);
++	}
++#endif
+ 	return ret;
+ 
+ err_iounmap:
+@@ -966,6 +979,60 @@
+ 	pci_free_consistent(vptr->pdev, size, vptr->tx_bufs, vptr->tx_bufs_dma);
+ }
+ 
++static inline void velocity_give_many_rx_descs(struct velocity_info *vptr)
++{
++	struct mac_regs *regs = vptr->mac_regs;
++	int avail, dirty, unusable;
++
++	/*
++	 * RD number must be equal to 4X per hardware spec
++	 * (programming guide rev 1.20, p.13)
++	 */
++	if (vptr->rd_filled < 4)
++		return;
++
++	wmb();
++
++	unusable = vptr->rd_filled | 0x0003;
++	dirty = vptr->rd_dirty - unusable + 1;
++	for (avail = vptr->rd_filled & 0xfffc; avail; avail--) {
++		dirty = (dirty > 0) ? dirty - 1 : vptr->options.numrx - 1;
++		velocity_give_rx_desc(vptr->rd_ring + dirty);
++	}
++
++	writew(vptr->rd_filled & 0xfffc, &regs->RBRDU);
++	vptr->rd_filled = unusable;
++}
++
++static int velocity_rx_refill(struct velocity_info *vptr)
++{
++	int dirty = vptr->rd_dirty, done = 0, ret = 0;
++
++	do {
++		struct rx_desc *rd = vptr->rd_ring + dirty;
++
++		/* Fine for an all zero Rx desc at init time as well */
++		if (rd->rdesc0.owner == cpu_to_le32(OWNED_BY_NIC))
++			break;
++
++		if (!vptr->rd_info[dirty].skb) {
++			ret = velocity_alloc_rx_buf(vptr, dirty);
++			if (ret < 0)
++				break;
++		}
++		done++;
++		dirty = (dirty < vptr->options.numrx - 1) ? dirty + 1 : 0;	
++	} while (dirty != vptr->rd_curr);
++
++	if (done) {
++		vptr->rd_dirty = dirty;
++		vptr->rd_filled += done;
++		velocity_give_many_rx_descs(vptr);
++	}
++
++	return ret;
++}
++
+ /**
+  *	velocity_init_rd_ring	-	set up receive ring
+  *	@vptr: velocity to configure
+@@ -976,9 +1043,7 @@
+ 
+ static int velocity_init_rd_ring(struct velocity_info *vptr)
+ {
+-	int i, ret = -ENOMEM;
+-	struct rx_desc *rd;
+-	struct velocity_rd_info *rd_info;
++	int ret = -ENOMEM;
+ 	unsigned int rsize = sizeof(struct velocity_rd_info) * 
+ 					vptr->options.numrx;
+ 
+@@ -987,22 +1052,14 @@
+ 		goto out;
+ 	memset(vptr->rd_info, 0, rsize);
+ 
+-	/* Init the RD ring entries */
+-	for (i = 0; i < vptr->options.numrx; i++) {
+-		rd = &(vptr->rd_ring[i]);
+-		rd_info = &(vptr->rd_info[i]);
++	vptr->rd_filled = vptr->rd_dirty = vptr->rd_curr = 0;
+ 
+-		ret = velocity_alloc_rx_buf(vptr, i);
+-		if (ret < 0) {
+-			VELOCITY_PRT(MSG_LEVEL_ERR, KERN_ERR
+-				"%s: failed to allocate RX buffer.\n", 
+-				vptr->dev->name);
+-			velocity_free_rd_ring(vptr);
+-			goto out;
+-		}
+-		rd->rdesc0.owner = OWNED_BY_NIC;
++	ret = velocity_rx_refill(vptr);
++	if (ret < 0) {
++		VELOCITY_PRT(MSG_LEVEL_ERR, KERN_ERR
++			"%s: failed to allocate RX buffer.\n", vptr->dev->name);
++		velocity_free_rd_ring(vptr);
+ 	}
+-	vptr->rd_used = vptr->rd_curr = 0;
+ out:
+ 	return ret;
+ }
+@@ -1025,7 +1082,7 @@
+ 	for (i = 0; i < vptr->options.numrx; i++) {
+ 		struct velocity_rd_info *rd_info = &(vptr->rd_info[i]);
+ 
+-		if (!rd_info->skb_dma)
++		if (!rd_info->skb)
+ 			continue;
+ 		pci_unmap_single(vptr->pdev, rd_info->skb_dma, vptr->rx_buf_sz,
+ 				 PCI_DMA_FROMDEVICE);
+@@ -1146,22 +1203,14 @@
+  
+ static int velocity_rx_srv(struct velocity_info *vptr, int status)
+ {
+-	struct rx_desc *rd;
+ 	struct net_device_stats *stats = &vptr->stats;
+-	struct mac_regs * regs = vptr->mac_regs;
+ 	int rd_curr = vptr->rd_curr;
+ 	int works = 0;
+ 
+ 	while (1) {
++		struct rx_desc *rd = vptr->rd_ring + rd_curr;
+ 
+-		rd = &(vptr->rd_ring[rd_curr]);
+-
+-		if ((vptr->rd_info[rd_curr]).skb == NULL) {
+-			if (velocity_alloc_rx_buf(vptr, rd_curr) < 0)
+-				break;
+-		}
+-
+-		if (works++ > 15)
++		if (!vptr->rd_info[rd_curr].skb || (works++ > 15))
+ 			break;
+ 
+ 		if (rd->rdesc0.owner == OWNED_BY_NIC)
+@@ -1169,17 +1218,10 @@
+ 
+ 		/*
+ 		 *	Don't drop CE or RL error frame although RXOK is off
+-		 *	FIXME: need to handle copybreak
+ 		 */
+ 		if ((rd->rdesc0.RSR & RSR_RXOK) || (!(rd->rdesc0.RSR & RSR_RXOK) && (rd->rdesc0.RSR & (RSR_CE | RSR_RL)))) {
+-			if (velocity_receive_frame(vptr, rd_curr) == 0) {
+-				if (velocity_alloc_rx_buf(vptr, rd_curr) < 0) {
+-					VELOCITY_PRT(MSG_LEVEL_ERR, KERN_ERR "%s: can not allocate rx buf\n", vptr->dev->name);
+-					break;
+-				}
+-			} else {
++			if (velocity_receive_frame(vptr, rd_curr) < 0)
+ 				stats->rx_dropped++;
+-			}
+ 		} else {
+ 			if (rd->rdesc0.RSR & RSR_CRC)
+ 				stats->rx_crc_errors++;
+@@ -1191,25 +1233,18 @@
+ 
+ 		rd->inten = 1;
+ 
+-		if (++vptr->rd_used >= 4) {
+-			int i, rd_prev = rd_curr;
+-			for (i = 0; i < 4; i++) {
+-				if (--rd_prev < 0)
+-					rd_prev = vptr->options.numrx - 1;
+-
+-				rd = &(vptr->rd_ring[rd_prev]);
+-				rd->rdesc0.owner = OWNED_BY_NIC;
+-			}
+-			writew(4, &(regs->RBRDU));
+-			vptr->rd_used -= 4;
+-		}
+-
+ 		vptr->dev->last_rx = jiffies;
+ 
+ 		rd_curr++;
+ 		if (rd_curr >= vptr->options.numrx)
+ 			rd_curr = 0;
+ 	}
++
++	if (velocity_rx_refill(vptr) < 0) {
++		VELOCITY_PRT(MSG_LEVEL_ERR, KERN_ERR
++			"%s: rx buf allocation failure\n", vptr->dev->name);
++	}
++
+ 	vptr->rd_curr = rd_curr;
+ 	VAR_USED(stats);
+ 	return works;
+@@ -1242,6 +1277,65 @@
+ }
+ 
+ /**
++ *	velocity_rx_copy	-	in place Rx copy for small packets
++ *	@rx_skb: network layer packet buffer candidate
++ *	@pkt_size: received data size
++ *	@rd: receive packet descriptor
++ *	@dev: network device
++ *
++ *	Replace the current skb that is scheduled for Rx processing by a
++ *	shorter, immediatly allocated skb, if the received packet is small
++ *	enough. This function returns a negative value if the received
++ *	packet is too big or if memory is exhausted.
++ */
++static inline int velocity_rx_copy(struct sk_buff **rx_skb, int pkt_size,
++				   struct velocity_info *vptr)
++{
++	int ret = -1;
++
++	if (pkt_size < rx_copybreak) {
++		struct sk_buff *new_skb;
++
++		new_skb = dev_alloc_skb(pkt_size + 2);
++		if (new_skb) {
++			new_skb->dev = vptr->dev;
++			new_skb->ip_summed = rx_skb[0]->ip_summed;
++
++			if (vptr->flags & VELOCITY_FLAGS_IP_ALIGN)
++				skb_reserve(new_skb, 2);
++
++			memcpy(new_skb->data, rx_skb[0]->tail, pkt_size);
++			*rx_skb = new_skb;
++			ret = 0;
++		}
++		
++	}
++	return ret;
++}
++
++/**
++ *	velocity_iph_realign	-	IP header alignment
++ *	@vptr: velocity we are handling
++ *	@skb: network layer packet buffer
++ *	@pkt_size: received data size
++ *
++ *	Align IP header on a 2 bytes boundary. This behavior can be
++ *	configured by the user.
++ */
++static inline void velocity_iph_realign(struct velocity_info *vptr,
++					struct sk_buff *skb, int pkt_size)
++{
++	/* FIXME - memmove ? */
++	if (vptr->flags & VELOCITY_FLAGS_IP_ALIGN) {
++		int i;
++
++		for (i = pkt_size; i >= 0; i--)
++			*(skb->data + i + 2) = *(skb->data + i);
++		skb_reserve(skb, 2);
++	}
++}
++
++/**
+  *	velocity_receive_frame	-	received packet processor
+  *	@vptr: velocity we are handling
+  *	@idx: ring index
+@@ -1252,9 +1346,11 @@
+  
+ static int velocity_receive_frame(struct velocity_info *vptr, int idx)
+ {
++	void (*pci_action)(struct pci_dev *, dma_addr_t, size_t, int);
+ 	struct net_device_stats *stats = &vptr->stats;
+ 	struct velocity_rd_info *rd_info = &(vptr->rd_info[idx]);
+ 	struct rx_desc *rd = &(vptr->rd_ring[idx]);
++	int pkt_len = rd->rdesc0.len;
+ 	struct sk_buff *skb;
+ 
+ 	if (rd->rdesc0.RSR & (RSR_STP | RSR_EDP)) {
+@@ -1269,22 +1365,8 @@
+ 	skb = rd_info->skb;
+ 	skb->dev = vptr->dev;
+ 
+-	pci_unmap_single(vptr->pdev, rd_info->skb_dma, vptr->rx_buf_sz, 
+-							PCI_DMA_FROMDEVICE);
+-	rd_info->skb_dma = (dma_addr_t) NULL;
+-	rd_info->skb = NULL;
+-
+-	/* FIXME - memmove ? */
+-	if (vptr->flags & VELOCITY_FLAGS_IP_ALIGN) {
+-		int i;
+-		for (i = rd->rdesc0.len + 4; i >= 0; i--)
+-			*(skb->data + i + 2) = *(skb->data + i);
+-		skb->data += 2;
+-		skb->tail += 2;
+-	}
+-
+-	skb_put(skb, (rd->rdesc0.len - 4));
+-	skb->protocol = eth_type_trans(skb, skb->dev);
++	pci_dma_sync_single_for_cpu(vptr->pdev, rd_info->skb_dma,
++				    vptr->rx_buf_sz, PCI_DMA_FROMDEVICE);
+ 
+ 	/*
+ 	 *	Drop frame not meeting IEEE 802.3
+@@ -1297,13 +1379,23 @@
+ 		}
+ 	}
+ 
++	pci_action = pci_dma_sync_single_for_device;
++
+ 	velocity_rx_csum(rd, skb);
+-	
+-	/*
+-	 *	FIXME: need rx_copybreak handling
+-	 */
+ 
+-	stats->rx_bytes += skb->len;
++	if (velocity_rx_copy(&skb, pkt_len, vptr) < 0) {
++		velocity_iph_realign(vptr, skb, pkt_len);
++		pci_action = pci_unmap_single;
++		rd_info->skb = NULL;
++	}
++
++	pci_action(vptr->pdev, rd_info->skb_dma, vptr->rx_buf_sz,
++		   PCI_DMA_FROMDEVICE);
++
++	skb_put(skb, pkt_len - 4);
++	skb->protocol = eth_type_trans(skb, skb->dev);	
++
++	stats->rx_bytes += pkt_len;
+ 	netif_rx(skb);
+ 
+ 	return 0;
+@@ -1963,32 +2055,6 @@
+ 
+ 
+ /**
+- *	ether_crc	-	ethernet CRC function
+- *
+- *	Compute an ethernet CRC hash of the data block provided. This
+- *	is not performance optimised but is not needed in performance
+- *	critical code paths.
+- *
+- *	FIXME: could we use shared code here ?
+- */
+- 
+-static inline u32 ether_crc(int length, unsigned char *data)
+-{
+-	static unsigned const ethernet_polynomial = 0x04c11db7U;
+-	
+-	int crc = -1;
+-
+-	while (--length >= 0) {
+-		unsigned char current_octet = *data++;
+-		int bit;
+-		for (bit = 0; bit < 8; bit++, current_octet >>= 1) {
+-			crc = (crc << 1) ^ ((crc < 0) ^ (current_octet & 1) ? ethernet_polynomial : 0);
+-		}
+-	}
+-	return crc;
+-}
+-
+-/**
+  *	velocity_set_multi	-	filter list change callback
+  *	@dev: network device
+  *
+@@ -2123,13 +2189,13 @@
+  */
+  
+ static struct pci_driver velocity_driver = {
+-      name:VELOCITY_NAME,
+-      id_table:velocity_id_table,
+-      probe:velocity_found1,
+-      remove:velocity_remove1,
++      .name	= VELOCITY_NAME,
++      .id_table	= velocity_id_table,
++      .probe	= velocity_found1,
++      .remove	= __devexit_p(velocity_remove1),
+ #ifdef CONFIG_PM
+-      suspend:velocity_suspend,
+-      resume:velocity_resume,
++      .suspend	= velocity_suspend,
++      .resume	= velocity_resume,
+ #endif
+ };
+ 
+@@ -2147,9 +2213,6 @@
+ 	int ret;
+ 	ret = pci_module_init(&velocity_driver);
+ 
+-#ifdef CONFIG_PM
+-	register_inetaddr_notifier(&velocity_inetaddr_notifier);
+-#endif
+ 	return ret;
+ }
+ 
+@@ -2165,7 +2228,10 @@
+ static void __exit velocity_cleanup_module(void)
+ {
+ #ifdef CONFIG_PM
+-	unregister_inetaddr_notifier(&velocity_inetaddr_notifier);
++	if (velocity_notifier_registered) {
++		unregister_inetaddr_notifier(&velocity_inetaddr_notifier);
++		velocity_notifier_registered = 0;
++	}
+ #endif
+ 	pci_unregister_driver(&velocity_driver);
+ }
+@@ -2992,172 +3058,6 @@
+ 
+ }
+ 
+-static int velocity_suspend(struct pci_dev *pdev, u32 state)
+-{
+-	struct velocity_info *vptr = pci_get_drvdata(pdev);
+-	unsigned long flags;
+-	
+-	if(!netif_running(vptr->dev))
+-		return 0;
+-		
+-	netif_device_detach(vptr->dev);
+-	
+-	spin_lock_irqsave(&vptr->lock, flags);
+-	pci_save_state(pdev, vptr->pci_state);
+-#ifdef ETHTOOL_GWOL
+-	if (vptr->flags & VELOCITY_FLAGS_WOL_ENABLED) {
+-		velocity_get_ip(vptr);
+-		velocity_save_context(vptr, &vptr->context);
+-		velocity_shutdown(vptr);
+-		velocity_set_wol(vptr);
+-		pci_enable_wake(pdev, 3, 1);
+-		pci_set_power_state(pdev, 3);
+-	} else {
+-		velocity_save_context(vptr, &vptr->context);
+-		velocity_shutdown(vptr);
+-		pci_disable_device(pdev);
+-		pci_set_power_state(pdev, state);
+-	}
+-#else
+-	pci_set_power_state(pdev, state);
+-#endif
+-	spin_unlock_irqrestore(&vptr->lock, flags);
+-	return 0;
+-}
+-
+-static int velocity_resume(struct pci_dev *pdev)
+-{
+-	struct velocity_info *vptr = pci_get_drvdata(pdev);
+-	unsigned long flags;
+-	int i;
+-	
+-	if(!netif_running(vptr->dev))
+-		return 0;
+-		
+-	pci_set_power_state(pdev, 0);
+-	pci_enable_wake(pdev, 0, 0);
+-	pci_restore_state(pdev, vptr->pci_state);
+-
+-	mac_wol_reset(vptr->mac_regs);
+-
+-	spin_lock_irqsave(&vptr->lock, flags);
+-	velocity_restore_context(vptr, &vptr->context);
+-	velocity_init_registers(vptr, VELOCITY_INIT_WOL);
+-	mac_disable_int(vptr->mac_regs);
+-
+-	velocity_tx_srv(vptr, 0);
+-
+-	for (i = 0; i < vptr->num_txq; i++) {
+-		if (vptr->td_used[i]) {
+-			mac_tx_queue_wake(vptr->mac_regs, i);
+-		}
+-	}
+-
+-	mac_enable_int(vptr->mac_regs);
+-	spin_unlock_irqrestore(&vptr->lock, flags);
+-	netif_device_attach(vptr->dev);
+-
+-	return 0;
+-}
+-
+-static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr)
+-{
+-	struct in_ifaddr *ifa = (struct in_ifaddr *) ptr;
+-	struct net_device *dev;
+-	struct velocity_info *vptr;
+-
+-	if (ifa) {
+-		dev = ifa->ifa_dev->dev;
+-		vptr = dev->priv;
+-		velocity_get_ip(vptr);
+-	}
+-	return NOTIFY_DONE;
+-}
+-#endif
+-
+-/*
+- * Purpose: Functions to set WOL.
+- */
+-
+-const static unsigned short crc16_tab[256] = {
+-	0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
+-	0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
+-	0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e,
+-	0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876,
+-	0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd,
+-	0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5,
+-	0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c,
+-	0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974,
+-	0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb,
+-	0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3,
+-	0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a,
+-	0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72,
+-	0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9,
+-	0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1,
+-	0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738,
+-	0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70,
+-	0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7,
+-	0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff,
+-	0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036,
+-	0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e,
+-	0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5,
+-	0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd,
+-	0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134,
+-	0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c,
+-	0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3,
+-	0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb,
+-	0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232,
+-	0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a,
+-	0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1,
+-	0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9,
+-	0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
+-	0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
+-};
+-
+-
+-static u32 mask_pattern[2][4] = {
+-	{0x00203000, 0x000003C0, 0x00000000, 0x0000000},	/* ARP		*/
+-	{0xfffff000, 0xffffffff, 0xffffffff, 0x000ffff}		/* Magic Packet */ 
+-};
+-
+-/**
+- *	ether_crc16	-	compute ethernet CRC
+- *	@len: buffer length
+- *	@cp: buffer
+- *	@crc16: initial CRC
+- *
+- *	Compute a CRC value for a block of data. 
+- *	FIXME: can we use generic functions ?
+- */
+- 
+-static u16 ether_crc16(int len, u8 * cp, u16 crc16)
+-{
+-	while (len--)
+-		crc16 = (crc16 >> 8) ^ crc16_tab[(crc16 ^ *cp++) & 0xff];
+-	return (crc16);
+-}
+-
+-/**
+- *	bit_reverse		-	16bit reverse
+- *	@data: 16bit data t reverse
+- *
+- *	Reverse the order of a 16bit value and return the reversed bits
+- */
+- 
+-static u16 bit_reverse(u16 data)
+-{
+-	u32 new = 0x00000000;
+-	int ii;
+-
+-
+-	for (ii = 0; ii < 16; ii++) {
+-		new |= ((u32) (data & 1) << (31 - ii));
+-		data >>= 1;
+-	}
+-
+-	return (u16) (new >> 16);
+-}
+-
+ /**
+  *	wol_calc_crc		-	WOL CRC
+  *	@pattern: data pattern
+@@ -3166,7 +3066,7 @@
+  *	Compute the wake on lan crc hashes for the packet header
+  *	we are interested in.
+  */
+- 
++
+ u16 wol_calc_crc(int size, u8 * pattern, u8 *mask_pattern)
+ {
+ 	u16 crc = 0xFFFF;
+@@ -3186,12 +3086,12 @@
+ 				continue;
+ 			}
+ 			mask >>= 1;
+-			crc = ether_crc16(1, &(pattern[i * 8 + j]), crc);
++			crc = crc16(crc, &(pattern[i * 8 + j]), 1);
+ 		}
+ 	}
+ 	/*	Finally, invert the result once to get the correct data */
+ 	crc = ~crc;
+-	return bit_reverse(crc);
++	return bitreverse(crc) >> 16;
+ }
+ 
+ /**
+@@ -3203,13 +3103,18 @@
+  *
+  *	FIXME: check static buffer is safe here
+  */
+- 
++
+ static int velocity_set_wol(struct velocity_info *vptr)
+ {
+ 	struct mac_regs * regs = vptr->mac_regs;
+ 	static u8 buf[256];
+ 	int i;
+ 
++	static u32 mask_pattern[2][4] = {
++		{0x00203000, 0x000003C0, 0x00000000, 0x0000000}, /* ARP */
++		{0xfffff000, 0xffffffff, 0xffffffff, 0x000ffff}	 /* Magic Packet */
++	};
++
+ 	writew(0xFFFF, &regs->WOLCRClr);
+ 	writeb(WOLCFG_SAB | WOLCFG_SAM, &regs->WOLCFGSet);
+ 	writew(WOLCR_MAGIC_EN, &regs->WOLCRSet);
+@@ -3236,7 +3141,8 @@
+ 
+ 		memcpy(arp->ar_tip, vptr->ip_addr, 4);
+ 
+-		crc = wol_calc_crc((sizeof(struct arp_packet) + 7) / 8, buf, (u8 *) & mask_pattern[0][0]);
++		crc = wol_calc_crc((sizeof(struct arp_packet) + 7) / 8, buf,
++				(u8 *) & mask_pattern[0][0]);
+ 
+ 		writew(crc, &regs->PatternCRC[0]);
+ 		writew(WOLCR_ARP_EN, &regs->WOLCRSet);
+@@ -3275,3 +3181,85 @@
+ 	return 0;
+ }
+ 
++static int velocity_suspend(struct pci_dev *pdev, u32 state)
++{
++	struct velocity_info *vptr = pci_get_drvdata(pdev);
++	unsigned long flags;
++
++	if(!netif_running(vptr->dev))
++		return 0;
++
++	netif_device_detach(vptr->dev);
++
++	spin_lock_irqsave(&vptr->lock, flags);
++	pci_save_state(pdev, vptr->pci_state);
++#ifdef ETHTOOL_GWOL
++	if (vptr->flags & VELOCITY_FLAGS_WOL_ENABLED) {
++		velocity_get_ip(vptr);
++		velocity_save_context(vptr, &vptr->context);
++		velocity_shutdown(vptr);
++		velocity_set_wol(vptr);
++		pci_enable_wake(pdev, 3, 1);
++		pci_set_power_state(pdev, 3);
++	} else {
++		velocity_save_context(vptr, &vptr->context);
++		velocity_shutdown(vptr);
++		pci_disable_device(pdev);
++		pci_set_power_state(pdev, state);
++	}
++#else
++	pci_set_power_state(pdev, state);
++#endif
++	spin_unlock_irqrestore(&vptr->lock, flags);
++	return 0;
++}
++
++static int velocity_resume(struct pci_dev *pdev)
++{
++	struct velocity_info *vptr = pci_get_drvdata(pdev);
++	unsigned long flags;
++	int i;
++
++	if(!netif_running(vptr->dev))
++		return 0;
++
++	pci_set_power_state(pdev, 0);
++	pci_enable_wake(pdev, 0, 0);
++	pci_restore_state(pdev, vptr->pci_state);
++
++	mac_wol_reset(vptr->mac_regs);
++
++	spin_lock_irqsave(&vptr->lock, flags);
++	velocity_restore_context(vptr, &vptr->context);
++	velocity_init_registers(vptr, VELOCITY_INIT_WOL);
++	mac_disable_int(vptr->mac_regs);
++
++	velocity_tx_srv(vptr, 0);
++
++	for (i = 0; i < vptr->num_txq; i++) {
++		if (vptr->td_used[i]) {
++			mac_tx_queue_wake(vptr->mac_regs, i);
++		}
++	}
++
++	mac_enable_int(vptr->mac_regs);
++	spin_unlock_irqrestore(&vptr->lock, flags);
++	netif_device_attach(vptr->dev);
++
++	return 0;
++}
++
++static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr)
++{
++	struct in_ifaddr *ifa = (struct in_ifaddr *) ptr;
++	struct net_device *dev;
++	struct velocity_info *vptr;
++
++	if (ifa) {
++		dev = ifa->ifa_dev->dev;
++		vptr = dev->priv;
++		velocity_get_ip(vptr);
++	}
++	return NOTIFY_DONE;
++}
++#endif

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-05.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-05.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-05.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,71 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [PATCH] CRC16 renaming in VIA Velocity ethernet driver
+## DP: Patch author: Andrey Panin <pazke at donpac.ru>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: pazke (BitKeeper)
+# cset: 1.1803.144.220 (2.6) key=412a4eeatO0kCVlyT2LNUdcd4c9gAg
+# inclusion: upstream
+# descrition: [PATCH] CRC16 renaming in VIA Velocity ethernet driver
+# revision date: Fri, 05 Nov 2004 10:59:41 +0900
+#
+# rset: ChangeSet|1.1803.144.219..1.1803.144.220
+# rset: drivers/net/via-velocity.c|1.12..1.13
+# rset: drivers/net/Kconfig|1.86..1.87
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/08/23 13:09:14-07:00 pazke at donpac.ru 
+#   [PATCH] CRC16 renaming in VIA Velocity ethernet driver
+#   
+#   Signed-off-by: Andrey Panin <pazke at donpac.ru>
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+# 
+# drivers/net/via-velocity.c
+#   2004/08/23 01:15:29-07:00 pazke at donpac.ru +2 -2
+#   CRC16 renaming in VIA Velocity ethernet driver
+# 
+# drivers/net/Kconfig
+#   2004/08/23 01:15:29-07:00 pazke at donpac.ru +0 -1
+#   CRC16 renaming in VIA Velocity ethernet driver
+# 
+diff -Nru a/drivers/net/Kconfig b/drivers/net/Kconfig
+--- a/drivers/net/Kconfig	2004-11-05 10:59:41 +09:00
++++ b/drivers/net/Kconfig	2004-11-05 10:59:41 +09:00
+@@ -1746,7 +1746,6 @@
+ 	tristate "VIA Velocity support"
+ 	depends on NET_PCI && PCI
+ 	select CRC32
+-	select CRC16
+ 	select MII
+ 	help
+ 	  If you have a VIA "Velocity" based network card say Y here.
+diff -Nru a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
+--- a/drivers/net/via-velocity.c	2004-11-05 10:59:41 +09:00
++++ b/drivers/net/via-velocity.c	2004-11-05 10:59:41 +09:00
+@@ -78,7 +78,7 @@
+ #include <linux/ip.h>
+ #include <linux/tcp.h>
+ #include <linux/udp.h>
+-#include <linux/crc16.h>
++#include <linux/crc-ccitt.h>
+ #include <linux/crc32.h>
+ 
+ #include "via-velocity.h"
+@@ -3086,7 +3086,7 @@
+ 				continue;
+ 			}
+ 			mask >>= 1;
+-			crc = crc16(crc, &(pattern[i * 8 + j]), 1);
++			crc = crc_ccitt(crc, &(pattern[i * 8 + j]), 1);
+ 		}
+ 	}
+ 	/*	Finally, invert the result once to get the correct data */

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-06.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-06.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-06.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,196 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [PATCH] via-velocity: more inetaddr_notifier fix
+## DP: Patch author: Francois Romieu <romieu at fr.zoreil.com>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: akpm (BitKeeper)
+# cset: 1.1832.13.11 (2.6) key=412c06e4eBj9-JEPzz-rKBqwx-047A
+# inclusion: upstream
+# descrition: [PATCH] via-velocity: more inetaddr_notifier fix
+# revision date: Fri, 05 Nov 2004 10:59:51 +0900
+#
+# rset: ChangeSet|1.1832.13.10..1.1832.13.11
+# rset: drivers/net/via-velocity.c|1.13..1.14
+# rset: drivers/net/via-velocity.h|1.3..1.4
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/08/24 23:26:28-04:00 akpm at osdl.org 
+#   [PATCH] via-velocity: more inetaddr_notifier fix
+#   
+#   From: Francois Romieu <romieu at fr.zoreil.com>
+#   
+#   There is no guarantee that the event which gets passed is associated to a
+#   via-velocity device, thus preventing to dereference dev->priv as if it
+#   always was a struct velocity_info *.  The via-velocity devices are kept in
+#   a module private list for comparison.
+#   
+#   Signed-off-by: Francois Romieu <romieu at fr.zoreil.com>
+#   Signed-off-by: Andrew Morton <akpm at osdl.org>
+# 
+# drivers/net/via-velocity.h
+#   2004/08/24 22:18:34-04:00 akpm at osdl.org +1 -2
+#   via-velocity: more inetaddr_notifier fix
+# 
+# drivers/net/via-velocity.c
+#   2004/08/24 22:18:34-04:00 akpm at osdl.org +54 -18
+#   via-velocity: more inetaddr_notifier fix
+# 
+diff -Nru a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
+--- a/drivers/net/via-velocity.c	2004-11-05 10:59:51 +09:00
++++ b/drivers/net/via-velocity.c	2004-11-05 10:59:51 +09:00
+@@ -262,6 +262,7 @@
+ static int velocity_set_media_mode(struct velocity_info *vptr, u32 mii_status);
+ 
+ #ifdef CONFIG_PM
++
+ static int velocity_suspend(struct pci_dev *pdev, u32 state);
+ static int velocity_resume(struct pci_dev *pdev);
+ 
+@@ -270,9 +271,26 @@
+ static struct notifier_block velocity_inetaddr_notifier = {
+       .notifier_call	= velocity_netdev_event,
+ };
+-static int velocity_notifier_registered;
+ 
+-#endif				/* CONFIG_PM */
++static spinlock_t velocity_dev_list_lock = SPIN_LOCK_UNLOCKED;
++static LIST_HEAD(velocity_dev_list);
++
++static void velocity_register_notifier(void)
++{
++	register_inetaddr_notifier(&velocity_inetaddr_notifier);
++}
++
++static void velocity_unregister_notifier(void)
++{
++	unregister_inetaddr_notifier(&velocity_inetaddr_notifier);
++}
++
++#else				/* CONFIG_PM */
++
++#define velocity_register_notifier()	do {} while (0)
++#define velocity_unregister_notifier()	do {} while (0)
++
++#endif				/* !CONFIG_PM */
+ 
+ /*
+  *	Internal board variants. At the moment we have only one
+@@ -327,6 +345,14 @@
+ 	struct net_device *dev = pci_get_drvdata(pdev);
+ 	struct velocity_info *vptr = dev->priv;
+ 
++#ifdef CONFIG_PM
++	unsigned long flags;
++
++	spin_lock_irqsave(&velocity_dev_list_lock, flags);
++	if (!list_empty(&velocity_dev_list))
++		list_del(&vptr->list);
++	spin_unlock_irqrestore(&velocity_dev_list_lock, flags);
++#endif
+ 	unregister_netdev(dev);
+ 	iounmap(vptr->mac_regs);
+ 	pci_release_regions(pdev);
+@@ -782,13 +808,16 @@
+ 	/* and leave the chip powered down */
+ 	
+ 	pci_set_power_state(pdev, 3);
+-out:
+ #ifdef CONFIG_PM
+-	if (ret == 0 && !velocity_notifier_registered) {
+-		velocity_notifier_registered = 1;
+-		register_inetaddr_notifier(&velocity_inetaddr_notifier);
++	{
++		unsigned long flags;
++
++		spin_lock_irqsave(&velocity_dev_list_lock, flags);
++		list_add(&vptr->list, &velocity_dev_list);
++		spin_unlock_irqrestore(&velocity_dev_list_lock, flags);
+ 	}
+ #endif
++out:
+ 	return ret;
+ 
+ err_iounmap:
+@@ -843,6 +872,8 @@
+ 
+ 	spin_lock_init(&vptr->lock);
+ 	spin_lock_init(&vptr->xmit_lock);
++
++	INIT_LIST_HEAD(&vptr->list);
+ }
+ 
+ /**
+@@ -2211,8 +2242,11 @@
+ static int __init velocity_init_module(void)
+ {
+ 	int ret;
+-	ret = pci_module_init(&velocity_driver);
+ 
++	velocity_register_notifier();
++	ret = pci_module_init(&velocity_driver);
++	if (ret < 0)
++		velocity_unregister_notifier();
+ 	return ret;
+ }
+ 
+@@ -2227,12 +2261,7 @@
+  
+ static void __exit velocity_cleanup_module(void)
+ {
+-#ifdef CONFIG_PM
+-	if (velocity_notifier_registered) {
+-		unregister_inetaddr_notifier(&velocity_inetaddr_notifier);
+-		velocity_notifier_registered = 0;
+-	}
+-#endif
++	velocity_unregister_notifier();
+ 	pci_unregister_driver(&velocity_driver);
+ }
+ 
+@@ -3252,13 +3281,20 @@
+ static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr)
+ {
+ 	struct in_ifaddr *ifa = (struct in_ifaddr *) ptr;
+-	struct net_device *dev;
+-	struct velocity_info *vptr;
+ 
+ 	if (ifa) {
+-		dev = ifa->ifa_dev->dev;
+-		vptr = dev->priv;
+-		velocity_get_ip(vptr);
++		struct net_device *dev = ifa->ifa_dev->dev;
++		struct velocity_info *vptr;
++		unsigned long flags;
++
++		spin_lock_irqsave(&velocity_dev_list_lock, flags);
++		list_for_each_entry(vptr, &velocity_dev_list, list) {
++			if (vptr->dev == dev) {
++				velocity_get_ip(vptr);
++				break;
++			}
++		}
++		spin_unlock_irqrestore(&velocity_dev_list_lock, flags);
+ 	}
+ 	return NOTIFY_DONE;
+ }
+diff -Nru a/drivers/net/via-velocity.h b/drivers/net/via-velocity.h
+--- a/drivers/net/via-velocity.h	2004-11-05 10:59:51 +09:00
++++ b/drivers/net/via-velocity.h	2004-11-05 10:59:51 +09:00
+@@ -1733,8 +1733,7 @@
+ };
+ 
+ struct velocity_info {
+-	struct velocity_info *next;
+-	struct velocity_info *prev;
++	struct list_head list;
+ 
+ 	struct pci_dev *pdev;
+ 	struct net_device *dev;

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-07.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-07.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-07.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,72 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [PATCH] via-velocity: properly manage the count of adapters
+## DP: Patch author: Tejun Heo <tj at home-tj.org>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: romieu (BitKeeper)
+# cset: 1.1988.54.2 (2.6) key=4161bc26pxXCHECI3j2fS0f04iJlDA
+# inclusion: upstream
+# descrition: [PATCH] via-velocity: properly manage the count of adapters
+# revision date: Fri, 05 Nov 2004 11:00:01 +0900
+#
+# rset: ChangeSet|1.1988.54.1..1.1988.54.2
+# rset: drivers/net/via-velocity.c|1.14..1.15
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/04 17:09:58-04:00 romieu at fr.zoreil.com 
+#   [PATCH] via-velocity: properly manage the count of adapters
+#   
+#   velocity_nics wasn't managed properly.
+#   
+#   Signed-off-by: Tejun Heo <tj at home-tj.org>
+# 
+# drivers/net/via-velocity.c
+#   2004/10/01 15:37:28-04:00 romieu at fr.zoreil.com +5 -2
+#   via-velocity: properly manage the count of adapters
+# 
+diff -Nru a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
+--- a/drivers/net/via-velocity.c	2004-11-05 11:00:01 +09:00
++++ b/drivers/net/via-velocity.c	2004-11-05 11:00:01 +09:00
+@@ -359,6 +359,8 @@
+ 	pci_disable_device(pdev);
+ 	pci_set_drvdata(pdev, NULL);
+ 	free_netdev(dev);
++
++	velocity_nics--;
+ }
+ 
+ /**
+@@ -695,7 +697,7 @@
+ 	struct mac_regs * regs;
+ 	int ret = -ENOMEM;
+ 
+-	if (velocity_nics++ >= MAX_UNITS) {
++	if (velocity_nics >= MAX_UNITS) {
+ 		printk(KERN_NOTICE VELOCITY_NAME ": already found %d NICs.\n", 
+ 				velocity_nics);
+ 		return -ENODEV;
+@@ -762,7 +764,7 @@
+ 		dev->dev_addr[i] = readb(&regs->PAR[i]);
+ 
+ 
+-	velocity_get_options(&vptr->options, velocity_nics - 1, dev->name);
++	velocity_get_options(&vptr->options, velocity_nics, dev->name);
+ 
+ 	/* 
+ 	 *	Mask out the options cannot be set to the chip
+@@ -817,6 +819,7 @@
+ 		spin_unlock_irqrestore(&velocity_dev_list_lock, flags);
+ 	}
+ #endif
++	velocity_nics++;
+ out:
+ 	return ret;
+ 

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-08.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-08.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-08.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,64 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [PATCH] via-velocity: removal of unused velocity_info.xmit_lock
+## DP: Patch author: Tejun Heo <tj at home-tj.org>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: romieu (BitKeeper)
+# cset: 1.1988.54.3 (2.6) key=4161bc34iMeaQlErqZQufrVxbWvMWA
+# inclusion: upstream
+# descrition: [PATCH] via-velocity: removal of unused velocity_info.xmit_lock
+# revision date: Fri, 05 Nov 2004 11:00:11 +0900
+#
+# rset: ChangeSet|1.1988.54.2..1.1988.54.3
+# rset: drivers/net/via-velocity.c|1.15..1.16
+# rset: drivers/net/via-velocity.h|1.5..1.6
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/04 17:10:12-04:00 romieu at fr.zoreil.com 
+#   [PATCH] via-velocity: removal of unused velocity_info.xmit_lock
+#   
+#   Removed unused velocity_info.xmit_lock.
+#   
+#   Signed-off-by: Tejun Heo <tj at home-tj.org>
+# 
+# drivers/net/via-velocity.h
+#   2004/10/01 15:37:31-04:00 romieu at fr.zoreil.com +0 -1
+#   via-velocity: removal of unused velocity_info.xmit_lock
+# 
+# drivers/net/via-velocity.c
+#   2004/10/01 15:37:31-04:00 romieu at fr.zoreil.com +0 -3
+#   via-velocity: removal of unused velocity_info.xmit_lock
+# 
+diff -Nru a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
+--- a/drivers/net/via-velocity.c	2004-11-05 11:00:11 +09:00
++++ b/drivers/net/via-velocity.c	2004-11-05 11:00:11 +09:00
+@@ -872,10 +872,7 @@
+ 	vptr->io_size = info->io_size;
+ 	vptr->num_txq = info->txqueue;
+ 	vptr->multicast_limit = MCAM_SIZE;
+-
+ 	spin_lock_init(&vptr->lock);
+-	spin_lock_init(&vptr->xmit_lock);
+-
+ 	INIT_LIST_HEAD(&vptr->list);
+ }
+ 
+diff -Nru a/drivers/net/via-velocity.h b/drivers/net/via-velocity.h
+--- a/drivers/net/via-velocity.h	2004-11-05 11:00:11 +09:00
++++ b/drivers/net/via-velocity.h	2004-11-05 11:00:11 +09:00
+@@ -1792,7 +1792,6 @@
+ 	u8 mCAMmask[(MCAM_SIZE / 8)];
+ 
+ 	spinlock_t lock;
+-	spinlock_t xmit_lock;
+ 
+ 	int wol_opts;
+ 	u8 wol_passwd[6];

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-09.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-09.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-09.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,74 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: PATCH] via-velocity: velocity_give_rx_desc() removal
+## DP: Patch author: Francois Romieu <romieu at fr.zoreil.com>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: romieu (BitKeeper)
+# cset: 1.1988.54.4 (2.6) key=4161bc41FDrwlBLCKHlWbztzwl3m7A
+# inclusion: upstream
+# descrition: [PATCH] via-velocity: velocity_give_rx_desc() removal
+# revision date: Fri, 05 Nov 2004 11:00:21 +0900
+#
+# rset: ChangeSet|1.1988.54.3..1.1988.54.4
+# rset: drivers/net/via-velocity.c|1.16..1.17
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/04 17:10:25-04:00 romieu at fr.zoreil.com 
+#   [PATCH] via-velocity: velocity_give_rx_desc() removal
+#   
+#   In velocity_give_rx_desc(), there should be a wmb() between resetting the
+#   first four bytes of rdesc0 and setting owner. As resetting the first four
+#   bytes isn't necessary, I just removed the function and directly set owner.
+#   Another rationale for removing the function:
+#   The function doesn't handle synchronization. We should do wmb() before
+#   calling the function.  So, I think using bare assignment makes the fact
+#   more explicit.
+#   
+#   Signed-off-by: Tejun Heo <tj at home-tj.org>
+# 
+# drivers/net/via-velocity.c
+#   2004/10/01 15:37:34-04:00 romieu at fr.zoreil.com +2 -8
+#   via-velocity: velocity_give_rx_desc() removal
+# 
+diff -Nru a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
+--- a/drivers/net/via-velocity.c	2004-11-05 11:00:21 +09:00
++++ b/drivers/net/via-velocity.c	2004-11-05 11:00:21 +09:00
+@@ -492,12 +492,6 @@
+ 	}
+ }
+ 
+-static inline void velocity_give_rx_desc(struct rx_desc *rd)
+-{
+-	*(u32 *)&rd->rdesc0 = 0;
+-	rd->rdesc0.owner = cpu_to_le32(OWNED_BY_NIC);
+-}
+-
+ /**
+  *	velocity_rx_reset	-	handle a receive reset
+  *	@vptr: velocity we are resetting
+@@ -518,7 +512,7 @@
+ 	 *	Init state, all RD entries belong to the NIC
+ 	 */
+ 	for (i = 0; i < vptr->options.numrx; ++i)
+-		velocity_give_rx_desc(vptr->rd_ring + i);
++		vptr->rd_ring[i].rdesc0.owner = OWNED_BY_NIC;
+ 
+ 	writew(vptr->options.numrx, &regs->RBRDU);
+ 	writel(vptr->rd_pool_dma, &regs->RDBaseLo);
+@@ -1028,7 +1022,7 @@
+ 	dirty = vptr->rd_dirty - unusable + 1;
+ 	for (avail = vptr->rd_filled & 0xfffc; avail; avail--) {
+ 		dirty = (dirty > 0) ? dirty - 1 : vptr->options.numrx - 1;
+-		velocity_give_rx_desc(vptr->rd_ring + dirty);
++		vptr->rd_ring[dirty].rdesc0.owner = OWNED_BY_NIC;
+ 	}
+ 
+ 	writew(vptr->rd_filled & 0xfffc, &regs->RBRDU);

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-10.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-10.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-10.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,98 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [PATCH] via-velocity: received ring wrong index and missing barriers
+## DP: Patch author: Francois Romieu <romieu at fr.zoreil.com>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: romieu (BitKeeper)
+# cset: 1.1988.54.5 (2.6) key=4161bc4f_AKSdbMURB6jBiiHcb86hw
+# inclusion: upstream
+# descrition: [PATCH] via-velocity: received ring wrong index and missing barriers
+# revision date: Fri, 05 Nov 2004 11:00:31 +0900
+#
+# rset: ChangeSet|1.1988.54.4..1.1988.54.5
+# rset: drivers/net/via-velocity.c|1.17..1.18
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/04 17:10:39-04:00 romieu at fr.zoreil.com 
+#   [PATCH] via-velocity: received ring wrong index and missing barriers
+#   
+#   There were several receive ring related bugs.
+#   
+#   In velocity_give_many_rx_descs(), index calculation was incorrect.
+#   This and bugs in velocity_rx_srv() described in the following paragraph
+#   caused packet loss, truncation and infinite error interrupt generation.
+#   
+#   In velocity_rx_srv(), velocity_rx_refill() could be called without any
+#   dirty slot.  With proper timing, This can result in refilling yet
+#   unreceived packets and pushing dirty pointer ahead of the current pointer.
+#   And vptr->rd_curr which is used by velocity_rx_refill() was updated after
+#   calling velocity_rx_refill() thus screwing receive descriptor ring.
+#   Also, between checking owner and reading the packet, rmb() is missing.
+#   
+#   Signed-off-by: Tejun Heo <tj at home-tj.org>
+# 
+# drivers/net/via-velocity.c
+#   2004/10/01 15:37:37-04:00 romieu at fr.zoreil.com +10 -7
+#   via-velocity: received ring wrong index and missing barriers
+# 
+diff -Nru a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
+--- a/drivers/net/via-velocity.c	2004-11-05 11:00:31 +09:00
++++ b/drivers/net/via-velocity.c	2004-11-05 11:00:31 +09:00
+@@ -1018,8 +1018,8 @@
+ 
+ 	wmb();
+ 
+-	unusable = vptr->rd_filled | 0x0003;
+-	dirty = vptr->rd_dirty - unusable + 1;
++	unusable = vptr->rd_filled & 0x0003;
++	dirty = vptr->rd_dirty - unusable;
+ 	for (avail = vptr->rd_filled & 0xfffc; avail; avail--) {
+ 		dirty = (dirty > 0) ? dirty - 1 : vptr->options.numrx - 1;
+ 		vptr->rd_ring[dirty].rdesc0.owner = OWNED_BY_NIC;
+@@ -1232,15 +1232,17 @@
+ 	int rd_curr = vptr->rd_curr;
+ 	int works = 0;
+ 
+-	while (1) {
++	do {
+ 		struct rx_desc *rd = vptr->rd_ring + rd_curr;
+ 
+-		if (!vptr->rd_info[rd_curr].skb || (works++ > 15))
++		if (!vptr->rd_info[rd_curr].skb)
+ 			break;
+ 
+ 		if (rd->rdesc0.owner == OWNED_BY_NIC)
+ 			break;
+ 
++		rmb();
++
+ 		/*
+ 		 *	Don't drop CE or RL error frame although RXOK is off
+ 		 */
+@@ -1263,14 +1265,15 @@
+ 		rd_curr++;
+ 		if (rd_curr >= vptr->options.numrx)
+ 			rd_curr = 0;
+-	}
++	} while (++works <= 15);
+ 
+-	if (velocity_rx_refill(vptr) < 0) {
++	vptr->rd_curr = rd_curr;
++
++	if (works > 0 && velocity_rx_refill(vptr) < 0) {
+ 		VELOCITY_PRT(MSG_LEVEL_ERR, KERN_ERR
+ 			"%s: rx buf allocation failure\n", vptr->dev->name);
+ 	}
+ 
+-	vptr->rd_curr = rd_curr;
+ 	VAR_USED(stats);
+ 	return works;
+ }

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-11.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-11.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-11.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,80 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [PATCH] via-velocity: early invocation of init_cam_filter()
+## DP: Patch author: Tejun Heo <tj at home-tj.org>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: romieu (BitKeeper)
+# cset: 1.1988.54.6 (2.6) key=4161bc5beGDcY-ENb8vOu3-q902T0g
+# inclusion: upstream
+# descrition: [PATCH] via-velocity: early invocation of init_cam_filter()
+# revision date: Fri, 05 Nov 2004 11:00:41 +0900
+#
+# rset: ChangeSet|1.1988.54.5..1.1988.54.6
+# rset: drivers/net/via-velocity.c|1.18..1.19
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/04 17:10:51-04:00 romieu at fr.zoreil.com 
+#   [PATCH] via-velocity: early invocation of init_cam_filter()
+#   
+#   In velocity_init_registers(), init_cam_filter() clears mCAMmask which
+#   might have been set by set_multi() (not sure if this can ever occur).
+#   Modified to invoke init_cam_filter() first. Also, clear_isr() is called
+#   twice. Removed the first invocation.
+#   
+#   In velocity_found1(), there was a unneeded assignment from vptr to
+#   dev->priv.  Removed.
+#   
+#   Signed-off-by: Tejun Heo <tj at home-tj.org>
+# 
+# drivers/net/via-velocity.c
+#   2004/10/01 15:37:40-04:00 romieu at fr.zoreil.com +5 -4
+#   via-velocity: early invocation of init_cam_filter()
+# 
+diff -Nru a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
+--- a/drivers/net/via-velocity.c	2004-11-05 11:00:41 +09:00
++++ b/drivers/net/via-velocity.c	2004-11-05 11:00:41 +09:00
+@@ -592,6 +592,11 @@
+ 		BYTE_REG_BITS_SET(CFGB_OFSET, (CFGB_CRANDOM | CFGB_CAP | CFGB_MBA | CFGB_BAKOPT), &regs->CFGB);
+ 
+ 		/*
++		 *	Init CAM filter
++		 */
++		velocity_init_cam_filter(vptr);
++
++		/*
+ 		 *	Set packet filter: Receive directed and broadcast address
+ 		 */
+ 		velocity_set_multi(vptr->dev);
+@@ -615,8 +620,6 @@
+ 			mac_tx_queue_run(regs, i);
+ 		}
+ 
+-		velocity_init_cam_filter(vptr);
+-
+ 		init_flow_control_register(vptr);
+ 
+ 		writel(CR0_STOP, &regs->CR0Clr);
+@@ -624,7 +627,6 @@
+ 
+ 		mii_status = velocity_get_opt_media_mode(vptr);
+ 		netif_stop_queue(vptr->dev);
+-		mac_clear_isr(regs);
+ 
+ 		mii_init(vptr, mii_status);
+ 
+@@ -723,7 +725,6 @@
+ 
+ 	vptr->dev = dev;
+ 
+-	dev->priv = vptr;
+ 	dev->irq = pdev->irq;
+ 
+ 	ret = pci_enable_device(pdev);

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-12.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-12.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-12.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,50 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: PATCH] via-velocity: removal of incomplete endianness handling
+## DP: Patch author: Francois Romieu <romieu at fr.zoreil.com>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: romieu (BitKeeper)
+# cset: 1.1988.54.7 (2.6) key=4161bc69Wafvc1SgyEXiEskeU27tfg
+# inclusion: upstream
+# descrition: [PATCH] via-velocity: removal of incomplete endianness handling
+# revision date: Fri, 05 Nov 2004 11:00:51 +0900
+#
+# rset: ChangeSet|1.1988.54.6..1.1988.54.7
+# rset: drivers/net/via-velocity.c|1.19..1.20
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/04 17:11:05-04:00 romieu at fr.zoreil.com 
+#   [PATCH] via-velocity: removal of incomplete endianness handling
+#   
+#   Removed cpu_to_le32 call on OWNED_BY_NIC. This will produce 0x01000000 on
+#   big endian machines while rdesc0.owner still evaluates to 0x00000000 or
+#   0x00000001. BTW, unless we reorder bit fields on big endian machines or
+#   use u32's and cpu_to_le32'd bit mask macros, current code won't work on big
+#   endian machines.
+#   
+#   Signed-off-by: Tejun Heo <tj at home-tj.org>
+# 
+# drivers/net/via-velocity.c
+#   2004/10/01 15:37:43-04:00 romieu at fr.zoreil.com +1 -1
+#   via-velocity: removal of incomplete endianness handling
+# 
+diff -Nru a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
+--- a/drivers/net/via-velocity.c	2004-11-05 11:00:51 +09:00
++++ b/drivers/net/via-velocity.c	2004-11-05 11:00:51 +09:00
+@@ -1038,7 +1038,7 @@
+ 		struct rx_desc *rd = vptr->rd_ring + dirty;
+ 
+ 		/* Fine for an all zero Rx desc at init time as well */
+-		if (rd->rdesc0.owner == cpu_to_le32(OWNED_BY_NIC))
++		if (rd->rdesc0.owner == OWNED_BY_NIC)
+ 			break;
+ 
+ 		if (!vptr->rd_info[dirty].skb) {

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-13.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-13.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/via-velocity-update-13.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,51 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: [PATCH] via-velocity: wrong buffer offset in velocity_init_td_ring()
+## DP: Patch author: Francois Romieu <romieu at fr.zoreil.com>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: romieu (BitKeeper)
+# cset: 1.1988.54.8 (2.6) key=4161bc78T6I51pLQUWLhP04Oi5KxZg
+# inclusion: upstream
+# descrition: [PATCH] via-velocity: wrong buffer offset in velocity_init_td_ring()
+# revision date: Fri, 05 Nov 2004 11:01:01 +0900
+#
+# rset: ChangeSet|1.1988.54.7..1.1988.54.8
+# rset: drivers/net/via-velocity.c|1.20..1.21
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/04 17:11:20-04:00 romieu at fr.zoreil.com 
+#   [PATCH] via-velocity: wrong buffer offset in velocity_init_td_ring()
+#   
+#   Buffer offset calculation was incorrect in velocity_init_td_ring().
+#   This didn't cause any trouble because we only use the first td ring.
+#   
+#   Signed-off-by: Tejun Heo <tj at home-tj.org>
+# 
+# drivers/net/via-velocity.c
+#   2004/10/01 15:37:46-04:00 romieu at fr.zoreil.com +4 -2
+#   via-velocity: wrong buffer offset in velocity_init_td_ring()
+# 
+diff -Nru a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
+--- a/drivers/net/via-velocity.c	2004-11-05 11:01:01 +09:00
++++ b/drivers/net/via-velocity.c	2004-11-05 11:01:01 +09:00
+@@ -1156,8 +1156,10 @@
+ 		for (i = 0; i < vptr->options.numtx; i++, curr += sizeof(struct tx_desc)) {
+ 			td = &(vptr->td_rings[j][i]);
+ 			td_info = &(vptr->td_infos[j][i]);
+-			td_info->buf = vptr->tx_bufs + (i + j) * PKT_BUF_SZ;
+-			td_info->buf_dma = vptr->tx_bufs_dma + (i + j) * PKT_BUF_SZ;
++			td_info->buf = vptr->tx_bufs +
++				(j * vptr->options.numtx + i) * PKT_BUF_SZ;
++			td_info->buf_dma = vptr->tx_bufs_dma +
++				(j * vptr->options.numtx + i) * PKT_BUF_SZ;
+ 		}
+ 		vptr->td_tail[j] = vptr->td_curr[j] = vptr->td_used[j] = 0;
+ 	}

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/vlan-update-1.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/vlan-update-1.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/vlan-update-1.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,282 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Sync code and feature set with 2.4.x
+## DP: Patch author: David Miller, Ben Greear
+## DP: Upstream status: upstream
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: greearb (BitKeeper)
+# cset: 1.2026.32.3 (2.6) key=4180303dxO_jU4ssNg8I1rEuY11kRA
+# inclusion: upstream
+# descrition: [VLAN]: Sync code and feature set with 2.4.x
+# revision date: Fri, 12 Nov 2004 16:24:20 +0900
+#
+# rset: ChangeSet|1.2026.32.2..1.2026.32.3
+# rset: include/linux/if_vlan.h|1.10..1.11
+# rset: net/8021q/vlan.h|1.10..1.11
+# rset: net/8021q/vlan.c|1.30..1.31
+# rset: net/8021q/vlan_dev.c|1.21..1.22
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/27 16:33:17-07:00 greearb at candelatech.com 
+#   [VLAN]: Sync code and feature set with 2.4.x
+#   
+#   Signed-off-by: David S. Miller <davem at davemloft.net>
+# 
+# net/8021q/vlan_dev.c
+#   2004/10/27 16:32:46-07:00 greearb at candelatech.com +57 -6
+#   [VLAN]: Sync code and feature set with 2.4.x
+# 
+# net/8021q/vlan.h
+#   2004/10/27 16:32:46-07:00 greearb at candelatech.com +2 -0
+#   [VLAN]: Sync code and feature set with 2.4.x
+# 
+# net/8021q/vlan.c
+#   2004/10/27 16:32:46-07:00 greearb at candelatech.com +50 -17
+#   [VLAN]: Sync code and feature set with 2.4.x
+# 
+# include/linux/if_vlan.h
+#   2004/10/27 16:32:46-07:00 greearb at candelatech.com +3 -1
+#   [VLAN]: Sync code and feature set with 2.4.x
+# 
+diff -Nru a/include/linux/if_vlan.h b/include/linux/if_vlan.h
+--- a/include/linux/if_vlan.h	2004-11-12 16:24:20 +09:00
++++ b/include/linux/if_vlan.h	2004-11-12 16:24:20 +09:00
+@@ -366,7 +366,9 @@
+ 	GET_VLAN_INGRESS_PRIORITY_CMD,
+ 	GET_VLAN_EGRESS_PRIORITY_CMD,
+ 	SET_VLAN_NAME_TYPE_CMD,
+-	SET_VLAN_FLAG_CMD
++	SET_VLAN_FLAG_CMD,
++	GET_VLAN_REALDEV_NAME_CMD, /* If this works, you know it's a VLAN device, btw */
++	GET_VLAN_VID_CMD /* Get the VID of this VLAN (specified by name) */
+ };
+ 
+ enum vlan_name_types {
+diff -Nru a/net/8021q/vlan.c b/net/8021q/vlan.c
+--- a/net/8021q/vlan.c	2004-11-12 16:24:20 +09:00
++++ b/net/8021q/vlan.c	2004-11-12 16:24:20 +09:00
+@@ -647,15 +647,9 @@
+ static int vlan_ioctl_handler(void __user *arg)
+ {
+ 	int err = 0;
++	unsigned short vid = 0;
+ 	struct vlan_ioctl_args args;
+ 
+-	/* everything here needs root permissions, except aguably the
+-	 * hack ioctls for sending packets.  However, I know _I_ don't
+-	 * want users running that on my network! --BLG
+-	 */
+-	if (!capable(CAP_NET_ADMIN))
+-		return -EPERM;
+-
+ 	if (copy_from_user(&args, arg, sizeof(struct vlan_ioctl_args)))
+ 		return -EFAULT;
+ 
+@@ -669,24 +663,32 @@
+ 
+ 	switch (args.cmd) {
+ 	case SET_VLAN_INGRESS_PRIORITY_CMD:
++		if (!capable(CAP_NET_ADMIN))
++			return -EPERM;
+ 		err = vlan_dev_set_ingress_priority(args.device1,
+ 						    args.u.skb_priority,
+ 						    args.vlan_qos);
+ 		break;
+ 
+ 	case SET_VLAN_EGRESS_PRIORITY_CMD:
++		if (!capable(CAP_NET_ADMIN))
++			return -EPERM;
+ 		err = vlan_dev_set_egress_priority(args.device1,
+ 						   args.u.skb_priority,
+ 						   args.vlan_qos);
+ 		break;
+ 
+ 	case SET_VLAN_FLAG_CMD:
++		if (!capable(CAP_NET_ADMIN))
++			return -EPERM;
+ 		err = vlan_dev_set_vlan_flag(args.device1,
+ 					     args.u.flag,
+ 					     args.vlan_qos);
+ 		break;
+ 
+ 	case SET_VLAN_NAME_TYPE_CMD:
++		if (!capable(CAP_NET_ADMIN))
++			return -EPERM;
+ 		if ((args.u.name_type >= 0) &&
+ 		    (args.u.name_type < VLAN_NAME_TYPE_HIGHEST)) {
+ 			vlan_name_type = args.u.name_type;
+@@ -696,17 +698,9 @@
+ 		}
+ 		break;
+ 
+-		/* TODO:  Figure out how to pass info back...
+-		   case GET_VLAN_INGRESS_PRIORITY_IOCTL:
+-		   err = vlan_dev_get_ingress_priority(args);
+-		   break;
+-
+-		   case GET_VLAN_EGRESS_PRIORITY_IOCTL:
+-		   err = vlan_dev_get_egress_priority(args);
+-		   break;
+-		*/
+-
+ 	case ADD_VLAN_CMD:
++		if (!capable(CAP_NET_ADMIN))
++			return -EPERM;
+ 		/* we have been given the name of the Ethernet Device we want to
+ 		 * talk to:  args.dev1	 We also have the
+ 		 * VLAN ID:  args.u.VID
+@@ -719,10 +713,49 @@
+ 		break;
+ 
+ 	case DEL_VLAN_CMD:
++		if (!capable(CAP_NET_ADMIN))
++			return -EPERM;
+ 		/* Here, the args.dev1 is the actual VLAN we want
+ 		 * to get rid of.
+ 		 */
+ 		err = unregister_vlan_device(args.device1);
++		break;
++
++	case GET_VLAN_INGRESS_PRIORITY_CMD:
++		/* TODO:  Implement
++		   err = vlan_dev_get_ingress_priority(args);
++		   if (copy_to_user((void*)arg, &args,
++		        sizeof(struct vlan_ioctl_args))) {
++		        err = -EFAULT;
++		   }
++		*/
++		err = -EINVAL;
++		break;
++	case GET_VLAN_EGRESS_PRIORITY_CMD:
++		/* TODO:  Implement
++		   err = vlan_dev_get_egress_priority(args.device1, &(args.args);
++		   if (copy_to_user((void*)arg, &args,
++		        sizeof(struct vlan_ioctl_args))) {
++		        err = -EFAULT;
++		   }
++		*/
++		err = -EINVAL;
++		break;
++	case GET_VLAN_REALDEV_NAME_CMD:
++		err = vlan_dev_get_realdev_name(args.device1, args.u.device2);
++		if (copy_to_user((void*)arg, &args,
++				 sizeof(struct vlan_ioctl_args))) {
++			err = -EFAULT;
++		}
++		break;
++
++	case GET_VLAN_VID_CMD:
++		err = vlan_dev_get_vid(args.device1, &vid);
++		args.u.VID = vid;
++		if (copy_to_user((void*)arg, &args,
++				 sizeof(struct vlan_ioctl_args))) {
++                      err = -EFAULT;
++		}
+ 		break;
+ 
+ 	default:
+diff -Nru a/net/8021q/vlan.h b/net/8021q/vlan.h
+--- a/net/8021q/vlan.h	2004-11-12 16:24:20 +09:00
++++ b/net/8021q/vlan.h	2004-11-12 16:24:20 +09:00
+@@ -66,6 +66,8 @@
+ int vlan_dev_set_ingress_priority(char* dev_name, __u32 skb_prio, short vlan_prio);
+ int vlan_dev_set_egress_priority(char* dev_name, __u32 skb_prio, short vlan_prio);
+ int vlan_dev_set_vlan_flag(char* dev_name, __u32 flag, short flag_val);
++int vlan_dev_get_realdev_name(const char* dev_name, char* result);
++int vlan_dev_get_vid(const char* dev_name, unsigned short* result);
+ void vlan_dev_set_multicast_list(struct net_device *vlan_dev);
+ 
+ #endif /* !(__BEN_VLAN_802_1Q_INC__) */
+diff -Nru a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
+--- a/net/8021q/vlan_dev.c	2004-11-12 16:24:20 +09:00
++++ b/net/8021q/vlan_dev.c	2004-11-12 16:24:20 +09:00
+@@ -1,4 +1,4 @@
+-/*
++/* -*- linux-c -*-
+  * INET		802.1Q VLAN
+  *		Ethernet-type device handling.
+  *
+@@ -484,13 +484,26 @@
+ 	       veth->h_vlan_proto, veth->h_vlan_TCI, veth->h_vlan_encapsulated_proto);
+ #endif
+ 
+-	stats->tx_packets++; /* for statics only */
+-	stats->tx_bytes += skb->len;
+-
+ 	skb->dev = VLAN_DEV_INFO(dev)->real_dev;
+-	dev_queue_xmit(skb);
+ 
+-	return 0;
++	{
++		/* Please note, dev_queue_xmit consumes the pkt regardless of the
++		 * error value.  So, will copy the skb first and free if successful.
++		 */
++		struct sk_buff* skb2 = skb_get(skb);
++		int rv = dev_queue_xmit(skb2);
++		if (rv == 0) {
++			/* Was success, need to free the skb reference since we bumped up the
++			 * user count above.
++			 */
++
++			stats->tx_packets++; /* for statics only */
++			stats->tx_bytes += skb->len;
++
++			kfree_skb(skb);
++		}
++		return rv;
++	}
+ }
+ 
+ int vlan_dev_hwaccel_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+@@ -621,6 +634,44 @@
+ 
+ 	return -EINVAL;
+ }
++
++
++int vlan_dev_get_realdev_name(const char *dev_name, char* result)
++{
++	struct net_device *dev = dev_get_by_name(dev_name);
++	int rv = 0;
++	if (dev) {
++		if (dev->priv_flags & IFF_802_1Q_VLAN) {
++			strncpy(result, VLAN_DEV_INFO(dev)->real_dev->name, 23);
++			rv = 0;
++		} else {
++			rv = -EINVAL;
++		}
++		dev_put(dev);
++	} else {
++		rv = -ENODEV;
++	}
++	return rv;
++}
++
++int vlan_dev_get_vid(const char *dev_name, unsigned short* result)
++{
++	struct net_device *dev = dev_get_by_name(dev_name);
++	int rv = 0;
++	if (dev) {
++		if (dev->priv_flags & IFF_802_1Q_VLAN) {
++			*result = VLAN_DEV_INFO(dev)->vlan_id;
++			rv = 0;
++		} else {
++			rv = -EINVAL;
++		}
++		dev_put(dev);
++	} else {
++		rv = -ENODEV;
++	}
++	return rv;
++}
++
+ 
+ int vlan_dev_set_mac_address(struct net_device *dev, void *addr_struct_p)
+ {

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/vlan-update-2.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/vlan-update-2.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/vlan-update-2.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,70 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Revert vlan_dev_hard_start_xmit part of Ben Greear's changes
+## DP: Patch author: David Miller
+## DP: Upstream status: upstream
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# origin: davem (BitKeeper)
+# cset: 1.2026.36.3 (2.6) key=41817f91MDHefCaP3_LsVzJAliK5ig
+# inclusion: upstream
+# descrition: [VLAN]: Revert vlan_dev_hard_start_xmit part of Ben Greear's changes
+# revision date: Fri, 12 Nov 2004 16:24:31 +0900
+#
+# rset: ChangeSet|1.2026.36.2..1.2026.36.3
+# rset: net/8021q/vlan_dev.c|1.22..1.23
+#
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/10/28 16:24:01-07:00 davem at nuts.davemloft.net 
+#   [VLAN]: Revert vlan_dev_hard_start_xmit part of Ben Greear's changes
+#   
+#   They are questionable at best.  Based upon commentary
+#   by Tommy Christensen.
+#   
+#   Signed-off-by: David S. Miller <davem at davemloft.net>
+# 
+# net/8021q/vlan_dev.c
+#   2004/10/28 16:23:09-07:00 davem at nuts.davemloft.net +5 -18
+#   [VLAN]: Revert vlan_dev_hard_start_xmit part of Ben Greear's changes
+# 
+diff -Nru a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
+--- a/net/8021q/vlan_dev.c	2004-11-12 16:24:31 +09:00
++++ b/net/8021q/vlan_dev.c	2004-11-12 16:24:31 +09:00
+@@ -484,26 +484,13 @@
+ 	       veth->h_vlan_proto, veth->h_vlan_TCI, veth->h_vlan_encapsulated_proto);
+ #endif
+ 
+-	skb->dev = VLAN_DEV_INFO(dev)->real_dev;
+-
+-	{
+-		/* Please note, dev_queue_xmit consumes the pkt regardless of the
+-		 * error value.  So, will copy the skb first and free if successful.
+-		 */
+-		struct sk_buff* skb2 = skb_get(skb);
+-		int rv = dev_queue_xmit(skb2);
+-		if (rv == 0) {
+-			/* Was success, need to free the skb reference since we bumped up the
+-			 * user count above.
+-			 */
++	stats->tx_packets++; /* for statics only */
++	stats->tx_bytes += skb->len;
+ 
+-			stats->tx_packets++; /* for statics only */
+-			stats->tx_bytes += skb->len;
++	skb->dev = VLAN_DEV_INFO(dev)->real_dev;
++	dev_queue_xmit(skb);
+ 
+-			kfree_skb(skb);
+-		}
+-		return rv;
+-	}
++	return 0;
+ }
+ 
+ int vlan_dev_hwaccel_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/vt-of-death.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/vt-of-death.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/vt-of-death.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,45 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Make sure VC resizing fits in s16.
+## DP: Patch author: Linus Torvalds
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/12/10 09:52:42-08:00 torvalds at ppc970.osdl.org 
+#   Make sure VC resizing fits in s16.
+#   
+#   Noted by Georgi Guninski
+# 
+# drivers/char/vt.c
+#   2004/12/10 09:52:35-08:00 torvalds at ppc970.osdl.org +5 -0
+#   Make sure VC resizing fits in s16.
+# 
+diff -Nru a/drivers/char/vt.c b/drivers/char/vt.c
+--- a/drivers/char/vt.c	2004-12-22 03:00:00 -08:00
++++ b/drivers/char/vt.c	2004-12-22 03:00:00 -08:00
+@@ -768,6 +768,8 @@
+  * [this is to be used together with some user program
+  * like resize that changes the hardware videomode]
+  */
++#define VC_RESIZE_MAXCOL (32767)
++#define VC_RESIZE_MAXROW (32767)
+ int vc_resize(int currcons, unsigned int cols, unsigned int lines)
+ {
+ 	unsigned long old_origin, new_origin, new_scr_end, rlth, rrem, err = 0;
+@@ -779,6 +781,9 @@
+ 
+ 	if (!vc_cons_allocated(currcons))
+ 		return -ENXIO;
++
++	if (cols > VC_RESIZE_MAXCOL || lines > VC_RESIZE_MAXROW)
++		return -EINVAL;
+ 
+ 	new_cols = (cols ? cols : video_num_columns);
+ 	new_rows = (lines ? lines : video_num_lines);

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/x86-i486_emu.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/x86-i486_emu.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/x86-i486_emu.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,528 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: 486 emulation
+## DP: Patch author: Willy Tarreau
+## DP: Upstream status: submitted, needs more work
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -urN kernel-source-2.6.6/arch/i386/Kconfig kernel-source-2.6.6-1/arch/i386/Kconfig
+--- kernel-source-2.6.6/arch/i386/Kconfig	2004-05-10 19:47:45.000000000 +1000
++++ kernel-source-2.6.6-1/arch/i386/Kconfig	2004-05-10 22:21:08.000000000 +1000
+@@ -330,6 +330,41 @@
+ 	  This is really intended for distributors who need more
+ 	  generic optimizations.
+ 
++config X86_EMU486
++       bool "486 emulation"
++       help
++          When used on a 386, Linux can emulate 3 instructions from the 486
++          set.  This allows user space programs compiled for 486 to run on a
++          386 without crashing with a SIGILL. As any emulation, performance
++          will be very low, but since these instruction are not often used,
++          this might not hurt.  The emulated instructions are:
++             - bswap (does the same as htonl())
++             - cmpxchg (used in multi-threading, mutex locking)
++             - xadd (rarely used)
++
++          Note that this can also allow Step-A 486's to correctly run
++          multi-thread applications since cmpxchg has a wrong opcode on this
++          early CPU.
++
++          Don't use this to enable multi-threading on an SMP machine, the lock
++          atomicity can't be guaranted!
++
++          Although it's highly preferable that you only execute programs
++          targetted for your CPU, it may happen that, consecutively to a
++          hardware replacement, or during rescue of a damaged system, you have
++          to execute such programs on an inadapted processor.  In this case,
++          this option will help you get your programs working, even if they
++          will be slower.
++
++          It is recommended that you say N here in any case, except for the
++          kernels that you will use on your rescue disks.
++ 
++          This option should not be left on by default, because it means that
++          you execute a program not targetted for your CPU.  You should
++          recompile your applications whenever possible.
++
++          If you are not sure, say N.
++
+ endif
+ 
+ #
+@@ -438,6 +473,7 @@
+ 
+ config SMP
+ 	bool "Symmetric multi-processing support"
++	depends on !X86_EMU486
+ 	---help---
+ 	  This enables support for systems with more than one CPU. If you have
+ 	  a system with only one CPU, like most personal computers, say N. If
+diff -urN kernel-source-2.6.6/arch/i386/kernel/Makefile kernel-source-2.6.6-1/arch/i386/kernel/Makefile
+--- kernel-source-2.6.6/arch/i386/kernel/Makefile	2004-05-10 19:47:45.000000000 +1000
++++ kernel-source-2.6.6-1/arch/i386/kernel/Makefile	2004-05-10 22:21:08.000000000 +1000
+@@ -28,6 +28,7 @@
+ obj-$(CONFIG_MODULES)		+= module.o
+ obj-y				+= sysenter.o vsyscall.o
+ obj-$(CONFIG_ACPI_SRAT) 	+= srat.o
++obj-$(CONFIG_X86_EMU486)	+= emu.o
+ obj-$(CONFIG_HPET_TIMER) 	+= time_hpet.o
+ obj-$(CONFIG_EFI) 		+= efi.o efi_stub.o
+ obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
+diff -urN kernel-source-2.6.6/arch/i386/kernel/emu.c kernel-source-2.6.6-1/arch/i386/kernel/emu.c
+--- kernel-source-2.6.6/arch/i386/kernel/emu.c	1970-01-01 10:00:00.000000000 +1000
++++ kernel-source-2.6.6-1/arch/i386/kernel/emu.c	2003-08-01 20:21:31.000000000 +1000
+@@ -0,0 +1,434 @@
++/*
++ *  linux/arch/i386/emu.c
++ *
++ *  Copyright (C) 2002  Willy Tarreau
++ */
++
++#include <linux/config.h>
++#include <linux/sched.h>
++#include <linux/linkage.h>
++#include <linux/preempt.h>
++#include <linux/ptrace.h>
++#include <linux/types.h>
++
++#include <asm/uaccess.h>
++#include <asm/segment.h>
++
++asmlinkage void do_general_protection(struct pt_regs *regs, long error_code);
++asmlinkage void do_invalid_op(struct pt_regs *regs, long error_code);
++
++/* gives the address of any register member in a struct pt_regs */
++static const int reg_ofs[8] = {
++	(int)&((struct pt_regs *)0)->eax,
++	(int)&((struct pt_regs *)0)->ecx,
++	(int)&((struct pt_regs *)0)->edx,
++	(int)&((struct pt_regs *)0)->ebx,
++	(int)&((struct pt_regs *)0)->esp,
++	(int)&((struct pt_regs *)0)->ebp,
++	(int)&((struct pt_regs *)0)->esi,
++	(int)&((struct pt_regs *)0)->edi
++};
++
++#define REG_PTR(regs, reg) ((unsigned long *)(((void *)(regs)) + reg_ofs[reg]))
++
++/* This code can be used to allow old 386's to hopefully correctly execute some
++ * code which was originally compiled for a 486, and to allow CMOV-disabled
++ * processors to emulate CMOV instructions. In user space, only 3 instructions
++ * have been added between the 386 the 486 :
++ *    - BSWAP reg		performs exactly htonl())
++ *    - CMPXCHG reg/mem, reg	used for mutex locking
++ *    - XADD reg/mem, reg	not encountered yet.
++ *
++ * Warning: this will NEVER allow a kernel compiled for a 486 to boot on a 386,
++ * neither will it allow a CMOV-optimized kernel to run on a processor without
++ * CMOV ! It will only help to port programs, or save you on a rescue disk, but
++ * for performance's sake, it's far better to recompile.
++ *
++ * Tests patterns have been submitted to this code on a 386, and it now seems
++ * OK. If you think you've found a bug, please report it to
++ * Willy Tarreau <willy at meta-x.org>.
++ */
++
++/* [modrm_address] returns a pointer to a user-space location by decoding the
++ * mod/rm byte and the bytes at <from>, which point to the mod/reg/rm byte.
++ * This must only be called if modrm indicates memory and not register. The
++ * <from> parameter is updated when bytes are read.
++ * NOTE: this code has some ugly lines, which produce a better assembler output
++ * than the "cleaner" version.
++ */
++static void *modrm_address(struct pt_regs *regs, u8 **from,
++                           int bit32, int modrm)
++{
++	u32 offset = 0;
++	u8 sib, mod, rm;
++
++	/* better optimization to compute them here, even
++	 * if rm is not always used
++	 */
++	rm = modrm & 7;
++	mod = modrm & 0xC0;
++
++	if (bit32) {  /* 32-bits addressing mode (default) */
++		if (mod == 0 && rm == 5) /* 32 bits offset and nothing more */
++			return (void *)*((u32*)*from)++;
++		
++		if (rm == 4) {
++			/* SIB byte is present and must be used */
++			sib = *(*from)++; /* SS(7-6) IDX(5-3) BASE(2-0) */
++
++			/* index * scale */
++			if (((sib >> 3) & 7) != 4)
++				offset += *REG_PTR(regs, (sib >> 3) & 7) << (sib >> 6);
++
++			rm = (sib & 7); /* base replaces rm from now */
++			if (mod == 0 && rm == 5) /* base off32 + scaled index */
++				return (void *)offset + *((u32*)*from)++;
++		}
++
++		/* base register */
++		offset += *REG_PTR(regs, rm);
++	
++		if (mod) {
++			if (mod & 0x80) /* 32 bits unsigned offset */
++				offset += *((u32*)*from)++;
++			else  /* 0x40: 8 bits signed offset */
++				offset += *((s8*)*from)++;
++		}
++
++		return (void *)offset;
++
++	} else { /* 16-bits addressing mode */
++		/* handle special case now */
++		if (mod == 0 && rm == 6) /* 16 bits offset */
++			return (void *)(u32)*((u16*)*from)++;
++
++		if ((rm & 4) == 0)
++			offset += (rm & 2) ? regs->ebp : regs->ebx;
++		if (rm < 6)
++			offset += (rm & 1) ? regs->edi : regs->esi;
++		else if (rm == 6)  /* bp */
++			offset += regs->ebp;
++		else if (rm == 7)  /* bx */
++			offset += regs->ebx;
++
++		/* now, let's include 8/16 bits offset */
++		if (mod) {
++			if (mod & 0x80) /* 16 bits unsigned offset */
++				offset += *((u16*)*from)++;
++			else  /* 0x40: 8 bits signed offset */
++				offset += *((s8*)*from)++;
++		}
++		return (void *)(offset & 0xFFFF);
++	}
++}
++
++
++/*
++ * skip_modrm() computes the EIP value of next instruction from the
++ * pointer <from> which points to the first byte after the mod/rm byte.
++ * Its purpose is to implement a fast alternative to modrm_address()
++ * when offset value is not needed.
++ */
++static inline void *skip_modrm(u8 *from, int bit32, int modrm)
++{
++    	u8 mod,rm;
++
++	/* better optimization to compute them here, even
++	 * if rm is not always used
++	 */
++	rm = modrm & 7;
++	mod = modrm & 0xC0;
++
++	/* most common case first : registers */
++	if (mod == 0xC0)
++		return from;
++
++	if (bit32) { /* 32 bits addressing mode (default) */
++		if (rm == 4)	/* SIB byte : rm becomes base */
++			rm = (*from++ & 7);
++		if (mod == 0x00) {
++			if (rm == 5)  /* 32 bits offset and nothing more */
++				return from + 4;
++			else
++				return from;
++		}
++	}
++	else { /* 16 bits mode */
++		if (mod == 0x00) {
++			if (rm == 6)  /* 16 bits offset and nothing more */
++				return from + 2;
++			else
++				return from;
++		}
++	}
++
++	if (mod & 0x80)
++		return from + (2 * (bit32 + 1)); /* + 2 or 4 bytes */
++	else
++		return from + 1;
++}
++
++
++/* [reg_address] returns a pointer to a register in the regs struct, depending
++ * on <w> (byte/word) and reg. Since the caller knows about <w>, it's
++ * responsible for understanding the result as a byte, word or dword pointer.
++ * Only the 3 lower bits of <reg> are meaningful, higher ones are ignored.
++ */
++static inline void *reg_address(struct pt_regs *regs, char w, u8 reg)
++{
++	if (w)
++		/* 16/32 bits mode */
++		return REG_PTR(regs, reg & 7);
++	else
++		/* 8 bits mode : al,cl,dl,bl,ah,ch,dh,bh */
++		return ((reg & 4) >> 2) + (u8*)REG_PTR(regs, reg & 3);
++
++	/* this is set just to prevent the compiler from complaining */
++	return NULL;
++}
++
++/* [do_emu] is called by exception 6 after an invalid opcode has been
++ * encountered. It will decode the prefixes and the instruction code, to try
++ * to emulate it, and will send a SIGILL or SIGSEGV to the process if not
++ * possible.
++ * REP/REPN prefixes are not supported anymore because it didn't make sense
++ * to emulate instructions prefixed with such opcodes since no arch-specific
++ * instruction start by one of them. At most, they will be the start of newer
++ * arch-specific instructions (SSE ?).
++ */
++asmlinkage void do_emu(struct pt_regs *regs, long error_code)
++{
++	enum {
++		PREFIX_ES   = 1,
++		PREFIX_CS   = 2,
++		PREFIX_SS   = 4,
++		PREFIX_DS   = 8,
++		PREFIX_FS   = 16,
++		PREFIX_GS   = 32,
++		PREFIX_SEG  = 63,  /* any seg */
++		PREFIX_D32  = 64,
++		PREFIX_A32  = 128,
++		PREFIX_LOCK = 256,
++	} prefixes = 0;
++
++	u32 *src, *dst;
++	u8 *eip;
++
++	preempt_disable();
++	eip = (u8*)regs->eip;
++
++#ifdef BENCH_CPU_EXCEPTION_BUT_NOT_THE_CODE
++	regs->eip += 3;
++	goto out;
++#endif
++	/* we'll first read all known opcode prefixes, and discard obviously
++	   invalid combinations.*/
++	while (1) {
++		/* prefix for CMOV, BSWAP, CMPXCHG, XADD */
++		if (*eip == 0x0F) {
++			eip++;
++
++			/* we'll verify if this is a BSWAP opcode, main source of SIGILL on 386's */
++			if ((*eip & 0xF8) == 0xC8) {  /* BSWAP */
++				u8 reg;
++
++				reg = *eip++ & 0x07;
++				src = reg_address(regs, 1, reg);
++				
++				__asm__ __volatile__ (
++						      "xchgb %%al, %%ah\n\t"
++						      "roll $16, %%eax\n\t"
++						      "xchgb %%al, %%ah\n\t"
++						      : "=a" (*(u32*)src)
++						      : "a" (*(u32*)src));
++				regs->eip = (u32)eip;
++				goto out;
++			}
++
++
++			/* we'll also try to emulate the CMPXCHG instruction (used in mutex locks).
++			   This instruction is often locked, but it's not possible to put a lock
++			   here. Anyway, I don't believe that there are lots of multiprocessors
++			   386 out there ...
++			*/
++			if ((*eip & 0xFE) == 0xB0) {  /* CMPXCHG */
++				u8 w, reg, modrm;
++
++				w = *eip & 1;
++				modrm = *(eip + 1);
++				eip += 2; /* skips all the opcodes */
++
++				reg = (modrm >> 3) & 7;
++				
++				dst = reg_address(regs, w, reg);
++				if ((modrm & 0xC0) == 0xC0) /* register to register */
++					src = reg_address(regs, w, modrm);
++				else {
++					src = modrm_address(regs, &eip, !(prefixes & PREFIX_A32), modrm);
++					/* we must verify that src is valid for this task */
++					if ((prefixes & (PREFIX_FS | PREFIX_GS)) ||
++					    verify_area(VERIFY_WRITE, (void *)src, (w?((prefixes & PREFIX_D32)?2:4):1))) {
++						do_general_protection(regs, error_code);
++					    goto out;
++					}
++				}
++				
++				if (!w) { /* 8 bits operands */
++					if ((u8)regs->eax == *(u8*)src) {
++						*(u8*)src = *(u8*)dst;
++						regs->eflags |= X86_EFLAGS_ZF;  /* set Zero Flag */
++					}
++					else {
++						*(u8*)&(regs->eax) = *(u8*)src;
++						regs->eflags &= ~X86_EFLAGS_ZF;  /* clear Zero Flag */
++					}
++				}
++				else if (!(prefixes & PREFIX_D32)) { /* 32 bits operands */
++					if ((u32)regs->eax == *(u32*)src) {
++						*(u32*)src = *(u32*)dst;
++						regs->eflags |= X86_EFLAGS_ZF;  /* set Zero Flag */
++					}
++					else {
++						regs->eax = *(u32*)src;
++						regs->eflags &= ~X86_EFLAGS_ZF;  /* clear Zero Flag */
++					}
++				}
++				else { /* 16 bits operands */
++					if ((u16)regs->eax == *(u16*)src) {
++						*(u16*)src = *(u16*)dst;
++						regs->eflags |= X86_EFLAGS_ZF;  /* set Zero Flag */
++					}
++					else {
++						*(u16*)&regs->eax = *(u16*)src;
++						regs->eflags &= ~X86_EFLAGS_ZF;  /* clear Zero Flag */
++					}
++				}
++				regs->eip = (u32)eip;
++				goto out;
++			}
++
++			/* we'll also try to emulate the XADD instruction (not very common) */
++			if ((*eip & 0xFE) == 0xC0) {  /* XADD */
++				u8 w, reg, modrm;
++				u32 op1, op2;
++
++				w = *eip & 1;
++				modrm = *(eip + 1);
++				eip += 2; /* skips all the opcodes */
++
++				reg = (modrm >> 3) & 7;
++				
++				dst = reg_address(regs, w, reg);
++				if ((modrm & 0xC0) == 0xC0) /* register to register */
++					src = reg_address(regs, w, modrm);
++				else {
++					src = modrm_address(regs, &eip, !(prefixes & PREFIX_A32), modrm);
++					/* we must verify that src is valid for this task */
++					if ((prefixes & (PREFIX_FS | PREFIX_GS)) ||
++					    verify_area(VERIFY_WRITE, (void *)src, (w?((prefixes & PREFIX_D32)?2:4):1))) {
++						do_general_protection(regs, error_code);
++						goto out;
++					}
++				}
++				
++				if (!w) { /* 8 bits operands */
++					op1 = *(u8*)src;
++					op2 = *(u8*)dst;
++					*(u8*)src = op1 + op2;
++					*(u8*)dst = op1;
++				}
++				else if (!(prefixes & PREFIX_D32)) { /* 32 bits operands */
++					op1 = *(u32*)src;
++					op2 = *(u32*)dst;
++					*(u32*)src = op1 + op2;
++					*(u32*)dst = op1;
++				}
++				else { /* 16 bits operands */
++					op1 = *(u16*)src;
++					op2 = *(u16*)dst;
++					*(u16*)src = op1 + op2;
++					*(u16*)dst = op1;
++				}
++				regs->eip = (u32)eip;
++				goto out;
++			}
++		} /* if (*eip == 0x0F) */
++		else if ((*eip & 0xfc) == 0x64) {
++			switch (*eip) {
++			case 0x66: /* Operand switches 16/32 bits */
++				if (prefixes & PREFIX_D32)
++					goto invalid_opcode;
++				prefixes |= PREFIX_D32;
++				eip++;
++				continue;
++			case 0x67: /* Address switches 16/32 bits */
++				if (prefixes & PREFIX_A32)
++					goto invalid_opcode;
++				prefixes |= PREFIX_A32;
++				eip++;
++				continue;
++			case 0x64: /* FS: */
++				if (prefixes & PREFIX_SEG)
++					goto invalid_opcode;
++				prefixes |= PREFIX_FS;
++				eip++;
++				continue;
++			case 0x65: /* GS: */
++				if (prefixes & PREFIX_SEG)
++					goto invalid_opcode;
++				prefixes |= PREFIX_GS;
++				eip++;
++				continue;
++			}
++		}
++		else if (*eip == 0xf0) { /* lock */
++			if (prefixes & PREFIX_LOCK)
++				goto invalid_opcode;
++			prefixes |= PREFIX_LOCK;
++				eip++;
++				continue;
++		}
++		else if ((*eip & 0xe7) == 0x26) {
++			switch (*eip) {
++			case 0x26: /* ES: */
++				if (prefixes & PREFIX_SEG)
++					goto invalid_opcode;
++				prefixes |= PREFIX_ES;
++				eip++;
++				continue;
++			case 0x2E: /* CS: */
++				if (prefixes & PREFIX_SEG)
++					goto invalid_opcode;
++				prefixes |= PREFIX_CS;
++				eip++;
++				continue;
++			case 0x36: /* SS: */
++				if (prefixes & PREFIX_SEG)
++					goto invalid_opcode;
++				prefixes |= PREFIX_SS;
++				eip++;
++				continue;
++			case 0x3E: /* DS: */
++				if (prefixes & PREFIX_SEG)
++					goto invalid_opcode;
++				prefixes |= PREFIX_DS;
++				eip++;
++				continue;
++			}
++		}
++		/* if this opcode has not been processed, it's not a prefix. */
++		break;
++	}
++
++	/* it's a case we can't handle. Unknown opcode or too many prefixes. */
++invalid_opcode:
++	preempt_enable();
++#ifdef CONFIG_CPU_EMU486_DEBUG
++	printk(KERN_DEBUG "do_emu() : invalid opcode detected @%p : %02x %02x ...\n", eip, eip[0], eip[1]);
++#endif
++	do_invalid_op(regs, error_code);
++	return;
++
++out:
++	preempt_enable();
++}
+diff -urN kernel-source-2.6.6/arch/i386/kernel/entry.S kernel-source-2.6.6-1/arch/i386/kernel/entry.S
+--- kernel-source-2.6.6/arch/i386/kernel/entry.S	2004-05-10 19:47:45.000000000 +1000
++++ kernel-source-2.6.6-1/arch/i386/kernel/entry.S	2004-05-10 22:21:09.000000000 +1000
+@@ -562,7 +562,11 @@
+ 
+ ENTRY(invalid_op)
+ 	pushl $0
++#ifdef CONFIG_X86_EMU486
++	pushl $do_emu
++#else
+ 	pushl $do_invalid_op
++#endif
+ 	jmp error_code
+ 
+ ENTRY(coprocessor_segment_overrun)

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/xfs-ioctl32.dpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/xfs-ioctl32.dpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/patches/xfs-ioctl32.dpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,302 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Add 32bit ioctl translations to XFS
+## DP: Patch author: Christoph Hellwig <hch at lst.de>
+## DP: Upstream status: pending submission in next XFS merge
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+--- 1.31/fs/xfs/Makefile	2004-06-18 04:05:01 +02:00
++++ edited/fs/xfs/Makefile	2004-08-11 10:20:52 +02:00
+@@ -71,6 +71,7 @@
+ xfs-$(CONFIG_XFS_POSIX_MAC)	+= xfs_mac.o
+ xfs-$(CONFIG_PROC_FS)		+= linux-2.6/xfs_stats.o
+ xfs-$(CONFIG_SYSCTL)		+= linux-2.6/xfs_sysctl.o
++xfs-$(CONFIG_COMPAT)		+= linux-2.6/xfs_ioctl32.o
+ 
+ 
+ xfs-y				+= xfs_alloc.o \
+--- 1.10/fs/xfs/xfs_fs.h	2004-02-27 07:28:05 +01:00
++++ edited/fs/xfs/xfs_fs.h	2004-08-11 18:27:01 +02:00
+@@ -445,6 +445,13 @@
+ #define XFS_FSOP_GOING_FLAGS_NOLOGFLUSH		0x2	/* don't flush log nor data */
+ 
+ /*
++ * ioctl commands that are used by Linux filesystems
++ */
++#define XFS_IOC_GETXFLAGS	_IOR('f', 1, long)
++#define XFS_IOC_SETXFLAGS	_IOW('f', 2, long)
++#define XFS_IOC_GETVERSION	_IOR('v', 1, long)
++
++/*
+  * ioctl commands that replace IRIX fcntl()'s
+  * For 'documentation' purposed more than anything else,
+  * the "cmd #" field reflects the IRIX fcntl number.
+--- 1.27/fs/xfs/linux-2.6/xfs_ioctl.c	2004-05-24 05:08:10 +02:00
++++ edited/fs/xfs/linux-2.6/xfs_ioctl.c	2004-08-11 18:26:25 +02:00
+@@ -73,14 +73,6 @@
+ #include <linux/pagemap.h>
+ 
+ /*
+- * ioctl commands that are used by Linux filesystems
+- */
+-#define XFS_IOC_GETXFLAGS	_IOR('f', 1, long)
+-#define XFS_IOC_SETXFLAGS	_IOW('f', 2, long)
+-#define XFS_IOC_GETVERSION	_IOR('v', 1, long)
+-
+-
+-/*
+  * xfs_find_handle maps from userspace xfs_fsop_handlereq structure to
+  * a file or fs handle.
+  *
+--- 1.84/fs/xfs/linux-2.6/xfs_super.c	2004-06-18 06:09:11 +02:00
++++ edited/fs/xfs/linux-2.6/xfs_super.c	2004-08-11 10:20:52 +02:00
+@@ -66,6 +66,7 @@
+ #include "xfs_buf_item.h"
+ #include "xfs_utils.h"
+ #include "xfs_version.h"
++#include "xfs_ioctl32.h"
+ 
+ #include <linux/namei.h>
+ #include <linux/init.h>
+@@ -857,6 +858,10 @@
+ 		goto undo_shaker;
+ 	}
+ 
++	error = xfs_ioctl32_init();
++	if (error)
++		goto undo_ioctl32;
++
+ 	error = register_filesystem(&xfs_fs_type);
+ 	if (error)
+ 		goto undo_register;
+@@ -864,6 +869,9 @@
+ 	return 0;
+ 
+ undo_register:
++	xfs_ioctl32_exit();
++
++undo_ioctl32:
+ 	kmem_shake_deregister(xfs_inode_shaker);
+ 
+ undo_shaker:
+@@ -882,6 +890,7 @@
+ 	vfs_exitquota();
+ 	XFS_DM_EXIT(&xfs_fs_type);
+ 	unregister_filesystem(&xfs_fs_type);
++	xfs_ioctl32_exit();
+ 	kmem_shake_deregister(xfs_inode_shaker);
+ 	xfs_cleanup();
+ 	pagebuf_terminate();
+--- /dev/null	2004-08-10 00:19:24.000000000 +0200
++++ a/fs/xfs/linux-2.6/xfs_ioctl32.c	2004-08-11 18:27:20.008881680 +0200
+@@ -0,0 +1,162 @@
++/*
++ * Copyright (c) 2004 Silicon Graphics, Inc.  All Rights Reserved.
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of version 2 of the GNU General Public License as
++ * published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it would be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
++ *
++ * Further, this software is distributed without any warranty that it is
++ * free of the rightful claim of any third person regarding infringement
++ * or the like.  Any license provided herein, whether implied or
++ * otherwise, applies only to this software file.  Patent licenses, if
++ * any, provided herein do not apply to combinations of this program with
++ * other software, or any other product whatsoever.
++ *
++ * You should have received a copy of the GNU General Public License along
++ * with this program; if not, write the Free Software Foundation, Inc., 59
++ * Temple Place - Suite 330, Boston MA 02111-1307, USA.
++ *
++ * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
++ * Mountain View, CA  94043, or:
++ *
++ * http://www.sgi.com
++ *
++ * For further information regarding this notice, see:
++ *
++ * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
++ */
++
++#include <linux/config.h>
++#include <linux/compat.h>
++#include <linux/init.h>
++#include <linux/ioctl.h>
++#include <linux/ioctl32.h>
++#include <linux/syscalls.h>
++#include <linux/types.h>
++#include <asm/uaccess.h>
++
++#include "xfs_types.h"
++#include "xfs_fs.h"
++#include "xfs_dfrag.h"
++
++#if defined(CONFIG_IA64) || defined(CONFIG_X86_64)
++#define BROKEN_X86_ALIGNMENT
++#endif
++
++
++typedef struct xfs_fsop_bulkreq32 {
++	compat_uptr_t	lastip;		/* last inode # pointer		*/
++	__s32		icount;		/* count of entries in buffer	*/
++	compat_uptr_t	ubuffer;	/* user buffer for inode desc.	*/
++	__s32		ocount;		/* output count pointer		*/
++} xfs_fsop_bulkreq32_t;
++
++static int
++xfs_ioctl32_bulkstat(
++	unsigned int		fd,
++	unsigned int		cmd,
++	unsigned long		arg,
++	struct file *		file)
++{
++	xfs_fsop_bulkreq32_t	__user *p32 = (void __user *)arg;
++	xfs_fsop_bulkreq_t	__user *p = compat_alloc_user_space(sizeof(*p));
++	u32 addr;
++
++	if (get_user(addr, &p32->lastip) ||
++	    put_user(compat_ptr(addr), &p->lastip) ||
++	    copy_in_user(&p->icount, &p32->icount, sizeof(s32)) ||
++	    get_user(addr, &p32->ubuffer) ||
++	    put_user(compat_ptr(addr), &p->ubuffer) ||
++	    get_user(addr, &p32->ocount) ||
++	    put_user(compat_ptr(addr), &p->ocount))
++		return -EFAULT;
++
++	return sys_ioctl(fd, cmd, (unsigned long)p);
++}
++
++struct ioctl_trans xfs_ioctl32_trans[] = {
++	{ XFS_IOC_DIOINFO, },
++	{ XFS_IOC_FSGEOMETRY_V1, },
++	{ XFS_IOC_FSGEOMETRY, },
++	{ XFS_IOC_GETVERSION, },
++	{ XFS_IOC_GETXFLAGS, },
++	{ XFS_IOC_SETXFLAGS, },
++	{ XFS_IOC_FSGETXATTR, },
++	{ XFS_IOC_FSSETXATTR, },
++	{ XFS_IOC_FSGETXATTRA, },
++	{ XFS_IOC_FSSETDM, },
++	{ XFS_IOC_GETBMAP, },
++	{ XFS_IOC_GETBMAPA, },
++	{ XFS_IOC_GETBMAPX, },
++/* not handled
++	{ XFS_IOC_FD_TO_HANDLE, },
++	{ XFS_IOC_PATH_TO_HANDLE, },
++	{ XFS_IOC_PATH_TO_HANDLE, },
++	{ XFS_IOC_PATH_TO_FSHANDLE, },
++	{ XFS_IOC_OPEN_BY_HANDLE, },
++	{ XFS_IOC_FSSETDM_BY_HANDLE, },
++	{ XFS_IOC_READLINK_BY_HANDLE, },
++	{ XFS_IOC_ATTRLIST_BY_HANDLE, },
++	{ XFS_IOC_ATTRMULTI_BY_HANDLE, },
++*/
++	{ XFS_IOC_FSCOUNTS, NULL, },
++	{ XFS_IOC_SET_RESBLKS, NULL, },
++	{ XFS_IOC_GET_RESBLKS, NULL, },
++	{ XFS_IOC_FSGROWFSDATA, NULL, },
++	{ XFS_IOC_FSGROWFSLOG, NULL, },
++	{ XFS_IOC_FSGROWFSRT, NULL, },
++	{ XFS_IOC_FREEZE, NULL, },
++	{ XFS_IOC_THAW, NULL, },
++	{ XFS_IOC_GOINGDOWN, NULL, },
++	{ XFS_IOC_ERROR_INJECTION, NULL, },
++	{ XFS_IOC_ERROR_CLEARALL, NULL, },
++#ifndef BROKEN_X86_ALIGNMENT
++	/* xfs_flock_t and xfs_bstat_t have wrong u32 vs u64 alignment */
++	{ XFS_IOC_ALLOCSP, },
++	{ XFS_IOC_FREESP, },
++	{ XFS_IOC_RESVSP, },
++	{ XFS_IOC_UNRESVSP, },
++	{ XFS_IOC_ALLOCSP64, },
++	{ XFS_IOC_FREESP64, },
++	{ XFS_IOC_RESVSP64, },
++	{ XFS_IOC_UNRESVSP64, },
++	{ XFS_IOC_SWAPEXT, },
++	{ XFS_IOC_FSBULKSTAT_SINGLE, xfs_ioctl32_bulkstat },
++	{ XFS_IOC_FSBULKSTAT, xfs_ioctl32_bulkstat},
++	{ XFS_IOC_FSINUMBERS, xfs_ioctl32_bulkstat},
++#endif
++	{ 0, },
++};
++
++int __init
++xfs_ioctl32_init(void)
++{
++	int error, i;
++
++	for (i = 0; xfs_ioctl32_trans[i].cmd != 0; i++) {
++		error = register_ioctl32_conversion(xfs_ioctl32_trans[i].cmd,
++				xfs_ioctl32_trans[i].handler);
++		if (error)
++			goto fail;
++	}
++
++	return 0;
++
++ fail:
++	while (--i)
++		unregister_ioctl32_conversion(xfs_ioctl32_trans[i].cmd);
++	return error;
++}
++
++void
++xfs_ioctl32_exit(void)
++{
++	int i;
++
++	for (i = 0; xfs_ioctl32_trans[i].cmd != 0; i++)
++		unregister_ioctl32_conversion(xfs_ioctl32_trans[i].cmd);
++}
+--- /dev/null	2004-08-10 00:19:24.000000000 +0200
++++ a/fs/xfs/linux-2.6/xfs_ioctl32.h	2004-07-11 16:42:03.000000000 +0200
+@@ -0,0 +1,41 @@
++/*
++ * Copyright (c) 2004 Silicon Graphics, Inc.  All Rights Reserved.
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of version 2 of the GNU General Public License as
++ * published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it would be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
++ *
++ * Further, this software is distributed without any warranty that it is
++ * free of the rightful claim of any third person regarding infringement
++ * or the like.  Any license provided herein, whether implied or
++ * otherwise, applies only to this software file.  Patent licenses, if
++ * any, provided herein do not apply to combinations of this program with
++ * other software, or any other product whatsoever.
++ *
++ * You should have received a copy of the GNU General Public License along
++ * with this program; if not, write the Free Software Foundation, Inc., 59
++ * Temple Place - Suite 330, Boston MA 02111-1307, USA.
++ *
++ * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
++ * Mountain View, CA  94043, or:
++ *
++ * http://www.sgi.com
++ *
++ * For further information regarding this notice, see:
++ *
++ * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
++ */
++
++#include <linux/config.h>
++
++#ifdef CONFIG_COMPAT
++extern int xfs_ioctl32_init(void);
++extern void xfs_ioctl32_exit(void);
++#else
++static inline int xfs_ioctl32_init(void) { return 0; }
++static inline void xfs_ioctl32_exit(void) { }
++#endif

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/prune-non-free
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/prune-non-free	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/prune-non-free	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# Scrubs known non-DFSG-compliant stuff out of the source tree so that a
+# DFSG-free .orig.tar.gz for the source package can be created.
+
+PROGNAME=${0##*/}
+
+if [ ! -d kernel ]; then
+    echo "$PROGNAME: no unpacked source tree in current working directory" >&2
+    exit 1
+fi
+
+for file in $(grep -h '^X' debian/patches/series/2.6.8-* | cut -d' ' -f2); do
+    rm -f $file
+done
+
+# Upstream deletes our debian directory.  Bastards.
+sed 's#rm -rf $(objtree)/debian/#test -f $(objtree)/debian/official || rm -rf $(objtree)/debian/#' scripts/package/Makefile > scripts/package/Makefile.ouch
+mv scripts/package/Makefile.ouch scripts/package/Makefile
+

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/rules
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/rules	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/rules	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,141 @@
+#!/usr/bin/make -f
+#
+# debian/rules for kernel-source.
+#
+# GNU copyright 1997 to 1999 by Joey Hess.
+# Copyright (c) 1999-2002 Herbert Xu <herbert at debian.org>
+# Copyright (c) 2004 Jens Schmalzing <jensen at debian.org>
+#
+
+release := $(shell dpkg-parsechangelog | awk '/^Version: / { print $$2 }')
+upstream := $(shell echo "$(release)" | sed 's/:\?\([0-9\.]\+\)-[0-9].*/\1/')
+patch_home := debian/kernel-patch-debian-$(upstream)/usr/src/kernel-patches/all/$(upstream)
+
+# Little things that help you...
+patch:
+	override_version=$(release) home=debian/patches sh debian/apply
+
+unpatch:
+	override_version=$(release) home=debian/patches sh debian/apply $(upstream)
+
+../orig/kernel-source-$(upstream)-$(upstream):
+ifneq (,$(wildcard ../kernel-source-$(upstream)_$(upstream).orig.tar.gz))
+	mkdir -p ../orig
+	tar -C ../orig -xzf ../kernel-source-$(upstream)_$(upstream).orig.tar.gz
+else
+$(error "Can't find orig tarball.")
+endif
+
+orig: ../orig/kernel-source-$(upstream)-$(upstream)
+	rsync -av --delete --exclude .svn --exclude debian ../orig/kernel-source-$(upstream)-$(upstream)/ .
+
+diff: ../orig/kernel-source-$(upstream)-$(upstream)
+	(cd .. && diff --exclude debian --exclude .svn -ur orig/kernel-source-$(upstream)-$(upstream) kernel-source-$(upstream)-$(upstream))
+
+#####################
+# Below comes Herbert's stuff with minimal additions
+
+build:
+# Ye olde no-op.
+
+clean:
+	dh_testdir
+	dh_testroot
+
+# Hack in case we killed it in the middle of something
+ifneq (,$(wildcard version.Debian))
+ifneq ($(shell cat version.Debian),$(upstream))
+	override_version=$(release) home=debian/patches sh debian/apply $(upstream)
+endif
+endif
+
+	make-kpkg clean
+	rm -f stamp-* .config* version.Debian 
+
+	dh_clean
+
+install:
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+debian/kernel-tree-$(upstream).substvars: debian/patches debian/make-substvars
+	sh debian/make-substvars $(upstream) > $@
+
+binary-kernel-patch:
+	mkdir -p $(patch_home) $(patch_home)/apply $(patch_home)/debian $(patch_home)/unpatch
+	cp debian/patches/*.dpatch $(patch_home)/debian
+	chmod -x $(patch_home)/debian/*.dpatch
+	mkdir -p $(patch_home)/debian/series
+	cp debian/patches/series/* $(patch_home)/debian/series/
+
+	sed 's/@version@/$(release)/' debian/apply > $(patch_home)/apply/debian
+	sed 's/@upstream@/$(upstream)/' debian/unpatch > $(patch_home)/unpatch/debian
+	chmod a+x $(patch_home)/apply/debian $(patch_home)/unpatch/debian
+	bzip2 -9 $(patch_home)/debian/*.dpatch
+
+	dh_fixperms -pkernel-patch-debian-$(upstream)
+	dh_installdocs -pkernel-patch-debian-$(upstream)
+	dh_installchangelogs -pkernel-patch-debian-$(upstream)
+	dh_compress -pkernel-patch-debian-$(upstream)
+	dh_installdeb -pkernel-patch-debian-$(upstream)
+	dh_gencontrol -pkernel-patch-debian-$(upstream)
+	dh_builddeb -pkernel-patch-debian-$(upstream)
+	
+# Build architecture-independent files here.
+binary-indep: install binary-kernel-patch debian/kernel-tree-$(upstream).substvars
+	dh_testdir
+	dh_testroot
+
+# Patch kernel with the Debian patch!
+	home=$(patch_home)/debian sh $(patch_home)/apply/debian
+	make-kpkg kernel-source
+
+# kernel-doc takes a LONG time, so build kernel-tree first for immediate use
+	dh_fixperms -pkernel-patch-debian-$(upstream)
+	dh_installdocs -pkernel-tree-$(upstream)
+	dh_installchangelogs -pkernel-tree-$(upstream)
+	dh_compress -pkernel-tree-$(upstream)
+	dh_installdeb -pkernel-tree-$(upstream)
+	dh_gencontrol -pkernel-tree-$(upstream)
+	dh_builddeb -pkernel-tree-$(upstream)
+	
+	make-kpkg kernel-doc
+# Clean up after yourself
+	home=$(patch_home)/debian sh $(patch_home)/apply/debian $(upstream)	
+
+# Build architecture-dependent files here.
+binary-arch:
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
+
+#####################
+# The following targets set the stage for building the Debian packages.
+# 
+# They unpack the vanilla kernel, remove the tainted bits, and package
+# everything again.  This produces both a free .orig.tar.gz in the
+# parent directory and an unpacked version plus the debian
+# subdirectory in the current directory.  In order to use these
+# targets, download the vanilla kernel as a gzipped tarball, put it
+# into the parent directory as linux-<release>.tar.gz, and run
+# 'debian/rules prune'.
+
+# phony target for easy reference
+.PHONY:	prune
+prune:	../kernel-source-$(upstream)_$(upstream).orig.tar.gz
+
+# prune the tainted bits from the vanilla kernel and package the result
+../kernel-source-$(upstream)_$(upstream).orig.tar.gz: debian/official
+	chmod u+x debian/prune-non-free
+	debian/prune-non-free
+	test $(notdir $(CURDIR)) = kernel-source-$(upstream)-$(upstream)
+	tar czCf .. $@ --exclude debian kernel-source-$(upstream)-$(upstream)
+
+# unpack the vanilla kernel from a tarball, move stuff over, and create a stamp file
+debian/official: ../linux-$(upstream).tar.gz
+	tar xzCf .. $<
+	mv ../linux-$(upstream)/* .
+	rmdir ../linux-$(upstream)
+	echo This is the Debian version of Linux $(upstream). > $@


Property changes on: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/rules
___________________________________________________________________
Name: svn:executable
   + *

Added: tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/unpatch
===================================================================
--- tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/unpatch	2005-01-13 16:18:18 UTC (rev 2292)
+++ tags/kernel/source/kernel-source-2.6.8-2.6.8/2.6.8-13/debian/unpatch	2005-01-13 16:30:40 UTC (rev 2293)
@@ -0,0 +1,8 @@
+#!/bin/sh
+# $Id: unpatch,v 1.3 2003/06/30 12:49:09 herbert Exp $
+
+set -e
+
+upstream=${override_upstream:- at upstream@}
+
+/usr/src/kernel-patches/all/$upstream/apply/debian $upstream




More information about the Kernel-svn-changes mailing list