http://linus.bkbits.net/linux-2.5
torvalds@ppc970.osdl.org|ChangeSet|20040401041229|50260 torvalds
# This is a BitKeeper generated diff -Nru style patch.
#
# drivers/pci/hotplug/cpqphp_core.c
#   2004/03/31 05:37:12-08:00 Alexander.Stohr@gmx.de +3 -3
#   double semicolon cleanup
# 
# ChangeSet
#   2004/04/01 12:21:32+10:00 tes@sgi.com 
#   [XFS] Be explicit in adding in the non-transactional data to the reservation
#   estimate.  We must add in for the worst case of a log stripe taking us the
#   full distance for a log stripe boundary.
#   
#   SGI Modid: xfs-linux:xfs-kern:169304a
# 
# fs/xfs/xfs_macros.c
#   2004/04/01 12:21:13+10:00 tes@sgi.com +0 -8
#   [XFS] Be explicit in adding in the non-transactional data to the reservation
#   estimate.  We must add in for the worst case of a log stripe taking us the
#   full distance for a log stripe boundary.
# 
# fs/xfs/xfs_log_priv.h
#   2004/04/01 12:21:13+10:00 tes@sgi.com +1 -6
#   [XFS] Be explicit in adding in the non-transactional data to the reservation
#   estimate.  We must add in for the worst case of a log stripe taking us the
#   full distance for a log stripe boundary.
# 
# fs/xfs/xfs_log.c
#   2004/04/01 12:21:13+10:00 tes@sgi.com +23 -13
#   [XFS] Be explicit in adding in the non-transactional data to the reservation
#   estimate.  We must add in for the worst case of a log stripe taking us the
#   full distance for a log stripe boundary.
# 
# ChangeSet
#   2004/03/31 18:18:18-08:00 torvalds@evo.osdl.org 
#   acpi: enable global wake events by default
#   
#   People need the global wake events even when not sleeping:
#   they are used for lid open events at least on some laptops.
#   As such, they should be enabled by default.
#   
#   You can disable them with "acpi_leave_gpes_disabled" if
#   your machine doesn't need them, and you want to get a few
#   less GPE's.
# 
# drivers/acpi/utilities/utglobal.c
#   2004/03/31 18:18:12-08:00 torvalds@evo.osdl.org +0 -1
#   acpi: enable global wake events by default
#   
#   People need the global wake events even when not sleeping:
#   they are used for lid open events at least on some laptops.
#   As such, they should be enabled by default.
#   
#   You can disable them with "acpi_leave_gpes_disabled" if
#   your machine doesn't need them, and you want to get a few
#   less GPE's.
# 
# drivers/acpi/osl.c
#   2004/03/31 18:18:12-08:00 torvalds@evo.osdl.org +5 -5
#   acpi: enable global wake events by default
#   
#   People need the global wake events even when not sleeping:
#   they are used for lid open events at least on some laptops.
#   As such, they should be enabled by default.
#   
#   You can disable them with "acpi_leave_gpes_disabled" if
#   your machine doesn't need them, and you want to get a few
#   less GPE's.
# 
# ChangeSet
#   2004/04/01 12:16:22+10:00 nathans@sgi.com 
#   [XFS] Make the XFS access checks like the other Linux filesystems for DAC.
#   
#   SGI Modid: xfs-linux:xfs-kern:169300a
# 
# fs/xfs/xfs_inode.c
#   2004/04/01 12:16:04+10:00 nathans@sgi.com +3 -4
#   [XFS] Make the XFS access checks like the other Linux filesystems for DAC.
# 
# ChangeSet
#   2004/04/01 12:07:01+10:00 nathans@sgi.com 
#   [XFS] Ensure sb not flushed async on a SYNC_WAIT sync.  Fixed by Bart Samwel.
#   
#   SGI Modid: xfs-linux:xfs-kern:169208a
# 
# fs/xfs/xfs_vfsops.c
#   2004/04/01 12:06:43+10:00 nathans@sgi.com +4 -2
#   [XFS] Ensure sb not flushed async on a SYNC_WAIT sync.  Fixed by Bart Samwel.
# 
# ChangeSet
#   2004/04/01 12:03:53+10:00 nathans@sgi.com 
#   [XFS] Disallow logbufs=0 unless the correct compilation flags used,
#   else we panic.
#   
#   SGI Modid: xfs-linux:xfs-kern:169200a
# 
# fs/xfs/xfs_vfsops.c
#   2004/04/01 12:03:34+10:00 nathans@sgi.com +5 -2
#   [XFS] Disallow logbufs=0 unless the correct compilation flags used,
#   else we panic.
# 
# ChangeSet
#   2004/04/01 12:01:15+10:00 nathans@sgi.com 
#   [XFS] Fix shortform attr flags botch affecting listxattr - from Andreas Gruenbacher.
#   
#   SGI Modid: xfs-linux:xfs-kern:169199a
# 
# fs/xfs/xfs_attr_leaf.c
#   2004/04/01 12:00:56+10:00 nathans@sgi.com +3 -4
#   [XFS] Fix shortform attr flags botch affecting listxattr - from Andreas Gruenbacher.
# 
# ChangeSet
#   2004/04/01 11:58:20+10:00 hch@sgi.com 
#   [XFS] Fix r/o check in xfs_ioc_space, fix checks on xfs_swapext validity.
#   
#   SGI Modid: xfs-linux:xfs-kern:169135a
# 
# fs/xfs/xfs_dfrag.c
#   2004/04/01 11:58:02+10:00 hch@sgi.com +14 -12
#   [XFS] Fix r/o check in xfs_ioc_space, fix checks on xfs_swapext validity.
# 
# fs/xfs/linux/xfs_ioctl.c
#   2004/04/01 11:58:02+10:00 hch@sgi.com +7 -1
#   [XFS] Fix r/o check in xfs_ioc_space, fix checks on xfs_swapext validity.
# 
# ChangeSet
#   2004/04/01 11:55:14+10:00 nathans@sgi.com 
#   [XFS] Reinstate some accidentally dropped log IO error injection code.
#   
#   SGI Modid: xfs-linux:xfs-kern:169048a
# 
# fs/xfs/xfs_log.c
#   2004/04/01 11:54:55+10:00 nathans@sgi.com +13 -11
#   [XFS] Reinstate some accidentally dropped log IO error injection code.
# 
# ChangeSet
#   2004/04/01 11:52:31+10:00 nathans@sgi.com 
#   [XFS] Reenable non-block flag for DMAPI.
#   
#   SGI Modid: xfs-linux:xfs-kern:169038a
# 
# fs/xfs/linux/xfs_iops.c
#   2004/04/01 11:52:13+10:00 nathans@sgi.com +4 -0
#   [XFS] Reenable non-block flag for DMAPI.
# 
# ChangeSet
#   2004/04/01 11:49:59+10:00 nstraz@sgi.com 
#   [XFS] Use unsigned long long for end_offset so we don't overflow it.
#   
#   SGI Modid: xfs-linux:xfs-kern:168809a
# 
# fs/xfs/linux/xfs_aops.c
#   2004/04/01 11:49:40+10:00 nstraz@sgi.com +4 -4
#   [XFS] Use unsigned long long for end_offset so we don't overflow it.
# 
# ChangeSet
#   2004/04/01 11:40:12+10:00 nathans@sgi.com 
#   [XFS] Fix debug builds - need sb_features2 details in endian translation code.
#   
#   SGI Modid: xfs-linux:xfs-kern:168693a
# 
# fs/xfs/xfs_mount.c
#   2004/04/01 11:39:54+10:00 nathans@sgi.com +2 -1
#   [XFS] Fix debug builds - need sb_features2 details in endian translation code.
# 
# ChangeSet
#   2004/04/01 11:36:15+10:00 overby@sgi.com 
#   [XFS] Define a new superblock field for more feature bits.  Take the last
#   feature bit in sb_versionnum to use to indicate that the new feature bit
#   field is to be used.
#   
#   SGI Modid: xfs-linux:xfs-kern:168665a
# 
# fs/xfs/xfs_sb.h
#   2004/04/01 11:35:56+10:00 overby@sgi.com +59 -5
#   [XFS] Define a new superblock field for more feature bits.  Take the last
#   feature bit in sb_versionnum to use to indicate that the new feature bit
#   field is to be used.
# 
# fs/xfs/xfs_macros.c
#   2004/04/01 11:35:56+10:00 overby@sgi.com +9 -0
#   [XFS] Define a new superblock field for more feature bits.  Take the last
#   feature bit in sb_versionnum to use to indicate that the new feature bit
#   field is to be used.
# 
# ChangeSet
#   2004/04/01 11:29:28+10:00 overby@sgi.com 
#   [XFS] Add space for inode and allocation btrees to ITRUNCATE log reservation.
#   Add XFS_ALLOCFREE_LOG_RES to IFREE log reservation.
#   
#   SGI Modid: xfs-linux:xfs-kern:168597a
# 
# fs/xfs/xfs_trans.h
#   2004/04/01 11:29:10+10:00 overby@sgi.com +8 -1
#   [XFS] Add space for inode and allocation btrees to ITRUNCATE log reservation.
#   Add XFS_ALLOCFREE_LOG_RES to IFREE log reservation.
# 
# ChangeSet
#   2004/04/01 11:22:52+10:00 hch@sgi.com 
#   [XFS] use ssize_t to store VOP_READ/VOP_WRITE return value.
#   
#   SGI Modid: xfs-linux:xfs-kern:168167a
# 
# fs/xfs/linux/xfs_file.c
#   2004/04/01 11:22:34+10:00 hch@sgi.com +23 -22
#   [XFS] use ssize_t to store VOP_READ/VOP_WRITE return value.
# 
# ChangeSet
#   2004/04/01 10:43:55+10:00 sandeen@sgi.com 
#   [XFS] Use PFLAGS_RESTORE_FSTRANS in place of PFLAGS_RESTORE, only restore
#   previously saved FSTRANS state.  Otherwise we can lose process flags.
#   
#   SGI Modid: xfs-linux:xfs-kern:168082a
# 
# fs/xfs/xfs_trans.c
#   2004/04/01 10:43:37+10:00 sandeen@sgi.com +6 -6
#   [XFS] Use PFLAGS_RESTORE_FSTRANS in place of PFLAGS_RESTORE, only restore
#   previously saved FSTRANS state.  Otherwise we can lose process flags.
# 
# fs/xfs/linux/kmem.h
#   2004/04/01 10:43:37+10:00 sandeen@sgi.com +11 -3
#   [XFS] Use PFLAGS_RESTORE_FSTRANS in place of PFLAGS_RESTORE, only restore
#   previously saved FSTRANS state.  Otherwise we can lose process flags.
# 
# ChangeSet
#   2004/04/01 10:38:16+10:00 nathans@sgi.com 
#   [XFS] Remove dup fdatasync/fdatawait call on fsync.  Means we no longer
#   take the iolock here, and readers no longer conflict with concurrent
#   fsync activity.  Kudos to Steve!
#   
#   SGI Modid: xfs-linux:xfs-kern:167949a
# 
# fs/xfs/xfs_vnodeops.c
#   2004/04/01 10:37:58+10:00 nathans@sgi.com +6 -98
#   [XFS] Remove dup fdatasync/fdatawait call on fsync.  Means we no longer
#   take the iolock here, and readers no longer conflict with concurrent
#   fsync activity.  Kudos to Steve!
# 
# ChangeSet
#   2004/04/01 10:35:23+10:00 nathans@sgi.com 
#   [XFS] Fix up mrlock debug code, and ensure its only built under DEBUG.
#   
#   SGI Modid: xfs-linux:xfs-kern:167944a
# 
# fs/xfs/linux/mrlock.h
#   2004/04/01 10:31:40+10:00 nathans@sgi.com +3 -1
#   [XFS] Fix up mrlock debug code, and ensure its only built under DEBUG.
# 
# ChangeSet
#   2004/03/31 15:18:48-08:00 akpm@osdl.org 
#   [PATCH] io_getevents leak fix
#   
#   Spotted by Suparna: if the first range check fails, we leak a ref on the io
#   context.
# 
# fs/aio.c
#   2004/03/31 03:14:13-08:00 akpm@osdl.org +3 -5
#   io_getevents leak fix
# 
# ChangeSet
#   2004/03/31 12:43:37-08:00 bunk@fs.tum.de 
#   [PATCH] fix ALSA au88x0 compilation
#   
#   In the ALSA cleanup for duplicate PCI ID's, they weren't exactly
#   duplicated, resulting in problems in the au8810.c driver.
#   
#   This fixes the problem
# 
# include/linux/pci_ids.h
#   2004/03/31 12:01:26-08:00 bunk@fs.tum.de +3 -2
#   fix ALSA au88x0 compilation
# 
# ChangeSet
#   2004/03/31 12:01:37-08:00 jgarzik@pobox.com 
#   [PATCH] fix VIA SATA device detection
#   
#   The last fix apparently only worked for device 0, since the driver
#   screwed up the port offsets (due to a wonky VIA hardware layout,
#   really). 
#   
#   This patch fixes device 1 detection for the users still seeing problems
#   in -rc3.
# 
# drivers/scsi/sata_via.c
#   2004/03/31 03:47:24-08:00 jgarzik@pobox.com +15 -10
#   fix VIA SATA device detection
# 
# ChangeSet
#   2004/03/31 12:01:25-08:00 jgarzik@pobox.com 
#   [PATCH] Fix oopses in fealnx driver TX path
#   
#   In both uniprocessor and SMP, the fealnx driver's TX-submit path can 
#   race against the interrupt handler, with disastrous results.  Add the
#   lock that needed to be there all along, to fix this.
#   
#   There's another problem in the RX path, that will be sent as a separate 
#   patch, as soon as we get that patch 100% nailed down, and acceptable for
#   a Release Candidate.
# 
# drivers/net/fealnx.c
#   2004/03/26 06:31:07-08:00 jgarzik@pobox.com +8 -2
#   Fix oopses in fealnx driver TX path
# 
# ChangeSet
#   2004/03/31 11:15:07-08:00 torvalds@ppc970.osdl.org 
#   Merge bk://linux-sam.bkbits.net/kbuild
#   into ppc970.osdl.org:/home/torvalds/v2.6/linux
# 
# Makefile
#   2004/03/31 11:15:04-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/03/31 11:12:17-08:00 torvalds@evo.osdl.org 
#   Add __user pointer annotations
#   
#   Every pointer in <syscalls.h> had better be a user
#   pointer. Also add some others that a quick sanity check
#   picked up on.
# 
# sound/core/seq/oss/seq_oss_synth.h
#   2004/03/31 11:12:11-08:00 torvalds@evo.osdl.org +1 -1
#   Add __user pointer annotations
# 
# kernel/uid16.c
#   2004/03/31 11:12:11-08:00 torvalds@evo.osdl.org +4 -4
#   Add __user pointer annotations
# 
# kernel/timer.c
#   2004/03/31 11:12:11-08:00 torvalds@evo.osdl.org +2 -2
#   Add __user pointer annotations
# 
# include/linux/syscalls.h
#   2004/03/31 11:12:11-08:00 torvalds@evo.osdl.org +26 -26
#   Add __user pointer annotations
# 
# include/linux/mmzone.h
#   2004/03/31 11:12:11-08:00 torvalds@evo.osdl.org +1 -1
#   Add __user pointer annotations
# 
# include/linux/aio.h
#   2004/03/31 11:12:11-08:00 torvalds@evo.osdl.org +1 -1
#   Add __user pointer annotations
# 
# fs/readdir.c
#   2004/03/31 11:12:11-08:00 torvalds@evo.osdl.org +2 -2
#   Add __user pointer annotations
# 
# fs/aio.c
#   2004/03/31 11:12:11-08:00 torvalds@evo.osdl.org +9 -9
#   Add __user pointer annotations
# 
# arch/i386/kernel/apm.c
#   2004/03/31 11:12:11-08:00 torvalds@evo.osdl.org +1 -1
#   Add __user pointer annotations
# 
# ChangeSet
#   2004/03/31 08:48:12-08:00 Alexander.Stohr@gmx.de 
#   [PATCH] double semicolon cleanup
#   
#   This cleans up a larger amount of superfluos ";;" statements in current
#   Linux kernel sources by converting them to the regular single ";"
#   statments.
#   
#   It seems to be a common problem that at the end of a line the semicolon
#   key is producing an echo.
# 
# sound/pci/cs46xx/dsp_spos.c
#   2004/03/31 05:46:12-08:00 Alexander.Stohr@gmx.de +2 -2
#   double semicolon cleanup
# 
# sound/pci/au88x0/au88x0_synth.c
#   2004/03/31 05:46:05-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# sound/parisc/harmony.c
#   2004/03/31 05:45:59-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# sound/oss/sys_timer.c
#   2004/03/31 05:45:53-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# sound/oss/soundcard.c
#   2004/03/31 05:45:45-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# sound/oss/rme96xx.c
#   2004/03/31 05:45:36-08:00 Alexander.Stohr@gmx.de +3 -3
#   double semicolon cleanup
# 
# sound/oss/nec_vrc5477.c
#   2004/03/31 05:45:27-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# sound/oss/i810_audio.c
#   2004/03/31 05:45:21-08:00 Alexander.Stohr@gmx.de +2 -2
#   double semicolon cleanup
# 
# sound/oss/cs46xx.c
#   2004/03/31 05:45:14-08:00 Alexander.Stohr@gmx.de +2 -2
#   double semicolon cleanup
# 
# security/selinux/hooks.c
#   2004/03/31 05:45:07-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# net/sunrpc/auth_gss/svcauth_gss.c
#   2004/03/31 05:44:59-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# net/sctp/socket.c
#   2004/03/31 05:44:53-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# net/sctp/sm_make_chunk.c
#   2004/03/31 05:44:47-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# net/sctp/bind_addr.c
#   2004/03/31 05:44:33-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# net/sched/sch_hfsc.c
#   2004/03/31 05:44:23-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# net/key/af_key.c
#   2004/03/31 05:44:16-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# net/irda/irttp.c
#   2004/03/31 05:44:11-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# net/irda/irlan/irlan_filter.c
#   2004/03/31 05:44:04-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# net/ipv4/tcp_ipv4.c
#   2004/03/31 05:43:58-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# net/ipv4/netfilter/ip_nat_snmp_basic.c
#   2004/03/31 05:43:51-08:00 Alexander.Stohr@gmx.de +2 -2
#   double semicolon cleanup
# 
# lib/bitmap.c
#   2004/03/31 05:43:42-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# kernel/exec_domain.c
#   2004/03/31 05:43:33-08:00 Alexander.Stohr@gmx.de +2 -2
#   double semicolon cleanup
# 
# fs/smbfs/sock.c
#   2004/03/31 05:42:25-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# fs/intermezzo/journal_xfs.c
#   2004/03/31 05:41:45-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# fs/cifs/connect.c
#   2004/03/31 05:41:34-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/video/sis/init301.c
#   2004/03/31 05:41:22-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/video/i810/i810_main.c
#   2004/03/31 05:41:13-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/video/fbmon.c
#   2004/03/31 05:41:09-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/video/aty/radeon_monitor.c
#   2004/03/31 05:41:00-08:00 Alexander.Stohr@gmx.de +3 -3
#   double semicolon cleanup
# 
# drivers/usb/serial/mct_u232.c
#   2004/03/31 05:40:46-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/usb/serial/empeg.c
#   2004/03/31 05:40:40-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/usb/media/stv680.c
#   2004/03/31 05:40:35-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/usb/media/se401.c
#   2004/03/31 05:40:30-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/scsi/wd33c93.c
#   2004/03/31 05:40:22-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/scsi/scsiiom.c
#   2004/03/31 05:40:09-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/scsi/qlogicisp.c
#   2004/03/31 05:40:03-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/scsi/qlogicfc.c
#   2004/03/31 05:39:58-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/scsi/qlogicfas.c
#   2004/03/31 05:39:51-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/scsi/pci2220i.c
#   2004/03/31 05:39:40-08:00 Alexander.Stohr@gmx.de +3 -3
#   double semicolon cleanup
# 
# drivers/scsi/pci2000.c
#   2004/03/31 05:39:05-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/scsi/in2000.c
#   2004/03/31 05:38:58-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/scsi/i91uscsi.c
#   2004/03/31 05:38:53-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/scsi/gdth.c
#   2004/03/31 05:38:28-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/scsi/dpt_i2o.c
#   2004/03/31 05:38:21-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/scsi/dec_esp.c
#   2004/03/31 05:38:15-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/scsi/cpqfcTSinit.c
#   2004/03/31 05:38:08-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/scsi/aic7xxx/aic7770.c
#   2004/03/31 05:37:53-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/s390/scsi/zfcp_erp.c
#   2004/03/31 05:37:40-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/s390/net/qeth.c
#   2004/03/31 05:37:34-08:00 Alexander.Stohr@gmx.de +2 -2
#   double semicolon cleanup
# 
# drivers/pcmcia/sa1100_pangolin.c
#   2004/03/31 05:37:27-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/pci/hotplug/pciehp_hpc.c
#   2004/03/31 05:37:19-08:00 Alexander.Stohr@gmx.de +2 -2
#   double semicolon cleanup
# 
# drivers/net/wireless/hermes.h
#   2004/03/31 05:37:02-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/net/wireless/atmel.c
#   2004/03/31 05:36:56-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/net/wireless/arlan-main.c
#   2004/03/31 05:36:50-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/net/typhoon.c
#   2004/03/31 05:36:44-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/net/sk98lin/skgepnmi.c
#   2004/03/31 05:36:34-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/net/mace.c
#   2004/03/31 05:36:21-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/net/hamradio/hdlcdrv.c
#   2004/03/31 05:36:14-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/net/acenic.h
#   2004/03/31 05:36:06-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/mtd/nand/nand.c
#   2004/03/31 05:36:01-08:00 Alexander.Stohr@gmx.de +2 -2
#   double semicolon cleanup
# 
# drivers/media/video/zoran_driver.c
#   2004/03/31 05:35:49-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/isdn/hisax/nj_s.c
#   2004/03/31 05:35:15-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/isdn/hisax/niccy.c
#   2004/03/31 05:35:08-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/isdn/hisax/hisax_fcpcipnp.c
#   2004/03/31 05:35:03-08:00 Alexander.Stohr@gmx.de +3 -3
#   double semicolon cleanup
# 
# drivers/isdn/hardware/eicon/message.c
#   2004/03/31 05:34:45-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/input/joystick/gf2k.c
#   2004/03/31 05:34:40-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/ide/pci/trm290.c
#   2004/03/31 05:34:33-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/char/vt.c
#   2004/03/31 05:34:19-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/char/qtronix.c
#   2004/03/31 05:33:58-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/char/mwave/smapi.c
#   2004/03/31 05:33:54-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/char/ftape/compressor/lzrw3.c
#   2004/03/31 05:33:39-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/char/dz.c
#   2004/03/31 05:33:33-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/char/drm/gamma_context.h
#   2004/03/31 05:33:24-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/char/drm/drm_memory_debug.h
#   2004/03/31 05:33:17-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/cdrom/sbpcd.c
#   2004/03/31 05:32:41-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/block/cpqarray.c
#   2004/03/31 05:32:34-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# drivers/acpi/sleep/proc.c
#   2004/03/31 05:32:27-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# arch/sparc64/solaris/timod.c
#   2004/03/31 05:32:11-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# arch/ppc/mm/pgtable.c
#   2004/03/31 05:31:46-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# arch/mips/kernel/sysirix.c
#   2004/03/31 05:31:23-08:00 Alexander.Stohr@gmx.de +2 -2
#   double semicolon cleanup
# 
# arch/m68k/mvme16x/16xints.c
#   2004/03/31 05:31:14-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# arch/ia64/sn/io/sn2/pic.c
#   2004/03/31 05:31:10-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# arch/ia64/sn/io/sn2/pciio.c
#   2004/03/31 05:30:59-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# arch/ia64/sn/fakeprom/fw-emu.c
#   2004/03/31 05:30:53-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# arch/arm26/kernel/sys_arm.c
#   2004/03/31 05:28:58-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# arch/arm/kernel/sys_arm.c
#   2004/03/31 05:28:50-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# arch/alpha/boot/misc.c
#   2004/03/31 05:28:41-08:00 Alexander.Stohr@gmx.de +1 -1
#   double semicolon cleanup
# 
# ChangeSet
#   2004/03/31 08:34:59-08:00 akpm@osdl.org 
#   [PATCH] ppc64: clean up virtual <-> absolute code
#   
#   From: Anton Blanchard <anton@samba.org>
#         Rusty Russell <rusty@rustcorp.com.au>
#   
#   The iSeries has an arch-specific mapping from physical <-> absolute
#   addresses.  Fortunately this is only used in a few places.  However, the
#   following arch-specific macros/functions are provided in addition to the
#   standard macros:
#   
#   	__a2p()
#   	__a2v()
#   	__p2a()
#   	__p2v()
#   	__v2a()
#   	__v2p()
#   	absolute_to_phys()
#   	phys_to_absolute()
#   	virt_to_absolute()
#   	absolute_to_virt()
#   
#   Reduce them to these, with slightly shorter names, and taking either pointers
#   or unsigned long (as per __va and __pa) rather than making the caller cast:
#   
#   	abs_to_phys()
#   	phys_to_abs()
#   
#   And helper macros:
#   
#   	virt_to_abs()
#   	abs_to_virt()
#   
#   As is standard, virtual addresses are returned as void *, physical and
#   absolute as unsigned long.
#   
#   Note that the change the iSeries_setup is a little subtle: ea is set to
#   __va(pa) above, so "phys_to_abs(pa)" is the same as "virt_to_abs(ea)".
#   
#   Also, REALADDR is renamed to ISERIES_HV_ADDR and used in a couple of places
#   where appropriate.
# 
# include/asm-ppc64/page.h
#   2004/03/30 07:45:59-08:00 akpm@osdl.org +0 -13
#   ppc64: clean up virtual <-> absolute code
# 
# include/asm-ppc64/iSeries/iSeries_pci.h
#   2004/03/30 07:45:59-08:00 akpm@osdl.org +2 -1
#   ppc64: clean up virtual <-> absolute code
# 
# include/asm-ppc64/iSeries/HvCallEvent.h
#   2004/03/30 07:45:59-08:00 akpm@osdl.org +5 -5
#   ppc64: clean up virtual <-> absolute code
# 
# include/asm-ppc64/abs_addr.h
#   2004/03/30 07:45:59-08:00 akpm@osdl.org +13 -26
#   ppc64: clean up virtual <-> absolute code
# 
# arch/ppc64/mm/init.c
#   2004/03/30 07:45:59-08:00 akpm@osdl.org +3 -2
#   ppc64: clean up virtual <-> absolute code
# 
# arch/ppc64/mm/hash_utils.c
#   2004/03/30 07:45:59-08:00 akpm@osdl.org +5 -3
#   ppc64: clean up virtual <-> absolute code
# 
# arch/ppc64/kernel/smp.c
#   2004/03/30 07:45:59-08:00 akpm@osdl.org +1 -1
#   ppc64: clean up virtual <-> absolute code
# 
# arch/ppc64/kernel/rtas.c
#   2004/03/30 07:45:59-08:00 akpm@osdl.org +4 -4
#   ppc64: clean up virtual <-> absolute code
# 
# arch/ppc64/kernel/prom.c
#   2004/03/30 07:45:59-08:00 akpm@osdl.org +7 -4
#   ppc64: clean up virtual <-> absolute code
# 
# arch/ppc64/kernel/pmac_iommu.c
#   2004/03/30 07:45:59-08:00 akpm@osdl.org +3 -3
#   ppc64: clean up virtual <-> absolute code
# 
# arch/ppc64/kernel/pci_dma_direct.c
#   2004/03/30 07:45:59-08:00 akpm@osdl.org +2 -2
#   ppc64: clean up virtual <-> absolute code
# 
# arch/ppc64/kernel/pSeries_lpar.c
#   2004/03/30 07:45:59-08:00 akpm@osdl.org +2 -1
#   ppc64: clean up virtual <-> absolute code
# 
# arch/ppc64/kernel/pSeries_iommu.c
#   2004/03/30 07:45:59-08:00 akpm@osdl.org +1 -1
#   ppc64: clean up virtual <-> absolute code
# 
# arch/ppc64/kernel/mf.c
#   2004/03/30 07:45:59-08:00 akpm@osdl.org +4 -8
#   ppc64: clean up virtual <-> absolute code
# 
# arch/ppc64/kernel/iSeries_setup.c
#   2004/03/30 07:45:59-08:00 akpm@osdl.org +1 -2
#   ppc64: clean up virtual <-> absolute code
# 
# arch/ppc64/kernel/iSeries_pci.c
#   2004/03/30 07:45:59-08:00 akpm@osdl.org +2 -2
#   ppc64: clean up virtual <-> absolute code
# 
# arch/ppc64/kernel/iSeries_iommu.c
#   2004/03/30 07:45:59-08:00 akpm@osdl.org +3 -3
#   ppc64: clean up virtual <-> absolute code
# 
# arch/ppc64/kernel/iSeries_VpdInfo.c
#   2004/03/30 07:45:59-08:00 akpm@osdl.org +2 -1
#   ppc64: clean up virtual <-> absolute code
# 
# arch/ppc64/kernel/HvCall.c
#   2004/03/30 07:45:59-08:00 akpm@osdl.org +2 -2
#   ppc64: clean up virtual <-> absolute code
# 
# ChangeSet
#   2004/03/31 08:34:47-08:00 akpm@osdl.org 
#   [PATCH] ppc64: make iSeries boot mostly
#   
#   From: Anton Blanchard <anton@samba.org>
#         Stephen Rothwell <sfr@canb.auug.org.au>
#   
#   This patch just ensures that the RI bit is set really early as it seems it
#   is not on iSeries Power4 machines (or maybe OS400 v5r3 does this).
# 
# arch/ppc64/kernel/head.S
#   2004/03/30 07:45:55-08:00 akpm@osdl.org +3 -0
#   ppc64: make iSeries boot mostly
# 
# ChangeSet
#   2004/03/30 22:41:02-08:00 wesolows@foobazco.org 
#   [SPARC32]: Regenerate defconfig
# 
# arch/sparc/defconfig
#   2004/03/30 22:40:57-08:00 wesolows@foobazco.org +225 -78
#   [SPARC32]: Regenerate defconfig
# 
# ChangeSet
#   2004/03/30 22:02:59-08:00 wesolows@foobazco.org 
#   [SPARC32]: Fix cast-as-lvalue
# 
# arch/sparc/kernel/signal.c
#   2004/03/30 22:02:53-08:00 wesolows@foobazco.org +2 -2
#   [SPARC32]: Fix cast-as-lvalue
# 
# ChangeSet
#   2004/03/30 22:01:26-08:00 wesolows@foobazco.org 
#   [SPARC32]: Display useful information in the event of a bad trap
# 
# arch/sparc/kernel/traps.c
#   2004/03/30 22:01:20-08:00 wesolows@foobazco.org +5 -5
#   [SPARC32]: Display useful information in the event of a bad trap
# 
# arch/sparc/kernel/entry.S
#   2004/03/30 22:01:20-08:00 wesolows@foobazco.org +2 -3
#   [SPARC32]: Display useful information in the event of a bad trap
# 
# ChangeSet
#   2004/03/30 21:23:10-08:00 wesolows@foobazco.org 
#   Merge foobazco.org:/sources/2.5-sparc-modules
#   into foobazco.org:/sources/2.5-sparc-todave
# 
# arch/sparc/kernel/sparc_ksyms.c
#   2004/03/30 21:23:06-08:00 wesolows@foobazco.org +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/03/30 17:36:12-08:00 torvalds@ppc970.osdl.org 
#   Fix serious naming problem.
#   
#   People were getting quite excited about this.
# 
# Makefile
#   2004/03/30 17:36:07-08:00 torvalds@ppc970.osdl.org +1 -1
#   Fix serious naming problem.
#   
#   For the last few weeks I've been getting increasingly
#   worried emails from people who want to alternately kill
#   the Dunnart (what kind of sick and perverted people are
#   you guys, anyway?), or rename it as "Fat Pig".
#   
#   You know who you are, and you should be ashamed.
#   
#   After extensive discussions with various drunk people,
#   and considering that beaver-overlord.com only got two
#   name suggestions, I decided to have a customer survey
#   on preferred animal names.
#   
#   However, the customer survey idea failed due to a total
#   lack of (a) customers and (b) motivation. Substituting
#   both of these vital components was instead a large amount
#   of alcoholic beverages.
#   
#   Thus a new kernel is born.
# 
# ChangeSet
#   2004/03/30 16:53:19-08:00 greg@kroah.com 
#   [PATCH] back out sysfs reference count change
#   
#   This backs out Maneesh's sysfs patch that was recently added to the
#   kernel.
#   
#   In its defense, the original patch did solve some fixes that could be
#   duplicated on SMP machines, but the side affect of the patch caused lots
#   of problems.  Basically it caused kobjects to get their references
#   incremented when files that are not present in the kobject are asked for
#   (udev can easily trigger this when it looks for files call "dev" in
#   directories that do not have that file).  This can cause easy oopses
#   when the VFS later ages out those old dentries and the kobject has its
#   reference finally released (usually after the module that the kobject
#   lived in was removed.)
#   
#   I will continue to work with Maneesh to try to solve the original bug,
#   but for now, this patch needs to be applied.
# 
# fs/sysfs/dir.c
#   2004/03/30 07:23:21-08:00 greg@kroah.com +1 -14
#   back out sysfs reference count change
# 
# ChangeSet
#   2004/03/30 16:53:09-08:00 rth@twiddle.net 
#   [PATCH] Alpha: UP1500 pci_mem fix
#   
#   From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
#   
#   The memory reserved for PCI probe is not freed properly in some cases,
#   for instance with a 3.5Gb of RAM.
#   
#   Forward port from 2.4.
# 
# arch/alpha/kernel/sys_nautilus.c
#   2003/08/20 04:30:07-07:00 rth@twiddle.net +5 -3
#   Alpha: UP1500 pci_mem fix
# 
# ChangeSet
#   2004/03/30 14:23:57-08:00 davem@nuts.davemloft.net 
#   [SPARC64]: Export prom_palette.
# 
# arch/sparc64/kernel/sparc64_ksyms.c
#   2004/03/30 14:23:37-08:00 davem@nuts.davemloft.net +3 -0
#   [SPARC64]: Export prom_palette.
# 
# ChangeSet
#   2004/03/30 10:52:10-08:00 benh@kernel.crashing.org 
#   [PATCH] ppc64: More incorrect syscall error test
#   
#   Oops, there was two different code path affected by this
#   bug (strace and normal) and I fixed only one. Here's the
#   other one:
# 
# arch/ppc64/kernel/entry.S
#   2004/03/30 07:59:43-08:00 benh@kernel.crashing.org +1 -1
#   ppc64: More incorrect syscall error test
# 
# ChangeSet
#   2004/03/30 10:51:56-08:00 benh@kernel.crashing.org 
#   [PATCH] ppc64: Add a sync in context switch on SMP
#   
#   For the same reason as ppc32, we need to ensure that all stores
#   done on a CPU has reached the coherency domain and are visible
#   to loads done by another CPU when context switching as the same
#   thread may be rescheduled almost right away there.
# 
# arch/ppc64/kernel/entry.S
#   2004/03/29 20:55:47-08:00 benh@kernel.crashing.org +8 -0
#   ppc64: Add a sync in context switch on SMP
# 
# ChangeSet
#   2004/03/30 10:51:44-08:00 benh@kernel.crashing.org 
#   [PATCH] ppc32: PCI mmap update
#   
#   This updates the ppc32 PCI mmap facility to allow mmap'ing of space
#   outside of the actual devices, using the host bridge resources instead. 
#   
#   This allow userland to map things like legacy IO space by either using
#   the bridge device itself, or simply any PCI device on the same bus
#   domain
# 
# arch/ppc/kernel/pci.c
#   2004/03/28 19:56:09-08:00 benh@kernel.crashing.org +28 -37
#   ppc32: PCI mmap update
# 
# ChangeSet
#   2004/03/30 10:51:30-08:00 benh@kernel.crashing.org 
#   [PATCH] ppc32: Allow PREEMPT with SMP in KConfig
#   
#   On ppc32, CONFIG_PREEMPT wasn't settable along with CONFIG_SMP
#   for historical reasons (smp_processor_id() races). Those races have
#   been fixes since then (well, should have been at least) so it's now
#   safe to allow both options.
# 
# arch/ppc/Kconfig
#   2004/03/30 07:39:41-08:00 benh@kernel.crashing.org +0 -4
#   ppc32: Allow PREEMPT with SMP in KConfig
# 
# ChangeSet
#   2004/03/30 10:51:17-08:00 benh@kernel.crashing.org 
#   [PATCH] ppc32: context switch  fixes
#   
#   This fixes a few issues with context switch on ppc32:
#   
#    - Makes sure we properly flush out all stores to the coherency domain
#      when switching out, since the same thread could be switched back in
#      on another CPU right away, those stores must be visible to all other
#      CPUs. 
#   
#    - Remove dssall in the assembly calls and do it now once in switch_mm
#      (stop vmx streams).  Assume the G5 doesn't need a sync after dssall. 
#   
#    - Remove bogus isync in the loop setting the userland segment registers
#   
#    - Do not switch the userland segments when the mm stays the same
# 
# include/asm-ppc/mmu_context.h
#   2004/03/29 20:58:44-08:00 benh@kernel.crashing.org +19 -6
#   ppc32: context switch  fixes
# 
# include/asm-ppc/cputable.h
#   2004/03/29 20:58:43-08:00 benh@kernel.crashing.org +16 -2
#   ppc32: context switch  fixes
# 
# arch/ppc/kernel/head.S
#   2004/03/29 20:55:41-08:00 benh@kernel.crashing.org +2 -5
#   ppc32: context switch  fixes
# 
# arch/ppc/kernel/entry.S
#   2004/03/29 20:55:41-08:00 benh@kernel.crashing.org +9 -0
#   ppc32: context switch  fixes
# 
# ChangeSet
#   2004/03/30 10:51:04-08:00 benh@kernel.crashing.org 
#   [PATCH] ppc32: Remove duplicate export
#   
#   enable_kernel_fp is exported both in ppc_ksyms and near it's
#   definition in process.c, remove the former.
# 
# arch/ppc/kernel/ppc_ksyms.c
#   2004/03/29 19:00:44-08:00 benh@kernel.crashing.org +0 -1
#   ppc32: Remove duplicate export
# 
# ChangeSet
#   2004/03/30 10:50:51-08:00 benh@kernel.crashing.org 
#   [PATCH] ppc32: Even more preempt fixes
#   
#   Add a warning if enable_kernel_{fp,altivec} is called with preempt
#   enabled since this is always an error, and make sure the alignement
#   exception handler properly disables preempt when doing FP operations.
# 
# arch/ppc/kernel/process.c
#   2004/03/29 20:55:42-08:00 benh@kernel.crashing.org +6 -4
#   ppc32: Even more preempt fixes
# 
# arch/ppc/kernel/align.c
#   2004/03/29 19:00:44-08:00 benh@kernel.crashing.org +4 -0
#   ppc32: Even more preempt fixes
# 
# ChangeSet
#   2004/03/30 10:49:13-08:00 vatsa@in.ibm.com 
#   [PATCH] Fix obvious stupid race in do_stop
#   
#   We don't set the task state to TASK_INTERRUPTIBLE _before_ checking for
#   kthread_should_stop in do_stop.
# 
# kernel/stop_machine.c
#   2004/03/08 22:53:56-08:00 vatsa@in.ibm.com +3 -1
#   Fix obvious stupid race in do_stop
# 
# ChangeSet
#   2004/03/30 10:47:17-08:00 marcelo.tosatti@cyclades.com 
#   [PATCH] pc300 driver misplaced ;
#   
#   From Dave Jones.
#   
#   Oops.
# 
# drivers/net/wan/pc300_drv.c
#   2004/03/30 06:32:11-08:00 marcelo.tosatti@cyclades.com +1 -1
#   pc300 driver misplaced ;
# 
# ChangeSet
#   2004/03/30 10:47:05-08:00 armin@melware.de 
#   [PATCH] ISDN Eicon driver: NULL pointer check inside spinlock
#   
#      Check for valid application pointer inside api spinlock
#      in diva_send_message().
# 
# drivers/isdn/hardware/eicon/capifunc.c
#   2004/03/30 06:17:51-08:00 armin@melware.de +4 -3
#   ISDN Eicon driver: NULL pointer check inside spinlock
# 
# ChangeSet
#   2004/03/30 10:41:57-08:00 akpm@osdl.org 
#   [PATCH] Make pdflush run at nice 0
#   
#   Since pdflush was converted to be launched by the kthread infrastructure it
#   has inherited keventd's `nice -10' setting.  That hurts interactivity when
#   pdflush is doing lots of work writing back through the dm-crypt layer.
#   
#   So set pdflush back to `nice 0'.
# 
# mm/pdflush.c
#   2004/03/30 09:58:09-08:00 akpm@osdl.org +6 -0
#   Make pdflush run at nice 0
# 
# ChangeSet
#   2004/03/30 10:41:44-08:00 akpm@osdl.org 
#   [PATCH] catch errors when completing bio pairs
#   
#   From: Mike Christie <michaelc@cs.wisc.edu>
#   
#   A couple of drivers can sometimes fail the first segments in a bio then
#   requeue the rest of the request.  In this situation, if the last part of
#   the bio completes successfully bio_pair_end_* will miss that the beginging
#   of the bio had failed becuase they just return one when bi_size is not yet
#   zero.  The attached patch moves the error value test before the bi_size to
#   catch the above case.
# 
# fs/bio.c
#   2004/03/23 07:05:19-08:00 akpm@osdl.org +6 -4
#   catch errors when completing bio pairs
# 
# ChangeSet
#   2004/03/30 10:41:31-08:00 akpm@osdl.org 
#   [PATCH] Fix BLKPREP_KILL
#   
#   From: Jens Axboe <axboe@suse.de>
#   
#   Samuel Rydh wrote:
#   
#   If a MODE_SENSE(6) command is sent to an IDE cd using the CDROM_SEND_PACKET
#   ioctl, then the kernel freezes solidly. To reproduce this, one can take the
#   SCSI cmd [1a 08 31 00 10 00] and a 16 byte data buffer.
#   
#   After some bug hunting, I found out that the following is what happens:
#   
#   - ide-cd recognizes that MODE_SENSE(6) isn't supported and tries
#     to abort the request from ide_cdrom_prep_pc by returning BLKPREP_KILL.
#   
#   - in elv_next_request(), the kill request is handled by
#     the following code:
#   
#   	while (end_that_request_first(rq, 0, rq->nr_sectors))
#   		;
#   	end_that_request_last(rq);
#   
#   The while loop never exits. The end_that_request_first() doesn't do anything
#   since rq->nr_sectors is 0; it just returns "not-done" after handling those 0
#   bytes (rq->bio->bi_size is 16).
# 
# drivers/block/elevator.c
#   2004/03/23 06:45:00-08:00 akpm@osdl.org +6 -2
#   Fix BLKPREP_KILL
# 
# ChangeSet
#   2004/03/30 11:47:50+02:00 perex@suse.cz 
#   ALSA - 1.0.4rc2
# 
# include/sound/version.h
#   2004/03/30 11:47:38+02:00 perex@suse.cz +2 -2
#   1.0.4rc2
# 
# ChangeSet
#   2004/03/30 11:45:02+02:00 perex@suse.cz 
#   ALSA CVS update - Jaroslav Kysela <perex@suse.cz>
#   au88x0 driver
#   Cleanups - removed duplicate PCI IDs
# 
# sound/pci/au88x0/au88x0.h
#   2004/03/30 02:46:35+02:00 perex@suse.cz +0 -17
#   ALSA CVS update
#   D:2004/03/30 09:46:35
#   C:au88x0 driver
#   A:Jaroslav Kysela <perex@suse.cz>
#   F:pci/au88x0/au88x0.h:1.2->1.3 
#   L:Cleanups - removed duplicate PCI IDs
# 
# ChangeSet
#   2004/03/30 11:19:58+02:00 perex@suse.cz 
#   ALSA CVS update - Clemens Ladisch <clemens@ladisch.de>
#   USB generic driver
#   add usb_device->speed wrapper for compiling with 2.2.x kernels
# 
# sound/usb/usbaudio.h
#   2004/03/29 06:33:37+02:00 perex@suse.cz +4 -0
#   ALSA CVS update
#   D:2004/03/29 13:33:37
#   C:USB generic driver
#   A:Clemens Ladisch <clemens@ladisch.de>
#   F:usb/usbaudio.c:1.94->1.95 
#   F:usb/usbaudio.h:1.28->1.29 
#   L:add usb_device->speed wrapper for compiling with 2.2.x kernels
# 
# sound/usb/usbaudio.c
#   2004/03/29 06:33:37+02:00 perex@suse.cz +12 -9
#   ALSA CVS update
#   D:2004/03/29 13:33:37
#   C:USB generic driver
#   A:Clemens Ladisch <clemens@ladisch.de>
#   F:usb/usbaudio.c:1.94->1.95 
#   F:usb/usbaudio.h:1.28->1.29 
#   L:add usb_device->speed wrapper for compiling with 2.2.x kernels
# 
# ChangeSet
#   2004/03/29 23:41:46-08:00 wesolows@foobazco.org 
#   [SPARC32]: Update module linking for symbols starting with "."
#   
#   Rusty did not like the __dot_sym approach and suggested instead:
#   
#   1) make rem, urem, mul, umul, div and udiv aliases to .rem, .urem etc:
#   
#      extern int rem(int, int) __attribute__((weak,alias(".rem")));
#   
#   2) EXPORT_SYMBOL(rem) etc.
#   3) Check genksyms recognises that prototype (it should).
#   4) Copy "dedotify" from ppc64 to handle them on load.
#   
#   The only real downside is the risk that someone else will export
#   those names, but I think that's pretty unlikely.
# 
# scripts/modpost.c
#   2004/03/29 23:38:38-08:00 wesolows@foobazco.org +2 -14
#   [SPARC32]: Update module linking for symbols starting with "."
# 
# arch/sparc/kernel/sparc_ksyms.c
#   2004/03/29 23:38:38-08:00 wesolows@foobazco.org +19 -29
#   [SPARC32]: Update module linking for symbols starting with "."
# 
# arch/sparc/kernel/module.c
#   2004/03/29 23:38:38-08:00 wesolows@foobazco.org +13 -5
#   [SPARC32]: Update module linking for symbols starting with "."
# 
# ChangeSet
#   2004/03/29 20:26:56-08:00 laforge@netfilter.org 
#   [NETFILTER]: Fix DELETE_LIST oopses.
#   
#   We've now narrowed down the issue of kernel oopses in combination with
#   'LIST_DELETE' syslog messages happening in certain setups.
#   
#   Apparently people who do not enable CONFIG_IP_NF_NAT_LOCAL and do
#   DNAT/REDIRECT and want to connect locally from the gateway via DNAT to
#   the DNAT'ed address experience the bug ;)
#   
#   Patch courtesy of KOVACS Krisztian and Henrik Nordstrom
# 
# net/ipv4/netfilter/ip_nat_standalone.c
#   2004/03/29 20:26:43-08:00 laforge@netfilter.org +10 -1
#   [NETFILTER]: Fix DELETE_LIST oopses.
#   
#   We've now narrowed down the issue of kernel oopses in combination with
#   'LIST_DELETE' syslog messages happening in certain setups.
#   
#   Apparently people who do not enable CONFIG_IP_NF_NAT_LOCAL and do
#   DNAT/REDIRECT and want to connect locally from the gateway via DNAT to
#   the DNAT'ed address experience the bug ;)
#   
#   Patch courtesy of KOVACS Krisztian and Henrik Nordstrom
# 
# ChangeSet
#   2004/03/29 20:19:57-08:00 laforge@netfilter.org 
#   [NETFILTER]: Fix DEBUG compile in ipt_MASQUERADE.
# 
# net/ipv4/netfilter/ipt_MASQUERADE.c
#   2004/03/29 20:19:44-08:00 laforge@netfilter.org +1 -1
#   [NETFILTER]: Fix DEBUG compile in ipt_MASQUERADE.
# 
# ChangeSet
#   2004/03/29 20:11:56-08:00 uaca@alumni.uv.es 
#   [AF_PACKET]: Add PACKET_MMAP documentation.
# 
# net/Kconfig
#   2004/03/29 20:11:38-08:00 uaca@alumni.uv.es +0 -0
#   [AF_PACKET]: Add PACKET_MMAP documentation.
# 
# Documentation/networking/packet_mmap.txt
#   2004/03/29 20:11:32-08:00 uaca@alumni.uv.es +412 -0
#   [AF_PACKET]: Add PACKET_MMAP documentation.
# 
# Documentation/networking/packet_mmap.txt
#   2004/03/29 20:11:32-08:00 uaca@alumni.uv.es +0 -0
#   BitKeeper file /disk1/BK/net-2.6/Documentation/networking/packet_mmap.txt
# 
# ChangeSet
#   2004/03/29 21:16:35+02:00 sam@mars.ravnborg.org 
#   kbuild: Avoid "expr length" in Makefile
#   
#   From:  Martin Schaffner <maschaffner@gmx.ch>
# 
# Makefile
#   2004/03/29 21:16:13+02:00 sam@mars.ravnborg.org +1 -1
#   kbuild: Avoid "expr length" in Makefile
#   
#   From:  Martin Schaffner <maschaffner@gmx.ch>
# 
# ChangeSet
#   2004/03/29 21:13:52+02:00 sam@mars.ravnborg.org 
#   kbuild: Add cscope to make help
#   
#   From: Bjorn Helgas <bjorn.helgaas@hp.com>
# 
# Makefile
#   2004/03/29 21:13:40+02:00 sam@mars.ravnborg.org +1 -0
#   kbuild: Add cscope to make help
# 
# ChangeSet
#   2004/03/29 13:54:39+02:00 perex@suse.cz 
#   ALSA - fixed date in version.h
# 
# include/sound/version.h
#   2004/03/29 13:54:26+02:00 perex@suse.cz +1 -1
#   Fixed release date.
# 
# ChangeSet
#   2004/03/29 12:26:33+02:00 perex@suse.cz 
#   ALSA CVS update - Clemens Ladisch <clemens@ladisch.de>
#   AC97 Codec Core
#   don't clobber other bits in SERIAL_CFG register with AD codecs when changing codec selection bits
# 
# sound/pci/ac97/ac97_proc.c
#   2004/03/29 01:05:00+02:00 perex@suse.cz +6 -4
#   ALSA CVS update
#   D:2004/03/29 08:05:00
#   C:AC97 Codec Core
#   A:Clemens Ladisch <clemens@ladisch.de>
#   F:pci/ac97/ac97_codec.c:1.124->1.125 
#   F:pci/ac97/ac97_patch.c:1.41->1.42 
#   F:pci/ac97/ac97_proc.c:1.4->1.5 
#   L:don't clobber other bits in SERIAL_CFG register with AD codecs when changing codec selection bits
# 
# sound/pci/ac97/ac97_patch.c
#   2004/03/29 01:05:00+02:00 perex@suse.cz +12 -5
#   ALSA CVS update
#   D:2004/03/29 08:05:00
#   C:AC97 Codec Core
#   A:Clemens Ladisch <clemens@ladisch.de>
#   F:pci/ac97/ac97_codec.c:1.124->1.125 
#   F:pci/ac97/ac97_patch.c:1.41->1.42 
#   F:pci/ac97/ac97_proc.c:1.4->1.5 
#   L:don't clobber other bits in SERIAL_CFG register with AD codecs when changing codec selection bits
# 
# sound/pci/ac97/ac97_codec.c
#   2004/03/29 01:05:00+02:00 perex@suse.cz +11 -6
#   ALSA CVS update
#   D:2004/03/29 08:05:00
#   C:AC97 Codec Core
#   A:Clemens Ladisch <clemens@ladisch.de>
#   F:pci/ac97/ac97_codec.c:1.124->1.125 
#   F:pci/ac97/ac97_patch.c:1.41->1.42 
#   F:pci/ac97/ac97_proc.c:1.4->1.5 
#   L:don't clobber other bits in SERIAL_CFG register with AD codecs when changing codec selection bits
# 
# ChangeSet
#   2004/03/29 12:26:14+02:00 perex@suse.cz 
#   ALSA CVS update - Clemens Ladisch <clemens@ladisch.de>
#   AC97 Codec Core
#   fix hang because of uninitialized ad18xx.mutex with AD1985
# 
# sound/pci/ac97/ac97_patch.c
#   2004/03/29 01:02:21+02:00 perex@suse.cz +1 -0
#   ALSA CVS update
#   D:2004/03/29 08:02:21
#   C:AC97 Codec Core
#   A:Clemens Ladisch <clemens@ladisch.de>
#   F:pci/ac97/ac97_patch.c:1.40->1.41 
#   L:fix hang because of uninitialized ad18xx.mutex with AD1985
# 
# ChangeSet
#   2004/03/29 12:25:51+02:00 perex@suse.cz 
#   ALSA CVS update - Clemens Ladisch <clemens@ladisch.de>
#   AC97 Codec Core
#   fix superfluous rate register assignments
# 
# sound/pci/ac97/ac97_pcm.c
#   2004/03/29 00:58:36+02:00 perex@suse.cz +2 -2
#   ALSA CVS update
#   D:2004/03/29 07:58:36
#   C:AC97 Codec Core
#   A:Clemens Ladisch <clemens@ladisch.de>
#   F:pci/ac97/ac97_pcm.c:1.11->1.12 
#   L:fix superfluous rate register assignments
# 
# ChangeSet
#   2004/03/29 12:25:32+02:00 perex@suse.cz 
#   ALSA CVS update - Clemens Ladisch <clemens@ladisch.de>
#   AC97 Codec Core
#   fix detection of 2.3 codecs
# 
# include/sound/ac97_codec.h
#   2004/03/29 00:56:07+02:00 perex@suse.cz +1 -1
#   ALSA CVS update
#   D:2004/03/29 07:56:07
#   C:AC97 Codec Core
#   A:Clemens Ladisch <clemens@ladisch.de>
#   F:include/ac97_codec.h:1.42->1.43 
#   L:fix detection of 2.3 codecs
# 
# ChangeSet
#   2004/03/29 12:25:08+02:00 perex@suse.cz 
#   ALSA CVS update - Takashi Iwai <tiwai@suse.de>
#   IOCTL32 emulation
#   disabled the entries conflifting with TIOC* ioctls.
# 
# sound/core/ioctl32/timer32.c
#   2004/03/28 09:52:37+02:00 perex@suse.cz +10 -0
#   ALSA CVS update
#   D:2004/03/28 16:52:37
#   C:IOCTL32 emulation
#   A:Takashi Iwai <tiwai@suse.de>
#   F:core/ioctl32/timer32.c:1.7->1.8 
#   L:disabled the entries conflifting with TIOC* ioctls.
# 
# ChangeSet
#   2004/03/29 12:24:49+02:00 perex@suse.cz 
#   ALSA CVS update - Jaroslav Kysela <perex@suse.cz>
#   ICE1712 driver
#   Fixed Delta410 cs8427 i/o
# 
# sound/pci/ice1712/delta.c
#   2004/03/28 09:45:32+02:00 perex@suse.cz +2 -0
#   ALSA CVS update
#   D:2004/03/28 16:45:32
#   C:ICE1712 driver
#   A:Jaroslav Kysela <perex@suse.cz>
#   F:pci/ice1712/delta.c:1.15->1.16 
#   L:Fixed Delta410 cs8427 i/o
# 
# ChangeSet
#   2004/03/29 12:24:26+02:00 perex@suse.cz 
#   ALSA CVS update - Jaroslav Kysela <perex@suse.cz>
#   CS46xx driver
#   mmap_valid is 1 by default
# 
# sound/pci/cs46xx/cs46xx.c
#   2004/03/28 09:04:49+02:00 perex@suse.cz +2 -2
#   ALSA CVS update
#   D:2004/03/28 16:04:49
#   C:CS46xx driver
#   A:Jaroslav Kysela <perex@suse.cz>
#   F:pci/cs46xx/cs46xx.c:1.23->1.24 
#   L:mmap_valid is 1 by default
# 
# ChangeSet
#   2004/03/29 12:24:08+02:00 perex@suse.cz 
#   ALSA CVS update - Jaroslav Kysela <perex@suse.cz>
#   CS46xx driver
#   Added parsing of mmap_valid,external_amp and thinkpad parameters at boot time
# 
# sound/pci/cs46xx/cs46xx.c
#   2004/03/28 08:04:23+02:00 perex@suse.cz +5 -2
#   ALSA CVS update
#   D:2004/03/28 15:04:23
#   C:CS46xx driver
#   A:Jaroslav Kysela <perex@suse.cz>
#   F:pci/cs46xx/cs46xx.c:1.22->1.23 
#   L:Added parsing of mmap_valid,external_amp and thinkpad parameters at boot time
# 
# ChangeSet
#   2004/03/29 12:23:44+02:00 perex@suse.cz 
#   ALSA CVS update - Jaroslav Kysela <perex@suse.cz>
#   PPC PowerMac driver
#   Remove global enable variable
# 
# sound/ppc/powermac.c
#   2004/03/27 05:43:41+01:00 perex@suse.cz +6 -4
#   ALSA CVS update
#   D:2004/03/27 12:43:41
#   C:PPC PowerMac driver
#   A:Jaroslav Kysela <perex@suse.cz>
#   F:ppc/powermac.c:1.14->1.15 
#   L:Remove global enable variable
# 
# ChangeSet
#   2004/03/29 12:23:25+02:00 perex@suse.cz 
#   ALSA CVS update - Jaroslav Kysela <perex@suse.cz>
#   ALSA Version
#   release: 1.0.4rc1
# 
# include/sound/version.h
#   2004/03/26 09:17:53+01:00 perex@suse.cz +2 -2
#   ALSA CVS update
#   D:2004/03/26 16:17:53
#   C:ALSA Version
#   A:Jaroslav Kysela <perex@suse.cz>
#   F:include/version.h:1.38->1.39 
#   L:release: 1.0.4rc1
# 
# ChangeSet
#   2004/03/29 12:23:02+02:00 perex@suse.cz 
#   ALSA CVS update - Jaroslav Kysela <perex@suse.cz>
#   ICE1712 driver
#   From: Arjan van de Ven <arjanv@redhat.com>
#   
#   ice1712.c: move 2 same structs to the top of the function; gcc won't share
#   the stackslots anyway
# 
# sound/pci/ice1712/ice1712.c
#   2004/03/26 05:25:51+01:00 perex@suse.cz +2 -4
#   ALSA CVS update
#   D:2004/03/26 12:25:51
#   C:ICE1712 driver
#   A:Jaroslav Kysela <perex@suse.cz>
#   F:pci/ice1712/ice1712.c:1.46->1.47 
#   L:From: Arjan van de Ven <arjanv@redhat.com>
#   L:
#   L:ice1712.c: move 2 same structs to the top of the function; gcc won't share
#   L:the stackslots anyway
# 
# ChangeSet
#   2004/03/29 12:22:43+02:00 perex@suse.cz 
#   ALSA CVS update - Takashi Iwai <tiwai@suse.de>
#   Intel8x0 driver
#   disable the legacy midi/joystick properly as default.
# 
# sound/pci/intel8x0.c
#   2004/03/25 11:52:15+01:00 perex@suse.cz +2 -0
#   ALSA CVS update
#   D:2004/03/25 18:52:15
#   C:Intel8x0 driver
#   A:Takashi Iwai <tiwai@suse.de>
#   F:pci/intel8x0.c:1.128->1.129 
#   L:disable the legacy midi/joystick properly as default.
# 
# ChangeSet
#   2004/03/29 12:22:19+02:00 perex@suse.cz 
#   ALSA CVS update - Takashi Iwai <tiwai@suse.de>
#   Documentation,I2C cs8427,ICE1712 driver
#   fixed cs8427_timeout option to use the correct value in msec.
# 
# sound/pci/ice1712/ice1712.c
#   2004/03/24 04:42:54+01:00 perex@suse.cz +6 -6
#   ALSA CVS update
#   D:2004/03/24 11:42:51
#   C:Documentation,I2C cs8427,ICE1712 driver
#   A:Takashi Iwai <tiwai@suse.de>
#   F:Documentation/ALSA-Configuration.txt:1.38->1.39 
#   F:i2c/cs8427.c:1.18->1.19 
#   F:pci/ice1712/ice1712.c:1.45->1.46 
#   L:fixed cs8427_timeout option to use the correct value in msec.
# 
# sound/i2c/cs8427.c
#   2004/03/24 04:42:54+01:00 perex@suse.cz +3 -1
#   ALSA CVS update
#   D:2004/03/24 11:42:51
#   C:Documentation,I2C cs8427,ICE1712 driver
#   A:Takashi Iwai <tiwai@suse.de>
#   F:Documentation/ALSA-Configuration.txt:1.38->1.39 
#   F:i2c/cs8427.c:1.18->1.19 
#   F:pci/ice1712/ice1712.c:1.45->1.46 
#   L:fixed cs8427_timeout option to use the correct value in msec.
# 
# Documentation/sound/alsa/ALSA-Configuration.txt
#   2004/03/24 04:42:51+01:00 perex@suse.cz +1 -1
#   ALSA CVS update
#   D:2004/03/24 11:42:51
#   C:Documentation,I2C cs8427,ICE1712 driver
#   A:Takashi Iwai <tiwai@suse.de>
#   F:Documentation/ALSA-Configuration.txt:1.38->1.39 
#   F:i2c/cs8427.c:1.18->1.19 
#   F:pci/ice1712/ice1712.c:1.45->1.46 
#   L:fixed cs8427_timeout option to use the correct value in msec.
# 
# ChangeSet
#   2004/03/29 12:22:00+02:00 perex@suse.cz 
#   ALSA CVS update - Jaroslav Kysela <perex@suse.cz>
#   Documentation
#   Corrected cs8427_timeout
# 
# Documentation/sound/alsa/ALSA-Configuration.txt
#   2004/03/24 03:02:00+01:00 perex@suse.cz +1 -1
#   ALSA CVS update
#   D:2004/03/24 10:02:00
#   C:Documentation
#   A:Jaroslav Kysela <perex@suse.cz>
#   F:Documentation/ALSA-Configuration.txt:1.37->1.38 
#   L:Corrected cs8427_timeout
# 
# ChangeSet
#   2004/03/29 12:21:35+02:00 perex@suse.cz 
#   ALSA CVS update - Clemens Ladisch <clemens@ladisch.de>
#   USB generic driver
#   adjust usb_set_interface() calls for 2.6.5-rc2
# 
# sound/usb/usbaudio.c
#   2004/03/23 05:47:15+01:00 perex@suse.cz +2 -2
#   ALSA CVS update
#   D:2004/03/23 12:47:15
#   C:USB generic driver
#   A:Clemens Ladisch <clemens@ladisch.de>
#   F:usb/usbaudio.c:1.93->1.94 
#   L:adjust usb_set_interface() calls for 2.6.5-rc2
# 
# ChangeSet
#   2004/03/29 12:21:17+02:00 perex@suse.cz 
#   ALSA CVS update - Jaroslav Kysela <perex@suse.cz>
#   PCM Midlevel
#   Fix in snd_pcm_timer_resolution_change() - it no longer oops when
#   32-bit value overflows.
# 
# sound/core/pcm_timer.c
#   2004/03/23 01:37:09+01:00 perex@suse.cz +8 -4
#   ALSA CVS update
#   D:2004/03/23 08:37:09
#   C:PCM Midlevel
#   A:Jaroslav Kysela <perex@suse.cz>
#   F:core/pcm_timer.c:1.6->1.7 
#   L:Fix in snd_pcm_timer_resolution_change() - it no longer oops when
#   L:32-bit value overflows.
# 
# ChangeSet
#   2004/03/29 12:20:52+02:00 perex@suse.cz 
#   ALSA CVS update - Clemens Ladisch <clemens@ladisch.de>
#   USB generic driver
#   fix deadlock on register_mutex and other bugs
#   in initialization error paths
# 
# sound/usb/usbaudio.c
#   2004/03/22 00:50:47+01:00 perex@suse.cz +20 -20
#   ALSA CVS update
#   D:2004/03/22 07:50:47
#   C:USB generic driver
#   A:Clemens Ladisch <clemens@ladisch.de>
#   F:usb/usbaudio.c:1.92->1.93 
#   L:fix deadlock on register_mutex and other bugs
#   L:in initialization error paths
# 
# ChangeSet
#   2004/03/29 12:20:32+02:00 perex@suse.cz 
#   ALSA CVS update - Jaroslav Kysela <perex@suse.cz>
#   Sound Core PDAudioCF driver
#   Adrian Bunk <bunk@fs.tum.de>
#   Fix warnings (SNDRV_GET_ID is not required since these files don't use get_id).
# 
# sound/pcmcia/pdaudiocf/pdaudiocf_irq.c
#   2004/03/20 12:16:59+01:00 perex@suse.cz +0 -1
#   ALSA CVS update
#   D:2004/03/20 19:16:59
#   C:Sound Core PDAudioCF driver
#   A:Jaroslav Kysela <perex@suse.cz>
#   F:pcmcia/pdaudiocf/pdaudiocf.c:1.3->1.4 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.1->1.2 
#   F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.2->1.3 
#   L:Adrian Bunk <bunk@fs.tum.de>
#   L:Fix warnings (SNDRV_GET_ID is not required since these files don't use get_id).
# 
# sound/pcmcia/pdaudiocf/pdaudiocf_core.c
#   2004/03/20 12:16:59+01:00 perex@suse.cz +0 -1
#   ALSA CVS update
#   D:2004/03/20 19:16:59
#   C:Sound Core PDAudioCF driver
#   A:Jaroslav Kysela <perex@suse.cz>
#   F:pcmcia/pdaudiocf/pdaudiocf.c:1.3->1.4 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.1->1.2 
#   F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.2->1.3 
#   L:Adrian Bunk <bunk@fs.tum.de>
#   L:Fix warnings (SNDRV_GET_ID is not required since these files don't use get_id).
# 
# sound/pcmcia/pdaudiocf/pdaudiocf.c
#   2004/03/20 12:16:59+01:00 perex@suse.cz +0 -1
#   ALSA CVS update
#   D:2004/03/20 19:16:59
#   C:Sound Core PDAudioCF driver
#   A:Jaroslav Kysela <perex@suse.cz>
#   F:pcmcia/pdaudiocf/pdaudiocf.c:1.3->1.4 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.1->1.2 
#   F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.2->1.3 
#   L:Adrian Bunk <bunk@fs.tum.de>
#   L:Fix warnings (SNDRV_GET_ID is not required since these files don't use get_id).
# 
# ChangeSet
#   2004/03/29 12:20:11+02:00 perex@suse.cz 
#   ALSA CVS update - Jaroslav Kysela <perex@suse.cz>
#   Documentation
#   Added cs8427_timeout to the snd-ice1712 module description
# 
# Documentation/sound/alsa/ALSA-Configuration.txt
#   2004/03/20 06:13:12+01:00 perex@suse.cz +2 -0
#   ALSA CVS update
#   D:2004/03/20 13:13:12
#   C:Documentation
#   A:Jaroslav Kysela <perex@suse.cz>
#   F:Documentation/ALSA-Configuration.txt:1.36->1.37 
#   L:Added cs8427_timeout to the snd-ice1712 module description
# 
# ChangeSet
#   2004/03/29 12:19:41+02:00 perex@suse.cz 
#   ALSA CVS update - Jaroslav Kysela <perex@suse.cz>
#   I2C cs8427,ALSA Version,ICE1712 driver
#   Added cs8427_timeout parameter to the ICE1712 driver
# 
# sound/pci/ice1712/ice1712.h
#   2004/03/20 06:10:14+01:00 perex@suse.cz +1 -0
#   ALSA CVS update
#   D:2004/03/20 13:10:01
#   C:I2C cs8427,ALSA Version,ICE1712 driver
#   A:Jaroslav Kysela <perex@suse.cz>
#   F:i2c/cs8427.c:1.17->1.18 
#   F:include/cs8427.h:1.6->1.7 
#   F:include/version.h:1.37->1.38 
#   F:pci/ice1712/ice1712.c:1.44->1.45 
#   F:pci/ice1712/ice1712.h:1.17->1.18 
#   L:Added cs8427_timeout parameter to the ICE1712 driver
# 
# sound/pci/ice1712/ice1712.c
#   2004/03/20 06:10:14+01:00 perex@suse.cz +14 -2
#   ALSA CVS update
#   D:2004/03/20 13:10:01
#   C:I2C cs8427,ALSA Version,ICE1712 driver
#   A:Jaroslav Kysela <perex@suse.cz>
#   F:i2c/cs8427.c:1.17->1.18 
#   F:include/cs8427.h:1.6->1.7 
#   F:include/version.h:1.37->1.38 
#   F:pci/ice1712/ice1712.c:1.44->1.45 
#   F:pci/ice1712/ice1712.h:1.17->1.18 
#   L:Added cs8427_timeout parameter to the ICE1712 driver
# 
# sound/i2c/cs8427.c
#   2004/03/20 06:10:01+01:00 perex@suse.cz +4 -1
#   ALSA CVS update
#   D:2004/03/20 13:10:01
#   C:I2C cs8427,ALSA Version,ICE1712 driver
#   A:Jaroslav Kysela <perex@suse.cz>
#   F:i2c/cs8427.c:1.17->1.18 
#   F:include/cs8427.h:1.6->1.7 
#   F:include/version.h:1.37->1.38 
#   F:pci/ice1712/ice1712.c:1.44->1.45 
#   F:pci/ice1712/ice1712.h:1.17->1.18 
#   L:Added cs8427_timeout parameter to the ICE1712 driver
# 
# include/sound/version.h
#   2004/03/20 06:10:14+01:00 perex@suse.cz +1 -1
#   ALSA CVS update
#   D:2004/03/20 13:10:01
#   C:I2C cs8427,ALSA Version,ICE1712 driver
#   A:Jaroslav Kysela <perex@suse.cz>
#   F:i2c/cs8427.c:1.17->1.18 
#   F:include/cs8427.h:1.6->1.7 
#   F:include/version.h:1.37->1.38 
#   F:pci/ice1712/ice1712.c:1.44->1.45 
#   F:pci/ice1712/ice1712.h:1.17->1.18 
#   L:Added cs8427_timeout parameter to the ICE1712 driver
# 
# include/sound/cs8427.h
#   2004/03/20 06:10:01+01:00 perex@suse.cz +2 -1
#   ALSA CVS update
#   D:2004/03/20 13:10:01
#   C:I2C cs8427,ALSA Version,ICE1712 driver
#   A:Jaroslav Kysela <perex@suse.cz>
#   F:i2c/cs8427.c:1.17->1.18 
#   F:include/cs8427.h:1.6->1.7 
#   F:include/version.h:1.37->1.38 
#   F:pci/ice1712/ice1712.c:1.44->1.45 
#   F:pci/ice1712/ice1712.h:1.17->1.18 
#   L:Added cs8427_timeout parameter to the ICE1712 driver
# 
# ChangeSet
#   2004/03/29 12:19:17+02:00 perex@suse.cz 
#   ALSA CVS update - Takashi Iwai <tiwai@suse.de>
#   Intel8x0 driver
#   Removed the unprocessed IRQ detection, it seems bogus.
# 
# sound/pci/intel8x0.c
#   2004/03/19 13:18:37+01:00 perex@suse.cz +4 -7
#   ALSA CVS update
#   D:2004/03/19 20:18:37
#   C:Intel8x0 driver
#   A:Takashi Iwai <tiwai@suse.de>
#   F:pci/intel8x0.c:1.127->1.128 
#   L:Removed the unprocessed IRQ detection, it seems bogus.
# 
# ChangeSet
#   2004/03/29 12:18:57+02:00 perex@suse.cz 
#   ALSA CVS update - Takashi Iwai <tiwai@suse.de>
#   Documentation
#   The description about ALSA proc files, including debug information.
# 
# Documentation/sound/alsa/Procfile.txt
#   2004/03/29 11:58:52+02:00 perex@suse.cz +185 -0
#   ALSA CVS update
#   D:2004/03/19 20:18:02
#   C:Documentation
#   A:Takashi Iwai <tiwai@suse.de>
#   F:Documentation/Procfile.txt:INITIAL->1.1 
#   L:The description about ALSA proc files, including debug information.
# 
# Documentation/sound/alsa/Procfile.txt
#   2004/03/29 11:58:52+02:00 perex@suse.cz +0 -0
#   BitKeeper file /home/perex/bk/linux-sound/work/Documentation/sound/alsa/Procfile.txt
# 
# ChangeSet
#   2004/03/29 12:18:31+02:00 perex@suse.cz 
#   ALSA CVS update - Takashi Iwai <tiwai@suse.de>
#   PCM Midlevel
#   - suppress the xrun debug output unless xrun_debug proc is set.
#   - show stack trace when xrun_debug > 1.
# 
# sound/core/pcm_lib.c
#   2004/03/19 13:17:34+01:00 perex@suse.cz +10 -3
#   ALSA CVS update
#   D:2004/03/19 20:17:34
#   C:PCM Midlevel
#   A:Takashi Iwai <tiwai@suse.de>
#   F:core/pcm.c:1.40->1.41 
#   F:core/pcm_lib.c:1.49->1.50 
#   F:include/pcm.h:1.39->1.40 
#   L:- suppress the xrun debug output unless xrun_debug proc is set.
#   L:- show stack trace when xrun_debug > 1.
# 
# sound/core/pcm.c
#   2004/03/19 13:17:34+01:00 perex@suse.cz +1 -1
#   ALSA CVS update
#   D:2004/03/19 20:17:34
#   C:PCM Midlevel
#   A:Takashi Iwai <tiwai@suse.de>
#   F:core/pcm.c:1.40->1.41 
#   F:core/pcm_lib.c:1.49->1.50 
#   F:include/pcm.h:1.39->1.40 
#   L:- suppress the xrun debug output unless xrun_debug proc is set.
#   L:- show stack trace when xrun_debug > 1.
# 
# include/sound/pcm.h
#   2004/03/19 13:17:34+01:00 perex@suse.cz +1 -1
#   ALSA CVS update
#   D:2004/03/19 20:17:34
#   C:PCM Midlevel
#   A:Takashi Iwai <tiwai@suse.de>
#   F:core/pcm.c:1.40->1.41 
#   F:core/pcm_lib.c:1.49->1.50 
#   F:include/pcm.h:1.39->1.40 
#   L:- suppress the xrun debug output unless xrun_debug proc is set.
#   L:- show stack trace when xrun_debug > 1.
# 
# ChangeSet
#   2004/03/29 12:18:11+02:00 perex@suse.cz 
#   ALSA CVS update - Takashi Iwai <tiwai@suse.de>
#   Intel8x0 driver
#   added the quirk for Compaq Evo D510C.
# 
# sound/pci/intel8x0.c
#   2004/03/19 06:46:40+01:00 perex@suse.cz +7 -1
#   ALSA CVS update
#   D:2004/03/19 13:46:40
#   C:Intel8x0 driver
#   A:Takashi Iwai <tiwai@suse.de>
#   F:pci/intel8x0.c:1.126->1.127 
#   L:added the quirk for Compaq Evo D510C.
# 
# ChangeSet
#   2004/03/29 12:17:47+02:00 perex@suse.cz 
#   ALSA CVS update - Clemens Ladisch <clemens@ladisch.de>
#   USB generic driver
#   high speed support
# 
# sound/usb/usbaudio.c
#   2004/03/19 00:46:03+01:00 perex@suse.cz +177 -38
#   ALSA CVS update
#   D:2004/03/19 07:46:03
#   C:USB generic driver
#   A:Clemens Ladisch <clemens@ladisch.de>
#   F:usb/usbaudio.c:1.91->1.92 
#   L:high speed support
# 
# ChangeSet
#   2004/03/29 12:17:29+02:00 perex@suse.cz 
#   ALSA CVS update - Clemens Ladisch <clemens@ladisch.de>
#   USB generic driver
#   clean up get_iface again :)
# 
# sound/usb/usbaudio.h
#   2004/03/19 00:23:20+01:00 perex@suse.cz +0 -1
#   ALSA CVS update
#   D:2004/03/19 07:23:20
#   C:USB generic driver
#   A:Clemens Ladisch <clemens@ladisch.de>
#   F:usb/usbaudio.h:1.27->1.28 
#   L:clean up get_iface again :)
# 
# ChangeSet
#   2004/03/29 12:17:10+02:00 perex@suse.cz 
#   ALSA CVS update - Clemens Ladisch <clemens@ladisch.de>
#   USB generic driver
#   replace usage of interface index with calls to usb_ifnum_to_if (forgot this in 1.88)
# 
# sound/usb/usbaudio.c
#   2004/03/18 07:57:03+01:00 perex@suse.cz +2 -3
#   ALSA CVS update
#   D:2004/03/18 14:57:03
#   C:USB generic driver
#   A:Clemens Ladisch <clemens@ladisch.de>
#   F:usb/usbaudio.c:1.90->1.91 
#   L:replace usage of interface index with calls to usb_ifnum_to_if (forgot this in 1.88)
# 
# ChangeSet
#   2004/03/29 12:16:47+02:00 perex@suse.cz 
#   ALSA CVS update - Clemens Ladisch <clemens@ladisch.de>
#   USB generic driver
#   remove calls to usb_driver_release_interface
#   (not needed when disconnect is called)
# 
# sound/usb/usbmidi.c
#   2004/03/18 07:50:54+01:00 perex@suse.cz +0 -1
#   ALSA CVS update
#   D:2004/03/18 14:50:53
#   C:USB generic driver
#   A:Clemens Ladisch <clemens@ladisch.de>
#   F:usb/usbaudio.c:1.89->1.90 
#   F:usb/usbmidi.c:1.27->1.28 
#   L:remove calls to usb_driver_release_interface
#   L:(not needed when disconnect is called)
# 
# sound/usb/usbaudio.c
#   2004/03/18 07:50:53+01:00 perex@suse.cz +0 -6
#   ALSA CVS update
#   D:2004/03/18 14:50:53
#   C:USB generic driver
#   A:Clemens Ladisch <clemens@ladisch.de>
#   F:usb/usbaudio.c:1.89->1.90 
#   F:usb/usbmidi.c:1.27->1.28 
#   L:remove calls to usb_driver_release_interface
#   L:(not needed when disconnect is called)
# 
# ChangeSet
#   2004/03/28 21:51:55-08:00 niv@us.ibm.com 
#   [TCP]: Use tcp_tw_put on time-wait sockets.
# 
# net/ipv4/tcp_ipv4.c
#   2004/03/28 21:51:37-08:00 niv@us.ibm.com +6 -3
#   [TCP]: Use tcp_tw_put on time-wait sockets.
# 
# ChangeSet
#   2004/03/28 16:15:44-08:00 davem@nuts.davemloft.net 
#   [INTERMEZZO]: Fix 64-bit platform warnings.
# 
# fs/intermezzo/upcall.c
#   2004/03/28 16:15:18-08:00 davem@nuts.davemloft.net +7 -2
#   [INTERMEZZO]: Fix 64-bit platform warnings.
# 
# fs/intermezzo/psdev.c
#   2004/03/28 16:15:18-08:00 davem@nuts.davemloft.net +4 -4
#   [INTERMEZZO]: Fix 64-bit platform warnings.
# 
# fs/intermezzo/kml_reint.c
#   2004/03/28 16:15:18-08:00 davem@nuts.davemloft.net +6 -4
#   [INTERMEZZO]: Fix 64-bit platform warnings.
# 
# fs/intermezzo/journal.c
#   2004/03/28 16:15:18-08:00 davem@nuts.davemloft.net +2 -2
#   [INTERMEZZO]: Fix 64-bit platform warnings.
# 
# fs/intermezzo/fileset.c
#   2004/03/28 16:15:18-08:00 davem@nuts.davemloft.net +6 -4
#   [INTERMEZZO]: Fix 64-bit platform warnings.
# 
# fs/intermezzo/file.c
#   2004/03/28 16:15:18-08:00 davem@nuts.davemloft.net +3 -3
#   [INTERMEZZO]: Fix 64-bit platform warnings.
# 
# ChangeSet
#   2004/03/28 15:29:47-08:00 davem@nuts.davemloft.net 
#   [CARMEL]: Fix 64-bit platform warning.
# 
# drivers/block/carmel.c
#   2004/03/28 15:29:34-08:00 davem@nuts.davemloft.net +2 -1
#   [CARMEL]: Fix 64-bit platform warning.
# 
# ChangeSet
#   2004/03/28 15:13:31-08:00 davem@nuts.davemloft.net 
#   [SOC]: Fix cast-as-lvalue warnings in soc fc4 driver.
# 
# drivers/fc4/soc.h
#   2004/03/28 15:10:12-08:00 davem@nuts.davemloft.net +7 -3
#   [SOC]: Fix cast-as-lvalue warnings in soc fc4 driver.
# 
# ChangeSet
#   2004/03/28 01:56:20-08:00 jmorris@redhat.com 
#   [IPV6]: Link some packet walker helpers always statically.
#   
#   Put the extension header helper funcs always statically into
#   the kernel even if ipv6 is built as a module, this is needed
#   for things like SELinux.
# 
# net/ipv6/ipv6_syms.c
#   2004/03/28 01:55:27-08:00 jmorris@redhat.com +0 -2
#   [IPV6]: Link some packet walker helpers always statically.
# 
# net/ipv6/exthdrs.c
#   2004/03/28 01:55:27-08:00 jmorris@redhat.com +0 -102
#   [IPV6]: Link some packet walker helpers always statically.
# 
# net/ipv6/Makefile
#   2004/03/28 01:55:27-08:00 jmorris@redhat.com +2 -0
#   [IPV6]: Link some packet walker helpers always statically.
# 
# net/Makefile
#   2004/03/28 01:55:27-08:00 jmorris@redhat.com +3 -1
#   [IPV6]: Link some packet walker helpers always statically.
# 
# net/ipv6/exthdrs_core.c
#   2004/03/28 01:55:23-08:00 jmorris@redhat.com +108 -0
#   [IPV6]: Link some packet walker helpers always statically.
# 
# net/ipv6/exthdrs_core.c
#   2004/03/28 01:55:23-08:00 jmorris@redhat.com +0 -0
#   BitKeeper file /disk1/BK/net-2.6/net/ipv6/exthdrs_core.c
# 
# ChangeSet
#   2004/03/28 01:54:03-08:00 uaca@alumni.uv.es 
#   [AF_PACKET]: Fix packet_set_ring memleak and remove num frame limit.
# 
# net/packet/af_packet.c
#   2004/03/28 01:50:58-08:00 uaca@alumni.uv.es +53 -36
#   [AF_PACKET]: Fix packet_set_ring memleak and remove num frame limit.
# 
# ChangeSet
#   2004/03/27 22:21:34-08:00 wesolows@foobazco.org 
#   Merge.
# 
# arch/sparc/kernel/sparc_ksyms.c
#   2004/03/27 22:21:29-08:00 wesolows@foobazco.org +1 -2
#   Merge.
# 
# arch/sparc/kernel/entry.S
#   2004/03/27 22:20:04-08:00 wesolows@foobazco.org +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/03/27 22:04:17-08:00 wesolows@foobazco.org 
#   [SPARC32]: Rename cpuid functions
#   
#   smp_processor_id is to be used when current_thread_info()->cpu is
#   valid; i.e. almost always.  Early on or when setting that field,
#   hard_smp_processor_id is used.  Clarify the distinction and only
#   export to modules what's really needed.  smp_processor_id is not
#   model-specific, so we no longer need btfixups for it.
# 
# include/asm-sparc/smp.h
#   2004/03/27 22:04:11-08:00 wesolows@foobazco.org +4 -4
#   [SPARC32]: Rename cpuid functions
# 
# arch/sparc/kernel/sparc_ksyms.c
#   2004/03/27 22:04:11-08:00 wesolows@foobazco.org +1 -1
#   [SPARC32]: Rename cpuid functions
# 
# ChangeSet
#   2004/03/27 21:50:09-08:00 wesolows@foobazco.org 
#   [SPARC32]: Optimize SMP IPI handling
#   
#   Since smp_stop_cpu is not used, we don't need to test for it.  This
#   saves several instructions in the IPI handler and simplifies the code.
# 
# arch/sparc/kernel/entry.S
#   2004/03/27 21:50:03-08:00 wesolows@foobazco.org +3 -15
#   [SPARC32]: Optimize SMP IPI handling
# 
# ChangeSet
#   2004/03/27 21:45:13-08:00 wesolows@foobazco.org 
#   [SPARC32]: Use model-specific cpuid calls in model-specific code
#   
#   There are no longer any callers of GET_PROCESSOR_MID and
#   GET_PROCESSOR_ID, so both are removed.
# 
# include/asm-sparc/asmmacro.h
#   2004/03/27 21:45:08-08:00 wesolows@foobazco.org +0 -11
#   [SPARC32]: Use model-specific cpuid calls in model-specific code
# 
# arch/sparc/kernel/entry.S
#   2004/03/27 21:45:08-08:00 wesolows@foobazco.org +2 -2
#   [SPARC32]: Use model-specific cpuid calls in model-specific code
# 
# ChangeSet
#   2004/03/27 21:36:28-08:00 wesolows@foobazco.org 
#   [SPARC32]: Replace deprecated EXPORT_SYMBOL_NOVERS
# 
# arch/sparc/kernel/sparc_ksyms.c
#   2004/03/27 21:36:23-08:00 wesolows@foobazco.org +25 -30
#   [SPARC32]: Replace deprecated EXPORT_SYMBOL_NOVERS
# 
# ChangeSet
#   2004/03/27 17:49:21-08:00 wesolows@foobazco.org 
#   [SPARC32]: Allow debugging locks to compile again
# 
# arch/sparc/lib/debuglocks.c
#   2004/03/27 17:49:15-08:00 wesolows@foobazco.org +2 -3
#   [SPARC32]: Allow debugging locks to compile again
# 
# arch/sparc/lib/Makefile
#   2004/03/27 17:49:15-08:00 wesolows@foobazco.org +3 -1
#   [SPARC32]: Allow debugging locks to compile again
# 
# ChangeSet
#   2004/03/27 17:46:30-08:00 wesolows@foobazco.org 
#   [SPARC32]: Correct init_thread_union section and alignment for gcc 3.3+
#   
#   Recent tools are disregarding both the __asm__(".text") in init_task.c
#   and the alignment at the end of .text in head.S.  Use attributes
#   instead.
# 
# arch/sparc/kernel/init_task.c
#   2004/03/27 17:46:24-08:00 wesolows@foobazco.org +4 -2
#   [SPARC32]: Correct init_thread_union section and alignment for gcc 3.3+
# 
# arch/sparc/kernel/head.S
#   2004/03/27 17:46:24-08:00 wesolows@foobazco.org +0 -3
#   [SPARC32]: Correct init_thread_union section and alignment for gcc 3.3+
# 
# ChangeSet
#   2004/03/25 23:14:22-08:00 wesolows@foobazco.org 
#   [SPARC32]: gcc 3.4+ compile fixes
#   
#   From: Art Haas <ahaas@airmail.net>
#   
#   Fix casts-as-lvalues and labels left at the end of blocks.
# 
# arch/sparc/math-emu/math.c
#   2004/03/25 23:14:16-08:00 wesolows@foobazco.org +2 -0
#   [SPARC32]: gcc 3.4+ compile fixes
# 
# arch/sparc/kernel/sys_sunos.c
#   2004/03/25 23:14:16-08:00 wesolows@foobazco.org +2 -2
#   [SPARC32]: gcc 3.4+ compile fixes
# 
# ChangeSet
#   2004/03/22 22:19:34+01:00 sam@mars.ravnborg.org 
#   kbuild: Trivial spelling / rephrasing
#   
#   From: Ingo Molnar <mingo@elte.hu>
# 
# scripts/basic/fixdep.c
#   2004/03/22 22:19:23+01:00 sam@mars.ravnborg.org +1 -1
#   kbuild: Trivial spelling / rephrasing
# 
# Documentation/kbuild/makefiles.txt
#   2004/03/22 22:19:23+01:00 sam@mars.ravnborg.org +6 -6
#   kbuild: Trivial spelling / rephrasing
# 
# ChangeSet
#   2004/03/22 22:12:04+01:00 sam@mars.ravnborg.org 
#   kbuild: Less modules printed when warned about SUBDIRS usage
#   
#   From: Rusty Russell <rusty@rustcorp.com.au>
#   
#   Now kbuild prints out a line telling only what modules there are added,
#   not all modules.
# 
# scripts/Makefile.modpost
#   2004/03/22 22:11:53+01:00 sam@mars.ravnborg.org +1 -1
#   kbuild: Less modules printed when warned about SUBDIRS usage
#   
#   Now kbuild print out a line telling only what modules there are added,
#   not all modules.
# 
# ChangeSet
#   2004/03/22 22:06:14+01:00 sam@mars.ravnborg.org 
#   kbuild: Preset locale variables
#   
#   From: Jasper Spaans <jasper@vs19.net>
#   
#   Presetting locale to 'C' gives slight improved compilation speed,
#   when for example using "LANG=nl_NL.UTF-8@euro".
#   Error message still appear with correct locale.
# 
# Makefile
#   2004/03/22 22:00:42+01:00 sam@mars.ravnborg.org +10 -0
#   kbuild: Preset locale variables
#   
#   From: Jasper Spaans <jasper@vs19.net>
#   
#   Presetting locale to 'C' gives slight improved compilation speed,
#   when for example using "LANG=nl_NL.UTF-8@euro".
#   Error message still appear with correct locale.
# 
diff -Nru a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
--- a/Documentation/kbuild/makefiles.txt	Thu Apr  1 00:48:06 2004
+++ b/Documentation/kbuild/makefiles.txt	Thu Apr  1 00:48:06 2004
@@ -119,7 +119,7 @@
 		obj-y += foo.o
 
 	This tell kbuild that there is one object in that directory named
-	foo.o. foo.o will be build from foo.c or foo.S.
+	foo.o. foo.o will be built from foo.c or foo.S.
 
 	If foo.o shall be built as a module, the variable obj-m is used.
 	Therefore the following pattern is often used:
@@ -334,7 +334,7 @@
 
 --- 3.9 Dependency tracking
 
-	Kbuild track dependencies on the following:
+	Kbuild tracks dependencies on the following:
 	1) All prerequisite files (both *.c and *.h)
 	2) CONFIG_ options used in all prerequisite files
 	3) Command-line used to compile target
@@ -411,7 +411,7 @@
 --- 4.2 Composite Host Programs
 
 	Host programs can be made up based on composite objects.
-	The syntax used to define composite objetcs for host programs is
+	The syntax used to define composite objects for host programs is
 	similar to the syntax used for kernel objects.
 	$(<executeable>-objs) list all objects used to link the final
 	executable.
@@ -811,7 +811,7 @@
 
     extra-y
 
-	extra-y specify additional targets created in current
+	extra-y specify additional targets created in the current
 	directory, in addition to any targets specified by obj-*.
 
 	Listing all targets in extra-y is required for two purposes:
@@ -829,7 +829,7 @@
 	
 --- 6.6 Commands useful for building a boot image
 
-	Kbuild provide a few macros that are useful when building a
+	Kbuild provides a few macros that are useful when building a
 	boot image.
 
     if_changed
@@ -872,7 +872,7 @@
 		$(obj)/setup $(obj)/bootsect: %: %.o FORCE
 			$(call if_changed,ld)
 
-	In this example there is two possible targets, requiring different
+	In this example there are two possible targets, requiring different
 	options to the linker. the linker options are specified using the
 	LDFLAGS_$@ syntax - one for each potential target.
 	$(targets) are assinged all potential targets, herby kbuild knows
diff -Nru a/Documentation/networking/packet_mmap.txt b/Documentation/networking/packet_mmap.txt
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/Documentation/networking/packet_mmap.txt	Thu Apr  1 00:48:07 2004
@@ -0,0 +1,412 @@
+
+DaveM:
+
+If you agree with it I will send two small patches to modify
+kernel's configure help. 
+
+	Ulisses
+
+--------------------------------------------------------------------------------
++ ABSTRACT
+--------------------------------------------------------------------------------
+
+This file documents the CONFIG_PACKET_MMAP option available with the PACKET
+socket interface on 2.4 and 2.6 kernels. This type of sockets is used for 
+capture network traffic with utilities like tcpdump or any other that uses 
+the libpcap library. 
+
+You can find the latest version of this document at
+
+    http://pusa.uv.es/~ulisses/packet_mmap/
+
+Please send me your comments to
+
+    Ulisses Alonso Camaró <uaca@i.hate.spam.alumni.uv.es>
+
+-------------------------------------------------------------------------------
++ Why use PACKET_MMAP
+--------------------------------------------------------------------------------
+
+In Linux 2.4/2.6 if PACKET_MMAP is not enabled, the capture process is very
+inefficient. It uses very limited buffers and requires one system call
+to capture each packet, it requires two if you want to get packet's 
+timestamp (like libpcap always does).
+
+In the other hand PACKET_MMAP is very efficient. PACKET_MMAP provides a size 
+configurable circular buffer mapped in user space. This way reading packets just 
+needs to wait for them, most of the time there is no need to issue a single 
+system call. By using a shared buffer between the kernel and the user 
+also has the benefit of minimizing packet copies.
+
+It's fine to use PACKET_MMAP to improve the performance of the capture process, 
+but it isn't everything. At least, if you are capturing at high speeds (this 
+is relative to the cpu speed), you should check if the device driver of your 
+network interface card supports some sort of interrupt load mitigation or 
+(even better) if it supports NAPI, also make sure it is enabled.
+
+--------------------------------------------------------------------------------
++ How to use CONFIG_PACKET_MMAP
+--------------------------------------------------------------------------------
+
+From the user standpoint, you should use the higher level libpcap library, wich
+is a de facto standard, portable across nearly all operating systems
+including Win32. 
+
+Said that, at time of this writing, official libpcap 0.8.1 is out and doesn't include
+support for PACKET_MMAP, and also probably the libpcap included in your distribution. 
+
+I'm aware of two implementations of PACKET_MMAP in libpcap:
+
+    http://pusa.uv.es/~ulisses/packet_mmap/  (by Simon Patarin, based on libpcap 0.6.2)
+    http://public.lanl.gov/cpw/              (by Phil Wood, based on lastest libpcap)
+
+The rest of this document is intended for people who want to understand
+the low level details or want to improve libpcap by including PACKET_MMAP
+support.
+
+--------------------------------------------------------------------------------
++ How to use CONFIG_PACKET_MMAP directly
+--------------------------------------------------------------------------------
+
+From the system calls stand point, the use of PACKET_MMAP involves
+the following process:
+
+
+[setup]     socket() -------> creation of the capture socket
+            setsockopt() ---> allocation of the circular buffer (ring)
+            mmap() ---------> maping of the allocated buffer to the
+                              user process
+
+[capture]   poll() ---------> to wait for incoming packets
+
+[shutdown]  close() --------> destruction of the capture socket and
+                              deallocation of all associated 
+                              resources.
+
+
+socket creation and destruction is straight forward, and is done 
+the same way with or without PACKET_MMAP:
+
+int fd;
+
+fd= socket(PF_PACKET, mode, htons(ETH_P_ALL))
+
+where mode is SOCK_RAW for the raw interface were link level
+information can be captured or SOCK_DGRAM for the cooked
+interface where link level information capture is not 
+supported and a link level pseudo-header is provided 
+by the kernel.
+
+The destruction of the socket and all associated resources
+is done by a simple call to close(fd).
+
+Next I will describe PACKET_MMAP settings and it's constraints,
+also the maping of the circular buffer in the user process and 
+the use of this buffer.
+
+--------------------------------------------------------------------------------
++ PACKET_MMAP settings
+--------------------------------------------------------------------------------
+
+
+To setup PACKET_MMAP from user level code is done with a call like
+
+     setsockopt(fd, SOL_PACKET, PACKET_RX_RING, (void *) &req, sizeof(req))
+
+The most significant argument in the previous call is the req parameter, 
+this parameter must to have the following structure:
+
+    struct tpacket_req
+    {
+        unsigned int    tp_block_size;  /* Minimal size of contiguous block */
+        unsigned int    tp_block_nr;    /* Number of blocks */
+        unsigned int    tp_frame_size;  /* Size of frame */
+        unsigned int    tp_frame_nr;    /* Total number of frames */
+    };
+
+This structure is defined in /usr/include/linux/if_packet.h and establishes a 
+circular buffer (ring) of unswappable memory mapped in the capture process. 
+Being mapped in the capture process allows reading the captured frames and 
+related meta-information like timestamps without requiring a system call.
+
+Captured frames are grouped in blocks. Each block is a physically contiguous 
+region of memory and holds tp_block_size/tp_frame_size frames. The total number 
+of blocks is tp_block_nr. Note that tp_frame_nr is a redundant parameter because
+
+    frames_per_block = tp_block_size/tp_frame_size
+
+indeed, packet_set_ring checks that the following condition is true
+
+    frames_per_block * tp_block_nr == tp_frame_nr
+
+
+Lets see an example, with the following values:
+
+     tp_block_size= 4096
+     tp_frame_size= 2048
+     tp_block_nr  = 4
+     tp_frame_nr  = 8
+
+we will get the following buffer structure:
+
+        block #1                 block #2         
++---------+---------+    +---------+---------+    
+| frame 1 | frame 2 |    | frame 3 | frame 4 |    
++---------+---------+    +---------+---------+    
+
+        block #3                 block #4
++---------+---------+    +---------+---------+
+| frame 5 | frame 6 |    | frame 7 | frame 8 |
++---------+---------+    +---------+---------+
+
+A frame can be of any size with the only condition it can fit in a block. A block
+can only hold an integer number of frames, or in other words, a frame cannot 
+be spawn accross two blocks so there are some datails you have to take into 
+account when choosing the frame_size. See "Maping and use of the circular 
+buffer (ring)".
+
+
+--------------------------------------------------------------------------------
++ PACKET_MMAP setting constraints
+--------------------------------------------------------------------------------
+
+In kernel versions prior to 2.4.26 (for the 2.4 branch) and 2.6.5 (2.6 branch),
+the PACKET_MMAP buffer could hold only 32768 frames in a 32 bit architecture or
+16384 in a 64 bit architecture. For information on these kernel versions
+see http://pusa.uv.es/~ulisses/packet_mmap/packet_mmap.pre-2.4.26_2.6.5.txt
+
+ Block size limit
+------------------
+
+As stated earlier, each block is a contiguous physical region of memory. These 
+memory regions are allocated with calls to the __get_free_pages() function. As 
+the name indicates, this function allocates pages of memory, and the second
+argument is "order" or a power of two number of pages, that is 
+(for PAGE_SIZE == 4096) order=0 ==> 4096 bytes, order=1 ==> 8192 bytes, 
+order=2 ==> 16384 bytes, etc. The maximum size of a 
+region allocated by __get_free_pages is determined by the MAX_ORDER macro. More 
+precisely the limit can be calculated as:
+
+   PAGE_SIZE << MAX_ORDER
+
+   In a i386 architecture PAGE_SIZE is 4096 bytes 
+   In a 2.4/i386 kernel MAX_ORDER is 10
+   In a 2.6/i386 kernel MAX_ORDER is 11
+
+So get_free_pages can allocate as much as 4MB or 8MB in a 2.4/2.6 kernel 
+respectively, with an i386 architecture.
+
+User space programs can include /usr/include/sys/user.h and 
+/usr/include/linux/mmzone.h to get PAGE_SIZE MAX_ORDER declarations.
+
+The pagesize can also be determined dynamically with the getpagesize (2) 
+system call. 
+
+
+ Block number limit
+--------------------
+
+To understand the constraints of PACKET_MMAP, we have to see the structure 
+used to hold the pointers to each block.
+
+Currently, this structure is a dynamically allocated vector with kmalloc 
+called pg_vec, its size limits the number of blocks that can be allocated.
+
+    +---+---+---+---+
+    | x | x | x | x |
+    +---+---+---+---+
+      |   |   |   |
+      |   |   |   v
+      |   |   v  block #4
+      |   v  block #3
+      v  block #2
+     block #1
+
+
+kmalloc allocates any number of bytes of phisically contiguous memory from 
+a pool of pre-determined sizes. This pool of memory is mantained by the slab 
+allocator wich is at the end the responsible for doing the allocation and 
+hence wich imposes the maximum memory that kmalloc can allocate. 
+
+In a 2.4/2.6 kernel and the i386 architecture, the limit is 131072 bytes. The 
+predetermined sizes that kmalloc uses can be checked in the "size-<bytes>" 
+entries of /proc/slabinfo
+
+In a 32 bit architecture, pointers are 4 bytes long, so the total number of 
+pointers to blocks is
+
+     131072/4 = 32768 blocks
+
+
+ PACKET_MMAP buffer size calculator
+------------------------------------
+
+Definitions:
+
+<size-max>    : is the maximum size of allocable with kmalloc (see /proc/slabinfo)
+<pointer size>: depends on the architecture -- sizeof(void *)
+<page size>   : depends on the architecture -- PAGE_SIZE or getpagesize (2)
+<max-order>   : is the value defined with MAX_ORDER
+<frame size>  : it's an upper bound of frame's capture size (more on this later)
+
+from these definitions we will derive 
+
+	<block number> = <size-max>/<pointer size>
+	<block size> = <pagesize> << <max-order>
+
+so, the max buffer size is
+
+	<block number> * <block size>
+
+and, the number of frames be
+
+	<block number> * <block size> / <frame size>
+
+Suposse the following parameters, wich apply for 2.6 kernel and an
+i386 architecture:
+
+	<size-max> = 131072 bytes
+	<pointer size> = 4 bytes
+	<pagesize> = 4096 bytes
+	<max-order> = 11
+
+and a value for <frame size> of 2048 byteas. These parameters will yield
+
+	<block number> = 131072/4 = 32768 blocks
+	<block size> = 4096 << 11 = 8 MiB.
+
+and hence the buffer will have a 262144 MiB size. So it can hold 
+262144 MiB / 2048 bytes = 134217728 frames
+
+
+Actually, this buffer size is not possible with an i386 architecture. 
+Remember that the memory is allocated in kernel space, in the case of 
+an i386 kernel's memory size is limited to 1GiB.
+
+All memory allocations are not freed until the socket is closed. The memory 
+allocations are done with GFP_KERNEL priority, this basically means that 
+the allocation can wait and swap other process' memory in order to allocate 
+the nececessary memory, so normally limits can be reached.
+
+ Other constraints
+-------------------
+
+If you check the source code you will see that what I draw here as a frame
+is not only the link level frame. At the begining of each frame there is a 
+header called struct tpacket_hdr used in PACKET_MMAP to hold link level's frame
+meta information like timestamp. So what we draw here a frame it's really 
+the following (from include/linux/if_packet.h):
+
+/*
+   Frame structure:
+
+   - Start. Frame must be aligned to TPACKET_ALIGNMENT=16
+   - struct tpacket_hdr
+   - pad to TPACKET_ALIGNMENT=16
+   - struct sockaddr_ll
+   - Gap, chosen so that packet data (Start+tp_net) alignes to 
+     TPACKET_ALIGNMENT=16
+   - Start+tp_mac: [ Optional MAC header ]
+   - Start+tp_net: Packet data, aligned to TPACKET_ALIGNMENT=16.
+   - Pad to align to TPACKET_ALIGNMENT=16
+ */
+           
+ 
+ The following are conditions that are checked in packet_set_ring
+
+   tp_block_size must be a multiple of PAGE_SIZE (1)
+   tp_frame_size must be greater than TPACKET_HDRLEN (obvious)
+   tp_frame_size must be a multiple of TPACKET_ALIGNMENT
+   tp_frame_nr   must be exactly frames_per_block*tp_block_nr
+
+Note that tp_block_size should be choosed to be a power of two or there will
+be a waste of memory.
+
+--------------------------------------------------------------------------------
++ Maping and use of the circular buffer (ring)
+--------------------------------------------------------------------------------
+
+The maping of the buffer in the user process is done with the conventional 
+mmap function. Even the circular buffer is compound of several physically
+discontiguous blocks of memory, they are contiguous to the user space, hence
+just one call to mmap is needed:
+
+    mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
+
+If tp_frame_size is a divisor of tp_block_size frames will be 
+contiguosly spaced by tp_frame_size bytes. If not, each 
+tp_block_size/tp_frame_size frames there will be a gap between 
+the frames. This is because a frame cannot be spawn across two
+blocks. 
+
+At the beginning of each frame there is an status field (see 
+struct tpacket_hdr). If this field is 0 means that the frame is ready
+to be used for the kernel, If not, there is a frame the user can read 
+and the following flags apply:
+
+     from include/linux/if_packet.h
+
+     #define TP_STATUS_COPY          2 
+     #define TP_STATUS_LOSING        4 
+     #define TP_STATUS_CSUMNOTREADY  8 
+
+
+TP_STATUS_COPY        : This flag indicates that the frame (and associated
+                        meta information) has been truncated because it's 
+                        larger than tp_frame_size. This packet can be 
+                        read entirely with recvfrom().
+                        
+                        In order to make this work it must to be
+                        enabled previously with setsockopt() and 
+                        the PACKET_COPY_THRESH option. 
+
+                        The number of frames than can be buffered to 
+                        be read with recvfrom is limited like a normal socket.
+                        See the SO_RCVBUF option in the socket (7) man page.
+
+TP_STATUS_LOSING      : indicates there were packet drops from last time 
+                        statistics where checked with getsockopt() and
+                        the PACKET_STATISTICS option.
+
+TP_STATUS_CSUMNOTREADY: currently it's used for outgoing IP packets wich 
+                        it's checksum will be done in hardware. So while 
+                        reading the packet we should not try to check the 
+                        checksum. 
+
+for convenience there are also the following defines:
+
+     #define TP_STATUS_KERNEL        0
+     #define TP_STATUS_USER          1
+
+The kernel initializes all frames to TP_STATUS_KERNEL, when the kernel
+receives a packet it puts in the buffer and updates the status with
+at least the TP_STATUS_USER flag. Then the user can read the packet,
+once the packet is read the user must zero the status field, so the kernel 
+can use again that frame buffer.
+
+The user can use poll (any other variant should apply too) to check if new
+packets are in the ring:
+
+    struct pollfd pfd;
+
+    pfd.fd = fd;
+    pfd.revents = 0;
+    pfd.events = POLLIN|POLLRDNORM|POLLERR;
+
+    if (status == TP_STATUS_KERNEL)
+        retval = poll(&pfd, 1, timeout);
+
+It doesn't incur in a race condition to first check the status value and 
+then poll for frames.
+
+--------------------------------------------------------------------------------
++ THANKS
+--------------------------------------------------------------------------------
+   
+   Jesse Brandeburg, for fixing my grammathical/spelling errors
+
+>>> EOF
+-
+To unsubscribe from this list: send the line "unsubscribe linux-net" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
\ No newline at end of file
diff -Nru a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
--- a/Documentation/sound/alsa/ALSA-Configuration.txt	Thu Apr  1 00:48:06 2004
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt	Thu Apr  1 00:48:06 2004
@@ -611,6 +611,8 @@
                         * Digigram VX442
 
     omni	- Omni I/O support for MidiMan M-Audio Delta44/66
+    cs8427_timeout - reset timeout for the CS8427 chip (S/PDIF transciever)
+                     in msec resolution, default value is 500 (0.5 sec)
 
     Module supports up to 8 cards and autoprobe. Note: The consumer part
     is not used with all Envy24 based cards (for example in the MidiMan Delta
diff -Nru a/Documentation/sound/alsa/Procfile.txt b/Documentation/sound/alsa/Procfile.txt
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/Documentation/sound/alsa/Procfile.txt	Thu Apr  1 00:48:07 2004
@@ -0,0 +1,185 @@
+		Proc Files of ALSA Drivers
+		==========================
+		Takashi Iwai <tiwai@suse.de>
+
+General
+-------
+
+ALSA has its own proc tree, /proc/asound.  Many useful information are
+found in this tree.  When you encounter a problem and need debugging,
+check the files listed in the following sections.
+
+Each card has its subtree cardX, where X is from 0 to 7. The
+card-specific files are stored in the card* subdirectories.
+
+
+Global Information
+------------------
+
+cards
+	Shows the list of currently configured ALSA drivers,
+	index, the id string, short and long descriptions.
+
+version
+	Shows the version string and compile date.
+
+modules
+	Lists the module of each card
+
+devices
+	Lists the ALSA native device mappings.
+
+meminfo
+	Shows the status of allocated pages via ALSA drivers.
+	Appears only when CONFIG_SND_DEBUG=y.
+
+hwdep
+	Lists the currently available hwdep devices in format of
+	<card>-<device>: <name>
+
+pcm
+	Lists the currently available PCM devices in format of
+	<card>-<device>: <id>: <name> : <sub-streams>
+
+timer
+	Lists the currently available timer devices
+
+
+oss/devices
+	Lists the OSS device mappings.
+
+oss/sndstat
+	Provides the output compatible with /dev/sndstat.
+	You can symlink this to /dev/sndstat.
+
+
+Card Specific Files
+-------------------
+
+The card-specific files are found in /proc/asound/card* directories.
+Some drivers (e.g. cmipci) have their own proc entries for the
+register dump, etc (e.g. /proc/asound/card*/cmipci shows the register
+dump).  These files would be really helpful for debugging.
+
+When PCM devices are available on this card, you can see directories
+like pcm0p or pcm1c.  They hold the PCM information for each PCM
+stream.  The number after 'pcm' is the PCM device number from 0, and
+the last 'p' or 'c' means playback or capture direction.  The files in
+this subtree is described later.
+
+The status of MIDI I/O is found in midi* files.  It shows the device
+name and the received/transmitted bytes through the MIDI device.
+
+When the card is equipped with AC97 codecs, there are codec97#*
+subdirectories (desribed later).
+
+When the OSS mixer emulation is enabled (and the module is loaded),
+oss_mixer file appears here, too.  This shows the current mapping of
+OSS mixer elements to the ALSA control elements.  You can change the
+mapping by writing to this device.  Read OSS-Emulation.txt for
+details.
+
+
+PCM Proc Files
+--------------
+
+card*/pcm*/info
+	The general information of this PCM device: card #, device #,
+	substreams, etc.
+
+card*/pcm*/xrun_debug
+	This file appears when CONFIG_SND_DEBUG=y.
+	This shows the status of xrun (= buffer overrun/xrun) debug of
+	ALSA PCM middle layer, as an integer from 0 to 2.  The value
+	can be changed by writing to this file, such as
+
+		 # cat 2 > /proc/asound/card0/pcm0p/xrun_debug
+
+	When this value is greater than 0, the driver will show the
+	messages to kernel log when an xrun is detected.  The debug
+	message is shown also when the invalid H/W pointer is detected
+	at the update of periods (usually called from the interrupt
+	handler).
+
+	When this value is greater than 1, the driver will show the
+	stack trace additionally.  This may help the debugging.
+
+card*/pcm*/sub*/info
+	The general information of this PCM sub-stream.
+
+card*/pcm*/sub*/status
+	The current status of this PCM sub-stream, elapsed time,
+	H/W position, etc.
+
+card*/pcm*/sub*/hw_params
+	The hardware parameters set for this sub-stream.
+
+card*/pcm*/sub*/sw_params
+	The soft parameters set for this sub-stream.
+
+card*/pcm*/sub*/prealloc
+	The buffer pre-allocation information.
+
+
+AC97 Codec Information
+----------------------
+
+card*/codec97#*/ac97#?-?
+	Shows the general information of this AC97 codec chip, such as
+	name, capabilities, set up.
+
+card*/codec97#0/ac97#?-?+regs
+	Shows the AC97 register dump.  Useful for debugging.
+
+
+Sequencer Information
+---------------------
+
+seq/drivers
+	Lists the currently available ALSA sequencer drivers.
+
+seq/clients
+	Shows the list of currently available sequencer clinets and
+	ports.  The connection status and the running status are shown
+	in this file, too.
+
+seq/queues
+	Lists the currently allocated/running sequener queues.
+
+seq/timer
+	Lists the currently allocated/running sequencer timers.
+
+seq/oss
+	Lists the OSS-compatible sequencer stuffs.
+
+
+Help For Debugging?
+-------------------
+
+When the problem is related with PCM, first try to turn on xrun_debug
+mode.  This will give you the kernel messages when and where xrun
+happened.
+
+If it's really a bug, report it with the following information
+
+  - the name of the driver/card, show in /proc/asound/cards
+  - the reigster dump, if available (e.g. card*/cmipci)
+
+when it's a PCM problem,
+
+  - set-up of PCM, shown in hw_parms, sw_params, and status in the PCM
+    sub-stream directory
+
+when it's a mixer problem,
+
+  - AC97 proc files, codec97#*/* files
+
+for USB audio/midi,
+
+  - output of lsusb -v
+  - stream* files in card directory
+
+
+The ALSA bug-tracking system is found at:
+
+    https://bugtrack.alsa-project.org/alsa-bug/
diff -Nru a/Makefile b/Makefile
--- a/Makefile	Thu Apr  1 00:48:06 2004
+++ b/Makefile	Thu Apr  1 00:48:06 2004
@@ -2,7 +2,7 @@
 PATCHLEVEL = 6
 SUBLEVEL = 5
 EXTRAVERSION =-rc3
-NAME=Feisty Dunnart
+NAME=Zonked Quokka
 
 # *DOCUMENTATION*
 # To see a list of typical targets execute "make help"
@@ -107,6 +107,16 @@
 # We process the rest of the Makefile if this is the final invocation of make
 ifeq ($(skip-makefile),)
 
+# Make sure we're not wasting cpu-cycles doing locale handling, yet do make
+# sure error messages appear in the user-desired language
+ifdef LC_ALL
+	LANG := $(LC_ALL)
+	LC_ALL :=
+endif
+LC_COLLATE := C
+LC_CTYPE := C
+export LANG LC_ALL LC_COLLATE LC_CTYPE
+
 srctree		:= $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR))
 TOPDIR		:= $(srctree)
 # FIXME - TOPDIR is obsolete, use srctree/objtree
@@ -652,7 +662,7 @@
 uts_len := 64
 
 define filechk_version.h
-	if expr length "$(KERNELRELEASE)" \> $(uts_len) >/dev/null ; then \
+	if ((`echo -n "$(KERNELRELEASE)" | wc -c ` > $(uts_len))); then \
 	  echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \
 	  exit 1; \
 	fi; \
@@ -911,6 +921,7 @@
 	@echo  '  dir/file.[ois]  - Build specified target only'
 	@echo  '  rpm		  - Build a kernel as an RPM package'
 	@echo  '  tags/TAGS	  - Generate tags file for editors'
+	@echo  '  cscope	  - Generate cscope index'
 	@echo  ''
 	@echo  'Documentation targets:'
 	@$(MAKE) -f $(srctree)/Documentation/DocBook/Makefile dochelp
diff -Nru a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c
--- a/arch/alpha/boot/misc.c	Thu Apr  1 00:48:06 2004
+++ b/arch/alpha/boot/misc.c	Thu Apr  1 00:48:06 2004
@@ -25,7 +25,7 @@
 #define memzero(s,n)	memset ((s),0,(n))
 #define puts		srm_printk
 extern long srm_printk(const char *, ...)
-     __attribute__ ((format (printf, 1, 2)));;
+     __attribute__ ((format (printf, 1, 2)));
 
 /*
  * gzip delarations
diff -Nru a/arch/alpha/kernel/sys_nautilus.c b/arch/alpha/kernel/sys_nautilus.c
--- a/arch/alpha/kernel/sys_nautilus.c	Thu Apr  1 00:48:06 2004
+++ b/arch/alpha/kernel/sys_nautilus.c	Thu Apr  1 00:48:06 2004
@@ -225,11 +225,13 @@
 	if (request_resource(&iomem_resource, bus->resource[1]) < 0)
 		printk(KERN_ERR "Failed to request MEM on hose 0\n");
 
-	if (pci_mem < memtop && pci_mem > alpha_mv.min_mem_address) {
+	if (pci_mem < memtop)
+		memtop = pci_mem;
+	if (memtop > alpha_mv.min_mem_address) {
 		free_reserved_mem(__va(alpha_mv.min_mem_address),
-				  __va(pci_mem));
+				  __va(memtop));
 		printk("nautilus_init_pci: %ldk freed\n",
-			(pci_mem - alpha_mv.min_mem_address) >> 10);
+			(memtop - alpha_mv.min_mem_address) >> 10);
 	}
 
 	if ((IRONGATE0->dev_vendor >> 16) > 0x7006)	/* Albacore? */
diff -Nru a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c
--- a/arch/arm/kernel/sys_arm.c	Thu Apr  1 00:48:06 2004
+++ b/arch/arm/kernel/sys_arm.c	Thu Apr  1 00:48:06 2004
@@ -100,7 +100,7 @@
 	struct mmap_arg_struct a;
 
 	if (copy_from_user(&a, arg, sizeof(a)))
-		goto out;;
+		goto out;
 
 	error = -EINVAL;
 	if (a.offset & ~PAGE_MASK)
diff -Nru a/arch/arm26/kernel/sys_arm.c b/arch/arm26/kernel/sys_arm.c
--- a/arch/arm26/kernel/sys_arm.c	Thu Apr  1 00:48:06 2004
+++ b/arch/arm26/kernel/sys_arm.c	Thu Apr  1 00:48:06 2004
@@ -101,7 +101,7 @@
 	struct mmap_arg_struct a;
 
 	if (copy_from_user(&a, arg, sizeof(a)))
-		goto out;;
+		goto out;
 
 	error = -EINVAL;
 	if (a.offset & ~PAGE_MASK)
diff -Nru a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c
--- a/arch/i386/kernel/apm.c	Thu Apr  1 00:48:06 2004
+++ b/arch/i386/kernel/apm.c	Thu Apr  1 00:48:06 2004
@@ -1435,7 +1435,7 @@
 	return 0;
 }
 
-static ssize_t do_read(struct file *fp, char *buf, size_t count, loff_t *ppos)
+static ssize_t do_read(struct file *fp, char __user *buf, size_t count, loff_t *ppos)
 {
 	struct apm_user *	as;
 	int			i;
diff -Nru a/arch/ia64/sn/fakeprom/fw-emu.c b/arch/ia64/sn/fakeprom/fw-emu.c
--- a/arch/ia64/sn/fakeprom/fw-emu.c	Thu Apr  1 00:48:06 2004
+++ b/arch/ia64/sn/fakeprom/fw-emu.c	Thu Apr  1 00:48:06 2004
@@ -397,7 +397,7 @@
         fix_virt_function_pointer((void**)&runtime->set_variable);
         fix_virt_function_pointer((void**)&runtime->get_next_high_mono_count);
         fix_virt_function_pointer((void**)&runtime->reset_system);
-        return EFI_SUCCESS;;
+        return EFI_SUCCESS;
 }
 
 void
diff -Nru a/arch/ia64/sn/io/sn2/pciio.c b/arch/ia64/sn/io/sn2/pciio.c
--- a/arch/ia64/sn/io/sn2/pciio.c	Thu Apr  1 00:48:06 2004
+++ b/arch/ia64/sn/io/sn2/pciio.c	Thu Apr  1 00:48:06 2004
@@ -926,7 +926,7 @@
 		win_alloc->wa_pages = size;
 	}
 
-	return new_res->start;;
+	return new_res->start;
 }
 
 /*
diff -Nru a/arch/ia64/sn/io/sn2/pic.c b/arch/ia64/sn/io/sn2/pic.c
--- a/arch/ia64/sn/io/sn2/pic.c	Thu Apr  1 00:48:06 2004
+++ b/arch/ia64/sn/io/sn2/pic.c	Thu Apr  1 00:48:06 2004
@@ -685,7 +685,7 @@
 
     /* Block off the range used by PROM. */
     res->start = prom_base_addr;
-    res->end = prom_base_addr + (prom_base_size - 1);;
+    res->end = prom_base_addr + (prom_base_size - 1);
     status = request_resource(&pcibr_soft->bs_mem_win_root_resource, res);
     if (status)
 	panic("PCIBR:Unable to request_resource()\n");
diff -Nru a/arch/m68k/mvme16x/16xints.c b/arch/m68k/mvme16x/16xints.c
--- a/arch/m68k/mvme16x/16xints.c	Thu Apr  1 00:48:06 2004
+++ b/arch/m68k/mvme16x/16xints.c	Thu Apr  1 00:48:06 2004
@@ -98,7 +98,7 @@
 		printk("%s: Removing probably wrong IRQ %d from %s\n",
 		       __FUNCTION__, irq, irq_tab[irq-64].devname);
 
-	irq_tab[irq-64].handler = mvme16x_defhand;;
+	irq_tab[irq-64].handler = mvme16x_defhand;
 	irq_tab[irq-64].flags   = IRQ_FLG_STD;
 	irq_tab[irq-64].dev_id  = NULL;
 	irq_tab[irq-64].devname = NULL;
diff -Nru a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c
--- a/arch/mips/kernel/sysirix.c	Thu Apr  1 00:48:06 2004
+++ b/arch/mips/kernel/sysirix.c	Thu Apr  1 00:48:06 2004
@@ -1249,9 +1249,9 @@
 	ks.st_atime.tv_sec = (s32) stat->atime.tv_sec;
 	ks.st_atime.tv_nsec = stat->atime.tv_nsec;
 	ks.st_mtime.tv_sec = (s32) stat->mtime.tv_sec;
-	ks.st_mtime.tv_nsec = stat->mtime.tv_nsec;;
+	ks.st_mtime.tv_nsec = stat->mtime.tv_nsec;
 	ks.st_ctime.tv_sec = (s32) stat->ctime.tv_sec;
-	ks.st_ctime.tv_nsec = stat->ctime.tv_nsec;;
+	ks.st_ctime.tv_nsec = stat->ctime.tv_nsec;
 
 	ks.st_blksize = (s32) stat->blksize;
 	ks.st_blocks = (long long) stat->blocks;
diff -Nru a/arch/ppc/Kconfig b/arch/ppc/Kconfig
--- a/arch/ppc/Kconfig	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc/Kconfig	Thu Apr  1 00:48:06 2004
@@ -696,14 +696,10 @@
 
 config PREEMPT
 	bool "Preemptible Kernel"
-	depends on !SMP
 	help
 	  This option reduces the latency of the kernel when reacting to
 	  real-time or interactive events by allowing a low priority process to
 	  be preempted even if it is in kernel mode executing a system call.
-	  Unfortunately the kernel code has some race conditions if both
-	  CONFIG_SMP and CONFIG_PREEMPT are enabled, so this option is
-	  currently disabled if you are building an SMP kernel.
 
 	  Say Y here if you are building a kernel for a desktop, embedded
 	  or real-time system.  Say N if you are unsure.
diff -Nru a/arch/ppc/kernel/align.c b/arch/ppc/kernel/align.c
--- a/arch/ppc/kernel/align.c	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc/kernel/align.c	Thu Apr  1 00:48:06 2004
@@ -325,14 +325,18 @@
 	 * the kernel with -msoft-float so it doesn't use the
 	 * fp regs for copying 8-byte objects. */
 	case LD+F+S:
+		preempt_disable();
 		enable_kernel_fp();
 		cvt_fd(&data.f, &current->thread.fpr[reg], &current->thread.fpscr);
 		/* current->thread.fpr[reg] = data.f; */
+		preempt_enable();
 		break;
 	case ST+F+S:
+		preempt_disable();
 		enable_kernel_fp();
 		cvt_df(&current->thread.fpr[reg], &data.f, &current->thread.fpscr);
 		/* data.f = current->thread.fpr[reg]; */
+		preempt_enable();
 		break;
 	default:
 		printk("align: can't handle flags=%x\n", flags);
diff -Nru a/arch/ppc/kernel/entry.S b/arch/ppc/kernel/entry.S
--- a/arch/ppc/kernel/entry.S	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc/kernel/entry.S	Thu Apr  1 00:48:06 2004
@@ -469,10 +469,19 @@
 	stw	r10,_CCR(r1)
 	stw	r1,KSP(r3)	/* Set old stack pointer */
 
+#ifdef CONFIG_SMP
+	/* We need a sync somewhere here to make sure that if the
+	 * previous task gets rescheduled on another CPU, it sees all
+	 * stores it has performed on this one.
+	 */
+	sync
+#endif /* CONFIG_SMP */
+
 	tophys(r0,r4)
 	CLR_TOP32(r0)
 	mtspr	SPRG3,r0	/* Update current THREAD phys addr */
 	lwz	r1,KSP(r4)	/* Load new stack pointer */
+
 	/* save the old current 'last' for return value */
 	mr	r3,r2
 	addi	r2,r4,-THREAD	/* Update current */
diff -Nru a/arch/ppc/kernel/head.S b/arch/ppc/kernel/head.S
--- a/arch/ppc/kernel/head.S	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc/kernel/head.S	Thu Apr  1 00:48:06 2004
@@ -1436,11 +1436,8 @@
 	stw	r4, 0x4(r5)
 #endif
 	li	r4,0
-BEGIN_FTR_SECTION
-	dssall
-	sync
-END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
-3:	isync
+	isync
+3:
 #ifdef CONFIG_PPC64BRIDGE
 	slbie	r4
 #endif /* CONFIG_PPC64BRIDGE */
diff -Nru a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c
--- a/arch/ppc/kernel/pci.c	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc/kernel/pci.c	Thu Apr  1 00:48:06 2004
@@ -159,7 +159,6 @@
 		ppc_md.pcibios_fixup_resources(dev);
 }
 
-
 void
 pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
 			struct resource *res)
@@ -1522,51 +1521,43 @@
 {
 	struct pci_controller *hose = (struct pci_controller *) dev->sysdata;
 	unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
-	unsigned long io_offset = 0;
-	int i, res_bit;
+	unsigned long size = vma->vm_end - vma->vm_start;
+	unsigned long base;
+	struct resource *res;
+	int i;
+	int ret = -EINVAL;
 
 	if (hose == 0)
 		return -EINVAL;		/* should never happen */
+	if (offset + size <= offset)
+		return -EINVAL;
 
-	/* If memory, add on the PCI bridge address offset */
 	if (mmap_state == pci_mmap_mem) {
+		/* PCI memory space */
+		base = hose->pci_mem_offset;
+		for (i = 0; i < 3; ++i) {
+			res = &hose->mem_resources[i];
+			if (res->flags == 0)
+				continue;
+			if (offset >= res->start - base
+			    && offset + size - 1 <= res->end - base) {
+				ret = 0;
+				break;
+			}
+		}
 		offset += hose->pci_mem_offset;
-		res_bit = IORESOURCE_MEM;
 	} else {
-		io_offset = (unsigned long)hose->io_base_virt - isa_io_base;
-		offset += io_offset;
-		res_bit = IORESOURCE_IO;
-	}
-
-	/*
-	 * Check that the offset requested corresponds to one of the
-	 * resources of the device.
-	 */
-	for (i = 0; i <= PCI_ROM_RESOURCE; i++) {
-		struct resource *rp = &dev->resource[i];
-		int flags = rp->flags;
-
-		/* treat ROM as memory (should be already) */
-		if (i == PCI_ROM_RESOURCE)
-			flags |= IORESOURCE_MEM;
-
-		/* Active and same type? */
-		if ((flags & res_bit) == 0)
-			continue;
-
-		/* In the range of this resource? */
-		if (offset < (rp->start & PAGE_MASK) || offset > rp->end)
-			continue;
-
-		/* found it! construct the final physical address */
-		if (mmap_state == pci_mmap_io)
-			offset += hose->io_base_phys - io_offset;
-
-		vma->vm_pgoff = offset >> PAGE_SHIFT;
-		return 0;
+		/* PCI I/O space */
+		base = (unsigned long)hose->io_base_virt - isa_io_base;
+		res = &hose->io_resource;
+		if (offset >= res->start - base
+		    && offset + size - 1 <= res->end - base)
+			ret = 0;
+		offset += hose->io_base_phys;
 	}
 
-	return -EINVAL;
+	vma->vm_pgoff = offset >> PAGE_SHIFT;
+	return ret;
 }
 
 /*
diff -Nru a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
--- a/arch/ppc/kernel/ppc_ksyms.c	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc/kernel/ppc_ksyms.c	Thu Apr  1 00:48:06 2004
@@ -192,7 +192,6 @@
 
 EXPORT_SYMBOL(flush_instruction_cache);
 EXPORT_SYMBOL(giveup_fpu);
-EXPORT_SYMBOL(enable_kernel_fp);
 EXPORT_SYMBOL(flush_icache_range);
 EXPORT_SYMBOL(flush_dcache_range);
 EXPORT_SYMBOL(flush_icache_user_range);
diff -Nru a/arch/ppc/kernel/process.c b/arch/ppc/kernel/process.c
--- a/arch/ppc/kernel/process.c	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc/kernel/process.c	Thu Apr  1 00:48:06 2004
@@ -163,7 +163,8 @@
 void
 enable_kernel_altivec(void)
 {
-	preempt_disable();
+	WARN_ON(current_thread_info()->preempt_count == 0 && !irqs_disabled());
+
 #ifdef CONFIG_SMP
 	if (current->thread.regs && (current->thread.regs->msr & MSR_VEC))
 		giveup_altivec(current);
@@ -172,14 +173,15 @@
 #else
 	giveup_altivec(last_task_used_altivec);
 #endif /* __SMP __ */
-	preempt_enable();
 }
+EXPORT_SYMBOL(enable_kernel_altivec);
 #endif /* CONFIG_ALTIVEC */
 
 void
 enable_kernel_fp(void)
 {
-	preempt_disable();
+	WARN_ON(current_thread_info()->preempt_count == 0 && !irqs_disabled());
+
 #ifdef CONFIG_SMP
 	if (current->thread.regs && (current->thread.regs->msr & MSR_FP))
 		giveup_fpu(current);
@@ -188,8 +190,8 @@
 #else
 	giveup_fpu(last_task_used_math);
 #endif /* CONFIG_SMP */
-	preempt_enable();
 }
+EXPORT_SYMBOL(enable_kernel_fp);
 
 int
 dump_task_fpu(struct task_struct *tsk, elf_fpregset_t *fpregs)
diff -Nru a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c
--- a/arch/ppc/mm/pgtable.c	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc/mm/pgtable.c	Thu Apr  1 00:48:06 2004
@@ -143,7 +143,7 @@
 void *
 ioremap(phys_addr_t addr, unsigned long size)
 {
-	phys_addr_t addr64 = fixup_bigphys_addr(addr, size);;
+	phys_addr_t addr64 = fixup_bigphys_addr(addr, size);
 
 	return ioremap64(addr64, size);
 }
diff -Nru a/arch/ppc64/kernel/HvCall.c b/arch/ppc64/kernel/HvCall.c
--- a/arch/ppc64/kernel/HvCall.c	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc64/kernel/HvCall.c	Thu Apr  1 00:48:06 2004
@@ -19,7 +19,7 @@
 {
 	struct HvLpBufferList hv_buf;
 	u64 left_this_page;
-	u64 cur = virt_to_absolute((unsigned long)buffer);
+	u64 cur = virt_to_abs(buffer);
 
 	while (len) {
 		hv_buf.addr = cur;
@@ -29,7 +29,7 @@
 		hv_buf.len = left_this_page;
 		len -= left_this_page;
 		HvCall2(HvCallBaseWriteLogBuffer,
-				virt_to_absolute((unsigned long)&hv_buf),
+				virt_to_abs(&hv_buf),
 				left_this_page);
 		cur = (cur & PAGE_MASK) + PAGE_SIZE;
 	}
diff -Nru a/arch/ppc64/kernel/entry.S b/arch/ppc64/kernel/entry.S
--- a/arch/ppc64/kernel/entry.S	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc64/kernel/entry.S	Thu Apr  1 00:48:06 2004
@@ -194,7 +194,7 @@
 _GLOBAL(ret_from_syscall_2)
 	std	r3,RESULT(r1)	/* Save result */	
 	li	r10,-_LAST_ERRNO
-	cmpl	0,r3,r10
+	cmpld	0,r3,r10
 	blt	60f
 	neg	r3,r3
 57:	ld	r10,_CCR(r1)	/* Set SO bit in CR */
@@ -288,6 +288,14 @@
 	mfcr	r23
 	std	r23,_CCR(r1)
 	std	r1,KSP(r3)	/* Set old stack pointer */
+
+#ifdef CONFIG_SMP
+	/* We need a sync somewhere here to make sure that if the
+	 * previous task gets rescheduled on another CPU, it sees all
+	 * stores it has performed on this one.
+	 */
+	sync
+#endif /* CONFIG_SMP */
 
 	addi	r6,r4,-THREAD	/* Convert THREAD to 'current' */
 	std	r6,PACACURRENT(r13)	/* Set new 'current' */
diff -Nru a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S
--- a/arch/ppc64/kernel/head.S	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc64/kernel/head.S	Thu Apr  1 00:48:06 2004
@@ -496,6 +496,9 @@
 	.globl SystemReset_Iseries
 SystemReset_Iseries:
 	mfspr	r13,SPRG3		/* Get paca address */
+	mfmsr	r24
+	ori	r24,r24,MSR_RI
+	mtmsrd	r24			/* RI on */
 	lhz	r24,PACAPACAINDEX(r13)	/* Get processor # */
 	cmpi	0,r24,0			/* Are we processor 0? */
 	beq	.__start_initialization_iSeries	/* Start up the first processor */
diff -Nru a/arch/ppc64/kernel/iSeries_VpdInfo.c b/arch/ppc64/kernel/iSeries_VpdInfo.c
--- a/arch/ppc64/kernel/iSeries_VpdInfo.c	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc64/kernel/iSeries_VpdInfo.c	Thu Apr  1 00:48:06 2004
@@ -293,7 +293,8 @@
 		return;
 	}
 	BusVpdLen = HvCallPci_getBusVpd(ISERIES_BUS(DevNode),
-			REALADDR(BusVpdPtr), BUS_VPDSIZE);
+					ISERIES_HV_ADDR(BusVpdPtr),
+					BUS_VPDSIZE);
 	if (BusVpdLen == 0) {
 		kfree(BusVpdPtr);
 		printk("PCI: Bus VPD Buffer zero length.\n");
diff -Nru a/arch/ppc64/kernel/iSeries_iommu.c b/arch/ppc64/kernel/iSeries_iommu.c
--- a/arch/ppc64/kernel/iSeries_iommu.c	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc64/kernel/iSeries_iommu.c	Thu Apr  1 00:48:06 2004
@@ -76,7 +76,7 @@
 	
 	while (npages--) {
 		tce.te_word = 0;
-		tce.te_bits.tb_rpn = (virt_to_absolute(uaddr)) >> PAGE_SHIFT;
+		tce.te_bits.tb_rpn = virt_to_abs(uaddr) >> PAGE_SHIFT;
 
 		if (tbl->it_type == TCE_VB) {
 			/* Virtual Bus */
@@ -130,7 +130,7 @@
 	cb.itc_busno = 255;    /* Bus 255 is the virtual bus */
 	cb.itc_virtbus = 0xff; /* Ask for virtual bus */
 	
-	cbp = virt_to_absolute((unsigned long)&cb);
+	cbp = virt_to_abs(&cb);
 	HvCallXm_getTceTableParms(cbp);
 	
 	veth_iommu_table.it_size        = cb.itc_size / 2;
@@ -209,7 +209,7 @@
 	parms->itc_slotno  = dn->LogicalSlot;
 	parms->itc_virtbus = 0;
 
-	HvCallXm_getTceTableParms(REALADDR(parms));
+	HvCallXm_getTceTableParms(ISERIES_HV_ADDR(parms));
 
 	if (parms->itc_size == 0)
 		panic("PCI_DMA: parms->size is zero, parms is 0x%p", parms);
diff -Nru a/arch/ppc64/kernel/iSeries_pci.c b/arch/ppc64/kernel/iSeries_pci.c
--- a/arch/ppc64/kernel/iSeries_pci.c	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc64/kernel/iSeries_pci.c	Thu Apr  1 00:48:06 2004
@@ -277,7 +277,7 @@
 	 */
 	for (IdSel = 1; IdSel < MaxAgents; ++IdSel) {
     		HvRc = HvCallPci_getDeviceInfo(bus, SubBus, IdSel,
-				REALADDR(DevInfo),
+				ISERIES_HV_ADDR(DevInfo),
 				sizeof(struct HvCallPci_DeviceInfo));
 		if (HvRc == 0) {
 			if (DevInfo->deviceType == HvCallPci_NodeDevice)
@@ -318,7 +318,7 @@
 					"PCI:Connect EADs: 0x%02X.%02X.%02X\n",
 					bus, SubBus, AgentId);
 	    		HvRc = HvCallPci_getBusUnitInfo(bus, SubBus, AgentId,
-					REALADDR(BridgeInfo),
+					ISERIES_HV_ADDR(BridgeInfo),
 					sizeof(struct HvCallPci_BridgeInfo));
 	 		if (HvRc == 0) {
 				printk("bridge info: type %x subbus %x maxAgents %x maxsubbus %x logslot %x\n",
diff -Nru a/arch/ppc64/kernel/iSeries_setup.c b/arch/ppc64/kernel/iSeries_setup.c
--- a/arch/ppc64/kernel/iSeries_setup.c	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc64/kernel/iSeries_setup.c	Thu Apr  1 00:48:06 2004
@@ -658,8 +658,7 @@
 			HvCallHpt_setPp(slot, PP_RWXX);
 		} else
 			/* No HPTE exists, so create a new bolted one */
-			iSeries_make_pte(va, (unsigned long)__v2a(ea),
-					mode_rw);
+			iSeries_make_pte(va, phys_to_abs(pa), mode_rw);
 	}
 }
 
diff -Nru a/arch/ppc64/kernel/mf.c b/arch/ppc64/kernel/mf.c
--- a/arch/ppc64/kernel/mf.c	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc64/kernel/mf.c	Thu Apr  1 00:48:06 2004
@@ -763,14 +763,10 @@
 	ev->event.data.vsp_cmd.lp_index = HvLpConfig_getLpIndex();
 	ev->event.data.vsp_cmd.result_code = 0xFF;
 	ev->event.data.vsp_cmd.reserved = 0;
-	ev->event.data.vsp_cmd.sub_data.page[0] =
-		(0x8000000000000000ULL | virt_to_absolute((unsigned long)pages[0]));
-	ev->event.data.vsp_cmd.sub_data.page[1] =
-		(0x8000000000000000ULL | virt_to_absolute((unsigned long)pages[1]));
-	ev->event.data.vsp_cmd.sub_data.page[2] =
-		(0x8000000000000000ULL | virt_to_absolute((unsigned long)pages[2]));
-	ev->event.data.vsp_cmd.sub_data.page[3] =
-		(0x8000000000000000ULL | virt_to_absolute((unsigned long)pages[3]));
+	ev->event.data.vsp_cmd.sub_data.page[0] = ISERIES_HV_ADDR(pages[0]);
+	ev->event.data.vsp_cmd.sub_data.page[1] = ISERIES_HV_ADDR(pages[1]);
+	ev->event.data.vsp_cmd.sub_data.page[2] = ISERIES_HV_ADDR(pages[2]);
+	ev->event.data.vsp_cmd.sub_data.page[3] = ISERIES_HV_ADDR(pages[3]);
 	mb();
 	if (signal_event(ev) != 0)
 		return;
diff -Nru a/arch/ppc64/kernel/pSeries_iommu.c b/arch/ppc64/kernel/pSeries_iommu.c
--- a/arch/ppc64/kernel/pSeries_iommu.c	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc64/kernel/pSeries_iommu.c	Thu Apr  1 00:48:06 2004
@@ -61,7 +61,7 @@
 
 	while (npages--) {
 		/* can't move this out since we might cross LMB boundary */
-		t.te_rpn = (virt_to_absolute(uaddr)) >> PAGE_SHIFT;
+		t.te_rpn = (virt_to_abs(uaddr)) >> PAGE_SHIFT;
 	
 		tp->te_word = t.te_word;
 
diff -Nru a/arch/ppc64/kernel/pSeries_lpar.c b/arch/ppc64/kernel/pSeries_lpar.c
--- a/arch/ppc64/kernel/pSeries_lpar.c	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc64/kernel/pSeries_lpar.c	Thu Apr  1 00:48:06 2004
@@ -36,6 +36,7 @@
 #include <asm/tlb.h>
 #include <asm/hvcall.h>
 #include <asm/prom.h>
+#include <asm/abs_addr.h>
 
 /* in pSeries_hvCall.S */
 EXPORT_SYMBOL(plpar_hcall);
@@ -135,7 +136,7 @@
 	union tce_entry tce;
 
 	tce.te_word = 0;
-	tce.te_rpn = (virt_to_absolute(uaddr)) >> PAGE_SHIFT;
+	tce.te_rpn = (virt_to_abs(uaddr)) >> PAGE_SHIFT;
 	tce.te_rdwr = 1;
 	if (direction != PCI_DMA_TODEVICE)
 		tce.te_pciwr = 1;
diff -Nru a/arch/ppc64/kernel/pci_dma_direct.c b/arch/ppc64/kernel/pci_dma_direct.c
--- a/arch/ppc64/kernel/pci_dma_direct.c	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc64/kernel/pci_dma_direct.c	Thu Apr  1 00:48:06 2004
@@ -37,7 +37,7 @@
 	ret = (void *)__get_free_pages(GFP_ATOMIC, get_order(size));
 	if (ret != NULL) {
 		memset(ret, 0, size);
-		*dma_handle = virt_to_absolute((unsigned long)ret);
+		*dma_handle = virt_to_abs(ret);
 	}
 	return ret;
 }
@@ -51,7 +51,7 @@
 static dma_addr_t pci_direct_map_single(struct pci_dev *hwdev, void *ptr,
 				  size_t size, int direction)
 {
-	return virt_to_absolute((unsigned long)ptr);
+	return virt_to_abs(ptr);
 }
 
 static void pci_direct_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
diff -Nru a/arch/ppc64/kernel/pmac_iommu.c b/arch/ppc64/kernel/pmac_iommu.c
--- a/arch/ppc64/kernel/pmac_iommu.c	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc64/kernel/pmac_iommu.c	Thu Apr  1 00:48:06 2004
@@ -154,7 +154,7 @@
 	 * out of the loop.
 	 */
 	while (npages--) {
-		rpn = (virt_to_absolute(uaddr)) >> PAGE_SHIFT;
+		rpn = virt_to_abs(uaddr) >> PAGE_SHIFT;
 
 		*(dp++) = DARTMAP_VALID | (rpn & DARTMAP_RPNMASK);
 
@@ -210,7 +210,7 @@
 	if (tmp == 0)
 		panic("U3-DART: Cannot allocate spare page !");
 	dart_emptyval = DARTMAP_VALID |
-		((virt_to_absolute(tmp) >> PAGE_SHIFT) & DARTMAP_RPNMASK);
+		((virt_to_abs(tmp) >> PAGE_SHIFT) & DARTMAP_RPNMASK);
 
 	/* Map in DART registers. FIXME: Use device node to get base address */
 	dart = ioremap(DART_BASE, 0x7000);
@@ -225,7 +225,7 @@
 		(((dart_tablesize >> PAGE_SHIFT) & DARTCNTL_SIZE_MASK)
 				 << DARTCNTL_SIZE_SHIFT);
 	p = virt_to_page(dart_tablebase);
-	dart_vbase = ioremap(virt_to_absolute(dart_tablebase), dart_tablesize);
+	dart_vbase = ioremap(virt_to_abs(dart_tablebase), dart_tablesize);
 
 	/* Fill initial table */
 	for (i = 0; i < dart_tablesize/4; i++)
diff -Nru a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c
--- a/arch/ppc64/kernel/prom.c	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc64/kernel/prom.c	Thu Apr  1 00:48:06 2004
@@ -900,7 +900,7 @@
 			prom_panic(RELOC("ERROR, cannot find space for TCE table.\n"));
 		}
 
-		vbase = absolute_to_virt(base);
+		vbase = (unsigned long)abs_to_virt(base);
 
 		/* Save away the TCE table attributes for later use. */
 		prom_tce_table[table].node = node;
@@ -1007,9 +1007,12 @@
 	extern void __secondary_hold(void);
         extern unsigned long __secondary_hold_spinloop;
         extern unsigned long __secondary_hold_acknowledge;
-        unsigned long *spinloop     = __v2a(&__secondary_hold_spinloop);
-        unsigned long *acknowledge  = __v2a(&__secondary_hold_acknowledge);
-        unsigned long secondary_hold = (unsigned long)__v2a(*PTRRELOC((unsigned long *)__secondary_hold));
+        unsigned long *spinloop
+		= (void *)virt_to_abs(&__secondary_hold_spinloop);
+        unsigned long *acknowledge
+		= (void *)virt_to_abs(&__secondary_hold_acknowledge);
+        unsigned long secondary_hold
+		= virt_to_abs(*PTRRELOC((unsigned long *)__secondary_hold));
         struct systemcfg *_systemcfg = RELOC(systemcfg);
 	struct paca_struct *_xPaca = PTRRELOC(&paca[0]);
 	struct prom_t *_prom = PTRRELOC(&prom);
diff -Nru a/arch/ppc64/kernel/rtas.c b/arch/ppc64/kernel/rtas.c
--- a/arch/ppc64/kernel/rtas.c	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc64/kernel/rtas.c	Thu Apr  1 00:48:06 2004
@@ -361,7 +361,7 @@
 	 */
 	rtas_firmware_flash_list.num_blocks = 0;
 	flist = (struct flash_block_list *)&rtas_firmware_flash_list;
-	rtas_block_list = virt_to_absolute((unsigned long)flist);
+	rtas_block_list = virt_to_abs(flist);
 	if (rtas_block_list >= (4UL << 20)) {
 		printk(KERN_ALERT "FLASH: kernel bug...flash list header addr above 4GB\n");
 		return;
@@ -373,13 +373,13 @@
 	for (f = flist; f; f = next) {
 		/* Translate data addrs to absolute */
 		for (i = 0; i < f->num_blocks; i++) {
-			f->blocks[i].data = (char *)virt_to_absolute((unsigned long)f->blocks[i].data);
+			f->blocks[i].data = (char *)virt_to_abs(f->blocks[i].data);
 			image_size += f->blocks[i].length;
 		}
 		next = f->next;
 		/* Don't translate NULL pointer for last entry */
-		if(f->next)
-			f->next = (struct flash_block_list *)virt_to_absolute((unsigned long)f->next);
+		if (f->next)
+			f->next = (struct flash_block_list *)virt_to_abs(f->next);
 		else
 			f->next = 0LL;
 		/* make num_blocks into the version/length field */
diff -Nru a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c
--- a/arch/ppc64/kernel/smp.c	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc64/kernel/smp.c	Thu Apr  1 00:48:06 2004
@@ -629,7 +629,7 @@
 		tmp = &stab_array[PAGE_SIZE * cpu];
 		memset(tmp, 0, PAGE_SIZE); 
 		paca[cpu].xStab_data.virt = (unsigned long)tmp;
-		paca[cpu].xStab_data.real = (unsigned long)__v2a(tmp);
+		paca[cpu].xStab_data.real = virt_to_abs(tmp);
 	}
 
 	/* create a process for the processor */
diff -Nru a/arch/ppc64/mm/hash_utils.c b/arch/ppc64/mm/hash_utils.c
--- a/arch/ppc64/mm/hash_utils.c	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc64/mm/hash_utils.c	Thu Apr  1 00:48:06 2004
@@ -48,6 +48,8 @@
 #include <asm/tlb.h>
 #include <asm/cacheflush.h>
 #include <asm/cputable.h>
+#include <asm/abs_addr.h>
+
 /*
  * Note:  pte   --> Linux PTE
  *        HPTE  --> PowerPC Hashed Page Table Entry
@@ -107,11 +109,11 @@
 
 		if (systemcfg->platform == PLATFORM_PSERIES_LPAR)
 			ret = pSeries_lpar_hpte_insert(hpteg, va,
-				(unsigned long)__v2a(addr) >> PAGE_SHIFT,
+				virt_to_abs(addr) >> PAGE_SHIFT,
 				0, mode, 1, large);
 		else
 			ret = pSeries_hpte_insert(hpteg, va,
-				(unsigned long)__v2a(addr) >> PAGE_SHIFT,
+				virt_to_abs(addr) >> PAGE_SHIFT,
 				0, mode, 1, large);
 
 		if (ret == -1) {
@@ -154,7 +156,7 @@
 			ppc64_terminate_msg(0x20, "hpt space");
 			loop_forever();
 		}
-		htab_data.htab = (HPTE *)__a2v(table);
+		htab_data.htab = abs_to_virt(table);
 
 		/* htab absolute addr + encoded htabsize */
 		_SDR1 = table + __ilog2(pteg_count) - 11;
diff -Nru a/arch/ppc64/mm/init.c b/arch/ppc64/mm/init.c
--- a/arch/ppc64/mm/init.c	Thu Apr  1 00:48:06 2004
+++ b/arch/ppc64/mm/init.c	Thu Apr  1 00:48:06 2004
@@ -60,6 +60,7 @@
 #include <asm/sections.h>
 #include <asm/system.h>
 #include <asm/iommu.h>
+#include <asm/abs_addr.h>
 
 
 struct mmu_context_queue_t mmu_context_queue;
@@ -153,7 +154,7 @@
 		pmdp = pmd_alloc(&ioremap_mm, pgdp, ea);
 		ptep = pte_alloc_kernel(&ioremap_mm, pmdp, ea);
 
-		pa = absolute_to_phys(pa);
+		pa = abs_to_phys(pa);
 		set_pte(ptep, pfn_pte(pa >> PAGE_SHIFT, __pgprot(flags)));
 		spin_unlock(&ioremap_mm.page_table_lock);
 	} else {
@@ -539,7 +540,7 @@
 	 */
 	bootmap_pages = bootmem_bootmap_pages(total_pages);
 
-	start = (unsigned long)__a2p(lmb_alloc(bootmap_pages<<PAGE_SHIFT, PAGE_SIZE));
+	start = abs_to_phys(lmb_alloc(bootmap_pages<<PAGE_SHIFT, PAGE_SIZE));
 	BUG_ON(!start);
 
 	boot_mapsize = init_bootmem(start >> PAGE_SHIFT, total_pages);
diff -Nru a/arch/sparc/defconfig b/arch/sparc/defconfig
--- a/arch/sparc/defconfig	Thu Apr  1 00:48:06 2004
+++ b/arch/sparc/defconfig	Thu Apr  1 00:48:06 2004
@@ -10,6 +10,9 @@
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_STANDALONE=y
+CONFIG_BROKEN_ON_SMP=y
 
 #
 # General setup
@@ -19,6 +22,16 @@
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
 CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_HOTPLUG is not set
+# CONFIG_IKCONFIG is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 
 #
 # Loadable module support
@@ -50,9 +63,8 @@
 # CONFIG_PCI_LEGACY_PROC is not set
 # CONFIG_PCI_NAMES is not set
 CONFIG_SUN_OPENPROMFS=m
-CONFIG_KCORE_ELF=y
-CONFIG_BINFMT_AOUT=y
 CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_AOUT=y
 CONFIG_BINFMT_MISC=m
 CONFIG_SUNOS_EMUL=y
 
@@ -62,6 +74,11 @@
 # CONFIG_PARPORT is not set
 
 #
+# Generic Driver Options
+#
+# CONFIG_DEBUG_DRIVER is not set
+
+#
 # Graphics support
 #
 # CONFIG_FB is not set
@@ -69,7 +86,6 @@
 #
 # Console display driver support
 #
-# CONFIG_VGA_CONSOLE is not set
 # CONFIG_MDA_CONSOLE is not set
 # CONFIG_PROM_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
@@ -89,7 +105,9 @@
 #
 CONFIG_SERIAL_SUNCORE=y
 CONFIG_SERIAL_SUNZILOG=y
+CONFIG_SERIAL_SUNZILOG_CONSOLE=y
 CONFIG_SERIAL_SUNSU=y
+CONFIG_SERIAL_SUNSU_CONSOLE=y
 # CONFIG_SERIAL_SUNSAB is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
@@ -111,13 +129,14 @@
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
 CONFIG_BLK_DEV_LOOP=m
+CONFIG_BLK_DEV_CRYPTOLOOP=m
 # CONFIG_BLK_DEV_NBD is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-# CONFIG_MD is not set
+# CONFIG_BLK_DEV_CARMEL is not set
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_INITRD=y
@@ -130,12 +149,13 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN_BOOL is not set
+# CONFIG_ISDN is not set
 
 #
-# SCSI support
+# SCSI device support
 #
 CONFIG_SCSI=y
+CONFIG_SCSI_PROC_FS=y
 
 #
 # SCSI support type (disk, tape, CD-ROM)
@@ -156,6 +176,12 @@
 # CONFIG_SCSI_LOGGING is not set
 
 #
+# SCSI Transport Attributes
+#
+CONFIG_SCSI_SPI_ATTRS=m
+# CONFIG_SCSI_FC_ATTRS is not set
+
+#
 # SCSI low-level drivers
 #
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
@@ -164,10 +190,9 @@
 # CONFIG_SCSI_AIC7XXX is not set
 # CONFIG_SCSI_AIC7XXX_OLD is not set
 # CONFIG_SCSI_AIC79XX is not set
-# CONFIG_SCSI_DPT_I2O is not set
 # CONFIG_SCSI_ADVANSYS is not set
-# CONFIG_SCSI_AM53C974 is not set
 # CONFIG_SCSI_MEGARAID is not set
+# CONFIG_SCSI_SATA is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
@@ -175,21 +200,22 @@
 # CONFIG_SCSI_EATA_PIO is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_GDTH is not set
-# CONFIG_SCSI_GENERIC_NCR5380 is not set
-# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
-# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_IPS is not set
 # CONFIG_SCSI_INIA100 is not set
 # CONFIG_SCSI_SYM53C8XX_2 is not set
-# CONFIG_SCSI_NCR53C8XX is not set
-# CONFIG_SCSI_PCI2000 is not set
-# CONFIG_SCSI_PCI2220I is not set
 # CONFIG_SCSI_QLOGIC_ISP is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
 CONFIG_SCSI_QLOGICPTI=m
+CONFIG_SCSI_QLA2XXX=y
+# CONFIG_SCSI_QLA21XX is not set
+# CONFIG_SCSI_QLA22XX is not set
+# CONFIG_SCSI_QLA2300 is not set
+# CONFIG_SCSI_QLA2322 is not set
+# CONFIG_SCSI_QLA6312 is not set
+# CONFIG_SCSI_QLA6322 is not set
 # CONFIG_SCSI_DC395x is not set
 # CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_U14_34F is not set
 # CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
 CONFIG_SCSI_SUNESP=y
@@ -200,6 +226,11 @@
 # CONFIG_FC4 is not set
 
 #
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
 # Networking support
 #
 CONFIG_NET=y
@@ -210,8 +241,6 @@
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
 CONFIG_NETLINK_DEV=y
-# CONFIG_NETFILTER is not set
-# CONFIG_FILTER is not set
 CONFIG_UNIX=y
 CONFIG_NET_KEY=m
 CONFIG_INET=y
@@ -224,26 +253,36 @@
 # CONFIG_NET_IPIP is not set
 # CONFIG_NET_IPGRE is not set
 # CONFIG_ARPD is not set
-# CONFIG_INET_ECN is not set
 # CONFIG_SYN_COOKIES is not set
 CONFIG_INET_AH=y
 CONFIG_INET_ESP=y
-CONFIG_XFRM_USER=m
+CONFIG_INET_IPCOMP=y
 CONFIG_IPV6=m
+CONFIG_IPV6_PRIVACY=y
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_NETFILTER is not set
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=m
 
 #
 # SCTP Configuration (EXPERIMENTAL)
 #
-CONFIG_IPV6_SCTP__=y
 CONFIG_IP_SCTP=m
-# CONFIG_SCTP_ADLER32 is not set
 # CONFIG_SCTP_DBG_MSG is not set
 CONFIG_SCTP_DBG_OBJCNT=y
+# CONFIG_SCTP_HMAC_NONE is not set
+# CONFIG_SCTP_HMAC_SHA1 is not set
+CONFIG_SCTP_HMAC_MD5=y
 # CONFIG_ATM is not set
 # CONFIG_VLAN_8021Q is not set
-# CONFIG_LLC is not set
-# CONFIG_DECNET is not set
-# CONFIG_BRIDGE is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
 # CONFIG_NET_DIVERT is not set
@@ -261,22 +300,79 @@
 # Network testing
 #
 CONFIG_NET_PKTGEN=m
+CONFIG_NETDEVICES=y
 
 #
-# Network device support
+# ARCnet devices
 #
-CONFIG_NETDEVICES=y
+# CONFIG_ARCNET is not set
 CONFIG_DUMMY=m
 # CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
 CONFIG_TUN=m
-# CONFIG_PPP is not set
-# CONFIG_SLIP is not set
-CONFIG_SUNLANCE=m
-CONFIG_HAPPYMEAL=y
-# CONFIG_SUNBMAC is not set
+# CONFIG_ETHERTAP is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+CONFIG_SUNLANCE=y
+CONFIG_HAPPYMEAL=m
+CONFIG_SUNBMAC=m
 CONFIG_SUNQE=m
+# CONFIG_SUNGEM is not set
+# CONFIG_NET_VENDOR_3COM is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+# CONFIG_NET_PCI is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
 # CONFIG_MYRI_SBUS is not set
-CONFIG_VORTEX=m
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_TIGON3 is not set
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_IXGB is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+# CONFIG_NET_FC is not set
+# CONFIG_RCPCI is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
 
 #
 # Amateur Radio support
@@ -284,6 +380,18 @@
 # CONFIG_HAMRADIO is not set
 
 #
+# IrDA (infrared) support
+#
+# CONFIG_IRDA is not set
+
+#
+# Bluetooth support
+#
+# CONFIG_BT is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
 # Unix98 PTY support
 #
 CONFIG_UNIX98_PTYS=y
@@ -297,7 +405,7 @@
 #
 # Userland interfaces
 #
-CONFIG_INPUT_MOUSEDEV=m
+CONFIG_INPUT_MOUSEDEV=y
 CONFIG_INPUT_MOUSEDEV_PSAUX=y
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
@@ -315,6 +423,7 @@
 # CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=m
 # CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PCIPS2 is not set
 
 #
 # Input Device Drivers
@@ -322,11 +431,13 @@
 CONFIG_INPUT_KEYBOARD=y
 CONFIG_KEYBOARD_ATKBD=m
 CONFIG_KEYBOARD_SUNKBD=m
+# CONFIG_KEYBOARD_LKKBD is not set
 # CONFIG_KEYBOARD_XTKBD is not set
 # CONFIG_KEYBOARD_NEWTON is not set
 CONFIG_INPUT_MOUSE=y
 CONFIG_MOUSE_PS2=m
 CONFIG_MOUSE_SERIAL=m
+# CONFIG_MOUSE_VSXXXAA is not set
 # CONFIG_INPUT_JOYSTICK is not set
 # CONFIG_INPUT_TOUCHSCREEN is not set
 # CONFIG_INPUT_MISC is not set
@@ -334,68 +445,93 @@
 #
 # File systems
 #
+CONFIG_EXT2_FS=y
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+# CONFIG_EXT3_FS is not set
+# CONFIG_JBD is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_XFS_FS=m
+CONFIG_XFS_RT=y
+CONFIG_XFS_QUOTA=y
+CONFIG_XFS_SECURITY=y
+CONFIG_XFS_POSIX_ACL=y
+# CONFIG_MINIX_FS is not set
+CONFIG_ROMFS_FS=m
 # CONFIG_QUOTA is not set
 CONFIG_QUOTACTL=y
 CONFIG_AUTOFS_FS=m
 CONFIG_AUTOFS4_FS=m
-# CONFIG_REISERFS_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+# CONFIG_JOLIET is not set
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_FAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+# CONFIG_DEVFS_FS is not set
+CONFIG_DEVPTS_FS_XATTR=y
+# CONFIG_DEVPTS_FS_SECURITY is not set
+# CONFIG_TMPFS is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
 # CONFIG_ADFS_FS is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
 CONFIG_BEFS_FS=m
 # CONFIG_BEFS_DEBUG is not set
 # CONFIG_BFS_FS is not set
-# CONFIG_EXT3_FS is not set
-# CONFIG_JBD is not set
-# CONFIG_FAT_FS is not set
 # CONFIG_EFS_FS is not set
 # CONFIG_CRAMFS is not set
-# CONFIG_TMPFS is not set
-CONFIG_RAMFS=y
-CONFIG_ISO9660_FS=m
-# CONFIG_JOLIET is not set
-# CONFIG_ZISOFS is not set
-# CONFIG_JFS_FS is not set
-# CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
-# CONFIG_NTFS_FS is not set
 # CONFIG_HPFS_FS is not set
-CONFIG_PROC_FS=y
-# CONFIG_DEVFS_FS is not set
-CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-CONFIG_ROMFS_FS=m
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
 # CONFIG_SYSV_FS is not set
-# CONFIG_UDF_FS is not set
 # CONFIG_UFS_FS is not set
-CONFIG_XFS_FS=m
-CONFIG_XFS_RT=y
-CONFIG_XFS_QUOTA=y
-CONFIG_XFS_POSIX_ACL=y
 
 #
 # Network File Systems
 #
-# CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
 # CONFIG_NFS_V4 is not set
-CONFIG_ROOT_NFS=y
+# CONFIG_NFS_DIRECTIO is not set
 # CONFIG_NFSD is not set
-CONFIG_SUNRPC=y
+CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
 # CONFIG_EXPORTFS is not set
-CONFIG_CIFS=m
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=m
+CONFIG_RPCSEC_GSS_KRB5=m
 # CONFIG_SMB_FS is not set
+CONFIG_CIFS=m
 # CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_AFS_FS=m
 CONFIG_RXRPC=m
-CONFIG_FS_MBCACHE=y
-CONFIG_FS_POSIX_ACL=y
 
 #
 # Partition Types
@@ -403,11 +539,11 @@
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
 CONFIG_SUN_PARTITION=y
-CONFIG_NLS=y
 
 #
 # Native Language Support
 #
+CONFIG_NLS=y
 CONFIG_NLS_DEFAULT="iso8859-1"
 # CONFIG_NLS_CODEPAGE_437 is not set
 # CONFIG_NLS_CODEPAGE_737 is not set
@@ -448,7 +584,7 @@
 # CONFIG_NLS_UTF8 is not set
 
 #
-# Sound card support
+# Sound
 #
 # CONFIG_SOUND is not set
 
@@ -456,26 +592,28 @@
 # USB support
 #
 # CONFIG_USB is not set
-# CONFIG_USB_GADGET is not set
 
 #
-# Bluetooth support
+# USB Gadget Support
 #
-# CONFIG_BT is not set
+# CONFIG_USB_GADGET is not set
 
 #
-# Watchdog
+# Watchdog Cards
 #
-# CONFIG_SOFT_WATCHDOG is not set
+# CONFIG_WATCHDOG is not set
 
 #
 # Kernel hacking
 #
-CONFIG_DEBUG_SLAB=y
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_SLAB is not set
 CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUG_SPINLOCK=y
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_HIGHMEM is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_BUGVERBOSE is not set
 
 #
 # Security options
@@ -492,13 +630,22 @@
 CONFIG_CRYPTO_MD5=y
 CONFIG_CRYPTO_SHA1=y
 CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
 CONFIG_CRYPTO_DES=y
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_TWOFISH=m
 CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_MICHAEL_MIC=m
 # CONFIG_CRYPTO_TEST is not set
 
 #
 # Library routines
 #
 CONFIG_CRC32=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
diff -Nru a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S
--- a/arch/sparc/kernel/entry.S	Thu Apr  1 00:48:06 2004
+++ b/arch/sparc/kernel/entry.S	Thu Apr  1 00:48:06 2004
@@ -288,10 +288,9 @@
 	wr	%l0, PSR_ET, %psr
 	WRITE_PAUSE
 
-	mov	%l7, %o0		! trap number
-	mov	%l0, %o1		! psr
+	add	%sp, STACKFRAME_SZ, %o0	! pt_regs
 	call	do_hw_interrupt
-	 mov	%l1, %o2		! pc
+	 mov	%l7, %o1		! trap number
 
 	RESTORE_ALL
 	
@@ -350,21 +349,15 @@
 	 * for cross calls.  That has a separate entry point below.
 	 */
 maybe_smp4m_msg:
-	GET_PROCESSOR_MID(o3)
+	GET_PROCESSOR4M_ID(o3)
 	set	sun4m_interrupts, %l5
 	ld	[%l5], %o5
-	sethi	%hi(0x60000000), %o4
+	sethi	%hi(0x40000000), %o2
 	sll	%o3, 12, %o3
 	ld	[%o5 + %o3], %o1
-	andcc	%o1, %o4, %g0
+	andcc	%o1, %o2, %g0
 	be,a	smp4m_ticker
 	 cmp	%l7, 14
-	sethi	%hi(0x40000000), %o2
-	add	%o5, %o3, %o5
-	andcc	%o1, %o2, %g0
-	be,a	1f
-	 sethi	%hi(0x20000000), %o2
-1:
 	st	%o2, [%o5 + 0x4]
 	WRITE_PAUSE
 	ld	[%o5], %g0
@@ -374,15 +367,9 @@
 	WRITE_PAUSE
 	wr	%l4, PSR_ET, %psr
 	WRITE_PAUSE
-	srl	%o2, (16+14), %o2
-	tst	%o2
-	bne	2f
-	 nop
 	call	smp_reschedule_irq
-	 add	%o7, 8, %o7
-2:
-	call	smp_stop_cpu_irq
 	 nop
+
 	RESTORE_ALL
 
 	.align	4
@@ -390,7 +377,7 @@
 linux_trap_ipi15_sun4m:
 	SAVE_ALL
 	sethi	%hi(0x80000000), %o2
-	GET_PROCESSOR_MID(o0)
+	GET_PROCESSOR4M_ID(o0)
 	set	sun4m_interrupts, %l5
 	ld	[%l5], %o5
 	sll	%o0, 12, %o0
diff -Nru a/arch/sparc/kernel/head.S b/arch/sparc/kernel/head.S
--- a/arch/sparc/kernel/head.S	Thu Apr  1 00:48:06 2004
+++ b/arch/sparc/kernel/head.S	Thu Apr  1 00:48:06 2004
@@ -746,9 +746,6 @@
 		jmpl	%g1, %g0
 		 nop
 
-	/* This is to align init_thread_union properly, be careful. -DaveM */
-	.align	8192
-
 /* The code above should be at beginning and we have to take care about
  * short jumps, as branching to .text.init section from .text is usually
  * impossible */
diff -Nru a/arch/sparc/kernel/init_task.c b/arch/sparc/kernel/init_task.c
--- a/arch/sparc/kernel/init_task.c	Thu Apr  1 00:48:06 2004
+++ b/arch/sparc/kernel/init_task.c	Thu Apr  1 00:48:06 2004
@@ -21,5 +21,7 @@
  * If this is not aligned on a 8k boundry, then you should change code
  * in etrap.S which assumes it.
  */
-__asm__(".section \".text\",#alloc\n");
-union thread_union init_thread_union = { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union
+	__attribute__((section (".text")))
+	__attribute__((aligned (THREAD_SIZE)))
+	= { INIT_THREAD_INFO(init_task) };
diff -Nru a/arch/sparc/kernel/module.c b/arch/sparc/kernel/module.c
--- a/arch/sparc/kernel/module.c	Thu Apr  1 00:48:06 2004
+++ b/arch/sparc/kernel/module.c	Thu Apr  1 00:48:06 2004
@@ -36,7 +36,9 @@
            table entries. */
 }
 
-/* Make generic code ignore STT_REGISTER dummy undefined symbols.  */
+/* Make generic code ignore STT_REGISTER dummy undefined symbols,
+ * and replace references to .func with func as in ppc64's dedotify.
+ */
 int module_frob_arch_sections(Elf_Ehdr *hdr,
 			      Elf_Shdr *sechdrs,
 			      char *secstrings,
@@ -44,7 +46,7 @@
 {
 	unsigned int symidx;
 	Elf32_Sym *sym;
-	const char *strtab;
+	char *strtab;
 	int i;
 
 	for (symidx = 0; sechdrs[symidx].sh_type != SHT_SYMTAB; symidx++) {
@@ -57,9 +59,15 @@
 	strtab = (char *)sechdrs[sechdrs[symidx].sh_link].sh_addr;
 
 	for (i = 1; i < sechdrs[symidx].sh_size / sizeof(Elf_Sym); i++) {
-		if (sym[i].st_shndx == SHN_UNDEF &&
-		    ELF32_ST_TYPE(sym[i].st_info) == STT_REGISTER)
-			sym[i].st_shndx = SHN_ABS;
+		if (sym[i].st_shndx == SHN_UNDEF) {
+			if (ELF32_ST_TYPE(sym[i].st_info) == STT_REGISTER)
+				sym[i].st_shndx = SHN_ABS;
+			else {
+				char *name = strtab + sym[i].st_name;
+				if (name[0] == '.')
+					memmove(name, name+1, strlen(name));
+			}
+		}
 	}
 	return 0;
 }
diff -Nru a/arch/sparc/kernel/signal.c b/arch/sparc/kernel/signal.c
--- a/arch/sparc/kernel/signal.c	Thu Apr  1 00:48:06 2004
+++ b/arch/sparc/kernel/signal.c	Thu Apr  1 00:48:06 2004
@@ -1128,9 +1128,9 @@
 
 	/* Now see if we want to update the new state. */
 	if (ssptr) {
-		void *ss_sp;
+		char *ss_sp;
 
-		if (get_user((long)ss_sp, &ssptr->the_stack))
+		if (get_user(ss_sp, &ssptr->the_stack))
 			goto out;
 		/* If the current stack was set with sigaltstack, don't
 		   swap stacks while we are on it.  */
diff -Nru a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c
--- a/arch/sparc/kernel/sparc_ksyms.c	Thu Apr  1 00:48:06 2004
+++ b/arch/sparc/kernel/sparc_ksyms.c	Thu Apr  1 00:48:06 2004
@@ -92,31 +92,21 @@
 extern void ___clear_bit(void);
 extern void ___change_bit(void);
 
-/* One thing to note is that the way the symbols of the mul/div
- * support routines are named is a mess, they all start with
- * a '.' which makes it a bitch to export, here is the trick:
+/* Alias functions whose names begin with "." and export the aliases.
+ * The module references will be fixed up by module_frob_arch_sections.
  */
+#define DOT_ALIAS2(__ret, __x, __arg1, __arg2) \
+	extern __ret __x(__arg1, __arg2) \
+	             __attribute__((weak, alias("." # __x)));
+
+DOT_ALIAS2(int, div, int, int)
+DOT_ALIAS2(int, mul, int, int)
+DOT_ALIAS2(int, rem, int, int)
+DOT_ALIAS2(unsigned, udiv, unsigned, unsigned)
+DOT_ALIAS2(unsigned, umul, unsigned, unsigned)
+DOT_ALIAS2(unsigned, urem, unsigned, unsigned)
 
-/* If the interface of any of these special functions does ever
- * change in an incompatible way, you must modify this.
- */
-#define DOT_PROTO(sym) extern int __dot_##sym(int, int)
-
-#ifdef __GENKSYMS__
-#define EXPORT_SYMBOL_DOT(sym)						\
-	DOT_PROTO(sym);							\
-	EXPORT_SYMBOL(__dot_ ## sym)
-#else /* !__GENKSYMS__ */
-#define EXPORT_SYMBOL_DOT(sym)						\
-	DOT_PROTO(sym) __asm__("." # sym);				\
-	__CRC_SYMBOL(__dot_##sym, "")					\
-	static const char __kstrtab___dot_##sym[]			\
-	__attribute__((section("__ksymtab_strings")))			\
-	= "." #sym;							\
-	static const struct kernel_symbol __ksymtab___dot_##sym		\
-	__attribute__((section("__ksymtab")))				\
-	= { (unsigned long)&__dot_##sym, __kstrtab___dot_##sym }
-#endif
+#undef DOT_ALIAS2
 
 /* used by various drivers */
 EXPORT_SYMBOL(sparc_cpu_model);
@@ -180,21 +170,20 @@
 /* EXPORT_SYMBOL(iounit_map_dma_init); */
 /* EXPORT_SYMBOL(iounit_map_dma_page); */
 
-/* Btfixup stuff cannot have versions, it would be complicated too much */
 #ifndef CONFIG_SMP
-EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(___xchg32));
+EXPORT_SYMBOL(BTFIXUP_CALL(___xchg32));
 #else
-EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(__smp_processor_id));
+EXPORT_SYMBOL(BTFIXUP_CALL(__hard_smp_processor_id));
 #endif
-EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(enable_irq));
-EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(disable_irq));
-EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(__irq_itoa));
-EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(mmu_unlockarea));
-EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(mmu_lockarea));
-EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(mmu_get_scsi_sgl));
-EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(mmu_get_scsi_one));
-EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(mmu_release_scsi_sgl));
-EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(mmu_release_scsi_one));
+EXPORT_SYMBOL(BTFIXUP_CALL(enable_irq));
+EXPORT_SYMBOL(BTFIXUP_CALL(disable_irq));
+EXPORT_SYMBOL(BTFIXUP_CALL(__irq_itoa));
+EXPORT_SYMBOL(BTFIXUP_CALL(mmu_unlockarea));
+EXPORT_SYMBOL(BTFIXUP_CALL(mmu_lockarea));
+EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_sgl));
+EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_one));
+EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_sgl));
+EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_one));
 
 #ifdef CONFIG_SBUS
 EXPORT_SYMBOL(sbus_root);
@@ -271,15 +260,15 @@
 /* sparc library symbols */
 EXPORT_SYMBOL(bcopy);
 EXPORT_SYMBOL(memchr);
-EXPORT_SYMBOL_NOVERS(memscan);
-EXPORT_SYMBOL_NOVERS(strlen);
+EXPORT_SYMBOL(memscan);
+EXPORT_SYMBOL(strlen);
 EXPORT_SYMBOL(strnlen);
 EXPORT_SYMBOL(strcpy);
 EXPORT_SYMBOL(strncpy);
 EXPORT_SYMBOL(strcat);
 EXPORT_SYMBOL(strncat);
 EXPORT_SYMBOL(strcmp);
-EXPORT_SYMBOL_NOVERS(strncmp);
+EXPORT_SYMBOL(strncmp);
 EXPORT_SYMBOL(strchr);
 EXPORT_SYMBOL(strrchr);
 EXPORT_SYMBOL(strpbrk);
@@ -309,28 +298,24 @@
 /* Cache flushing.  */
 EXPORT_SYMBOL(sparc_flush_page_to_ram);
 
-/* No version information on this, heavily used in inline asm,
- * and will always be 'void __ret_efault(void)'.
- */
-EXPORT_SYMBOL_NOVERS(__ret_efault);
+EXPORT_SYMBOL(__ret_efault);
 
-/* No version information on these, as gcc produces such symbols. */
-EXPORT_SYMBOL_NOVERS(memcmp);
-EXPORT_SYMBOL_NOVERS(memcpy);
-EXPORT_SYMBOL_NOVERS(memset);
-EXPORT_SYMBOL_NOVERS(memmove);
-EXPORT_SYMBOL_NOVERS(__ashrdi3);
-EXPORT_SYMBOL_NOVERS(__ashldi3);
-EXPORT_SYMBOL_NOVERS(__lshrdi3);
-EXPORT_SYMBOL_NOVERS(__muldi3);
-EXPORT_SYMBOL_NOVERS(__divdi3);
-
-EXPORT_SYMBOL_DOT(rem);
-EXPORT_SYMBOL_DOT(urem);
-EXPORT_SYMBOL_DOT(mul);
-EXPORT_SYMBOL_DOT(umul);
-EXPORT_SYMBOL_DOT(div);
-EXPORT_SYMBOL_DOT(udiv);
+EXPORT_SYMBOL(memcmp);
+EXPORT_SYMBOL(memcpy);
+EXPORT_SYMBOL(memset);
+EXPORT_SYMBOL(memmove);
+EXPORT_SYMBOL(__ashrdi3);
+EXPORT_SYMBOL(__ashldi3);
+EXPORT_SYMBOL(__lshrdi3);
+EXPORT_SYMBOL(__muldi3);
+EXPORT_SYMBOL(__divdi3);
+
+EXPORT_SYMBOL(rem);
+EXPORT_SYMBOL(urem);
+EXPORT_SYMBOL(mul);
+EXPORT_SYMBOL(umul);
+EXPORT_SYMBOL(div);
+EXPORT_SYMBOL(udiv);
 
 #ifdef CONFIG_DEBUG_BUGVERBOSE
 EXPORT_SYMBOL(do_BUG);
diff -Nru a/arch/sparc/kernel/sys_sunos.c b/arch/sparc/kernel/sys_sunos.c
--- a/arch/sparc/kernel/sys_sunos.c	Thu Apr  1 00:48:06 2004
+++ b/arch/sparc/kernel/sys_sunos.c	Thu Apr  1 00:48:06 2004
@@ -343,7 +343,7 @@
 	put_user(reclen, &dirent->d_reclen);
 	copy_to_user(dirent->d_name, name, namlen);
 	put_user(0, dirent->d_name + namlen);
-	((char *) dirent) += reclen;
+	dirent = (void *)dirent + reclen;
 	buf->curr = dirent;
 	buf->count -= reclen;
 	return 0;
@@ -422,7 +422,7 @@
 	put_user(reclen, &dirent->d_reclen);
 	copy_to_user(dirent->d_name, name, namlen);
 	put_user(0, dirent->d_name + namlen);
-	((char *) dirent) += reclen;
+	dirent = (void *)dirent + reclen;
 	buf->curr = dirent;
 	buf->count -= reclen;
 	return 0;
diff -Nru a/arch/sparc/kernel/traps.c b/arch/sparc/kernel/traps.c
--- a/arch/sparc/kernel/traps.c	Thu Apr  1 00:48:06 2004
+++ b/arch/sparc/kernel/traps.c	Thu Apr  1 00:48:06 2004
@@ -131,23 +131,23 @@
 	do_exit(SIGSEGV);
 }
 
-void do_hw_interrupt(unsigned long type, unsigned long psr, unsigned long pc)
+void do_hw_interrupt(struct pt_regs *regs, unsigned long type)
 {
 	siginfo_t info;
 
 	if(type < 0x80) {
 		/* Sun OS's puke from bad traps, Linux survives! */
 		printk("Unimplemented Sparc TRAP, type = %02lx\n", type);
-		die_if_kernel("Whee... Hello Mr. Penguin", current->thread.kregs);
+		die_if_kernel("Whee... Hello Mr. Penguin", regs);
 	}	
 
-	if(psr & PSR_PS)
-		die_if_kernel("Kernel bad trap", current->thread.kregs);
+	if(regs->psr & PSR_PS)
+		die_if_kernel("Kernel bad trap", regs);
 
 	info.si_signo = SIGILL;
 	info.si_errno = 0;
 	info.si_code = ILL_ILLTRP;
-	info.si_addr = (void *)pc;
+	info.si_addr = (void *)regs->pc;
 	info.si_trapno = type - 0x80;
 	force_sig_info(SIGILL, &info, current);
 }
diff -Nru a/arch/sparc/lib/Makefile b/arch/sparc/lib/Makefile
--- a/arch/sparc/lib/Makefile	Thu Apr  1 00:48:06 2004
+++ b/arch/sparc/lib/Makefile	Thu Apr  1 00:48:06 2004
@@ -7,5 +7,7 @@
 lib-y := mul.o rem.o sdiv.o udiv.o umul.o urem.o ashrdi3.o memcpy.o memset.o \
          strlen.o checksum.o blockops.o memscan.o memcmp.o strncmp.o \
 	 strncpy_from_user.o divdi3.o udivdi3.o strlen_user.o \
-	 copy_user.o locks.o atomic.o atomic32.o bitops.o debuglocks.o \
+	 copy_user.o locks.o atomic.o atomic32.o bitops.o \
 	 lshrdi3.o ashldi3.o rwsem.o muldi3.o bitext.o
+
+lib-$(CONFIG_DEBUG_SPINLOCK) +=	debuglocks.o
diff -Nru a/arch/sparc/lib/debuglocks.c b/arch/sparc/lib/debuglocks.c
--- a/arch/sparc/lib/debuglocks.c	Thu Apr  1 00:48:06 2004
+++ b/arch/sparc/lib/debuglocks.c	Thu Apr  1 00:48:06 2004
@@ -12,8 +12,7 @@
 #include <asm/psr.h>
 #include <asm/system.h>
 
-/* To enable this code, just define SPIN_LOCK_DEBUG in asm/spinlock.h */
-#ifdef SPIN_LOCK_DEBUG
+#ifdef CONFIG_SMP
 
 /* Some notes on how these debugging routines work.  When a lock is acquired
  * an extra debugging member lock->owner_pc is set to the caller of the lock
@@ -200,4 +199,4 @@
 	rw->lock = 0;
 }
 
-#endif /* SPIN_LOCK_DEBUG */
+#endif /* SMP */
diff -Nru a/arch/sparc/math-emu/math.c b/arch/sparc/math-emu/math.c
--- a/arch/sparc/math-emu/math.c	Thu Apr  1 00:48:06 2004
+++ b/arch/sparc/math-emu/math.c	Thu Apr  1 00:48:06 2004
@@ -327,6 +327,7 @@
 #ifdef DEBUG_MATHEMU
 			printk("unknown FPop1: %03lx\n",(insn>>5)&0x1ff);
 #endif
+			break;
 		}
 	} else if ((insn & 0xc1f80000) == 0x81a80000)	/* FPOP2 */ {
 		switch ((insn >> 5) & 0x1ff) {
@@ -340,6 +341,7 @@
 #ifdef DEBUG_MATHEMU
 			printk("unknown FPop2: %03lx\n",(insn>>5)&0x1ff);
 #endif
+			break;
 		}
 	}
 
diff -Nru a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c
--- a/arch/sparc64/kernel/sparc64_ksyms.c	Thu Apr  1 00:48:06 2004
+++ b/arch/sparc64/kernel/sparc64_ksyms.c	Thu Apr  1 00:48:06 2004
@@ -91,6 +91,7 @@
 extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *);
 extern long sparc32_open(const char * filename, int flags, int mode);
 extern int io_remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned long offset, unsigned long size, pgprot_t prot, int space);
+extern void (*prom_palette)(int);
 
 extern int __ashrdi3(int, int);
 
@@ -388,3 +389,5 @@
 EXPORT_SYMBOL(xor_vis_3);
 EXPORT_SYMBOL(xor_vis_4);
 EXPORT_SYMBOL(xor_vis_5);
+
+EXPORT_SYMBOL(prom_palette);
diff -Nru a/arch/sparc64/solaris/timod.c b/arch/sparc64/solaris/timod.c
--- a/arch/sparc64/solaris/timod.c	Thu Apr  1 00:48:06 2004
+++ b/arch/sparc64/solaris/timod.c	Thu Apr  1 00:48:06 2004
@@ -296,7 +296,7 @@
 		SOLD("calling GETSOCKOPT");
 		set_fs(KERNEL_DS);
 		error = sys_socketcall(SYS_GETSOCKOPT, args);
-		set_fs(old_fs);;
+		set_fs(old_fs);
 		if (error) {
 			failed = TBADOPT;
 			break;
diff -Nru a/drivers/acpi/osl.c b/drivers/acpi/osl.c
--- a/drivers/acpi/osl.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/acpi/osl.c	Thu Apr  1 00:48:06 2004
@@ -1057,15 +1057,15 @@
  * Run-time events on the same GPE this flag is available
  * to tell Linux to keep the wake-time GPEs enabled at run-time.
  */
-int __init
-acpi_wake_gpes_always_on_setup(char *str)
+static int __init
+acpi_leave_gpes_disabled_setup(char *str)
 {
-	printk(KERN_INFO PREFIX "wake GPEs not disabled\n");
+	printk(KERN_INFO PREFIX "leave wake GPEs disabled\n");
 
-	acpi_gbl_leave_wake_gpes_disabled = FALSE;
+	acpi_gbl_leave_wake_gpes_disabled = TRUE;
 
 	return 1;
 }
 
-__setup("acpi_wake_gpes_always_on", acpi_wake_gpes_always_on_setup);
+__setup("acpi_leave_gpes_disabled", acpi_leave_gpes_disabled_setup);
 
diff -Nru a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c
--- a/drivers/acpi/sleep/proc.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/acpi/sleep/proc.c	Thu Apr  1 00:48:06 2004
@@ -99,7 +99,7 @@
 	if (acpi_gbl_FADT->mon_alrm)
 		mo = CMOS_READ(acpi_gbl_FADT->mon_alrm);
 	else
-		mo = CMOS_READ(RTC_MONTH);;
+		mo = CMOS_READ(RTC_MONTH);
 	if (acpi_gbl_FADT->century)
 		yr = CMOS_READ(acpi_gbl_FADT->century) * 100 + CMOS_READ(RTC_YEAR);
 	else
diff -Nru a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c
--- a/drivers/acpi/utilities/utglobal.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/acpi/utilities/utglobal.c	Thu Apr  1 00:48:06 2004
@@ -787,7 +787,6 @@
 
 	acpi_gbl_create_osi_method = TRUE;
 	acpi_gbl_all_methods_serialized = FALSE;
-	acpi_gbl_leave_wake_gpes_disabled = TRUE;
 
 	/* Memory allocation and cache lists */
 
diff -Nru a/drivers/block/carmel.c b/drivers/block/carmel.c
--- a/drivers/block/carmel.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/block/carmel.c	Thu Apr  1 00:48:06 2004
@@ -994,7 +994,8 @@
 	}
 
 	printk(KERN_INFO DRV_NAME "(%s): port %u device %Lu sectors\n",
-	       pci_name(host->pdev), port->port_no, port->capacity);
+	       pci_name(host->pdev), port->port_no,
+	       (unsigned long long) port->capacity);
 	printk(KERN_INFO DRV_NAME "(%s): port %u device \"%s\"\n",
 	       pci_name(host->pdev), port->port_no, port->name);
 
diff -Nru a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
--- a/drivers/block/cpqarray.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/block/cpqarray.c	Thu Apr  1 00:48:06 2004
@@ -1738,7 +1738,7 @@
                 return;
         }
 
-	info_p->log_drives = id_ctlr_buf->nr_drvs;;
+	info_p->log_drives = id_ctlr_buf->nr_drvs;
 	for(i=0;i<4;i++)
 		info_p->firm_rev[i] = id_ctlr_buf->firm_rev[i];
 	info_p->ctlr_sig = id_ctlr_buf->cfg_sig;
diff -Nru a/drivers/block/elevator.c b/drivers/block/elevator.c
--- a/drivers/block/elevator.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/block/elevator.c	Thu Apr  1 00:48:06 2004
@@ -210,10 +210,14 @@
 			rq = NULL;
 			break;
 		} else if (ret == BLKPREP_KILL) {
+			int nr_bytes = rq->hard_nr_sectors << 9;
+
+			if (!nr_bytes)
+				nr_bytes = rq->data_len;
+
 			blkdev_dequeue_request(rq);
 			rq->flags |= REQ_QUIET;
-			while (end_that_request_first(rq, 0, rq->nr_sectors))
-				;
+			end_that_request_chunk(rq, 0, nr_bytes);
 			end_that_request_last(rq);
 		} else {
 			printk("%s: bad return=%d\n", __FUNCTION__, ret);
diff -Nru a/drivers/cdrom/sbpcd.c b/drivers/cdrom/sbpcd.c
--- a/drivers/cdrom/sbpcd.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/cdrom/sbpcd.c	Thu Apr  1 00:48:06 2004
@@ -5120,7 +5120,7 @@
 			for ( ; try!=0;try--)
 			{
 				j=inb(CDi_status);
-				if (!(j&s_not_data_ready)) break;;
+				if (!(j&s_not_data_ready)) break;
 				if (!(j&s_not_result_ready)) break;
 				if (fam0LV_drive) if (j&s_attention) break;
 			}
diff -Nru a/drivers/char/drm/drm_memory_debug.h b/drivers/char/drm/drm_memory_debug.h
--- a/drivers/char/drm/drm_memory_debug.h	Thu Apr  1 00:48:06 2004
+++ b/drivers/char/drm/drm_memory_debug.h	Thu Apr  1 00:48:06 2004
@@ -385,7 +385,7 @@
 	if (!handle) {
 		DRM_MEM_ERROR(DRM_MEM_TOTALAGP,
 			      "Attempt to free NULL AGP handle\n");
-		return retval;;
+		return retval;
 	}
 
 	if (DRM(agp_free_memory)(handle)) {
diff -Nru a/drivers/char/drm/gamma_context.h b/drivers/char/drm/gamma_context.h
--- a/drivers/char/drm/gamma_context.h	Thu Apr  1 00:48:06 2004
+++ b/drivers/char/drm/gamma_context.h	Thu Apr  1 00:48:06 2004
@@ -84,7 +84,7 @@
 	}
 
 	wake_up_interruptible(&dev->buf_writers);
-	return DRM_MIN(avail, count);;
+	return DRM_MIN(avail, count);
 }
 
 
diff -Nru a/drivers/char/dz.c b/drivers/char/dz.c
--- a/drivers/char/dz.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/char/dz.c	Thu Apr  1 00:48:06 2004
@@ -431,7 +431,7 @@
 static void do_serial_hangup (void *private_data)
 {
 	struct dz_serial *info = (struct dz_serial *) private_data;
-	struct tty_struct *tty = info->tty;;
+	struct tty_struct *tty = info->tty;
         
 	if (!tty)
 		return;
diff -Nru a/drivers/char/ftape/compressor/lzrw3.c b/drivers/char/ftape/compressor/lzrw3.c
--- a/drivers/char/ftape/compressor/lzrw3.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/char/ftape/compressor/lzrw3.c	Thu Apr  1 00:48:06 2004
@@ -701,7 +701,7 @@
           /* been postponed for lack of bytes.                                */
           if (literals>0)
             {
-             register UBYTE *r=p_ziv-literals;;
+             register UBYTE *r=p_ziv-literals;
              hash[HASH(r)]=r;
              if (literals==2)
                 {r++; hash[HASH(r)]=r;}
diff -Nru a/drivers/char/mwave/smapi.c b/drivers/char/mwave/smapi.c
--- a/drivers/char/mwave/smapi.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/char/mwave/smapi.c	Thu Apr  1 00:48:06 2004
@@ -447,7 +447,7 @@
 	if (bRC) goto exit_smapi_request_error;
 
 	if (mwave_3780i_io) {
-		usDI = dspio_index;;
+		usDI = dspio_index;
 	}
 	if (mwave_3780i_irq) {
 		usSI = (usSI & 0xff00) | mwave_3780i_irq;
diff -Nru a/drivers/char/qtronix.c b/drivers/char/qtronix.c
--- a/drivers/char/qtronix.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/char/qtronix.c	Thu Apr  1 00:48:06 2004
@@ -206,7 +206,7 @@
 	unsigned char int_status;
 
 	cir = (struct cir_port *)dev_id;
-	int_status = get_int_status(cir);;
+	int_status = get_int_status(cir);
 	if (int_status & 0x4) {
 		clear_fifo(cir);
 		return;
diff -Nru a/drivers/char/vt.c b/drivers/char/vt.c
--- a/drivers/char/vt.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/char/vt.c	Thu Apr  1 00:48:06 2004
@@ -2315,7 +2315,7 @@
 			break;
 		case TIOCL_SETVESABLANK:
 			set_vesa_blanking(arg);
-			break;;
+			break;
 		case TIOCL_SETKMSGREDIRECT:
 			if (!capable(CAP_SYS_ADMIN)) {
 				ret = -EPERM;
diff -Nru a/drivers/fc4/soc.h b/drivers/fc4/soc.h
--- a/drivers/fc4/soc.h	Thu Apr  1 00:48:06 2004
+++ b/drivers/fc4/soc.h	Thu Apr  1 00:48:06 2004
@@ -114,18 +114,22 @@
 static inline void xram_copy_from (void *p, xram_p x, int len)
 {
 	for (len >>= 2; len > 0; len--, x += sizeof(u32)) {
-		u32 val;
+		u32 val, *p32 = p;
 
 		val = ((sbus_readw(x + 0x00UL) << 16) |
 		       (sbus_readw(x + 0x02UL)));
-		*((u32 *)p)++ = val;
+		*p32++ = val;
+		p = p32;
 	}
 }
 
 static inline void xram_copy_to (xram_p x, void *p, int len)
 {
 	for (len >>= 2; len > 0; len--, x += sizeof(u32)) {
-		u32 tmp = *((u32 *)p)++;
+		u32 tmp, *p32 = p;
+
+		tmp = *p32++;
+		p = p32;
 		sbus_writew(tmp >> 16, x + 0x00UL);
 		sbus_writew(tmp, x + 0x02UL);
 	}
diff -Nru a/drivers/ide/pci/trm290.c b/drivers/ide/pci/trm290.c
--- a/drivers/ide/pci/trm290.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/ide/pci/trm290.c	Thu Apr  1 00:48:06 2004
@@ -280,7 +280,7 @@
 static int trm290_ide_dma_end (ide_drive_t *drive)
 {
 	ide_hwif_t *hwif = HWIF(drive);
-	u16 status = 0;;
+	u16 status = 0;
 
 	drive->waiting_for_dma = 0;
 	/* purge DMA mappings */
diff -Nru a/drivers/input/joystick/gf2k.c b/drivers/input/joystick/gf2k.c
--- a/drivers/input/joystick/gf2k.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/input/joystick/gf2k.c	Thu Apr  1 00:48:06 2004
@@ -109,7 +109,7 @@
 	local_irq_save(flags);
 
 	gameport_trigger(gameport);
-	v = gameport_read(gameport);;
+	v = gameport_read(gameport);
 
 	while (t > 0 && i < length) {
 		t--; u = v;
diff -Nru a/drivers/isdn/hardware/eicon/capifunc.c b/drivers/isdn/hardware/eicon/capifunc.c
--- a/drivers/isdn/hardware/eicon/capifunc.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/isdn/hardware/eicon/capifunc.c	Thu Apr  1 00:48:06 2004
@@ -1,4 +1,4 @@
-/* $Id: capifunc.c,v 1.60 2004/03/22 16:28:27 armin Exp $
+/* $Id: capifunc.c,v 1.61 2004/03/26 19:48:48 armin Exp $
  *
  * ISDN interface module for Eicon active cards DIVA.
  * CAPI Interface common functions
@@ -893,15 +893,16 @@
 		return CAPI_REGOSRESOURCEERR;
 	}
 
+	diva_os_enter_spin_lock(&api_lock, &old_irql, "send message");
+
 	if (!this->Id) {
+		diva_os_leave_spin_lock(&api_lock, &old_irql, "send message");
 		return CAPI_ILLAPPNR;
 	}
 
 	/* patch controller number */
 	msg->header.controller = ControllerMap[card->Id]
 	    | (msg->header.controller & 0x80);	/* preserve external controller bit */
-
-	diva_os_enter_spin_lock(&api_lock, &old_irql, "send message");
 
 	switch (command) {
 	default:
diff -Nru a/drivers/isdn/hardware/eicon/message.c b/drivers/isdn/hardware/eicon/message.c
--- a/drivers/isdn/hardware/eicon/message.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/isdn/hardware/eicon/message.c	Thu Apr  1 00:48:06 2004
@@ -14821,7 +14821,7 @@
   for(i=0;i<MAX_CIP_TYPES;i++)
   {
     info_mask_group[i] = 0;
-    cip_mask_group [i] = 0;;
+    cip_mask_group [i] = 0;
   }
   for(i=0;i<MAX_APPL;i++)
   {
diff -Nru a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c
--- a/drivers/isdn/hisax/hisax_fcpcipnp.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/isdn/hisax/hisax_fcpcipnp.c	Thu Apr  1 00:48:06 2004
@@ -762,7 +762,7 @@
 	adapter->isac.priv = adapter;
 	switch (adapter->type) {
 	case AVM_FRITZ_PCIV2:
-		adapter->isac.read_isac       = &fcpci2_read_isac;;
+		adapter->isac.read_isac       = &fcpci2_read_isac;
 		adapter->isac.write_isac      = &fcpci2_write_isac;
 		adapter->isac.read_isac_fifo  = &fcpci2_read_isac_fifo;
 		adapter->isac.write_isac_fifo = &fcpci2_write_isac_fifo;
@@ -771,7 +771,7 @@
 		adapter->write_ctrl           = &fcpci2_write_ctrl;
 		break;
 	case AVM_FRITZ_PCI:
-		adapter->isac.read_isac       = &fcpci_read_isac;;
+		adapter->isac.read_isac       = &fcpci_read_isac;
 		adapter->isac.write_isac      = &fcpci_write_isac;
 		adapter->isac.read_isac_fifo  = &fcpci_read_isac_fifo;
 		adapter->isac.write_isac_fifo = &fcpci_write_isac_fifo;
@@ -780,7 +780,7 @@
 		adapter->write_ctrl           = &fcpci_write_ctrl;
 		break;
 	case AVM_FRITZ_PNP:
-		adapter->isac.read_isac       = &fcpci_read_isac;;
+		adapter->isac.read_isac       = &fcpci_read_isac;
 		adapter->isac.write_isac      = &fcpci_write_isac;
 		adapter->isac.read_isac_fifo  = &fcpci_read_isac_fifo;
 		adapter->isac.write_isac_fifo = &fcpci_write_isac_fifo;
diff -Nru a/drivers/isdn/hisax/niccy.c b/drivers/isdn/hisax/niccy.c
--- a/drivers/isdn/hisax/niccy.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/isdn/hisax/niccy.c	Thu Apr  1 00:48:06 2004
@@ -271,7 +271,7 @@
 			}
 			card->para[1] = pnp_port_start(pnp_d, 0);
 			card->para[2] = pnp_port_start(pnp_d, 1);
-			card->para[0] = pnp_irq(pnp_d, 0);;
+			card->para[0] = pnp_irq(pnp_d, 0);
 			if (!card->para[0] || !card->para[1] || !card->para[2]) {
 				printk(KERN_ERR "NiccyPnP:some resources are missing %ld/%lx/%lx\n",
 					card->para[0], card->para[1], card->para[2]);
diff -Nru a/drivers/isdn/hisax/nj_s.c b/drivers/isdn/hisax/nj_s.c
--- a/drivers/isdn/hisax/nj_s.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/isdn/hisax/nj_s.c	Thu Apr  1 00:48:06 2004
@@ -80,7 +80,7 @@
 			printk(KERN_WARNING "nj LOCK_ATOMIC s0val %x->%x\n",
 				cs->hw.njet.last_is0, s0val);
 			spin_unlock_irqrestore(&cs->lock, flags);
-			return IRQ_HANDLED;;
+			return IRQ_HANDLED;
 		}
 		cs->hw.njet.irqstat0 = s0val;
 		if ((cs->hw.njet.irqstat0 & NETJET_IRQM0_READ) != 
diff -Nru a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c
--- a/drivers/media/video/zoran_driver.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/media/video/zoran_driver.c	Thu Apr  1 00:48:06 2004
@@ -2815,7 +2815,7 @@
 				     fh->jpg_settings.TmpDcm);
 				fmt->fmt.pix.sizeimage =
 				    zoran_v4l2_calc_bufsize(&fh->
-							    jpg_settings);;
+							    jpg_settings);
 				fmt->fmt.pix.pixelformat =
 				    V4L2_PIX_FMT_MJPEG;
 				if (fh->jpg_settings.TmpDcm == 1)
diff -Nru a/drivers/mtd/nand/nand.c b/drivers/mtd/nand/nand.c
--- a/drivers/mtd/nand/nand.c	Thu Apr  1 00:48:07 2004
+++ b/drivers/mtd/nand/nand.c	Thu Apr  1 00:48:07 2004
@@ -1060,7 +1060,7 @@
 			goto out;
 
 		/* Update written bytes count */
-		written += mtd->oobblock;;
+		written += mtd->oobblock;
 
 		/* Increment page address */
 		page++;
@@ -1192,7 +1192,7 @@
 	nand_deselect ();
 	spin_unlock_bh (&this->chip_lock);
 
-	ret = instr->state == MTD_ERASE_DONE ? 0 : -EIO;;
+	ret = instr->state == MTD_ERASE_DONE ? 0 : -EIO;
 	/* Do call back function */
 	if (!ret && instr->callback)
 		instr->callback (instr);
diff -Nru a/drivers/net/acenic.h b/drivers/net/acenic.h
--- a/drivers/net/acenic.h	Thu Apr  1 00:48:06 2004
+++ b/drivers/net/acenic.h	Thu Apr  1 00:48:06 2004
@@ -696,7 +696,7 @@
 	char			name[48];
 #ifdef INDEX_DEBUG
 	spinlock_t		debug_lock
-				__attribute__ ((aligned (SMP_CACHE_BYTES)));;
+				__attribute__ ((aligned (SMP_CACHE_BYTES)));
 	u32			last_tx, last_std_rx, last_mini_rx;
 #endif
 	struct net_device_stats stats;
diff -Nru a/drivers/net/fealnx.c b/drivers/net/fealnx.c
--- a/drivers/net/fealnx.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/net/fealnx.c	Thu Apr  1 00:48:06 2004
@@ -1303,14 +1303,15 @@
 	/* for the last tx descriptor */
 	np->tx_ring[i - 1].next_desc = np->tx_ring_dma;
 	np->tx_ring[i - 1].next_desc_logical = &np->tx_ring[0];
-
-	return;
 }
 
 
 static int start_tx(struct sk_buff *skb, struct net_device *dev)
 {
 	struct netdev_private *np = dev->priv;
+	unsigned long flags;
+
+	spin_lock_irqsave(&np->lock, flags);
 
 	np->cur_tx_copy->skbuff = skb;
 
@@ -1377,6 +1378,7 @@
 	writel(0, dev->base_addr + TXPDR);
 	dev->trans_start = jiffies;
 
+	spin_unlock_irqrestore(&np->lock, flags);
 	return 0;
 }
 
@@ -1423,6 +1425,8 @@
 	unsigned int num_tx = 0;
 	int handled = 0;
 
+	spin_lock(&np->lock);
+
 	writel(0, dev->base_addr + IMR);
 
 	ioaddr = dev->base_addr;
@@ -1564,6 +1568,8 @@
 		       dev->name, readl(ioaddr + ISR));
 
 	writel(np->imrvalue, ioaddr + IMR);
+
+	spin_unlock(&np->lock);
 
 	return IRQ_RETVAL(handled);
 }
diff -Nru a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c
--- a/drivers/net/hamradio/hdlcdrv.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/net/hamradio/hdlcdrv.c	Thu Apr  1 00:48:06 2004
@@ -737,7 +737,7 @@
 	static const struct hdlcdrv_channel_params dflt_ch_params = { 
 		20, 2, 10, 40, 0 
 	};
-	struct hdlcdrv_state *s = dev->priv;;
+	struct hdlcdrv_state *s = dev->priv;
 
 	/*
 	 * initialize the hdlcdrv_state struct
diff -Nru a/drivers/net/mace.c b/drivers/net/mace.c
--- a/drivers/net/mace.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/net/mace.c	Thu Apr  1 00:48:06 2004
@@ -202,7 +202,7 @@
 		rc = -ENOMEM;
 		goto err_unmap_tx_dma;
 	}
-	mp->rx_dma_intr = macio_irq(mdev, 2);;
+	mp->rx_dma_intr = macio_irq(mdev, 2);
 
 	mp->tx_cmds = (volatile struct dbdma_cmd *) DBDMA_ALIGN(mp + 1);
 	mp->rx_cmds = mp->tx_cmds + NCMDS_TX * N_TX_RING + 1;
diff -Nru a/drivers/net/sk98lin/skgepnmi.c b/drivers/net/sk98lin/skgepnmi.c
--- a/drivers/net/sk98lin/skgepnmi.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/net/sk98lin/skgepnmi.c	Thu Apr  1 00:48:06 2004
@@ -7684,7 +7684,7 @@
 			 to the low-power state.
 			 A miniport driver must always return NDIS_STATUS_SUCCESS
 			 to a query of OID_PNP_QUERY_POWER. */
-			*pLen = sizeof(SK_DEVICE_POWER_STATE);;
+			*pLen = sizeof(SK_DEVICE_POWER_STATE);
             RetCode = SK_PNMI_ERR_OK;
 			break;
 
diff -Nru a/drivers/net/typhoon.c b/drivers/net/typhoon.c
--- a/drivers/net/typhoon.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/net/typhoon.c	Thu Apr  1 00:48:06 2004
@@ -1318,7 +1318,7 @@
 	tp->rxHiRing.ringBase = (u8 *) tp->shared->rxHi;
 	tp->rxBuffRing.ringBase = (u8 *) tp->shared->rxBuff;
 	tp->cmdRing.ringBase = (u8 *) tp->shared->cmd;
-	tp->respRing.ringBase = (u8 *) tp->shared->resp;;
+	tp->respRing.ringBase = (u8 *) tp->shared->resp;
 
 	tp->txLoRing.writeRegister = TYPHOON_REG_TX_LO_READY;
 	tp->txHiRing.writeRegister = TYPHOON_REG_TX_HI_READY;
diff -Nru a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c
--- a/drivers/net/wan/pc300_drv.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/net/wan/pc300_drv.c	Thu Apr  1 00:48:06 2004
@@ -3661,7 +3661,7 @@
 			release_mem_region(card->hw.falcphys, card->hw.falcsize);
 		}
 		for (i = 0; i < card->hw.nchan; i++)
-			if (card->chan[i].d.dev);
+			if (card->chan[i].d.dev)
 				free_netdev(card->chan[i].d.dev);
 		if (card->hw.irq)
 			free_irq(card->hw.irq, card);
diff -Nru a/drivers/net/wireless/arlan-main.c b/drivers/net/wireless/arlan-main.c
--- a/drivers/net/wireless/arlan-main.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/net/wireless/arlan-main.c	Thu Apr  1 00:48:06 2004
@@ -1281,7 +1281,7 @@
 			priv->retransmissions = 0;
 			if (priv->Conf->tx_delay_ms)
 			{
-				priv->tx_done_delayed = jiffies + (priv->Conf->tx_delay_ms * HZ) / 1000 + 1;;
+				priv->tx_done_delayed = jiffies + (priv->Conf->tx_delay_ms * HZ) / 1000 + 1;
 			}
 			else
 			{
diff -Nru a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c
--- a/drivers/net/wireless/atmel.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/net/wireless/atmel.c	Thu Apr  1 00:48:06 2004
@@ -537,7 +537,7 @@
 	int channel;
 	int reg_domain;
 	int tx_rate;
-	int auto_tx_rate;;
+	int auto_tx_rate;
 	int rts_threshold;
 	int frag_threshold;
 	int long_retry, short_retry;
diff -Nru a/drivers/net/wireless/hermes.h b/drivers/net/wireless/hermes.h
--- a/drivers/net/wireless/hermes.h	Thu Apr  1 00:48:06 2004
+++ b/drivers/net/wireless/hermes.h	Thu Apr  1 00:48:06 2004
@@ -364,7 +364,7 @@
 /* Note that for the next two, the count is in 16-bit words, not bytes */
 static inline void hermes_read_words(struct hermes *hw, int off, void *buf, unsigned count)
 {
-	off = off << hw->reg_spacing;;
+	off = off << hw->reg_spacing;
 
 	if (hw->io_space) {
 		insw(hw->iobase + off, buf, count);
diff -Nru a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c
--- a/drivers/pci/hotplug/cpqphp_core.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/pci/hotplug/cpqphp_core.c	Thu Apr  1 00:48:06 2004
@@ -1342,7 +1342,7 @@
 	cpqhp_rom_start = ioremap(ROM_PHY_ADDR, ROM_PHY_LEN);
 	if (!cpqhp_rom_start) {
 		err ("Could not ioremap memory region for ROM\n");
-		retval = -EIO;;
+		retval = -EIO;
 		goto error;
 	}
 	
@@ -1353,14 +1353,14 @@
 	smbios_table = detect_SMBIOS_pointer(cpqhp_rom_start, cpqhp_rom_start + ROM_PHY_LEN);
 	if (!smbios_table) {
 		err ("Could not find the SMBIOS pointer in memory\n");
-		retval = -EIO;;
+		retval = -EIO;
 		goto error;
 	}
 
 	smbios_start = ioremap(readl(smbios_table + ST_ADDRESS), readw(smbios_table + ST_LENGTH));
 	if (!smbios_start) {
 		err ("Could not ioremap memory region taken from SMBIOS values\n");
-		retval = -EIO;;
+		retval = -EIO;
 		goto error;
 	}
 
diff -Nru a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
--- a/drivers/pci/hotplug/pciehp_hpc.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/pci/hotplug/pciehp_hpc.c	Thu Apr  1 00:48:06 2004
@@ -915,7 +915,7 @@
 		rc = hp_register_read_word(php_ctlr->pci_dev, SLOT_CTRL, temp_word);
 		if (rc) {
 			err("%s : hp_register_read_word SLOT_CTRL failed\n", __FUNCTION__);
-			return IRQ_NONE;;
+			return IRQ_NONE;
 		}
 
 		temp_word = (temp_word & ~HP_INTR_ENABLE) | 0x00;
@@ -923,7 +923,7 @@
 		rc = hp_register_write_word(php_ctlr->pci_dev, SLOT_CTRL, temp_word);
 		if (rc) {
 			err("%s : hp_register_write_word SLOT_CTRL failed\n", __FUNCTION__);
-			return IRQ_NONE;;
+			return IRQ_NONE;
 		}
 	}
 	
diff -Nru a/drivers/pcmcia/sa1100_pangolin.c b/drivers/pcmcia/sa1100_pangolin.c
--- a/drivers/pcmcia/sa1100_pangolin.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/pcmcia/sa1100_pangolin.c	Thu Apr  1 00:48:06 2004
@@ -54,7 +54,7 @@
 pangolin_pcmcia_socket_state(struct sa1100_pcmcia_socket *skt,
 			     struct pcmcia_state *state)
 {
-	unsigned long levels = GPLR;;
+	unsigned long levels = GPLR;
 
 	state->detect=((levels & GPIO_PCMCIA_CD)==0)?1:0;
 	state->ready=(levels & GPIO_PCMCIA_IRQ)?1:0;
diff -Nru a/drivers/s390/net/qeth.c b/drivers/s390/net/qeth.c
--- a/drivers/s390/net/qeth.c	Thu Apr  1 00:48:07 2004
+++ b/drivers/s390/net/qeth.c	Thu Apr  1 00:48:07 2004
@@ -5930,7 +5930,7 @@
 			LOW_WATERMARK_PACK);
 	/* first_element is the last buffer that we got back from hydra */
 	if (!switch_state && !last_pci_hit)
-		return;;
+		return;
 	QETH_DBF_CARD3(0, trace, "stchcw", card);
 	if (atomic_swap(&card->outbound_ringbuffer_lock[queue], QETH_LOCK_FLUSH)
 	    == QETH_LOCK_UNLOCKED) {
@@ -6883,7 +6883,7 @@
 
 	card->portname_required =
 	    ((!QETH_IDX_NO_PORTNAME_REQUIRED(card->dma_stuff->recbuf)) &&
-	     (card->type == QETH_CARD_TYPE_OSAE));;
+	     (card->type == QETH_CARD_TYPE_OSAE));
 
 	/*
 	 * however, as the portname indication of OSA is wrong, we have to
diff -Nru a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
--- a/drivers/s390/scsi/zfcp_erp.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/s390/scsi/zfcp_erp.c	Thu Apr  1 00:48:06 2004
@@ -2706,7 +2706,7 @@
 		ZFCP_LOG_INFO("error: Exchange of configuration data between "
 			      "the adapter %s and the device driver failed.\n",
 			      zfcp_get_busid_by_adapter(adapter));
-		retval = ZFCP_ERP_FAILED;;
+		retval = ZFCP_ERP_FAILED;
 	}
 
 	return retval;
diff -Nru a/drivers/scsi/aic7xxx/aic7770.c b/drivers/scsi/aic7xxx/aic7770.c
--- a/drivers/scsi/aic7xxx/aic7770.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/scsi/aic7xxx/aic7770.c	Thu Apr  1 00:48:06 2004
@@ -64,7 +64,7 @@
 static int aic7770_resume(struct ahc_softc *ahc);
 static int aha2840_load_seeprom(struct ahc_softc *ahc);
 static ahc_device_setup_t ahc_aic7770_VL_setup;
-static ahc_device_setup_t ahc_aic7770_EISA_setup;;
+static ahc_device_setup_t ahc_aic7770_EISA_setup;
 static ahc_device_setup_t ahc_aic7770_setup;
 
 struct aic7770_identity aic7770_ident_table[] =
diff -Nru a/drivers/scsi/cpqfcTSinit.c b/drivers/scsi/cpqfcTSinit.c
--- a/drivers/scsi/cpqfcTSinit.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/scsi/cpqfcTSinit.c	Thu Apr  1 00:48:06 2004
@@ -216,7 +216,7 @@
   cpqfcHBAdata->fcChip.InitializeTachyon = CpqTsInitializeTachLite;  
   cpqfcHBAdata->fcChip.LaserControl = CpqTsLaserControl;  
   cpqfcHBAdata->fcChip.ProcessIMQEntry = CpqTsProcessIMQEntry;
-  cpqfcHBAdata->fcChip.InitializeFrameManager = CpqTsInitializeFrameManager;;  
+  cpqfcHBAdata->fcChip.InitializeFrameManager = CpqTsInitializeFrameManager;
   cpqfcHBAdata->fcChip.ReadWriteWWN = CpqTsReadWriteWWN;
   cpqfcHBAdata->fcChip.ReadWriteNVRAM = CpqTsReadWriteNVRAM;
 
diff -Nru a/drivers/scsi/dec_esp.c b/drivers/scsi/dec_esp.c
--- a/drivers/scsi/dec_esp.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/scsi/dec_esp.c	Thu Apr  1 00:48:06 2004
@@ -378,7 +378,7 @@
 
 static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd * sp)
 {
-	return sp->SCp.this_residual;;
+	return sp->SCp.this_residual;
 }
 
 static void dma_dump_state(struct NCR_ESP *esp)
diff -Nru a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
--- a/drivers/scsi/dpt_i2o.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/scsi/dpt_i2o.c	Thu Apr  1 00:48:06 2004
@@ -2161,7 +2161,7 @@
 	(adpt_hba*)(host->hostdata[0]) = pHba;
 	pHba->host = host;
 
-	host->irq = pHba->pDev->irq;;
+	host->irq = pHba->pDev->irq;
 	/* no IO ports, so don't have to set host->io_port and 
 	 * host->n_io_port
 	 */
diff -Nru a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
--- a/drivers/scsi/gdth.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/scsi/gdth.c	Thu Apr  1 00:48:06 2004
@@ -1358,7 +1358,7 @@
         
         /* disable board interrupts, deinit services */
         gdth_writeb(0xff, &dp6_ptr->io.irqdel);
-        gdth_writeb(0x00, &dp6_ptr->io.irqen);;
+        gdth_writeb(0x00, &dp6_ptr->io.irqen);
         gdth_writeb(0x00, &dp6_ptr->u.ic.S_Status);
         gdth_writeb(0x00, &dp6_ptr->u.ic.Cmd_Index);
 
diff -Nru a/drivers/scsi/i91uscsi.c b/drivers/scsi/i91uscsi.c
--- a/drivers/scsi/i91uscsi.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/scsi/i91uscsi.c	Thu Apr  1 00:48:06 2004
@@ -2133,7 +2133,7 @@
 		tul_append_done_scb(pCurHcb, pCurScb);
 	}
 	for (i = 0; i < pCurHcb->HCS_MaxTar; i++) {
-		pCurHcb->HCS_Tcs[i].TCS_Flags &= ~(TCF_SYNC_DONE | TCF_WDTR_DONE);;
+		pCurHcb->HCS_Tcs[i].TCS_Flags &= ~(TCF_SYNC_DONE | TCF_WDTR_DONE);
 	}
 	return (-1);
 }
diff -Nru a/drivers/scsi/in2000.c b/drivers/scsi/in2000.c
--- a/drivers/scsi/in2000.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/scsi/in2000.c	Thu Apr  1 00:48:06 2004
@@ -2288,7 +2288,7 @@
 		return 0;	/* return 0 to signal end-of-file */
 	}
 	if (off > 0x40000)	/* ALWAYS stop after 256k bytes have been read */
-		stop = 1;;
+		stop = 1;
 	if (hd->proc & PR_STOP)	/* stop every other time */
 		stop = 1;
 	return strlen(bp);
diff -Nru a/drivers/scsi/pci2000.c b/drivers/scsi/pci2000.c
--- a/drivers/scsi/pci2000.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/scsi/pci2000.c	Thu Apr  1 00:48:06 2004
@@ -320,7 +320,7 @@
 
 	outb_p (0xFF, padapter->tag);												// clear the op interrupt
 	outb_p (CMD_DONE, padapter->cmd);											// complete the op
-	goto irq_return;;															// done, but, with what?
+	goto irq_return;															// done, but, with what?
 
 unmapProceed:;
 	if ( !bus )
diff -Nru a/drivers/scsi/pci2220i.c b/drivers/scsi/pci2220i.c
--- a/drivers/scsi/pci2220i.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/scsi/pci2220i.c	Thu Apr  1 00:48:06 2004
@@ -1389,7 +1389,7 @@
 			 (pdev->DiskMirror[0].pairIdentifier == (pdev->DiskMirror[1].pairIdentifier ^ 1)) )
 			{
 			if ( (pdev->DiskMirror[0].status & UCBF_MATCHED) && (pdev->DiskMirror[1].status & UCBF_MATCHED) )
-				break;;
+				break;
 
 			if ( pdev->DiskMirror[0].status & UCBF_SURVIVOR )				// is first drive survivor?
 				testsize = SetReconstruct (pdev, 0);
@@ -2613,7 +2613,7 @@
 	
 		if ( ++Installed < MAXADAPTER )
 			continue;
-		break;;
+		break;
 unregister:;
 		scsi_unregister (pshost);
 		}
@@ -2747,7 +2747,7 @@
 		
 		if ( ++Installed < MAXADAPTER )
 			continue;
-		break;;
+		break;
 unregister1:;
 		scsi_unregister (pshost);
 		}
diff -Nru a/drivers/scsi/qlogicfas.c b/drivers/scsi/qlogicfas.c
--- a/drivers/scsi/qlogicfas.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/scsi/qlogicfas.c	Thu Apr  1 00:48:06 2004
@@ -501,7 +501,7 @@
 			release_region(qbase, 0x10);
 		}
 		if (qbase == 0x430)
-			return NULL;;
+			return NULL;
 	} else
 		printk(KERN_INFO "Ql: Using preset base address of %03x\n", qbase);
 
diff -Nru a/drivers/scsi/qlogicfc.c b/drivers/scsi/qlogicfc.c
--- a/drivers/scsi/qlogicfc.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/scsi/qlogicfc.c	Thu Apr  1 00:48:06 2004
@@ -1778,7 +1778,7 @@
 
 	LEAVE("isp2x00_reset");
 
-	return return_status;;
+	return return_status;
 }
 
 
diff -Nru a/drivers/scsi/qlogicisp.c b/drivers/scsi/qlogicisp.c
--- a/drivers/scsi/qlogicisp.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/scsi/qlogicisp.c	Thu Apr  1 00:48:06 2004
@@ -1230,7 +1230,7 @@
 
 	LEAVE("isp1020_reset");
 
-	return return_status;;
+	return return_status;
 }
 
 
diff -Nru a/drivers/scsi/sata_via.c b/drivers/scsi/sata_via.c
--- a/drivers/scsi/sata_via.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/scsi/sata_via.c	Thu Apr  1 00:48:06 2004
@@ -39,9 +39,10 @@
 enum {
 	via_sata		= 0,
 
-	SATA_CHAN_ENAB		= 0x40,
-	SATA_INT_GATE		= 0x41,
-	SATA_NATIVE_MODE	= 0x42,
+	SATA_CHAN_ENAB		= 0x40, /* SATA channel enable */
+	SATA_INT_GATE		= 0x41, /* SATA interrupt gating */
+	SATA_NATIVE_MODE	= 0x42, /* Native mode enable */
+	SATA_PATA_SHARING	= 0x49, /* PATA/SATA sharing func ctrl */
 
 	PORT0			= (1 << 1),
 	PORT1			= (1 << 0),
@@ -51,6 +52,9 @@
 	INT_GATE_ALL		= PORT0 | PORT1,
 
 	NATIVE_MODE_ALL		= (1 << 7) | (1 << 6) | (1 << 5) | (1 << 4),
+
+	SATA_EXT_PHY		= (1 << 6), /* 0==use PATA, 1==ext phy */
+	SATA_2DEV		= (1 << 5), /* SATA is master/slave */
 };
 
 static int svia_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
@@ -136,13 +140,7 @@
 
 static unsigned long svia_scr_addr(unsigned long addr, unsigned int port)
 {
-	if (port >= 4)
-		return 0;	/* invalid port */
-
-	addr &= ~((1 << 7) | (1 << 6));
-	addr |= ((unsigned long)port << 6);
-
-	return addr;
+	return addr + (port * 128);
 }
 
 /**
@@ -175,6 +173,13 @@
 	if (rc)
 		goto err_out;
 
+	pci_read_config_byte(pdev, SATA_PATA_SHARING, &tmp8);
+	if (tmp8 & SATA_2DEV) {
+		printk(KERN_ERR DRV_NAME "(%s): SATA master/slave not supported (0x%x)\n",
+		       pci_name(pdev), (int) tmp8);
+		rc = -EIO;
+		goto err_out_regions;
+	}
 
 	for (i = 0; i < ARRAY_SIZE(svia_bar_sizes); i++)
 		if ((pci_resource_start(pdev, i) == 0) ||
diff -Nru a/drivers/scsi/scsiiom.c b/drivers/scsi/scsiiom.c
--- a/drivers/scsi/scsiiom.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/scsi/scsiiom.c	Thu Apr  1 00:48:06 2004
@@ -1674,7 +1674,7 @@
 #endif	
 	    psrb  = psrb2;
 	}
-	pdcb->GoingSRBCnt = 0;;
+	pdcb->GoingSRBCnt = 0;
 	pdcb->pGoingSRB = NULL;
 	pdcb->TagMask = 0;
 	pdcb = pdcb->pNextDCB;
diff -Nru a/drivers/scsi/wd33c93.c b/drivers/scsi/wd33c93.c
--- a/drivers/scsi/wd33c93.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/scsi/wd33c93.c	Thu Apr  1 00:48:06 2004
@@ -2056,7 +2056,7 @@
 		return 0;
 	}
 	if (off > 0x40000)	/* ALWAYS stop after 256k bytes have been read */
-		stop = 1;;
+		stop = 1;
 	if (hd->proc & PR_STOP)	/* stop every other time */
 		stop = 1;
 	return strlen(bp);
diff -Nru a/drivers/usb/media/se401.c b/drivers/usb/media/se401.c
--- a/drivers/usb/media/se401.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/usb/media/se401.c	Thu Apr  1 00:48:06 2004
@@ -369,7 +369,7 @@
 				se401->scratch_overflow=0;
 				se401->scratch_next++;
 				if (se401->scratch_next>=SE401_NUMSCRATCH)
-					se401->scratch_next=0;;
+					se401->scratch_next=0;
 				break;
 			}
 		}
diff -Nru a/drivers/usb/media/stv680.c b/drivers/usb/media/stv680.c
--- a/drivers/usb/media/stv680.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/usb/media/stv680.c	Thu Apr  1 00:48:06 2004
@@ -641,7 +641,7 @@
 			stv680->scratch_overflow = 0;
 			stv680->scratch_next++;
 			if (stv680->scratch_next >= STV680_NUMSCRATCH)
-				stv680->scratch_next = 0;;
+				stv680->scratch_next = 0;
 			break;
 		}		/* switch  */
 	} else {
diff -Nru a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c
--- a/drivers/usb/serial/empeg.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/usb/serial/empeg.c	Thu Apr  1 00:48:06 2004
@@ -155,7 +155,7 @@
 static int empeg_open (struct usb_serial_port *port, struct file *filp)
 {
 	struct usb_serial *serial = port->serial;
-	int result = 0;;
+	int result = 0;
 
 	if (port_paranoia_check (port, __FUNCTION__))
 		return -ENODEV;
diff -Nru a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
--- a/drivers/usb/serial/mct_u232.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/usb/serial/mct_u232.c	Thu Apr  1 00:48:06 2004
@@ -511,7 +511,7 @@
 
 	/* only do something if we have a bulk out endpoint */
 	if (!serial->num_bulk_out)
-		return(0);;
+		return(0);
 	
 	/* another write is still pending? */
 	if (port->write_urb->status == -EINPROGRESS) {
diff -Nru a/drivers/video/aty/radeon_monitor.c b/drivers/video/aty/radeon_monitor.c
--- a/drivers/video/aty/radeon_monitor.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/video/aty/radeon_monitor.c	Thu Apr  1 00:48:06 2004
@@ -640,21 +640,21 @@
 #ifdef CONFIG_PPC_OF
 	/* iBook2's */
 	if (machine_is_compatible("PowerBook4,3")) {
-		rinfo->panel_info.ref_divider = rinfo->pll.ref_div;;
+		rinfo->panel_info.ref_divider = rinfo->pll.ref_div;
 		rinfo->panel_info.post_divider = 0x6;
 		rinfo->panel_info.fbk_divider = 0xad;
 		rinfo->panel_info.use_bios_dividers = 1;
 	}
 	/* Aluminium PowerBook 17" */
 	if (machine_is_compatible("PowerBook5,3")) {
-		rinfo->panel_info.ref_divider = rinfo->pll.ref_div;;
+		rinfo->panel_info.ref_divider = rinfo->pll.ref_div;
 		rinfo->panel_info.post_divider = 0x4;
 		rinfo->panel_info.fbk_divider = 0x80;
 		rinfo->panel_info.use_bios_dividers = 1;
 	}
 	/* iBook G4 */
 	if (machine_is_compatible("PowerBook6,3")) {
-		rinfo->panel_info.ref_divider = rinfo->pll.ref_div;;
+		rinfo->panel_info.ref_divider = rinfo->pll.ref_div;
 		rinfo->panel_info.post_divider = 0x6;
 		rinfo->panel_info.fbk_divider = 0xad;
 		rinfo->panel_info.use_bios_dividers = 1;
diff -Nru a/drivers/video/fbmon.c b/drivers/video/fbmon.c
--- a/drivers/video/fbmon.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/video/fbmon.c	Thu Apr  1 00:48:06 2004
@@ -899,7 +899,7 @@
  */
 static u32 fb_get_hblank_by_dclk(u32 dclk, u32 xres)
 {
-	u32 duty_cycle, h_period, hblank;;
+	u32 duty_cycle, h_period, hblank;
 
 	dclk /= 1000;
 	h_period = 100 - C_VAL;
diff -Nru a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c
--- a/drivers/video/i810/i810_main.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/video/i810/i810_main.c	Thu Apr  1 00:48:06 2004
@@ -281,7 +281,7 @@
 static void i810_load_2d(struct i810fb_par *par)
 {
 	u32 tmp;
-	u8 tmp8, *mmio = par->mmio_start_virtual;;
+	u8 tmp8, *mmio = par->mmio_start_virtual;
 
   	i810_writel(FW_BLC, mmio, par->watermark); 
 	tmp = i810_readl(PIXCONF, mmio);
diff -Nru a/drivers/video/sis/init301.c b/drivers/video/sis/init301.c
--- a/drivers/video/sis/init301.c	Thu Apr  1 00:48:06 2004
+++ b/drivers/video/sis/init301.c	Thu Apr  1 00:48:06 2004
@@ -2313,7 +2313,7 @@
 
 #ifdef SIS315H
 
-        unsigned char bridgerev = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x01);;
+        unsigned char bridgerev = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x01);
 
 	/* The following is nearly unpreditable and varies from machine
 	 * to machine. Especially the 301DH seems to be a real trouble
diff -Nru a/fs/aio.c b/fs/aio.c
--- a/fs/aio.c	Thu Apr  1 00:48:06 2004
+++ b/fs/aio.c	Thu Apr  1 00:48:06 2004
@@ -798,8 +798,8 @@
 
 static int read_events(struct kioctx *ctx,
 			long min_nr, long nr,
-			struct io_event *event,
-			struct timespec *timeout)
+			struct io_event __user *event,
+			struct timespec __user *timeout)
 {
 	long			start_jiffies = jiffies;
 	struct task_struct	*tsk = current;
@@ -991,7 +991,7 @@
 	struct kiocb *req;
 	struct file *file;
 	ssize_t ret;
-	char *buf;
+	char __user *buf;
 
 	/* enforce forwards compatibility on users */
 	if (unlikely(iocb->aio_reserved1 || iocb->aio_reserved2 ||
@@ -1032,7 +1032,7 @@
 	req->ki_user_data = iocb->aio_data;
 	req->ki_pos = iocb->aio_offset;
 
-	buf = (char *)(unsigned long)iocb->aio_buf;
+	buf = (char __user *)(unsigned long)iocb->aio_buf;
 
 	switch (iocb->aio_lio_opcode) {
 	case IOCB_CMD_PREAD:
@@ -1148,7 +1148,7 @@
  *	Finds a given iocb for cancellation.
  *	MUST be called with ctx->ctx_lock held.
  */
-struct kiocb *lookup_kiocb(struct kioctx *ctx, struct iocb *iocb, u32 key)
+struct kiocb *lookup_kiocb(struct kioctx *ctx, struct iocb __user *iocb, u32 key)
 {
 	struct list_head *pos;
 	/* TODO: use a hash or array, this sucks. */
@@ -1170,8 +1170,8 @@
  *	invalid.  May fail with -EAGAIN if the iocb specified was not
  *	cancelled.  Will fail with -ENOSYS if not implemented.
  */
-asmlinkage long sys_io_cancel(aio_context_t ctx_id, struct iocb *iocb,
-			      struct io_event *result)
+asmlinkage long sys_io_cancel(aio_context_t ctx_id, struct iocb __user *iocb,
+			      struct io_event __user *result)
 {
 	int (*cancel)(struct kiocb *iocb, struct io_event *res);
 	struct kioctx *ctx;
@@ -1234,17 +1234,15 @@
 asmlinkage long sys_io_getevents(aio_context_t ctx_id,
 				 long min_nr,
 				 long nr,
-				 struct io_event *events,
-				 struct timespec *timeout)
+				 struct io_event __user *events,
+				 struct timespec __user *timeout)
 {
 	struct kioctx *ioctx = lookup_ioctx(ctx_id);
 	long ret = -EINVAL;
 
-	if (unlikely(min_nr > nr || min_nr < 0 || nr < 0))
-		return ret;
-
-	if (likely(NULL != ioctx)) {
-		ret = read_events(ioctx, min_nr, nr, events, timeout);
+	if (likely(ioctx)) {
+		if (likely(min_nr <= nr && min_nr >= 0 && nr >= 0))
+			ret = read_events(ioctx, min_nr, nr, events, timeout);
 		put_ioctx(ioctx);
 	}
 
diff -Nru a/fs/bio.c b/fs/bio.c
--- a/fs/bio.c	Thu Apr  1 00:48:06 2004
+++ b/fs/bio.c	Thu Apr  1 00:48:06 2004
@@ -701,11 +701,12 @@
 {
 	struct bio_pair *bp = container_of(bi, struct bio_pair, bio1);
 
-	if (bi->bi_size)
-		return 1;
 	if (err)
 		bp->error = err;
 
+	if (bi->bi_size)
+		return 1;
+
 	bio_pair_release(bp);
 	return 0;
 }
@@ -714,10 +715,11 @@
 {
 	struct bio_pair *bp = container_of(bi, struct bio_pair, bio2);
 
-	if (bi->bi_size)
-		return 1;
 	if (err)
 		bp->error = err;
+
+	if (bi->bi_size)
+		return 1;
 
 	bio_pair_release(bp);
 	return 0;
diff -Nru a/fs/cifs/connect.c b/fs/cifs/connect.c
--- a/fs/cifs/connect.c	Thu Apr  1 00:48:06 2004
+++ b/fs/cifs/connect.c	Thu Apr  1 00:48:06 2004
@@ -116,7 +116,7 @@
 	if(server->ssocket) {
 		cFYI(1,("State: 0x%x Flags: 0x%lx", server->ssocket->state,
 			server->ssocket->flags));
-		server->ssocket->ops->shutdown(server->ssocket,SEND_SHUTDOWN);;
+		server->ssocket->ops->shutdown(server->ssocket,SEND_SHUTDOWN);
 		cFYI(1,("Post shutdown state: 0x%x Flags: 0x%lx", server->ssocket->state,
 			server->ssocket->flags));
 		sock_release(server->ssocket);
diff -Nru a/fs/intermezzo/file.c b/fs/intermezzo/file.c
--- a/fs/intermezzo/file.c	Thu Apr  1 00:48:06 2004
+++ b/fs/intermezzo/file.c	Thu Apr  1 00:48:06 2004
@@ -82,7 +82,7 @@
                 info.remote_generation = dd->remote_generation;
         } else
                 CERROR("get_fileid failed %d, ino: %Lx, fetching by name\n", rc,
-                       dd->remote_ino);
+                       (unsigned long long) dd->remote_ino);
 
         rc = izo_upc_open(minor, pathlen, path, fset->fset_name, &info);
         PRESTO_FREE(buffer, PAGE_SIZE);
@@ -380,7 +380,7 @@
                 << file->f_dentry->d_inode->i_sb->s_blocksize_bits);
 
         error = presto_reserve_space(fset->fset_cache, res_size); 
-        CDEBUG(D_INODE, "Reserved %Ld for %d\n", res_size, size); 
+        CDEBUG(D_INODE, "Reserved %Ld for %Zd\n", res_size, size);
         if ( error ) { 
                 EXIT;
                 return -ENOSPC;
@@ -440,7 +440,7 @@
         fops = filter_c2cffops(cache->cache_filter);
         res = fops->write(file, buf, size, off);
         if ( res != size ) {
-                CDEBUG(D_FILE, "file write returns short write: size %d, res %d\n", size, res); 
+                CDEBUG(D_FILE, "file write returns short write: size %Zd, res %Zd\n", size, res); 
         }
 
         if ( (res > 0) && fdata ) 
diff -Nru a/fs/intermezzo/fileset.c b/fs/intermezzo/fileset.c
--- a/fs/intermezzo/fileset.c	Thu Apr  1 00:48:06 2004
+++ b/fs/intermezzo/fileset.c	Thu Apr  1 00:48:06 2004
@@ -647,8 +647,9 @@
         CDEBUG(D_FILE,"de:%p dd:%p\n", dentry, dd);
 
         if (dd->remote_ino != 0) {
-                CERROR("remote_ino already set? %Lx:%Lx\n", dd->remote_ino,
-                       dd->remote_generation);
+                CERROR("remote_ino already set? %Lx:%Lx\n",
+                       (unsigned long long) dd->remote_ino,
+                       (unsigned long long) dd->remote_generation);
                 rc = 0;
                 EXIT;
                 goto out_close;
@@ -656,8 +657,9 @@
 
 
         CDEBUG(D_FILE,"setting %p %p, %s to %Lx:%Lx\n", dentry, dd, 
-               buf, data->ioc_ino,
-               data->ioc_generation);
+               buf,
+               (unsigned long long) data->ioc_ino,
+               (unsigned long long) data->ioc_generation);
         dd->remote_ino = data->ioc_ino;
         dd->remote_generation = data->ioc_generation;
 
diff -Nru a/fs/intermezzo/journal.c b/fs/intermezzo/journal.c
--- a/fs/intermezzo/journal.c	Thu Apr  1 00:48:06 2004
+++ b/fs/intermezzo/journal.c	Thu Apr  1 00:48:06 2004
@@ -1470,7 +1470,7 @@
                 return 0;
         }
 
-        CDEBUG(D_JOURNAL, "reading prefix: off %ld, size %d\n", 
+        CDEBUG(D_JOURNAL, "reading prefix: off %ld, size %Zd\n", 
                (long)lml_offset, sizeof(record));
         rc = presto_fread(fset->fset_lml.fd_file, (char *)&record,
                           sizeof(record), &offset);
@@ -1621,7 +1621,7 @@
         /* journal_log_suffix expects journal_log to set this */
         suffix->recno = 0;
 
-        CDEBUG(D_FILE, "actual kml size: %d\n", logrecord - record);
+        CDEBUG(D_FILE, "actual kml size: %Zd\n", logrecord - record);
         CDEBUG(D_FILE, "get fileid: uid %d, gid %d, path: %s\n", uid, gid,path);
 
         error = izo_upc_get_fileid(minor, size, record, 
diff -Nru a/fs/intermezzo/journal_xfs.c b/fs/intermezzo/journal_xfs.c
--- a/fs/intermezzo/journal_xfs.c	Thu Apr  1 00:48:06 2004
+++ b/fs/intermezzo/journal_xfs.c	Thu Apr  1 00:48:06 2004
@@ -57,7 +57,7 @@
         VFS_STATVFS(vfsp, &stat, NULL, rc);
         avail = statp.f_bfree;
 
-        return sbp->sb_fdblocks;; 
+        return sbp->sb_fdblocks;
 #endif
         return 0x0fffffff;
 }
diff -Nru a/fs/intermezzo/kml_reint.c b/fs/intermezzo/kml_reint.c
--- a/fs/intermezzo/kml_reint.c	Thu Apr  1 00:48:06 2004
+++ b/fs/intermezzo/kml_reint.c	Thu Apr  1 00:48:06 2004
@@ -162,7 +162,8 @@
                          */
                         if (error == ENOENT) {
                                 CDEBUG(D_KML, "manually updating remote offset uuid %s"
-                                       "recno %d offset %Lu\n", info.uuid, info.recno, info.kml_offset);
+                                       "recno %d offset %Lu\n", info.uuid, info.recno,
+                                       (unsigned long long) info.kml_offset);
                                 error = izo_rcvd_upd_remote(fset, info.uuid, info.recno, info.kml_offset);
                                 if(error)
                                         CERROR("izo_rcvd_upd_remote error %d\n", error);
@@ -528,7 +529,7 @@
 
         if (rec.suffix->recno != lr_rec.lr_remote_recno + 1) {
                 CERROR("KML record number %Lu expected, not %d\n",
-                       lr_rec.lr_remote_recno + 1,
+                       (unsigned long long) (lr_rec.lr_remote_recno + 1),
                        rec.suffix->recno);
 
 #if 0
@@ -631,8 +632,9 @@
         data->ioc_generation = file->f_dentry->d_inode->i_generation; 
         filp_close(file, 0); 
 
-        CDEBUG(D_FILE, "%s ino %Lx, gen %Lx\n", rec.path, 
-               data->ioc_ino, data->ioc_generation);
+        CDEBUG(D_FILE, "%s ino %Lx, gen %Lx\n", rec.path,
+               (unsigned long long) data->ioc_ino,
+               (unsigned long long) data->ioc_generation);
 
  out:
         if (buf) 
diff -Nru a/fs/intermezzo/psdev.c b/fs/intermezzo/psdev.c
--- a/fs/intermezzo/psdev.c	Thu Apr  1 00:48:06 2004
+++ b/fs/intermezzo/psdev.c	Thu Apr  1 00:48:06 2004
@@ -227,7 +227,7 @@
 
         /* move data into response buffer. */
         if (req->rq_bufsize < count) {
-                CERROR("psdev_write: too much cnt: %d, cnt: %d, "
+                CERROR("psdev_write: too much cnt: %d, cnt: %Zd, "
                        "opc: %d, uniq: %d.\n",
                        req->rq_bufsize, count, hdr.opcode, hdr.unique);
                 count = req->rq_bufsize; /* don't have more space! */
@@ -281,7 +281,7 @@
         }
 
         if (count < req->rq_bufsize) {
-                CERROR ("psdev_read: buffer too small, read %d of %d bytes\n",
+                CERROR ("psdev_read: buffer too small, read %Zd of %d bytes\n",
                         count, req->rq_bufsize);
         }
 
@@ -592,8 +592,8 @@
                req->rq_opcode, jiffies - req->rq_posttime,
                req->rq_unique, req->rq_rep_size);
         CDEBUG(D_UPCALL,
-               "..process %d woken up by Lento for req at 0x%x, data at %x\n",
-               current->pid, (int)req, (int)req->rq_data);
+               "..process %d woken up by Lento for req at 0x%p, data at %p\n",
+               current->pid, req, req->rq_data);
 
         if (channel->uc_pid) {      /* i.e. Lento is still alive */
           /* Op went through, interrupt or not we go on */
diff -Nru a/fs/intermezzo/upcall.c b/fs/intermezzo/upcall.c
--- a/fs/intermezzo/upcall.c	Thu Apr  1 00:48:06 2004
+++ b/fs/intermezzo/upcall.c	Thu Apr  1 00:48:06 2004
@@ -142,7 +142,10 @@
 
         CDEBUG(D_UPCALL, "KML: fileset %s, offset %Lu, length %Lu, "
                "first %u, last %d; minor %d\n",
-               fsetname, hdr->u_offset, hdr->u_length, hdr->u_first_recno,
+               fsetname,
+               (unsigned long long) hdr->u_offset,
+               (unsigned long long) hdr->u_length,
+               hdr->u_first_recno,
                hdr->u_last_recno, minor);
 
         error = izo_upc_upcall(minor, &size, hdr, ASYNCHRONOUS);
@@ -174,7 +177,9 @@
 
         CDEBUG(D_UPCALL, "KML TRUNCATE: fileset %s, length %Lu, "
                "last recno %d, minor %d\n",
-               fsetname, hdr->u_length, hdr->u_last_recno, minor);
+               fsetname,
+               (unsigned long long) hdr->u_length,
+               hdr->u_last_recno, minor);
 
         error = izo_upc_upcall(minor, &size, hdr, ASYNCHRONOUS);
 
diff -Nru a/fs/readdir.c b/fs/readdir.c
--- a/fs/readdir.c	Thu Apr  1 00:48:06 2004
+++ b/fs/readdir.c	Thu Apr  1 00:48:06 2004
@@ -162,7 +162,7 @@
 	if (__put_user(d_type, (char *) dirent + reclen - 1))
 		goto efault;
 	buf->previous = dirent;
-	dirent = (void *)dirent + reclen;
+	dirent = (void __user *)dirent + reclen;
 	buf->current_dir = dirent;
 	buf->count -= reclen;
 	return 0;
@@ -248,7 +248,7 @@
 	if (__put_user(0, dirent->d_name + namlen))
 		goto efault;
 	buf->previous = dirent;
-	dirent = (void *)dirent + reclen;
+	dirent = (void __user *)dirent + reclen;
 	buf->current_dir = dirent;
 	buf->count -= reclen;
 	return 0;
diff -Nru a/fs/smbfs/sock.c b/fs/smbfs/sock.c
--- a/fs/smbfs/sock.c	Thu Apr  1 00:48:06 2004
+++ b/fs/smbfs/sock.c	Thu Apr  1 00:48:06 2004
@@ -350,7 +350,7 @@
 	fs = get_fs();
 	set_fs(get_ds());
 
-	flags = MSG_DONTWAIT | MSG_NOSIGNAL;;
+	flags = MSG_DONTWAIT | MSG_NOSIGNAL;
 	msg.msg_flags = flags;
 	msg.msg_name = NULL;
 	msg.msg_namelen = 0;
diff -Nru a/fs/sysfs/dir.c b/fs/sysfs/dir.c
--- a/fs/sysfs/dir.c	Thu Apr  1 00:48:06 2004
+++ b/fs/sysfs/dir.c	Thu Apr  1 00:48:06 2004
@@ -20,18 +20,6 @@
 	return 0;
 }
 
-static void sysfs_d_iput(struct dentry * dentry, struct inode * inode)
-{
-	struct kobject * kobj = dentry->d_fsdata;
-
-	if (kobj)
-		kobject_put(kobj);
-	iput(inode);
-}
-
-static struct dentry_operations sysfs_dentry_operations = {
-	.d_iput	= &sysfs_d_iput,
-};
 
 static int create_dir(struct kobject * k, struct dentry * p,
 		      const char * n, struct dentry ** d)
@@ -45,8 +33,7 @@
 					 S_IFDIR| S_IRWXU | S_IRUGO | S_IXUGO,
 					 init_dir);
 		if (!error) {
-			(*d)->d_op = &sysfs_dentry_operations;
-			(*d)->d_fsdata = kobject_get(k);
+			(*d)->d_fsdata = k;
 			p->d_inode->i_nlink++;
 		}
 		dput(*d);
diff -Nru a/fs/xfs/linux/kmem.h b/fs/xfs/linux/kmem.h
--- a/fs/xfs/linux/kmem.h	Thu Apr  1 00:48:07 2004
+++ b/fs/xfs/linux/kmem.h	Thu Apr  1 00:48:07 2004
@@ -55,15 +55,23 @@
 
 typedef unsigned long xfs_pflags_t;
 
-#define PFLAGS_TEST_FSTRANS()		(current->flags & PF_FSTRANS)
+#define PFLAGS_TEST_FSTRANS()           (current->flags & PF_FSTRANS)
 
+/* these could be nested, so we save state */
 #define PFLAGS_SET_FSTRANS(STATEP) do {	\
 	*(STATEP) = current->flags;	\
 	current->flags |= PF_FSTRANS;	\
 } while (0)
 
-#define PFLAGS_RESTORE(STATEP) do {	\
-	current->flags = *(STATEP);	\
+#define PFLAGS_CLEAR_FSTRANS(STATEP) do { \
+	*(STATEP) = current->flags;	\
+	current->flags &= ~PF_FSTRANS;	\
+} while (0)
+
+/* Restore the PF_FSTRANS state to what was saved in STATEP */
+#define PFLAGS_RESTORE_FSTRANS(STATEP) do {     		\
+	current->flags = ((current->flags & ~PF_FSTRANS) |	\
+			  (*(STATEP) & PF_FSTRANS));		\
 } while (0)
 
 #define PFLAGS_DUP(OSTATEP, NSTATEP) do { \
diff -Nru a/fs/xfs/linux/mrlock.h b/fs/xfs/linux/mrlock.h
--- a/fs/xfs/linux/mrlock.h	Thu Apr  1 00:48:06 2004
+++ b/fs/xfs/linux/mrlock.h	Thu Apr  1 00:48:06 2004
@@ -88,6 +88,7 @@
 	downgrade_write(&mrp->mr_lock);
 }
 
+#ifdef DEBUG
 /*
  * Debug-only routine, without some platform-specific asm code, we can
  * now only answer requests regarding whether we hold the lock for write
@@ -96,9 +97,10 @@
  */
 static inline int ismrlocked(mrlock_t *mrp, int type)
 {
-	if (type == MR_UPDATE)
+	if (mrp && type == MR_UPDATE)
 		return mrp->mr_writer;
 	return 1;
 }
+#endif
 
 #endif /* __XFS_SUPPORT_MRLOCK_H__ */
diff -Nru a/fs/xfs/linux/xfs_aops.c b/fs/xfs/linux/xfs_aops.c
--- a/fs/xfs/linux/xfs_aops.c	Thu Apr  1 00:48:06 2004
+++ b/fs/xfs/linux/xfs_aops.c	Thu Apr  1 00:48:06 2004
@@ -717,7 +717,8 @@
 	struct buffer_head	*bh_arr[MAX_BUF_PER_PAGE], *bh, *head;
 	xfs_iomap_t		*iomp, iomap;
 	unsigned long		p_offset = 0, end_index;
-	loff_t			offset, end_offset;
+	loff_t			offset;
+	unsigned long long	end_offset;
 	int			len, err, i, cnt = 0, uptodate = 1;
 	int			flags = startio ? 0 : BMAPI_TRYLOCK;
 	int			page_dirty = 1;
@@ -734,9 +735,8 @@
 	}
 
 	offset = (loff_t)page->index << PAGE_CACHE_SHIFT;
-	end_offset = offset + PAGE_CACHE_SIZE;
-	if (end_offset > i_size_read(inode))
-		end_offset = i_size_read(inode);
+	end_offset = min_t(unsigned long long,
+			offset + PAGE_CACHE_SIZE, i_size_read(inode));
 
 	bh = head = page_buffers(page);
 	iomp = NULL;
diff -Nru a/fs/xfs/linux/xfs_file.c b/fs/xfs/linux/xfs_file.c
--- a/fs/xfs/linux/xfs_file.c	Thu Apr  1 00:48:06 2004
+++ b/fs/xfs/linux/xfs_file.c	Thu Apr  1 00:48:06 2004
@@ -68,16 +68,15 @@
 {
 	struct iovec		iov = {buf, count};
 	struct file		*file = iocb->ki_filp;
-	vnode_t			*vp;
-	int			error;
+	vnode_t			*vp = LINVFS_GET_VP(file->f_dentry->d_inode);
+	ssize_t			rval;
 
 	BUG_ON(iocb->ki_pos != pos);
 
 	if (unlikely(file->f_flags & O_DIRECT))
 		ioflags |= IO_ISDIRECT;
-	vp = LINVFS_GET_VP(file->f_dentry->d_inode);
-	VOP_READ(vp, iocb, &iov, 1, &iocb->ki_pos, ioflags, NULL, error);
-	return error;
+	VOP_READ(vp, iocb, &iov, 1, &iocb->ki_pos, ioflags, NULL, rval);
+	return rval;
 }
 
 
@@ -114,20 +113,21 @@
 	struct file	*file = iocb->ki_filp;
 	struct inode	*inode = file->f_mapping->host;
 	vnode_t		*vp = LINVFS_GET_VP(inode);
-	int		error;
+	ssize_t		rval;
 
 	BUG_ON(iocb->ki_pos != pos);
 	if (unlikely(file->f_flags & O_DIRECT)) {
 		ioflags |= IO_ISDIRECT;
 		VOP_WRITE(vp, iocb, &iov, 1, &iocb->ki_pos,
-				ioflags, NULL, error);
+				ioflags, NULL, rval);
 	} else {
 		down(&inode->i_sem);
 		VOP_WRITE(vp, iocb, &iov, 1, &iocb->ki_pos,
-				ioflags, NULL, error);
+				ioflags, NULL, rval);
 		up(&inode->i_sem);
 	}
-	return error;
+
+	return rval;
 }
 
 
@@ -163,19 +163,19 @@
 	struct inode	*inode = file->f_mapping->host;
 	vnode_t		*vp = LINVFS_GET_VP(inode);
 	struct		kiocb kiocb;
-	int		error;
+	ssize_t		rval;
 
 	init_sync_kiocb(&kiocb, file);
 	kiocb.ki_pos = *ppos;
 
 	if (unlikely(file->f_flags & O_DIRECT))
 		ioflags |= IO_ISDIRECT;
-	VOP_READ(vp, &kiocb, iov, nr_segs, &kiocb.ki_pos, ioflags, NULL, error);
-	if (-EIOCBQUEUED == error)
-		error = wait_on_sync_kiocb(&kiocb);
-	*ppos = kiocb.ki_pos;
+	VOP_READ(vp, &kiocb, iov, nr_segs, &kiocb.ki_pos, ioflags, NULL, rval);
+	if (rval == -EIOCBQUEUED)
+		rval = wait_on_sync_kiocb(&kiocb);
 
-	return error;
+	*ppos = kiocb.ki_pos;
+	return rval;
 }
 
 STATIC ssize_t
@@ -210,25 +210,26 @@
 	struct inode	*inode = file->f_mapping->host;
 	vnode_t		*vp = LINVFS_GET_VP(inode);
 	struct		kiocb kiocb;
-	int		error;
+	ssize_t		rval;
 
 	init_sync_kiocb(&kiocb, file);
 	kiocb.ki_pos = *ppos;
 	if (unlikely(file->f_flags & O_DIRECT)) {
 		ioflags |= IO_ISDIRECT;
 		VOP_WRITE(vp, &kiocb, iov, nr_segs, &kiocb.ki_pos,
-				ioflags, NULL, error);
+				ioflags, NULL, rval);
 	} else {
 		down(&inode->i_sem);
 		VOP_WRITE(vp, &kiocb, iov, nr_segs, &kiocb.ki_pos,
-				ioflags, NULL, error);
+				ioflags, NULL, rval);
 		up(&inode->i_sem);
 	}
-	if (-EIOCBQUEUED == error)
-		error = wait_on_sync_kiocb(&kiocb);
-	*ppos = kiocb.ki_pos;
 
-	return error;
+	if (rval == -EIOCBQUEUED)
+		rval = wait_on_sync_kiocb(&kiocb);
+
+	*ppos = kiocb.ki_pos;
+	return rval;
 }
 
 
diff -Nru a/fs/xfs/linux/xfs_ioctl.c b/fs/xfs/linux/xfs_ioctl.c
--- a/fs/xfs/linux/xfs_ioctl.c	Thu Apr  1 00:48:06 2004
+++ b/fs/xfs/linux/xfs_ioctl.c	Thu Apr  1 00:48:06 2004
@@ -850,6 +850,9 @@
 	case XFS_IOC_ERROR_INJECTION: {
 		xfs_error_injection_t in;
 
+		if (!capable(CAP_SYS_ADMIN))
+			return -EPERM;
+
 		if (copy_from_user(&in, (char *)arg, sizeof(in)))
 			return -XFS_ERROR(EFAULT);
 
@@ -858,6 +861,9 @@
 	}
 
 	case XFS_IOC_ERROR_CLEARALL:
+		if (!capable(CAP_SYS_ADMIN))
+			return -EPERM;
+
 		error = xfs_errortag_clearall(mp);
 		return -error;
 
@@ -882,7 +888,7 @@
 	if (vp->v_inode.i_flags & (S_IMMUTABLE|S_APPEND))
 		return -XFS_ERROR(EPERM);
 
-	if (filp->f_flags & O_RDONLY)
+	if (!(filp->f_flags & FMODE_WRITE))
 		return -XFS_ERROR(EBADF);
 
 	if (vp->v_type != VREG)
diff -Nru a/fs/xfs/linux/xfs_iops.c b/fs/xfs/linux/xfs_iops.c
--- a/fs/xfs/linux/xfs_iops.c	Thu Apr  1 00:48:06 2004
+++ b/fs/xfs/linux/xfs_iops.c	Thu Apr  1 00:48:06 2004
@@ -536,6 +536,10 @@
 
 	if (ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET))
 		flags = ATTR_UTIME;
+#ifdef ATTR_NO_BLOCK
+	if ((ia_valid & ATTR_NO_BLOCK))
+		flags |= ATTR_NONBLOCK;
+#endif
 
 	VOP_SETATTR(vp, &vattr, flags, NULL, error);
 	if (error)
diff -Nru a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c
--- a/fs/xfs/xfs_attr_leaf.c	Thu Apr  1 00:48:06 2004
+++ b/fs/xfs/xfs_attr_leaf.c	Thu Apr  1 00:48:06 2004
@@ -575,8 +575,8 @@
 	for ( ; i < nsbuf; i++, sbp++) {
 		attrnames_t	*namesp;
 
-		namesp = (sfe->flags & XFS_ATTR_SECURE) ? &attr_secure :
-			((sfe->flags & XFS_ATTR_ROOT) ? &attr_trusted :
+		namesp = (sbp->flags & XFS_ATTR_SECURE) ? &attr_secure :
+			((sbp->flags & XFS_ATTR_ROOT) ? &attr_trusted :
 			  &attr_user);
 
 		if (cursor->hashval != INT_GET(sbp->hash, ARCH_CONVERT)) {
@@ -587,8 +587,7 @@
 			ASSERT(context->flags & ATTR_KERNAMELS);
 			context->count += namesp->attr_namelen +
 						sbp->namelen + 1;
-		}
-		else {
+		} else {
 			if (xfs_attr_put_listent(context, namesp,
 					sbp->name, sbp->namelen,
 					INT_GET(sbp->valuelen, ARCH_CONVERT)))
diff -Nru a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c
--- a/fs/xfs/xfs_dfrag.c	Thu Apr  1 00:48:06 2004
+++ b/fs/xfs/xfs_dfrag.c	Thu Apr  1 00:48:06 2004
@@ -119,6 +119,11 @@
 		tip = XFS_BHVTOI(tbdp);
 	}
 
+	if (ip->i_mount != tip->i_mount) {
+		error =  XFS_ERROR(EINVAL);
+		goto error0;
+	}
+
 	if (ip->i_ino == tip->i_ino) {
 		error =  XFS_ERROR(EINVAL);
 		goto error0;
@@ -147,20 +152,17 @@
 	xfs_lock_inodes(ips, 2, 0, lock_flags);
 
 	/* Check permissions */
-	if ((error = _MAC_XFS_IACCESS(ip, MACWRITE, NULL))) {
-		goto error0;
-	}
-	if ((error = _MAC_XFS_IACCESS(tip, MACWRITE, NULL))) {
+	error = xfs_iaccess(ip, S_IWUSR, NULL);
+	if (error)
 		goto error0;
-	}
-	if ((current_fsuid(cred) != ip->i_d.di_uid) &&
-	    (error = xfs_iaccess(ip, S_IWUSR, NULL)) &&
-	    !capable_cred(NULL, CAP_FOWNER)) {
+
+	error = xfs_iaccess(tip, S_IWUSR, NULL);
+	if (error)
 		goto error0;
-	}
-	if ((current_fsuid(cred) != tip->i_d.di_uid) &&
-	    (error = xfs_iaccess(tip, S_IWUSR, NULL)) &&
-	    !capable_cred(NULL, CAP_FOWNER)) {
+
+	/* Verify that both files have the same format */
+	if ((ip->i_d.di_mode & S_IFMT) != (tip->i_d.di_mode & S_IFMT)) {
+		error = XFS_ERROR(EINVAL);
 		goto error0;
 	}
 
diff -Nru a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
--- a/fs/xfs/xfs_inode.c	Thu Apr  1 00:48:06 2004
+++ b/fs/xfs/xfs_inode.c	Thu Apr  1 00:48:06 2004
@@ -3707,14 +3707,13 @@
 	 * Read/write DACs are always overridable.
 	 * Executable DACs are overridable if at least one exec bit is set.
 	 */
-	if (!(orgmode & S_IXUSR) || (inode->i_mode & S_IXUGO) ||
-	    (ip->i_d.di_mode & S_IFMT) == S_IFDIR)
+	if (!(orgmode & S_IXUSR) ||
+	    (inode->i_mode & S_IXUGO) || S_ISDIR(inode->i_mode))
 		if (capable_cred(cr, CAP_DAC_OVERRIDE))
 			return 0;
 
 	if ((orgmode == S_IRUSR) ||
-	    (((ip->i_d.di_mode & S_IFMT) == S_IFDIR) &&
-	     (!(orgmode & ~(S_IWUSR|S_IXUSR))))) {
+	    (S_ISDIR(inode->i_mode) && (!(orgmode & S_IWUSR)))) {
 		if (capable_cred(cr, CAP_DAC_READ_SEARCH))
 			return 0;
 #ifdef	NOISE
diff -Nru a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
--- a/fs/xfs/xfs_log.c	Thu Apr  1 00:48:07 2004
+++ b/fs/xfs/xfs_log.c	Thu Apr  1 00:48:07 2004
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-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
@@ -940,7 +940,8 @@
 void
 xlog_iodone(xfs_buf_t *bp)
 {
-	xlog_in_core_t *iclog;
+	xlog_in_core_t	*iclog;
+	xlog_t		*l;
 	int		aborted;
 
 	iclog = XFS_BUF_FSPRIVATE(bp, xlog_in_core_t *);
@@ -949,18 +950,19 @@
 	aborted = 0;
 
 	/*
+	 * Some versions of cpp barf on the recursive definition of
+	 * ic_log -> hic_fields.ic_log and expand ic_log twice when
+	 * it is passed through two macros.  Workaround broken cpp.
+	 */
+	l = iclog->ic_log;
+
+	/*
 	 * Race to shutdown the filesystem if we see an error.
 	 */
-	if (XFS_BUF_GETERROR(bp)) {
-		/* Some versions of cpp barf on the recursive definition of
-		 * ic_log -> hic_fields.ic_log and expand ic_log twice when
-		 * it is passed through two macros.  Workaround for broken cpp
-		 */
-		struct log *l;
-		xfs_ioerror_alert("xlog_iodone",
-				  iclog->ic_log->l_mp, bp, XFS_BUF_ADDR(bp));
+	if (XFS_TEST_ERROR((XFS_BUF_GETERROR(bp)), l->l_mp,
+			XFS_ERRTAG_IODONE_IOERR, XFS_RANDOM_IODONE_IOERR)) {
+		xfs_ioerror_alert("xlog_iodone", l->l_mp, bp, XFS_BUF_ADDR(bp));
 		XFS_BUF_STALE(bp);
-		l = iclog->ic_log;
 		xfs_force_shutdown(l->l_mp, XFS_LOG_IO_ERROR);
 		/*
 		 * This flag will be propagated to the trans-committed
@@ -3158,6 +3160,7 @@
 		uint		xflags)
 {
 	xlog_ticket_t	*tic;
+	uint		num_headers;
 	SPLDECL(s);
 
  alloc:
@@ -3181,21 +3184,30 @@
 	 * in the log.  A unit in this case is the amount of space for one
 	 * of these log operations.  Normal reservations have a cnt of 1
 	 * and their unit amount is the total amount of space required.
-	 * The following line of code adds one log record header length
-	 * for each part of an operation which may fall on a different
-	 * log record.
 	 *
-	 * One more XLOG_HEADER_SIZE is added to account for possible
-	 * round off errors when syncing a LR to disk.  The bytes are
-	 * subtracted if the thread using this ticket is the first writer
-	 * to a new LR.
-	 *
-	 * We add an extra log header for the possibility that the commit
-	 * record is the first data written to a new log record.  In this
-	 * case it is separate from the rest of the transaction data and
-	 * will be charged for the log record header.
+	 * The following lines of code account for non-transaction data
+	 * which occupy space in the on-disk log. 
 	 */
-	unit_bytes += log->l_iclog_hsize * (XLOG_BTOLRBB(unit_bytes) + 2);
+
+	/* for start-rec */
+	unit_bytes += sizeof(xlog_op_header_t); 
+
+	/* for padding */
+	if (XFS_SB_VERSION_HASLOGV2(&log->l_mp->m_sb) &&
+		log->l_mp->m_sb.sb_logsunit > 1) {
+		/* log su roundoff */
+		unit_bytes += log->l_mp->m_sb.sb_logsunit;  
+	} else {
+		/* BB roundoff */
+		unit_bytes += BBSIZE;
+        }
+
+	/* for commit-rec */
+	unit_bytes += sizeof(xlog_op_header_t);
+ 
+	/* for LR headers */
+	num_headers = ((unit_bytes + log->l_iclog_size-1) >> log->l_iclog_size_log);
+	unit_bytes += log->l_iclog_hsize * num_headers;
 
 	tic->t_unit_res		= unit_bytes;
 	tic->t_curr_res		= unit_bytes;
diff -Nru a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h
--- a/fs/xfs/xfs_log_priv.h	Thu Apr  1 00:48:06 2004
+++ b/fs/xfs/xfs_log_priv.h	Thu Apr  1 00:48:06 2004
@@ -57,12 +57,6 @@
 #define XLOG_RECORD_BSHIFT	14		/* 16384 == 1 << 14 */
 #define XLOG_BIG_RECORD_BSHIFT	15		/* 32k == 1 << 15 */
 #define XLOG_MAX_RECORD_BSHIFT	18		/* 256k == 1 << 18 */
-#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XLOG_BTOLRBB)
-int xlog_btolrbb(int b);
-#define XLOG_BTOLRBB(b)		xlog_btolrbb(b)
-#else
-#define XLOG_BTOLRBB(b)		(((b)+XLOG_RECORD_BSIZE-1) >> XLOG_RECORD_BSHIFT)
-#endif
 #define XLOG_BTOLSUNIT(log, b)  (((b)+(log)->l_mp->m_sb.sb_logsunit-1) / \
                                  (log)->l_mp->m_sb.sb_logsunit)
 #define XLOG_LSUNITTOB(log, su) ((su) * (log)->l_mp->m_sb.sb_logsunit)
@@ -560,6 +554,7 @@
 extern int	 xlog_bread(xlog_t *, xfs_daddr_t, int, struct xfs_buf *);
 extern xfs_caddr_t xlog_align(xlog_t *, xfs_daddr_t, int, struct xfs_buf *);
 
+/* iclog tracing */
 #define XLOG_TRACE_GRAB_FLUSH  1
 #define XLOG_TRACE_REL_FLUSH   2
 #define XLOG_TRACE_SLEEP_FLUSH 3
diff -Nru a/fs/xfs/xfs_macros.c b/fs/xfs/xfs_macros.c
--- a/fs/xfs/xfs_macros.c	Thu Apr  1 00:48:06 2004
+++ b/fs/xfs/xfs_macros.c	Thu Apr  1 00:48:06 2004
@@ -2219,14 +2219,6 @@
 }
 #endif
 
-#if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XLOG_BTOLRBB)
-int
-xlog_btolrbb(int b)
-{
-	return XLOG_BTOLRBB(b);
-}
-#endif
-
 #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XLOG_GRANT_ADD_SPACE)
 void
 xlog_grant_add_space(xlog_t *log, int bytes, int type)
@@ -2242,3 +2234,12 @@
 	XLOG_GRANT_SUB_SPACE(log, bytes, type);
 }
 #endif
+
+#if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_SB_VERSION_HASMOREBITS)
+int
+xfs_sb_version_hasmorebits(xfs_sb_t *sbp)
+{
+	return XFS_SB_VERSION_HASMOREBITS(sbp);
+}
+#endif
+
diff -Nru a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
--- a/fs/xfs/xfs_mount.c	Thu Apr  1 00:48:06 2004
+++ b/fs/xfs/xfs_mount.c	Thu Apr  1 00:48:06 2004
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-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
@@ -117,6 +117,7 @@
     { offsetof(xfs_sb_t, sb_logsectlog), 0 },
     { offsetof(xfs_sb_t, sb_logsectsize),0 },
     { offsetof(xfs_sb_t, sb_logsunit),	 0 },
+    { offsetof(xfs_sb_t, sb_features2),	 0 },
     { sizeof(xfs_sb_t),			 0 }
 };
 
diff -Nru a/fs/xfs/xfs_sb.h b/fs/xfs/xfs_sb.h
--- a/fs/xfs/xfs_sb.h	Thu Apr  1 00:48:06 2004
+++ b/fs/xfs/xfs_sb.h	Thu Apr  1 00:48:06 2004
@@ -60,6 +60,7 @@
 #define XFS_SB_VERSION_SECTORBIT	0x0800
 #define	XFS_SB_VERSION_EXTFLGBIT	0x1000
 #define	XFS_SB_VERSION_DIRV2BIT		0x2000
+#define	XFS_SB_VERSION_MOREBITSBIT	0x8000
 #define	XFS_SB_VERSION_OKSASHFBITS	\
 	(XFS_SB_VERSION_EXTFLGBIT | \
 	 XFS_SB_VERSION_DIRV2BIT)
@@ -80,17 +81,46 @@
 	(XFS_SB_VERSION_NUMBITS | \
 	 XFS_SB_VERSION_OKREALFBITS | \
 	 XFS_SB_VERSION_OKSASHFBITS)
-#define XFS_SB_VERSION_MKFS(ia,dia,extflag,dirv2,na,sflag)	\
-	(((ia) || (dia) || (extflag) || (dirv2) || (na) || (sflag)) ? \
+#define XFS_SB_VERSION_MKFS(ia,dia,extflag,dirv2,na,sflag,morebits)	\
+	(((ia) || (dia) || (extflag) || (dirv2) || (na) || (sflag) || \
+	  (morebits)) ? \
 		(XFS_SB_VERSION_4 | \
 		 ((ia) ? XFS_SB_VERSION_ALIGNBIT : 0) | \
 		 ((dia) ? XFS_SB_VERSION_DALIGNBIT : 0) | \
 		 ((extflag) ? XFS_SB_VERSION_EXTFLGBIT : 0) | \
 		 ((dirv2) ? XFS_SB_VERSION_DIRV2BIT : 0) | \
 		 ((na) ? XFS_SB_VERSION_LOGV2BIT : 0) | \
-		 ((sflag) ? XFS_SB_VERSION_SECTORBIT : 0)) : \
+		 ((sflag) ? XFS_SB_VERSION_SECTORBIT : 0) | \
+		 ((morebits) ? XFS_SB_VERSION_MOREBITSBIT : 0)) : \
 		XFS_SB_VERSION_1)
 
+/*
+ * There are two words to hold XFS "feature" bits: the original
+ * word, sb_versionnum, and sb_features2.  Whenever a bit is set in
+ * sb_features2, the feature bit XFS_SB_VERSION_MOREBITSBIT must be set.
+ *
+ * These defines represent bits in sb_features2.
+ */
+#define XFS_SB_VERSION2_REALFBITS	0x00ffffff	/* Mask: features */
+#define XFS_SB_VERSION2_RESERVED1BIT	0x00000001
+#define XFS_SB_VERSION2_SASHFBITS	0xff000000	/* Mask: features that
+							   require changing
+							   PROM and SASH */
+
+#define	XFS_SB_VERSION2_OKREALFBITS	\
+	(0)
+#define	XFS_SB_VERSION2_OKSASHFBITS	\
+	(0)
+#define XFS_SB_VERSION2_OKREALBITS	\
+	(XFS_SB_VERSION2_OKREALFBITS |	\
+	 XFS_SB_VERSION2_OKSASHFBITS )
+
+/*
+ * mkfs macro to set up sb_features2 word
+ */
+#define	XFS_SB_VERSION2_MKFS(xyz)	\
+	((xyz) ? 0 : 0)
+
 typedef struct xfs_sb
 {
 	__uint32_t	sb_magicnum;	/* magic number == XFS_SB_MAGIC */
@@ -146,6 +176,7 @@
 	__uint8_t	sb_logsectlog;	/* log2 of the log sector size */
 	__uint16_t	sb_logsectsize;	/* sector size for the log, bytes */
 	__uint32_t	sb_logsunit;	/* stripe unit size for the log */
+	__uint32_t	sb_features2;	/* additonal feature bits */
 } xfs_sb_t;
 
 /*
@@ -164,6 +195,7 @@
 	XFS_SBS_GQUOTINO, XFS_SBS_QFLAGS, XFS_SBS_FLAGS, XFS_SBS_SHARED_VN,
 	XFS_SBS_INOALIGNMT, XFS_SBS_UNIT, XFS_SBS_WIDTH, XFS_SBS_DIRBLKLOG,
 	XFS_SBS_LOGSECTLOG, XFS_SBS_LOGSECTSIZE, XFS_SBS_LOGSUNIT,
+	XFS_SBS_FEATURES2,
 	XFS_SBS_FIELDCOUNT
 } xfs_sb_field_t;
 
@@ -217,8 +249,11 @@
 #define	XFS_SB_GOOD_VERSION_INT(sbp)	\
 	((((sbp)->sb_versionnum >= XFS_SB_VERSION_1) && \
 	  ((sbp)->sb_versionnum <= XFS_SB_VERSION_3)) || \
-	 ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \
-	  !((sbp)->sb_versionnum & ~XFS_SB_VERSION_OKREALBITS)
+	   ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \
+	    !(((sbp)->sb_versionnum & ~XFS_SB_VERSION_OKREALBITS) && \
+	      ((sbp)->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT) && \
+	      ((sbp)->sb_features2 & ~XFS_SB_VERSION2_OKREALBITS))
+
 #ifdef __KERNEL__
 #define	XFS_SB_GOOD_VERSION(sbp)	\
 	(XFS_SB_GOOD_VERSION_INT(sbp) && \
@@ -452,6 +487,25 @@
 	((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \
 	((sbp)->sb_versionnum & XFS_SB_VERSION_SECTORBIT))
 #endif
+
+#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_HASMOREBITSBIT)
+int xfs_sb_version_hasmorebits(xfs_sb_t *sbp);
+#define XFS_SB_VERSION_HASMOREBITS(sbp)	xfs_sb_version_hasmorebits(sbp)
+#else
+#define XFS_SB_VERSION_HASMOREBITS(sbp)	\
+	((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \
+	 ((sbp)->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT))
+#endif
+
+/*
+ * sb_features2 bit version macros.
+ *
+ * For example, for a bit defined as XFS_SB_VERSION2_YBIT, has a macro:
+ *
+ * SB_VERSION_HASYBIT(xfs_sb_t *sbp)
+ *	((XFS_SB_VERSION_HASMOREBITS(sbp) &&
+ *	 ((sbp)->sb_versionnum & XFS_SB_VERSION2_YBIT)
+ */
 
 /*
  * end of superblock version macros
diff -Nru a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
--- a/fs/xfs/xfs_trans.c	Thu Apr  1 00:48:06 2004
+++ b/fs/xfs/xfs_trans.c	Thu Apr  1 00:48:06 2004
@@ -250,7 +250,7 @@
 		error = xfs_mod_incore_sb(tp->t_mountp, XFS_SBS_FDBLOCKS,
 					  -blocks, rsvd);
 		if (error != 0) {
-                        PFLAGS_RESTORE(&tp->t_pflags);
+                        PFLAGS_RESTORE_FSTRANS(&tp->t_pflags);
 			return (XFS_ERROR(ENOSPC));
 		}
 		tp->t_blk_res += blocks;
@@ -323,7 +323,7 @@
 		tp->t_blk_res = 0;
 	}
 
-        PFLAGS_RESTORE(&tp->t_pflags);
+        PFLAGS_RESTORE_FSTRANS(&tp->t_pflags);
 
 	return (error);
 }
@@ -734,7 +734,7 @@
 			if (commit_lsn == -1 && !shutdown)
 				shutdown = XFS_ERROR(EIO);
 		}
-                PFLAGS_RESTORE(&tp->t_pflags);
+                PFLAGS_RESTORE_FSTRANS(&tp->t_pflags);
 		xfs_trans_free_items(tp, shutdown? XFS_TRANS_ABORT : 0);
 		xfs_trans_free_busy(tp);
 		xfs_trans_free(tp);
@@ -823,7 +823,7 @@
 	 * had pinned, clean up, free trans structure, and return error.
 	 */
 	if (error || commit_lsn == -1) {
-                PFLAGS_RESTORE(&tp->t_pflags);
+                PFLAGS_RESTORE_FSTRANS(&tp->t_pflags);
 		xfs_trans_uncommit(tp, flags|XFS_TRANS_ABORT);
 		return XFS_ERROR(EIO);
 	}
@@ -862,7 +862,7 @@
 	error = xfs_log_notify(mp, commit_iclog, &(tp->t_logcb));
 
 	/* mark this thread as no longer being in a transaction */
-        PFLAGS_RESTORE(&tp->t_pflags);
+        PFLAGS_RESTORE_FSTRANS(&tp->t_pflags);
 
 	/*
 	 * Once all the items of the transaction have been copied
@@ -1100,7 +1100,7 @@
 	}
 
 	/* mark this thread as no longer being in a transaction */
-        PFLAGS_RESTORE(&tp->t_pflags);
+        PFLAGS_RESTORE_FSTRANS(&tp->t_pflags);
 
 	xfs_trans_free_items(tp, flags);
 	xfs_trans_free_busy(tp);
diff -Nru a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h
--- a/fs/xfs/xfs_trans.h	Thu Apr  1 00:48:06 2004
+++ b/fs/xfs/xfs_trans.h	Thu Apr  1 00:48:06 2004
@@ -535,6 +535,8 @@
  *    the super block to reflect the freed blocks: sector size
  *    worst case split in allocation btrees per extent assuming 4 extents:
  *		4 exts * 2 trees * (2 * max depth - 1) * block size
+ *    the inode btree: max depth * blocksize
+ *    the allocation btrees: 2 trees * (max depth - 1) * block size
  */
 #define	XFS_CALC_ITRUNCATE_LOG_RES(mp) \
 	(MAX( \
@@ -545,7 +547,11 @@
 	  (4 * (mp)->m_sb.sb_sectsize) + \
 	  (mp)->m_sb.sb_sectsize + \
 	  XFS_ALLOCFREE_LOG_RES(mp, 4) + \
-	  (128 * (9 + XFS_ALLOCFREE_LOG_COUNT(mp, 4))))))
+	  (128 * (9 + XFS_ALLOCFREE_LOG_COUNT(mp, 4))) + \
+	  (128 * 5) + \
+	  XFS_ALLOCFREE_LOG_RES(mp, 1) + \
+	   (128 * (2 + XFS_IALLOC_BLOCKS(mp) + XFS_IN_MAXLEVELS(mp) + \
+	    XFS_ALLOCFREE_LOG_COUNT(mp, 1))))))
 
 #define	XFS_ITRUNCATE_LOG_RES(mp)   ((mp)->m_reservations.tr_itruncate)
 
@@ -713,6 +719,7 @@
 	 XFS_FSB_TO_B((mp), 1) + \
 	 MAX((__uint16_t)XFS_FSB_TO_B((mp), 1), XFS_INODE_CLUSTER_SIZE(mp)) + \
 	 (128 * 5) + \
+	  XFS_ALLOCFREE_LOG_RES(mp, 1) + \
 	  (128 * (2 + XFS_IALLOC_BLOCKS(mp) + XFS_IN_MAXLEVELS(mp) + \
 	   XFS_ALLOCFREE_LOG_COUNT(mp, 1))))
 
diff -Nru a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
--- a/fs/xfs/xfs_vfsops.c	Thu Apr  1 00:48:06 2004
+++ b/fs/xfs/xfs_vfsops.c	Thu Apr  1 00:48:06 2004
@@ -1,7 +1,7 @@
 /*
  * XFS filesystem operations.
  *
- * Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-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
@@ -229,7 +229,10 @@
 		mp->m_swidth = ap->swidth;
 	}
 
-	if (ap->logbufs != 0 && ap->logbufs != -1 &&
+	if (ap->logbufs != -1 &&
+#if defined(DEBUG) || defined(XLOG_NOLOG)
+	    ap->logbufs != 0 &&
+#endif
 	    (ap->logbufs < XLOG_MIN_ICLOGS ||
 	     ap->logbufs > XLOG_MAX_ICLOGS)) {
 		cmn_err(CE_WARN,
@@ -1484,8 +1487,10 @@
 			 */
 			if (XFS_BUF_ISPINNED(bp))
 				xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE);
-			if (!(flags & SYNC_WAIT))
-				XFS_BUF_BFLAGS(bp) |= XFS_B_ASYNC;
+			if (flags & SYNC_WAIT)
+				XFS_BUF_UNASYNC(bp);
+			else
+				XFS_BUF_ASYNC(bp);
 			error = xfs_bwrite(mp, bp);
 		}
 		if (error) {
diff -Nru a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
--- a/fs/xfs/xfs_vnodeops.c	Thu Apr  1 00:48:07 2004
+++ b/fs/xfs/xfs_vnodeops.c	Thu Apr  1 00:48:07 2004
@@ -1106,14 +1106,11 @@
 	xfs_off_t	stop)
 {
 	xfs_inode_t	*ip;
-	int		error;
-	int		error2;
-	int		syncall;
-	vnode_t		*vp;
 	xfs_trans_t	*tp;
+	int		error;
 
-	vp = BHV_TO_VNODE(bdp);
-	vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address);
+	vn_trace_entry(BHV_TO_VNODE(bdp),
+			__FUNCTION__, (inst_t *)__return_address);
 
 	ip = XFS_BHVTOI(bdp);
 
@@ -1122,44 +1119,6 @@
 	if (XFS_FORCED_SHUTDOWN(ip->i_mount))
 		return XFS_ERROR(EIO);
 
-	xfs_ilock(ip, XFS_IOLOCK_EXCL);
-
-	syncall = error = error2 = 0;
-
-	if (stop == -1)  {
-		ASSERT(start >= 0);
-		if (start == 0)
-			syncall = 1;
-		stop = xfs_file_last_byte(ip);
-	}
-
-	/*
-	 * If we're invalidating, always flush since we want to
-	 * tear things down.  Otherwise, don't flush anything if
-	 * we're not dirty.
-	 */
-	if (flag & FSYNC_INVAL) {
-		if (ip->i_df.if_flags & XFS_IFEXTENTS &&
-		    ip->i_df.if_bytes > 0) {
-			VOP_FLUSHINVAL_PAGES(vp, start, -1, FI_REMAPF_LOCKED);
-		}
-		ASSERT(syncall == 0 || (VN_CACHED(vp) == 0));
-	} else {
-		/*
-		 * In the non-invalidating case, calls to fsync() do not
-		 * flush all the dirty mmap'd pages.  That requires a
-		 * call to msync().
-		 */
-		VOP_FLUSH_PAGES(vp, start, -1,
-				(flag & FSYNC_WAIT) ? 0 : XFS_B_ASYNC,
-				FI_NONE, error2);
-	}
-
-	if (error2) {
-		xfs_iunlock(ip, XFS_IOLOCK_EXCL);
-		return XFS_ERROR(error2);
-	}
-
 	/*
 	 * We always need to make sure that the required inode state
 	 * is safe on disk.  The vnode might be clean but because
@@ -1199,7 +1158,7 @@
 		 * be pinned.  If it is, force the log.
 		 */
 
-		xfs_iunlock(ip, XFS_IOLOCK_EXCL | XFS_ILOCK_SHARED);
+		xfs_iunlock(ip, XFS_ILOCK_SHARED);
 
 		if (xfs_ipincount(ip)) {
 			xfs_log_force(ip->i_mount, (xfs_lsn_t)0,
@@ -1222,7 +1181,6 @@
 				XFS_FSYNC_TS_LOG_RES(ip->i_mount),
 				0, 0, 0)))  {
 			xfs_trans_cancel(tp, 0);
-			xfs_iunlock(ip, XFS_IOLOCK_EXCL);
 			return error;
 		}
 		xfs_ilock(ip, XFS_ILOCK_EXCL);
@@ -1237,67 +1195,17 @@
 		 * inode in another recent transaction.	 So we
 		 * play it safe and fire off the transaction anyway.
 		 */
-		xfs_trans_ijoin(tp, ip, XFS_IOLOCK_EXCL|XFS_ILOCK_EXCL);
+		xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
 		xfs_trans_ihold(tp, ip);
 		xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
 		if (flag & FSYNC_WAIT)
 			xfs_trans_set_sync(tp);
 		error = xfs_trans_commit(tp, 0, NULL);
 
-		xfs_iunlock(ip, XFS_IOLOCK_EXCL|XFS_ILOCK_EXCL);
+		xfs_iunlock(ip, XFS_ILOCK_EXCL);
 	}
 	return error;
 }
-
-
-#if 0
-/*
- * This is a utility routine for xfs_inactive.  It is called when a
- * transaction attempting to free up the disk space for a file encounters
- * an error.  It cancels the old transaction and starts up a new one
- * to be used to free up the inode.  It also sets the inode size and extent
- * counts to 0 and frees up any memory being used to store inline data,
- * extents, or btree roots.
- */
-STATIC void
-xfs_itruncate_cleanup(
-	xfs_trans_t	**tpp,
-	xfs_inode_t	*ip,
-	int		commit_flags,
-	int		fork)
-{
-	xfs_mount_t	*mp;
-	/* REFERENCED */
-	int		error;
-
-	mp = ip->i_mount;
-	if (*tpp) {
-		xfs_trans_cancel(*tpp, commit_flags | XFS_TRANS_ABORT);
-	}
-	xfs_iunlock(ip, XFS_IOLOCK_EXCL | XFS_ILOCK_EXCL);
-	*tpp = xfs_trans_alloc(mp, XFS_TRANS_INACTIVE);
-	error = xfs_trans_reserve(*tpp, 0, XFS_IFREE_LOG_RES(mp), 0, 0,
-				  XFS_DEFAULT_LOG_COUNT);
-	if (error) {
-		return;
-	}
-
-	xfs_ilock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
-	xfs_trans_ijoin(*tpp, ip, XFS_IOLOCK_EXCL | XFS_ILOCK_EXCL);
-	xfs_trans_ihold(*tpp, ip);
-
-	xfs_idestroy_fork(ip, fork);
-
-	if (fork == XFS_DATA_FORK) {
-		ip->i_d.di_nblocks = 0;
-		ip->i_d.di_nextents = 0;
-		ip->i_d.di_size = 0;
-	} else {
-		ip->i_d.di_anextents = 0;
-	}
-	xfs_trans_log_inode(*tpp, ip, XFS_ILOG_CORE);
-}
-#endif
 
 /*
  * This is called by xfs_inactive to free any blocks beyond eof,
diff -Nru a/include/asm-ppc/cputable.h b/include/asm-ppc/cputable.h
--- a/include/asm-ppc/cputable.h	Thu Apr  1 00:48:06 2004
+++ b/include/asm-ppc/cputable.h	Thu Apr  1 00:48:06 2004
@@ -90,10 +90,24 @@
 	.long 99b;				\
 	.previous
 
-#define END_FTR_SECTION_IFSET(msk)	END_FTR_SECTION((msk), (msk))
-#define END_FTR_SECTION_IFCLR(msk)	END_FTR_SECTION((msk), 0)
+#else
+
+#define BEGIN_FTR_SECTION		"98:\n"
+#define END_FTR_SECTION(msk, val)		\
+"99:\n"						\
+"	.section __ftr_fixup,\"a\";\n"		\
+"	.align 2;\n"				\
+"	.long "#msk";\n"			\
+"	.long "#val";\n"			\
+"	.long 98b;\n"			        \
+"	.long 99b;\n"	 		        \
+"	.previous\n"
+
 
 #endif /* __ASSEMBLY__ */
+
+#define END_FTR_SECTION_IFSET(msk)	END_FTR_SECTION((msk), (msk))
+#define END_FTR_SECTION_IFCLR(msk)	END_FTR_SECTION((msk), 0)
 
 #endif /* __ASM_PPC_CPUTABLE_H */
 #endif /* __KERNEL__ */
diff -Nru a/include/asm-ppc/mmu_context.h b/include/asm-ppc/mmu_context.h
--- a/include/asm-ppc/mmu_context.h	Thu Apr  1 00:48:06 2004
+++ b/include/asm-ppc/mmu_context.h	Thu Apr  1 00:48:06 2004
@@ -6,6 +6,7 @@
 #include <asm/atomic.h>
 #include <asm/bitops.h>
 #include <asm/mmu.h>
+#include <asm/cputable.h>
 
 /*
  * On 32-bit PowerPC 6xx/7xx/7xxx CPUs, we use a set of 16 VSIDs
@@ -155,7 +156,24 @@
 static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
 			     struct task_struct *tsk)
 {
+#ifdef CONFIG_ALTIVEC
+	asm volatile (
+ BEGIN_FTR_SECTION
+	"dssall;\n"
+#ifndef CONFIG_POWER4
+	 "sync;\n" /* G4 needs a sync here, G5 apparently not */
+#endif
+ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
+	 : : );
+#endif /* CONFIG_ALTIVEC */
+
 	tsk->thread.pgdir = next->pgd;
+
+	/* No need to flush userspace segments if the mm doesnt change */
+	if (prev == next)
+		return;
+
+	/* Setup new userspace context */
 	get_mmu_context(next);
 	set_context(next->context, next->pgd);
 }
@@ -166,12 +184,7 @@
  * After we have set current->mm to a new value, this activates
  * the context for the new mm so we see the new mappings.
  */
-static inline void activate_mm(struct mm_struct *active_mm, struct mm_struct *mm)
-{
-	current->thread.pgdir = mm->pgd;
-	get_mmu_context(mm);
-	set_context(mm->context, mm->pgd);
-}
+#define activate_mm(active_mm, mm)   switch_mm(active_mm, mm, current)
 
 extern void mmu_context_init(void);
 
diff -Nru a/include/asm-ppc64/abs_addr.h b/include/asm-ppc64/abs_addr.h
--- a/include/asm-ppc64/abs_addr.h	Thu Apr  1 00:48:06 2004
+++ b/include/asm-ppc64/abs_addr.h	Thu Apr  1 00:48:06 2004
@@ -71,26 +71,22 @@
 	return PTRRELOC(_msChunks->abs)[pchunk];
 }
 
-
-static inline unsigned long
-phys_to_absolute(unsigned long pa)
-{
-	return chunk_to_addr(abs_chunk(addr_to_chunk(pa))) + chunk_offset(pa);
-}
+/* A macro so it can take pointers or unsigned long. */
+#define phys_to_abs(pa)						     \
+	({ unsigned long _pa = (unsigned long)(pa);			     \
+	   chunk_to_addr(abs_chunk(addr_to_chunk(_pa))) + chunk_offset(_pa); \
+	})
 
 static inline unsigned long
 physRpn_to_absRpn(unsigned long rpn)
 {
 	unsigned long pa = rpn << PAGE_SHIFT;
-	unsigned long aa = phys_to_absolute(pa);
+	unsigned long aa = phys_to_abs(pa);
 	return (aa >> PAGE_SHIFT);
 }
 
-static inline unsigned long
-absolute_to_phys(unsigned long aa)
-{
-	return lmb_abs_to_phys(aa);
-}
+/* A macro so it can take pointers or unsigned long. */
+#define abs_to_phys(aa) lmb_abs_to_phys((unsigned long)(aa))
 
 #else  /* !CONFIG_MSCHUNKS */
 
@@ -99,23 +95,14 @@
 #define chunk_offset(addr) (0)
 #define abs_chunk(pchunk) (pchunk)
 
-#define phys_to_absolute(pa) (pa)
+#define phys_to_abs(pa) (pa)
 #define physRpn_to_absRpn(rpn) (rpn)
-#define absolute_to_phys(aa) (aa)
+#define abs_to_phys(aa) (aa)
 
 #endif /* !CONFIG_MSCHUNKS */
 
-
-static inline unsigned long
-virt_to_absolute(unsigned long ea)
-{
-	return phys_to_absolute(__pa(ea));
-}
-
-static inline unsigned long
-absolute_to_virt(unsigned long aa)
-{
-	return (unsigned long)__va(absolute_to_phys(aa));
-}
+/* Convenience macros */
+#define virt_to_abs(va) phys_to_abs(__pa(va))
+#define abs_to_virt(aa) __va(abs_to_phys(aa))
 
 #endif /* _ABS_ADDR_H */
diff -Nru a/include/asm-ppc64/iSeries/HvCallEvent.h b/include/asm-ppc64/iSeries/HvCallEvent.h
--- a/include/asm-ppc64/iSeries/HvCallEvent.h	Thu Apr  1 00:48:06 2004
+++ b/include/asm-ppc64/iSeries/HvCallEvent.h	Thu Apr  1 00:48:06 2004
@@ -100,7 +100,7 @@
 {
 	u64 abs_addr;
 
-	abs_addr = virt_to_absolute((unsigned long)eventStackAddr);
+	abs_addr = virt_to_abs(eventStackAddr);
 	HvCall3(HvCallEventSetLpEventStack, queueIndex, abs_addr,
 			eventStackSize);
 	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
@@ -123,7 +123,7 @@
 	printk("HvCallEvent_signalLpEvent: *event = %016lx\n ",
 			(unsigned long)event);
 #endif
-	abs_addr = virt_to_absolute((unsigned long)event);
+	abs_addr = virt_to_abs(event);
 	retVal = (HvLpEvent_Rc)HvCall1(HvCallEventSignalLpEvent, abs_addr);
 	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
 	return retVal;
@@ -164,7 +164,7 @@
 	u64 abs_addr;
 	HvLpEvent_Rc retVal;
 
-	abs_addr = virt_to_absolute((unsigned long)event);
+	abs_addr = virt_to_abs(event);
 	retVal = (HvLpEvent_Rc)HvCall1(HvCallEventAckLpEvent, abs_addr);
 	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
 	return retVal;
@@ -175,7 +175,7 @@
 	u64 abs_addr;
 	HvLpEvent_Rc retVal;
 
-	abs_addr = virt_to_absolute((unsigned long)event);
+	abs_addr = virt_to_abs(event);
 	retVal = (HvLpEvent_Rc)HvCall1(HvCallEventCancelLpEvent, abs_addr);
 	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
 	return retVal;
@@ -286,7 +286,7 @@
 	u64 abs_addr;
 	HvLpDma_Rc retVal;
 
-	abs_addr = virt_to_absolute((unsigned long)local);
+	abs_addr = virt_to_abs(local);
 	retVal = (HvLpDma_Rc)HvCall4(HvCallEventDmaToSp, abs_addr, remote,
 			length, dir);
 	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
diff -Nru a/include/asm-ppc64/iSeries/iSeries_pci.h b/include/asm-ppc64/iSeries/iSeries_pci.h
--- a/include/asm-ppc64/iSeries/iSeries_pci.h	Thu Apr  1 00:48:06 2004
+++ b/include/asm-ppc64/iSeries/iSeries_pci.h	Thu Apr  1 00:48:06 2004
@@ -31,6 +31,7 @@
 /************************************************************************/
 
 #include <asm/iSeries/HvCallPci.h>
+#include <asm/abs_addr.h>
 
 struct pci_dev;				/* For Forward Reference        */
 struct iSeries_Device_Node;
@@ -71,7 +72,7 @@
 /* Converts Virtual Address to Real Address for Hypervisor calls        */
 /************************************************************************/
 
-#define REALADDR(virtaddr)  (0x8000000000000000 | (virt_to_absolute((u64)virtaddr) ))
+#define ISERIES_HV_ADDR(virtaddr)  (0x8000000000000000 | virt_to_abs(virtaddr))
 
 /************************************************************************/
 /* iSeries Device Information                                           */
diff -Nru a/include/asm-ppc64/page.h b/include/asm-ppc64/page.h
--- a/include/asm-ppc64/page.h	Thu Apr  1 00:48:06 2004
+++ b/include/asm-ppc64/page.h	Thu Apr  1 00:48:06 2004
@@ -212,19 +212,6 @@
 
 #define __va(x) ((void *)((unsigned long)(x) + KERNELBASE))
 
-/* Given that physical addresses do not map 1-1 to absolute addresses, we
- * use these macros to better specify exactly what we want to do.
- * The only restriction on their use is that the absolute address
- * macros cannot be used until after the LMB structure has been
- * initialized in prom.c.  -Peter
- */
-#define __v2p(x) ((void *) __pa(x))
-#define __v2a(x) ((void *) phys_to_absolute(__pa(x)))
-#define __p2a(x) ((void *) phys_to_absolute(x))
-#define __p2v(x) ((void *) __va(x))
-#define __a2p(x) ((void *) absolute_to_phys(x))
-#define __a2v(x) ((void *) __va(absolute_to_phys(x)))
-
 #ifdef CONFIG_DISCONTIGMEM
 #define page_to_pfn(page)	discontigmem_page_to_pfn(page)
 #define pfn_to_page(pfn)	discontigmem_pfn_to_page(pfn)
diff -Nru a/include/asm-sparc/asmmacro.h b/include/asm-sparc/asmmacro.h
--- a/include/asm-sparc/asmmacro.h	Thu Apr  1 00:48:06 2004
+++ b/include/asm-sparc/asmmacro.h	Thu Apr  1 00:48:06 2004
@@ -18,17 +18,6 @@
 #define GET_PROCESSOR4D_ID(reg) \
 	lda	[%g0] ASI_M_VIKING_TMP1, %reg;
 
-/* Blackbox */
-#define GET_PROCESSOR_ID(reg) \
-	sethi	%hi(___b_smp_processor_id), %reg; \
-	sethi	%hi(boot_cpu_id), %reg; \
-	ldub	[%reg + %lo(boot_cpu_id)], %reg;
-
-#define GET_PROCESSOR_MID(reg) \
-	rd	%tbr, %reg; \
-	srl	%reg, 12, %reg; \
-	and	%reg, 3, %reg;
-
 /* All trap entry points _must_ begin with this macro or else you
  * lose.  It makes sure the kernel has a proper window so that
  * c-code can be called.
diff -Nru a/include/asm-sparc/smp.h b/include/asm-sparc/smp.h
--- a/include/asm-sparc/smp.h	Thu Apr  1 00:48:06 2004
+++ b/include/asm-sparc/smp.h	Thu Apr  1 00:48:06 2004
@@ -53,8 +53,8 @@
 
 BTFIXUPDEF_CALL(void, smp_cross_call, smpfunc_t, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)
 BTFIXUPDEF_CALL(void, smp_message_pass, int, int, unsigned long, int)
-BTFIXUPDEF_CALL(int, __smp_processor_id, void)
-BTFIXUPDEF_BLACKBOX(smp_processor_id)
+BTFIXUPDEF_CALL(int, __hard_smp_processor_id, void)
+BTFIXUPDEF_BLACKBOX(hard_smp_processor_id)
 BTFIXUPDEF_BLACKBOX(load_current)
 
 #define smp_cross_call(func,arg1,arg2,arg3,arg4,arg5) BTFIXUP_CALL(smp_cross_call)(func,arg1,arg2,arg3,arg4,arg5)
@@ -129,7 +129,7 @@
 	   			     "=&r" (cpuid));
 	   See btfixup.h and btfixupprep.c to understand how a blackbox works.
 	 */
-	__asm__ __volatile__("sethi %%hi(___b_smp_processor_id), %0\n\t"
+	__asm__ __volatile__("sethi %%hi(___b_hard_smp_processor_id), %0\n\t"
 			     "sethi %%hi(boot_cpu_id), %0\n\t"
 			     "ldub [%0 + %%lo(boot_cpu_id)], %0\n\t" :
 			     "=&r" (cpuid));
@@ -141,7 +141,7 @@
 	int cpuid;
 	
 	__asm__ __volatile__("mov %%o7, %%g1\n\t"
-			     "call ___f___smp_processor_id\n\t"
+			     "call ___f___hard_smp_processor_id\n\t"
 			     " nop\n\t"
 			     "mov %%g2, %0\n\t" : "=r"(cpuid) : : "g1", "g2");
 	return cpuid;
diff -Nru a/include/linux/aio.h b/include/linux/aio.h
--- a/include/linux/aio.h	Thu Apr  1 00:48:06 2004
+++ b/include/linux/aio.h	Thu Apr  1 00:48:06 2004
@@ -59,7 +59,7 @@
 	struct list_head	ki_list;	/* the aio core uses this
 						 * for cancellation */
 
-	void			*ki_user_obj;	/* pointer to userland's iocb */
+	void __user		*ki_user_obj;	/* pointer to userland's iocb */
 	__u64			ki_user_data;	/* user's data for completion */
 	loff_t			ki_pos;
 
diff -Nru a/include/linux/mmzone.h b/include/linux/mmzone.h
--- a/include/linux/mmzone.h	Thu Apr  1 00:48:06 2004
+++ b/include/linux/mmzone.h	Thu Apr  1 00:48:06 2004
@@ -299,7 +299,7 @@
 struct ctl_table;
 struct file;
 int min_free_kbytes_sysctl_handler(struct ctl_table *, int, struct file *, 
-					  void *, size_t *);
+					  void __user *, size_t *);
 
 #include <linux/topology.h>
 /* Returns the number of the current Node. */
diff -Nru a/include/linux/pci_ids.h b/include/linux/pci_ids.h
--- a/include/linux/pci_ids.h	Thu Apr  1 00:48:06 2004
+++ b/include/linux/pci_ids.h	Thu Apr  1 00:48:06 2004
@@ -1634,8 +1634,9 @@
 #define PCI_SUBDEVICE_ID_CHASE_PCIRAS8		0xF010
 
 #define PCI_VENDOR_ID_AUREAL		0x12eb
-#define PCI_DEVICE_ID_AUREAL_VORTEX_1	0x0001
-#define PCI_DEVICE_ID_AUREAL_VORTEX_2	0x0002
+#define PCI_DEVICE_ID_AUREAL_VORTEX	0x0001
+#define PCI_DEVICE_ID_AUREAL_VORTEX2	0x0002
+#define PCI_DEVICE_ID_AUREAL_ADVANTAGE	0x0003
 
 #define PCI_VENDOR_ID_ELECTRONICDESIGNGMBH 0x12f8
 #define PCI_DEVICE_ID_LML_33R10		0x8a02
diff -Nru a/include/linux/syscalls.h b/include/linux/syscalls.h
--- a/include/linux/syscalls.h	Thu Apr  1 00:48:07 2004
+++ b/include/linux/syscalls.h	Thu Apr  1 00:48:07 2004
@@ -60,8 +60,8 @@
 #include <asm/signal.h>
 #include <linux/quota.h>
 
-asmlinkage long sys_time(int *tloc);
-asmlinkage long sys_stime(time_t *tptr);
+asmlinkage long sys_time(int __user *tloc);
+asmlinkage long sys_stime(time_t __user *tptr);
 asmlinkage long sys_gettimeofday(struct timeval __user *tv,
 				struct timezone __user *tz);
 asmlinkage long sys_settimeofday(struct timeval __user *tv,
@@ -71,7 +71,7 @@
 asmlinkage long sys_times(struct tms __user *tbuf);
 
 asmlinkage long sys_gettid(void);
-asmlinkage long sys_nanosleep(struct timespec *rqtp, struct timespec *rmtp);
+asmlinkage long sys_nanosleep(struct timespec __user *rqtp, struct timespec __user *rmtp);
 asmlinkage unsigned long sys_alarm(unsigned int seconds);
 asmlinkage long sys_getpid(void);
 asmlinkage long sys_getppid(void);
@@ -79,8 +79,8 @@
 asmlinkage long sys_geteuid(void);
 asmlinkage long sys_getgid(void);
 asmlinkage long sys_getegid(void);
-asmlinkage long sys_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
-asmlinkage long sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
+asmlinkage long sys_getresuid(uid_t __user *ruid, uid_t __user *euid, uid_t __user *suid);
+asmlinkage long sys_getresgid(gid_t __user *rgid, gid_t __user *egid, gid_t __user *sgid);
 asmlinkage long sys_getpgid(pid_t pid);
 asmlinkage long sys_getpgrp(void);
 asmlinkage long sys_getsid(pid_t pid);
@@ -98,7 +98,7 @@
 asmlinkage long sys_setsid(void);
 asmlinkage long sys_setgroups(int gidsetsize, gid_t __user *grouplist);
 
-asmlinkage long sys_acct(const char *name);
+asmlinkage long sys_acct(const char __user *name);
 asmlinkage long sys_capget(cap_user_header_t header,
 				cap_user_data_t dataptr);
 asmlinkage long sys_capset(cap_user_header_t header,
@@ -157,8 +157,8 @@
 asmlinkage long sys_exit(int error_code);
 asmlinkage void sys_exit_group(int error_code);
 asmlinkage long sys_wait4(pid_t pid, unsigned int *stat_addr,
-				int options, struct rusage *ru);
-asmlinkage long sys_waitpid(pid_t pid, unsigned int *stat_addr, int options);
+				int options, struct rusage __user *ru);
+asmlinkage long sys_waitpid(pid_t pid, unsigned int __user *stat_addr, int options);
 asmlinkage long sys_set_tid_address(int __user *tidptr);
 asmlinkage long sys_futex(u32 __user *uaddr, int op, int val,
 			struct timespec __user *utime, u32 __user *uaddr2);
@@ -274,7 +274,7 @@
 				unsigned dev);
 asmlinkage long sys_link(const char __user *oldname,
 				const char __user *newname);
-asmlinkage long sys_symlink(const char *old, const char *new);
+asmlinkage long sys_symlink(const char __user *old, const char __user *new);
 asmlinkage long sys_unlink(const char __user *pathname);
 asmlinkage long sys_rename(const char __user *oldname,
 				const char __user *newname);
@@ -292,17 +292,17 @@
 asmlinkage long sys_ioctl(unsigned int fd, unsigned int cmd,
 				unsigned long arg);
 asmlinkage long sys_flock(unsigned int fd, unsigned int cmd);
-asmlinkage long sys_io_setup(unsigned nr_reqs, aio_context_t *ctx);
+asmlinkage long sys_io_setup(unsigned nr_reqs, aio_context_t __user *ctx);
 asmlinkage long sys_io_destroy(aio_context_t ctx);
 asmlinkage long sys_io_getevents(aio_context_t ctx_id,
 				long min_nr,
 				long nr,
-				struct io_event *events,
-				struct timespec *timeout);
+				struct io_event __user *events,
+				struct timespec __user *timeout);
 asmlinkage long sys_io_submit(aio_context_t, long,
-				struct iocb __user **);
-asmlinkage long sys_io_cancel(aio_context_t ctx_id, struct iocb *iocb,
-			      struct io_event *result);
+				struct iocb __user * __user *);
+asmlinkage long sys_io_cancel(aio_context_t ctx_id, struct iocb __user *iocb,
+			      struct io_event __user *result);
 asmlinkage ssize_t sys_sendfile(int out_fd, int in_fd,
 				off_t __user *offset, size_t count);
 asmlinkage ssize_t sys_sendfile64(int out_fd, int in_fd,
@@ -321,9 +321,9 @@
 				uid_t user, gid_t group);
 asmlinkage long sys_fchown(unsigned int fd, uid_t user, gid_t group);
 #ifdef CONFIG_UID16
-asmlinkage long sys_chown16(const char *filename,
+asmlinkage long sys_chown16(const char __user *filename,
 				old_uid_t user, old_gid_t group);
-asmlinkage long sys_lchown16(const char *filename,
+asmlinkage long sys_lchown16(const char __user *filename,
 				old_uid_t user, old_gid_t group);
 asmlinkage long sys_fchown16(unsigned int fd, old_uid_t user, old_gid_t group);
 asmlinkage long sys_setregid16(old_gid_t rgid, old_gid_t egid);
@@ -331,11 +331,11 @@
 asmlinkage long sys_setreuid16(old_uid_t ruid, old_uid_t euid);
 asmlinkage long sys_setuid16(old_uid_t uid);
 asmlinkage long sys_setresuid16(old_uid_t ruid, old_uid_t euid, old_uid_t suid);
-asmlinkage long sys_getresuid16(old_uid_t *ruid,
-				old_uid_t *euid, old_uid_t *suid);
+asmlinkage long sys_getresuid16(old_uid_t __user *ruid,
+				old_uid_t __user *euid, old_uid_t __user *suid);
 asmlinkage long sys_setresgid16(old_gid_t rgid, old_gid_t egid, old_gid_t sgid);
-asmlinkage long sys_getresgid16(old_gid_t *rgid,
-				old_gid_t *egid, old_gid_t *sgid);
+asmlinkage long sys_getresgid16(old_gid_t __user *rgid,
+				old_gid_t __user *egid, old_gid_t __user *sgid);
 asmlinkage long sys_setfsuid16(old_uid_t uid);
 asmlinkage long sys_setfsgid16(old_gid_t gid);
 asmlinkage long sys_getgroups16(int gidsetsize, old_gid_t __user *grouplist);
@@ -375,8 +375,8 @@
 asmlinkage long sys_chdir(const char __user *filename);
 asmlinkage long sys_fchdir(unsigned int fd);
 asmlinkage long sys_rmdir(const char __user *pathname);
-asmlinkage long sys_lookup_dcookie(u64 cookie64, char *buf, size_t len);
-asmlinkage long sys_quotactl(unsigned int cmd, const char *special,
+asmlinkage long sys_lookup_dcookie(u64 cookie64, char __user *buf, size_t len);
+asmlinkage long sys_quotactl(unsigned int cmd, const char __user *special,
 				qid_t id, caddr_t addr);
 asmlinkage long sys_getdents(unsigned int fd,
 				struct linux_dirent __user *dirent,
@@ -445,7 +445,7 @@
 				unsigned nsops,
 				const struct timespec __user *timeout);
 asmlinkage long sys_shmat(int shmid, char __user *shmaddr,
-				int shmflg, unsigned long *addr);
+				int shmflg, unsigned long __user *addr);
 asmlinkage long sys_shmget(key_t key, size_t size, int flag);
 asmlinkage long sys_shmdt(char __user *shmaddr);
 asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf);
@@ -453,10 +453,10 @@
 asmlinkage long sys_pciconfig_iobase(long which, unsigned long bus, unsigned long devfn);
 asmlinkage long sys_pciconfig_read(unsigned long bus, unsigned long dfn,
 				unsigned long off, unsigned long len,
-				void *buf);
+				void __user *buf);
 asmlinkage long sys_pciconfig_write(unsigned long bus, unsigned long dfn,
 				unsigned long off, unsigned long len,
-				void *buf);
+				void __user *buf);
 
 asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3,
 			unsigned long arg4, unsigned long arg5);
diff -Nru a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h
--- a/include/sound/ac97_codec.h	Thu Apr  1 00:48:06 2004
+++ b/include/sound/ac97_codec.h	Thu Apr  1 00:48:06 2004
@@ -460,7 +460,7 @@
 }
 static inline int ac97_is_rev22(ac97_t * ac97)
 {
-	return (ac97->ext_id & AC97_EI_REV_MASK) == AC97_EI_REV_22;
+	return (ac97->ext_id & AC97_EI_REV_MASK) >= AC97_EI_REV_22;
 }
 static inline int ac97_can_amap(ac97_t * ac97)
 {
diff -Nru a/include/sound/cs8427.h b/include/sound/cs8427.h
--- a/include/sound/cs8427.h	Thu Apr  1 00:48:06 2004
+++ b/include/sound/cs8427.h	Thu Apr  1 00:48:06 2004
@@ -187,7 +187,8 @@
 #define CS8427_VER8427A		0x71
 
 int snd_cs8427_detect(snd_i2c_bus_t *bus, unsigned char addr);
-int snd_cs8427_create(snd_i2c_bus_t *bus, unsigned char addr, snd_i2c_device_t **r_cs8427);
+int snd_cs8427_create(snd_i2c_bus_t *bus, unsigned char addr,
+		      unsigned int reset_timeout, snd_i2c_device_t **r_cs8427);
 void snd_cs8427_reset(snd_i2c_device_t *cs8427);
 int snd_cs8427_reg_write(snd_i2c_device_t *device, unsigned char reg, unsigned char val);
 int snd_cs8427_reg_read(snd_i2c_device_t *device, unsigned char reg);
diff -Nru a/include/sound/pcm.h b/include/sound/pcm.h
--- a/include/sound/pcm.h	Thu Apr  1 00:48:06 2004
+++ b/include/sound/pcm.h	Thu Apr  1 00:48:06 2004
@@ -428,7 +428,7 @@
 	snd_info_entry_t *proc_root;
 	snd_info_entry_t *proc_info_entry;
 #ifdef CONFIG_SND_DEBUG
-	unsigned int xrun_debug: 1;
+	unsigned int xrun_debug;	/* 0 = disabled, 1 = verbose, 2 = stacktrace */
 	snd_info_entry_t *proc_xrun_debug_entry;
 #endif
 };
diff -Nru a/include/sound/version.h b/include/sound/version.h
--- a/include/sound/version.h	Thu Apr  1 00:48:06 2004
+++ b/include/sound/version.h	Thu Apr  1 00:48:06 2004
@@ -1,3 +1,3 @@
 /* include/version.h.  Generated by configure.  */
-#define CONFIG_SND_VERSION "1.0.3"
-#define CONFIG_SND_DATE " (Mon Mar 01 10:12:14 2004 UTC)"
+#define CONFIG_SND_VERSION "1.0.4rc2"
+#define CONFIG_SND_DATE " (Tue Mar 30 08:19:30 2004 UTC)"
diff -Nru a/kernel/exec_domain.c b/kernel/exec_domain.c
--- a/kernel/exec_domain.c	Thu Apr  1 00:48:06 2004
+++ b/kernel/exec_domain.c	Thu Apr  1 00:48:06 2004
@@ -170,7 +170,7 @@
 		fsp = copy_fs_struct(current->fs);
 		if (fsp == NULL) {
 			module_put(ep->module);
-			return -ENOMEM;;
+			return -ENOMEM;
 		}
 
 		task_lock(current);
@@ -213,7 +213,7 @@
 asmlinkage long
 sys_personality(u_long personality)
 {
-	u_long old = current->personality;;
+	u_long old = current->personality;
 
 	if (personality != 0xffffffff) {
 		set_personality(personality);
diff -Nru a/kernel/stop_machine.c b/kernel/stop_machine.c
--- a/kernel/stop_machine.c	Thu Apr  1 00:48:06 2004
+++ b/kernel/stop_machine.c	Thu Apr  1 00:48:06 2004
@@ -149,10 +149,12 @@
 	complete(&smdata->done);
 
 	/* Wait for kthread_stop */
+	__set_current_state(TASK_INTERRUPTIBLE);
 	while (!kthread_should_stop()) {
-		__set_current_state(TASK_INTERRUPTIBLE);
 		schedule();
+		__set_current_state(TASK_INTERRUPTIBLE);
 	}
+	__set_current_state(TASK_RUNNING);
 	return ret;
 }
 
diff -Nru a/kernel/timer.c b/kernel/timer.c
--- a/kernel/timer.c	Thu Apr  1 00:48:06 2004
+++ b/kernel/timer.c	Thu Apr  1 00:48:06 2004
@@ -1059,7 +1059,7 @@
 static long nanosleep_restart(struct restart_block *restart)
 {
 	unsigned long expire = restart->arg0, now = jiffies;
-	struct timespec *rmtp = (struct timespec *) restart->arg1;
+	struct timespec __user *rmtp = (struct timespec __user *) restart->arg1;
 	long ret;
 
 	/* Did it expire while we handled signals? */
@@ -1082,7 +1082,7 @@
 	return ret;
 }
 
-asmlinkage long sys_nanosleep(struct timespec *rqtp, struct timespec *rmtp)
+asmlinkage long sys_nanosleep(struct timespec __user *rqtp, struct timespec __user *rmtp)
 {
 	struct timespec t;
 	unsigned long expire;
diff -Nru a/kernel/uid16.c b/kernel/uid16.c
--- a/kernel/uid16.c	Thu Apr  1 00:48:06 2004
+++ b/kernel/uid16.c	Thu Apr  1 00:48:06 2004
@@ -17,12 +17,12 @@
 
 #include <asm/uaccess.h>
 
-asmlinkage long sys_chown16(const char * filename, old_uid_t user, old_gid_t group)
+asmlinkage long sys_chown16(const char __user * filename, old_uid_t user, old_gid_t group)
 {
 	return sys_chown(filename, low2highuid(user), low2highgid(group));
 }
 
-asmlinkage long sys_lchown16(const char * filename, old_uid_t user, old_gid_t group)
+asmlinkage long sys_lchown16(const char __user * filename, old_uid_t user, old_gid_t group)
 {
 	return sys_lchown(filename, low2highuid(user), low2highgid(group));
 }
@@ -58,7 +58,7 @@
 		low2highuid(suid));
 }
 
-asmlinkage long sys_getresuid16(old_uid_t *ruid, old_uid_t *euid, old_uid_t *suid)
+asmlinkage long sys_getresuid16(old_uid_t __user *ruid, old_uid_t __user *euid, old_uid_t __user *suid)
 {
 	int retval;
 
@@ -75,7 +75,7 @@
 		low2highgid(sgid));
 }
 
-asmlinkage long sys_getresgid16(old_gid_t *rgid, old_gid_t *egid, old_gid_t *sgid)
+asmlinkage long sys_getresgid16(old_gid_t __user *rgid, old_gid_t __user *egid, old_gid_t __user *sgid)
 {
 	int retval;
 
diff -Nru a/lib/bitmap.c b/lib/bitmap.c
--- a/lib/bitmap.c	Thu Apr  1 00:48:06 2004
+++ b/lib/bitmap.c	Thu Apr  1 00:48:06 2004
@@ -47,7 +47,7 @@
 int bitmap_equal(const unsigned long *bitmap1,
 		unsigned long *bitmap2, int bits)
 {
-	int k, lim = bits/BITS_PER_LONG;;
+	int k, lim = bits/BITS_PER_LONG;
 	for (k = 0; k < lim; ++k)
 		if (bitmap1[k] != bitmap2[k])
 			return 0;
diff -Nru a/mm/pdflush.c b/mm/pdflush.c
--- a/mm/pdflush.c	Thu Apr  1 00:48:07 2004
+++ b/mm/pdflush.c	Thu Apr  1 00:48:07 2004
@@ -172,6 +172,12 @@
 static int pdflush(void *dummy)
 {
 	struct pdflush_work my_work;
+
+	/*
+	 * pdflush can spend a lot of time doing encryption via dm-crypt.  We
+	 * don't want to do that at keventd's priority.
+	 */
+	set_user_nice(current, 0);
 	return __pdflush(&my_work);
 }
 
diff -Nru a/net/Makefile b/net/Makefile
--- a/net/Makefile	Thu Apr  1 00:48:06 2004
+++ b/net/Makefile	Thu Apr  1 00:48:06 2004
@@ -16,7 +16,9 @@
 obj-$(CONFIG_NET)		+= ethernet/ 802/ sched/ netlink/
 obj-$(CONFIG_INET)		+= ipv4/ xfrm/
 obj-$(CONFIG_UNIX)		+= unix/
-obj-$(CONFIG_IPV6)		+= ipv6/
+ifneq ($(CONFIG_IPV6),)
+obj-y				+= ipv6/
+endif
 obj-$(CONFIG_PACKET)		+= packet/
 obj-$(CONFIG_NET_KEY)		+= key/
 obj-$(CONFIG_NET_SCHED)		+= sched/
diff -Nru a/net/ipv4/netfilter/ip_nat_snmp_basic.c b/net/ipv4/netfilter/ip_nat_snmp_basic.c
--- a/net/ipv4/netfilter/ip_nat_snmp_basic.c	Thu Apr  1 00:48:06 2004
+++ b/net/ipv4/netfilter/ip_nat_snmp_basic.c	Thu Apr  1 00:48:06 2004
@@ -899,10 +899,10 @@
 		goto err_addr_free;
 		
 	if (cls != ASN1_UNI || con != ASN1_PRI || tag != ASN1_INT)
-		goto err_addr_free;;
+		goto err_addr_free;
 		
 	if (!asn1_uint_decode(ctx, end, &trap->general))
-		goto err_addr_free;;
+		goto err_addr_free;
 		
 	if (!asn1_header_decode(ctx, &end, &cls, &con, &tag))
 		goto err_addr_free;
diff -Nru a/net/ipv4/netfilter/ip_nat_standalone.c b/net/ipv4/netfilter/ip_nat_standalone.c
--- a/net/ipv4/netfilter/ip_nat_standalone.c	Thu Apr  1 00:48:06 2004
+++ b/net/ipv4/netfilter/ip_nat_standalone.c	Thu Apr  1 00:48:06 2004
@@ -124,7 +124,16 @@
 		WRITE_LOCK(&ip_nat_lock);
 		/* Seen it before?  This can happen for loopback, retrans,
 		   or local packets.. */
-		if (!(info->initialized & (1 << maniptype))) {
+		if (!(info->initialized & (1 << maniptype))
+#ifndef CONFIG_IP_NF_NAT_LOCAL
+		    /* If this session has already been confirmed we must not
+		     * touch it again even if there is no mapping set up.
+		     * Can only happen on local->local traffic with
+		     * CONFIG_IP_NF_NAT_LOCAL disabled.
+		     */
+		    && !(ct->status & IPS_CONFIRMED)
+#endif
+		    ) {
 			unsigned int ret;
 
 			if (ct->master
diff -Nru a/net/ipv4/netfilter/ipt_MASQUERADE.c b/net/ipv4/netfilter/ipt_MASQUERADE.c
--- a/net/ipv4/netfilter/ipt_MASQUERADE.c	Thu Apr  1 00:48:06 2004
+++ b/net/ipv4/netfilter/ipt_MASQUERADE.c	Thu Apr  1 00:48:06 2004
@@ -45,7 +45,7 @@
 	const struct ip_nat_multi_range *mr = targinfo;
 
 	if (strcmp(tablename, "nat") != 0) {
-		DEBUGP("masquerade_check: bad table `%s'.\n", table);
+		DEBUGP("masquerade_check: bad table `%s'.\n", tablename);
 		return 0;
 	}
 	if (targinfosize != IPT_ALIGN(sizeof(*mr))) {
diff -Nru a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
--- a/net/ipv4/tcp_ipv4.c	Thu Apr  1 00:48:06 2004
+++ b/net/ipv4/tcp_ipv4.c	Thu Apr  1 00:48:06 2004
@@ -1596,7 +1596,7 @@
 	newinet->id = newtp->write_seq ^ jiffies;
 
 	tcp_sync_mss(newsk, dst_pmtu(dst));
-	newtp->advmss = dst_metric(dst, RTAX_ADVMSS);;
+	newtp->advmss = dst_metric(dst, RTAX_ADVMSS);
 	tcp_initialize_rcv_mss(newsk);
 
 	__tcp_v4_hash(newsk, 0);
@@ -1825,12 +1825,15 @@
 	goto discard_it;
 
 do_time_wait:
-	if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb))
-		goto discard_and_relse;
+	if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) {
+		tcp_tw_put((struct tcp_tw_bucket *) sk);
+		goto discard_it;
+	}
 
 	if (skb->len < (th->doff << 2) || tcp_checksum_complete(skb)) {
 		TCP_INC_STATS_BH(TcpInErrs);
-		goto discard_and_relse;
+		tcp_tw_put((struct tcp_tw_bucket *) sk);
+		goto discard_it;
 	}
 	switch (tcp_timewait_state_process((struct tcp_tw_bucket *)sk,
 					   skb, th, skb->len)) {
diff -Nru a/net/ipv6/Makefile b/net/ipv6/Makefile
--- a/net/ipv6/Makefile	Thu Apr  1 00:48:06 2004
+++ b/net/ipv6/Makefile	Thu Apr  1 00:48:06 2004
@@ -19,3 +19,5 @@
 obj-$(CONFIG_NETFILTER)	+= netfilter/
 
 obj-$(CONFIG_IPV6_TUNNEL) += ip6_tunnel.o
+
+obj-y += exthdrs_core.o
diff -Nru a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
--- a/net/ipv6/exthdrs.c	Thu Apr  1 00:48:06 2004
+++ b/net/ipv6/exthdrs.c	Thu Apr  1 00:48:06 2004
@@ -633,105 +633,3 @@
 	}
 	return opt2;
 }
-
-
-/* 
- * find out if nexthdr is a well-known extension header or a protocol
- */
-
-int ipv6_ext_hdr(u8 nexthdr)
-{
-	/* 
-	 * find out if nexthdr is an extension header or a protocol
-	 */
-	return ( (nexthdr == NEXTHDR_HOP)	||
-		 (nexthdr == NEXTHDR_ROUTING)	||
-		 (nexthdr == NEXTHDR_FRAGMENT)	||
-		 (nexthdr == NEXTHDR_AUTH)	||
-		 (nexthdr == NEXTHDR_NONE)	||
-		 (nexthdr == NEXTHDR_DEST) );
-}
-
-/*
- * Skip any extension headers. This is used by the ICMP module.
- *
- * Note that strictly speaking this conflicts with RFC 2460 4.0:
- * ...The contents and semantics of each extension header determine whether 
- * or not to proceed to the next header.  Therefore, extension headers must
- * be processed strictly in the order they appear in the packet; a
- * receiver must not, for example, scan through a packet looking for a
- * particular kind of extension header and process that header prior to
- * processing all preceding ones.
- * 
- * We do exactly this. This is a protocol bug. We can't decide after a
- * seeing an unknown discard-with-error flavour TLV option if it's a 
- * ICMP error message or not (errors should never be send in reply to
- * ICMP error messages).
- * 
- * But I see no other way to do this. This might need to be reexamined
- * when Linux implements ESP (and maybe AUTH) headers.
- * --AK
- *
- * This function parses (probably truncated) exthdr set "hdr"
- * of length "len". "nexthdrp" initially points to some place,
- * where type of the first header can be found.
- *
- * It skips all well-known exthdrs, and returns pointer to the start
- * of unparsable area i.e. the first header with unknown type.
- * If it is not NULL *nexthdr is updated by type/protocol of this header.
- *
- * NOTES: - if packet terminated with NEXTHDR_NONE it returns NULL.
- *        - it may return pointer pointing beyond end of packet,
- *	    if the last recognized header is truncated in the middle.
- *        - if packet is truncated, so that all parsed headers are skipped,
- *	    it returns NULL.
- *	  - First fragment header is skipped, not-first ones
- *	    are considered as unparsable.
- *	  - ESP is unparsable for now and considered like
- *	    normal payload protocol.
- *	  - Note also special handling of AUTH header. Thanks to IPsec wizards.
- *
- * --ANK (980726)
- */
-
-int ipv6_skip_exthdr(const struct sk_buff *skb, int start, u8 *nexthdrp, int len)
-{
-	u8 nexthdr = *nexthdrp;
-
-	while (ipv6_ext_hdr(nexthdr)) {
-		struct ipv6_opt_hdr hdr;
-		int hdrlen;
-
-		if (len < (int)sizeof(struct ipv6_opt_hdr))
-			return -1;
-		if (nexthdr == NEXTHDR_NONE)
-			return -1;
-		if (skb_copy_bits(skb, start, &hdr, sizeof(hdr)))
-			BUG();
-		if (nexthdr == NEXTHDR_FRAGMENT) {
-			unsigned short frag_off;
-			if (skb_copy_bits(skb,
-					  start+offsetof(struct frag_hdr,
-							 frag_off),
-					  &frag_off,
-					  sizeof(frag_off))) {
-				return -1;
-			}
-
-			if (ntohs(frag_off) & ~0x7)
-				break;
-			hdrlen = 8;
-		} else if (nexthdr == NEXTHDR_AUTH)
-			hdrlen = (hdr.hdrlen+2)<<2; 
-		else
-			hdrlen = ipv6_optlen(&hdr); 
-
-		nexthdr = hdr.nexthdr;
-		len -= hdrlen;
-		start += hdrlen;
-	}
-
-	*nexthdrp = nexthdr;
-	return start;
-}
-
diff -Nru a/net/ipv6/exthdrs_core.c b/net/ipv6/exthdrs_core.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/ipv6/exthdrs_core.c	Thu Apr  1 00:48:07 2004
@@ -0,0 +1,108 @@
+/*
+ * IPv6 library code, needed by static components when full IPv6 support is
+ * not configured or static.
+ */
+#include <net/ipv6.h>
+
+/* 
+ * find out if nexthdr is a well-known extension header or a protocol
+ */
+
+int ipv6_ext_hdr(u8 nexthdr)
+{
+	/* 
+	 * find out if nexthdr is an extension header or a protocol
+	 */
+	return ( (nexthdr == NEXTHDR_HOP)	||
+		 (nexthdr == NEXTHDR_ROUTING)	||
+		 (nexthdr == NEXTHDR_FRAGMENT)	||
+		 (nexthdr == NEXTHDR_AUTH)	||
+		 (nexthdr == NEXTHDR_NONE)	||
+		 (nexthdr == NEXTHDR_DEST) );
+}
+
+/*
+ * Skip any extension headers. This is used by the ICMP module.
+ *
+ * Note that strictly speaking this conflicts with RFC 2460 4.0:
+ * ...The contents and semantics of each extension header determine whether 
+ * or not to proceed to the next header.  Therefore, extension headers must
+ * be processed strictly in the order they appear in the packet; a
+ * receiver must not, for example, scan through a packet looking for a
+ * particular kind of extension header and process that header prior to
+ * processing all preceding ones.
+ * 
+ * We do exactly this. This is a protocol bug. We can't decide after a
+ * seeing an unknown discard-with-error flavour TLV option if it's a 
+ * ICMP error message or not (errors should never be send in reply to
+ * ICMP error messages).
+ * 
+ * But I see no other way to do this. This might need to be reexamined
+ * when Linux implements ESP (and maybe AUTH) headers.
+ * --AK
+ *
+ * This function parses (probably truncated) exthdr set "hdr"
+ * of length "len". "nexthdrp" initially points to some place,
+ * where type of the first header can be found.
+ *
+ * It skips all well-known exthdrs, and returns pointer to the start
+ * of unparsable area i.e. the first header with unknown type.
+ * If it is not NULL *nexthdr is updated by type/protocol of this header.
+ *
+ * NOTES: - if packet terminated with NEXTHDR_NONE it returns NULL.
+ *        - it may return pointer pointing beyond end of packet,
+ *	    if the last recognized header is truncated in the middle.
+ *        - if packet is truncated, so that all parsed headers are skipped,
+ *	    it returns NULL.
+ *	  - First fragment header is skipped, not-first ones
+ *	    are considered as unparsable.
+ *	  - ESP is unparsable for now and considered like
+ *	    normal payload protocol.
+ *	  - Note also special handling of AUTH header. Thanks to IPsec wizards.
+ *
+ * --ANK (980726)
+ */
+
+int ipv6_skip_exthdr(const struct sk_buff *skb, int start, u8 *nexthdrp, int len)
+{
+	u8 nexthdr = *nexthdrp;
+
+	while (ipv6_ext_hdr(nexthdr)) {
+		struct ipv6_opt_hdr hdr;
+		int hdrlen;
+
+		if (len < (int)sizeof(struct ipv6_opt_hdr))
+			return -1;
+		if (nexthdr == NEXTHDR_NONE)
+			return -1;
+		if (skb_copy_bits(skb, start, &hdr, sizeof(hdr)))
+			BUG();
+		if (nexthdr == NEXTHDR_FRAGMENT) {
+			unsigned short frag_off;
+			if (skb_copy_bits(skb,
+					  start+offsetof(struct frag_hdr,
+							 frag_off),
+					  &frag_off,
+					  sizeof(frag_off))) {
+				return -1;
+			}
+
+			if (ntohs(frag_off) & ~0x7)
+				break;
+			hdrlen = 8;
+		} else if (nexthdr == NEXTHDR_AUTH)
+			hdrlen = (hdr.hdrlen+2)<<2; 
+		else
+			hdrlen = ipv6_optlen(&hdr); 
+
+		nexthdr = hdr.nexthdr;
+		len -= hdrlen;
+		start += hdrlen;
+	}
+
+	*nexthdrp = nexthdr;
+	return start;
+}
+
+EXPORT_SYMBOL(ipv6_ext_hdr);
+EXPORT_SYMBOL(ipv6_skip_exthdr);
diff -Nru a/net/ipv6/ipv6_syms.c b/net/ipv6/ipv6_syms.c
--- a/net/ipv6/ipv6_syms.c	Thu Apr  1 00:48:06 2004
+++ b/net/ipv6/ipv6_syms.c	Thu Apr  1 00:48:06 2004
@@ -41,9 +41,7 @@
 #endif
 EXPORT_SYMBOL(rt6_lookup);
 EXPORT_SYMBOL(fl6_sock_lookup);
-EXPORT_SYMBOL(ipv6_ext_hdr);
 EXPORT_SYMBOL(ip6_append_data);
 EXPORT_SYMBOL(ip6_flush_pending_frames);
 EXPORT_SYMBOL(ip6_push_pending_frames);
 EXPORT_SYMBOL(ipv6_push_nfrag_opts);
-EXPORT_SYMBOL(ipv6_skip_exthdr);
diff -Nru a/net/irda/irlan/irlan_filter.c b/net/irda/irlan/irlan_filter.c
--- a/net/irda/irlan/irlan_filter.c	Thu Apr  1 00:48:06 2004
+++ b/net/irda/irlan/irlan_filter.c	Thu Apr  1 00:48:06 2004
@@ -53,7 +53,7 @@
 			self->provider.mac_address[4] = 
 				self->provider.send_arb_val & 0xff;
 			self->provider.mac_address[5] = 
-				(self->provider.send_arb_val >> 8) & 0xff;;
+				(self->provider.send_arb_val >> 8) & 0xff;
 		} else {
 			/* Just generate something for now */
 			get_random_bytes(self->provider.mac_address+4, 1);
diff -Nru a/net/irda/irttp.c b/net/irda/irttp.c
--- a/net/irda/irttp.c	Thu Apr  1 00:48:06 2004
+++ b/net/irda/irttp.c	Thu Apr  1 00:48:06 2004
@@ -1271,7 +1271,7 @@
 
 	lsap = (struct lsap_cb *) sap;
 
-	self->max_seg_size = max_seg_size - TTP_HEADER;;
+	self->max_seg_size = max_seg_size - TTP_HEADER;
 	self->max_header_size = max_header_size+TTP_HEADER;
 
 	IRDA_DEBUG(4, "%s(), TSAP sel=%02x\n", __FUNCTION__, self->stsap_sel);
diff -Nru a/net/key/af_key.c b/net/key/af_key.c
--- a/net/key/af_key.c	Thu Apr  1 00:48:06 2004
+++ b/net/key/af_key.c	Thu Apr  1 00:48:06 2004
@@ -1699,7 +1699,7 @@
 		sin6->sin6_port = xp->selector.sport;
 		sin6->sin6_flowinfo = 0;
 		memcpy(&sin6->sin6_addr, xp->selector.saddr.a6,
-		       sizeof(struct in6_addr));;
+		       sizeof(struct in6_addr));
 		sin6->sin6_scope_id = 0;
 	}
 #endif
diff -Nru a/net/packet/af_packet.c b/net/packet/af_packet.c
--- a/net/packet/af_packet.c	Thu Apr  1 00:48:06 2004
+++ b/net/packet/af_packet.c	Thu Apr  1 00:48:06 2004
@@ -34,6 +34,8 @@
  *	Alexey Kuznetsov	:	Untied from IPv4 stack.
  *	Cyrus Durgin		:	Fixed kerneld for kmod.
  *	Michal Ostrowski        :       Module initialization cleanup.
+ *         Ulises Alonso        :       Frame number limit removal and 
+ *                                      packet_set_ring memory leak.
  *
  *		This program is free software; you can redistribute it and/or
  *		modify it under the terms of the GNU General Public License
@@ -168,30 +170,47 @@
 
 struct packet_opt
 {
+	struct tpacket_stats	stats;
+#ifdef CONFIG_PACKET_MMAP
+	unsigned long		*pg_vec;
+	unsigned int		head;
+	unsigned int            frames_per_block;
+	unsigned int		frame_size;
+	unsigned int		frame_max;
+	int			copy_thresh;
+#endif
 	struct packet_type	prot_hook;
 	spinlock_t		bind_lock;
 	char			running;	/* prot_hook is attached*/
 	int			ifindex;	/* bound device		*/
 	unsigned short		num;
-	struct tpacket_stats	stats;
 #ifdef CONFIG_PACKET_MULTICAST
 	struct packet_mclist	*mclist;
 #endif
 #ifdef CONFIG_PACKET_MMAP
 	atomic_t		mapped;
-	unsigned long		*pg_vec;
-	unsigned int		pg_vec_order;
+	unsigned int            pg_vec_order;
 	unsigned int		pg_vec_pages;
 	unsigned int		pg_vec_len;
-
-	struct tpacket_hdr	**iovec;
-	unsigned int		frame_size;
-	unsigned int		iovmax;
-	unsigned int		head;
-	int			copy_thresh;
 #endif
 };
 
+#ifdef CONFIG_PACKET_MMAP
+
+static inline unsigned long packet_lookup_frame(struct packet_opt *po, unsigned int position)
+{
+	unsigned int pg_vec_pos, frame_offset;
+	unsigned long frame;
+
+	pg_vec_pos = position / po->frames_per_block;
+	frame_offset = position % po->frames_per_block;
+
+	frame = (unsigned long) (po->pg_vec[pg_vec_pos] + (frame_offset * po->frame_size));
+	
+	return frame;
+}
+#endif
+
 #define pkt_sk(__sk) ((struct packet_opt *)(__sk)->sk_protinfo)
 
 void packet_sock_destruct(struct sock *sk)
@@ -586,11 +605,11 @@
 		snaplen = skb->len-skb->data_len;
 
 	spin_lock(&sk->sk_receive_queue.lock);
-	h = po->iovec[po->head];
-
+	h = (struct tpacket_hdr *)packet_lookup_frame(po, po->head);
+	
 	if (h->tp_status)
 		goto ring_is_full;
-	po->head = po->head != po->iovmax ? po->head+1 : 0;
+	po->head = po->head != po->frame_max ? po->head+1 : 0;
 	po->stats.tp_packets++;
 	if (copy_skb) {
 		status |= TP_STATUS_COPY;
@@ -1485,10 +1504,13 @@
 	unsigned int mask = datagram_poll(file, sock, wait);
 
 	spin_lock_bh(&sk->sk_receive_queue.lock);
-	if (po->iovec) {
-		unsigned last = po->head ? po->head-1 : po->iovmax;
+	if (po->pg_vec) {
+		unsigned last = po->head ? po->head-1 : po->frame_max;
+		struct tpacket_hdr *h;
 
-		if (po->iovec[last]->tp_status)
+		h = (struct tpacket_hdr *)packet_lookup_frame(po, last);
+
+		if (h->tp_status)
 			mask |= POLLIN | POLLRDNORM;
 	}
 	spin_unlock_bh(&sk->sk_receive_queue.lock);
@@ -1548,16 +1570,18 @@
 static int packet_set_ring(struct sock *sk, struct tpacket_req *req, int closing)
 {
 	unsigned long *pg_vec = NULL;
-	struct tpacket_hdr **io_vec = NULL;
 	struct packet_opt *po = pkt_sk(sk);
 	int was_running, num, order = 0;
 	int err = 0;
-
+	
 	if (req->tp_block_nr) {
 		int i, l;
-		int frames_per_block;
 
 		/* Sanity tests and some calculations */
+
+		if (po->pg_vec)
+			return -EBUSY;
+
 		if ((int)req->tp_block_size <= 0)
 			return -EINVAL;
 		if (req->tp_block_size&(PAGE_SIZE-1))
@@ -1566,10 +1590,11 @@
 			return -EINVAL;
 		if (req->tp_frame_size&(TPACKET_ALIGNMENT-1))
 			return -EINVAL;
-		frames_per_block = req->tp_block_size/req->tp_frame_size;
-		if (frames_per_block <= 0)
+
+		po->frames_per_block = req->tp_block_size/req->tp_frame_size;
+		if (po->frames_per_block <= 0)
 			return -EINVAL;
-		if (frames_per_block*req->tp_block_nr != req->tp_frame_nr)
+		if (po->frames_per_block*req->tp_block_nr != req->tp_frame_nr)
 			return -EINVAL;
 		/* OK! */
 
@@ -1596,20 +1621,16 @@
 		}
 		/* Page vector is allocated */
 
-		/* Draw frames */
-		io_vec = kmalloc(req->tp_frame_nr*sizeof(struct tpacket_hdr*), GFP_KERNEL);
-		if (io_vec == NULL)
-			goto out_free_pgvec;
-		memset(io_vec, 0, req->tp_frame_nr*sizeof(struct tpacket_hdr*));
-
 		l = 0;
 		for (i=0; i<req->tp_block_nr; i++) {
 			unsigned long ptr = pg_vec[i];
+			struct tpacket_hdr *header;
 			int k;
 
-			for (k=0; k<frames_per_block; k++, l++) {
-				io_vec[l] = (struct tpacket_hdr*)ptr;
-				io_vec[l]->tp_status = TP_STATUS_KERNEL;
+			for (k=0; k<po->frames_per_block; k++) {
+				
+				header = (struct tpacket_hdr*)ptr;
+				header->tp_status = TP_STATUS_KERNEL;
 				ptr += req->tp_frame_size;
 			}
 		}
@@ -1642,8 +1663,7 @@
 
 		spin_lock_bh(&sk->sk_receive_queue.lock);
 		pg_vec = XC(po->pg_vec, pg_vec);
-		io_vec = XC(po->iovec, io_vec);
-		po->iovmax = req->tp_frame_nr-1;
+		po->frame_max = req->tp_frame_nr-1;
 		po->head = 0;
 		po->frame_size = req->tp_frame_size;
 		spin_unlock_bh(&sk->sk_receive_queue.lock);
@@ -1652,7 +1672,7 @@
 		req->tp_block_nr = XC(po->pg_vec_len, req->tp_block_nr);
 
 		po->pg_vec_pages = req->tp_block_size/PAGE_SIZE;
-		po->prot_hook.func = po->iovec ? tpacket_rcv : packet_rcv;
+		po->prot_hook.func = po->pg_vec ? tpacket_rcv : packet_rcv;
 		skb_queue_purge(&sk->sk_receive_queue);
 #undef XC
 		if (atomic_read(&po->mapped))
@@ -1669,9 +1689,6 @@
 	spin_unlock(&po->bind_lock);
 
 	release_sock(sk);
-
-	if (io_vec)
-		kfree(io_vec);
 
 out_free_pgvec:
 	if (pg_vec)
diff -Nru a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
--- a/net/sched/sch_hfsc.c	Thu Apr  1 00:48:06 2004
+++ b/net/sched/sch_hfsc.c	Thu Apr  1 00:48:06 2004
@@ -1562,7 +1562,7 @@
 	struct tc_hfsc_qopt *qopt;
 
 	if (opt == NULL || RTA_PAYLOAD(opt) < sizeof(*qopt))
-		return -EINVAL;;
+		return -EINVAL;
 	qopt = RTA_DATA(opt);
 
 	sch_tree_lock(sch);
diff -Nru a/net/sctp/bind_addr.c b/net/sctp/bind_addr.c
--- a/net/sctp/bind_addr.c	Thu Apr  1 00:48:06 2004
+++ b/net/sctp/bind_addr.c	Thu Apr  1 00:48:06 2004
@@ -292,7 +292,7 @@
 		if (retval) {
 			/* Can't finish building the list, clean up. */
 			sctp_bind_addr_clean(bp);
-			break;;
+			break;
 		}
 
 		len = ntohs(param->length);
diff -Nru a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
--- a/net/sctp/sm_make_chunk.c	Thu Apr  1 00:48:06 2004
+++ b/net/sctp/sm_make_chunk.c	Thu Apr  1 00:48:06 2004
@@ -1467,7 +1467,7 @@
 struct __sctp_missing {
 	__u32 num_missing;
 	__u16 type;
-}  __attribute__((packed));;
+}  __attribute__((packed));
 
 /*
  * Report a missing mandatory parameter.
diff -Nru a/net/sctp/socket.c b/net/sctp/socket.c
--- a/net/sctp/socket.c	Thu Apr  1 00:48:07 2004
+++ b/net/sctp/socket.c	Thu Apr  1 00:48:07 2004
@@ -4490,7 +4490,7 @@
 	 * 3) Peeling off non-partial delivery; move pd_lobby to recieve_queue.
 	 */
 	skb_queue_head_init(&newsp->pd_lobby);
-	sctp_sk(newsk)->pd_mode = assoc->ulpq.pd_mode;;
+	sctp_sk(newsk)->pd_mode = assoc->ulpq.pd_mode;
 
 	if (sctp_sk(oldsk)->pd_mode) {
 		struct sk_buff_head *queue;
diff -Nru a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c
--- a/net/sunrpc/auth_gss/svcauth_gss.c	Thu Apr  1 00:48:06 2004
+++ b/net/sunrpc/auth_gss/svcauth_gss.c	Thu Apr  1 00:48:06 2004
@@ -193,7 +193,7 @@
 	len = qword_get(&mesg, buf, mlen);
 	status = -EINVAL;
 	if (len < 0)
-		goto out;;
+		goto out;
 	status = -ENOMEM;
 	if (dup_to_netobj(&rsii.in_token, buf, len))
 		goto out;
diff -Nru a/scripts/Makefile.modpost b/scripts/Makefile.modpost
--- a/scripts/Makefile.modpost	Thu Apr  1 00:48:06 2004
+++ b/scripts/Makefile.modpost	Thu Apr  1 00:48:06 2004
@@ -14,7 +14,7 @@
 modules := $(patsubst %.o,%.ko,$(wildcard $(__modules:.ko=.o)))
 
 ifneq ($(filter-out $(modules),$(__modules)),)
-  $(warning Trouble: $(__modules) )
+  $(warning Trouble: $(filter-out $(modules),$(__modules)))
   $(warning *** Uh-oh, you have stale module entries. You messed with SUBDIRS,)
   $(warning     do not complain if something goes wrong.)
 endif
diff -Nru a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
--- a/scripts/basic/fixdep.c	Thu Apr  1 00:48:06 2004
+++ b/scripts/basic/fixdep.c	Thu Apr  1 00:48:06 2004
@@ -38,7 +38,7 @@
  *
  * The idea above dates, by the way, back to Michael E Chastain, AFAIK.
  *
- * So to get dependencies right, there two issues:
+ * So to get dependencies right, there are two issues:
  * o if any of the files the compiler read changed, we need to rebuild
  * o if the command line given to the compile the file changed, we
  *   better rebuild as well.
diff -Nru a/scripts/modpost.c b/scripts/modpost.c
--- a/scripts/modpost.c	Thu Apr  1 00:48:06 2004
+++ b/scripts/modpost.c	Thu Apr  1 00:48:06 2004
@@ -141,26 +141,14 @@
 	symbolhash[hash] = new;
 }
 
-#define DOTSYM_PFX "__dot_"
-
 struct symbol *
 find_symbol(const char *name)
 {
 	struct symbol *s;
-	char dotname[64 + sizeof(DOTSYM_PFX)];
 
-	/* .foo matches foo.  PPC64 needs this. */
-	if (name[0] == '.') {
+	/* For our purposes, .foo matches foo.  PPC64 needs this. */
+	if (name[0] == '.')
 		name++;
-		strcpy(dotname, DOTSYM_PFX);
-		strncat(dotname, name, sizeof(dotname) - sizeof(DOTSYM_PFX) - 1);
-		dotname[sizeof(dotname)-1] = 0;
-		/* Sparc32 wants .foo to match __dot_foo, try this first. */
-		for (s = symbolhash[tdb_hash(dotname) % SYMBOL_HASH_SIZE]; s; s=s->next) {
-			if (strcmp(s->name, dotname) == 0)
-				return s;
-		}
-	}
 
 	for (s = symbolhash[tdb_hash(name) % SYMBOL_HASH_SIZE]; s; s=s->next) {
 		if (strcmp(s->name, name) == 0)
diff -Nru a/security/selinux/hooks.c b/security/selinux/hooks.c
--- a/security/selinux/hooks.c	Thu Apr  1 00:48:06 2004
+++ b/security/selinux/hooks.c	Thu Apr  1 00:48:06 2004
@@ -1453,7 +1453,7 @@
 
 static int selinux_quota_on(struct file *f)
 {
-	return file_has_perm(current, f, FILE__QUOTAON);;
+	return file_has_perm(current, f, FILE__QUOTAON);
 }
 
 static int selinux_syslog(int type)
diff -Nru a/sound/core/ioctl32/timer32.c b/sound/core/ioctl32/timer32.c
--- a/sound/core/ioctl32/timer32.c	Thu Apr  1 00:48:06 2004
+++ b/sound/core/ioctl32/timer32.c	Thu Apr  1 00:48:06 2004
@@ -88,8 +88,18 @@
 	{ SNDRV_TIMER_IOCTL_INFO32, AP(timer_info) },
 	MAP_COMPAT(SNDRV_TIMER_IOCTL_PARAMS),
 	{ SNDRV_TIMER_IOCTL_STATUS32, AP(timer_status) },
+#if 0
+	/* ** FIXME **
+	 * The following four entries are disabled because they conflict
+	 * with the TCOC* definitions.
+	 * Unfortunately, the current ioctl32 wrapper uses a single
+	 * hash table for all devices.  Once when the wrapper is fixed
+	 * with the table based on devices, they'll be back again.
+	 */
 	MAP_COMPAT(SNDRV_TIMER_IOCTL_START),
 	MAP_COMPAT(SNDRV_TIMER_IOCTL_STOP),
 	MAP_COMPAT(SNDRV_TIMER_IOCTL_CONTINUE),
+	MAP_COMPAT(SNDRV_TIMER_IOCTL_PAUSE),
+#endif
 	{ 0 },
 };
diff -Nru a/sound/core/pcm.c b/sound/core/pcm.c
--- a/sound/core/pcm.c	Thu Apr  1 00:48:06 2004
+++ b/sound/core/pcm.c	Thu Apr  1 00:48:06 2004
@@ -403,7 +403,7 @@
 	snd_pcm_str_t *pstr = (snd_pcm_str_t *)entry->private_data;
 	char line[64];
 	if (!snd_info_get_line(buffer, line, sizeof(line)))
-		pstr->xrun_debug = !!simple_strtoul(line, NULL, 10);
+		pstr->xrun_debug = simple_strtoul(line, NULL, 10);
 }
 #endif
 
diff -Nru a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
--- a/sound/core/pcm_lib.c	Thu Apr  1 00:48:06 2004
+++ b/sound/core/pcm_lib.c	Thu Apr  1 00:48:06 2004
@@ -167,7 +167,8 @@
 				   substream->pcm->card->number,
 				   substream->pcm->device,
 				   substream->stream ? 'c' : 'p');
-			dump_stack();
+			if (substream->pstr->xrun_debug > 1)
+				dump_stack();
 		}
 #endif
 		return -EPIPE;
@@ -194,8 +195,11 @@
 	if (delta > 0) {
 		if ((snd_pcm_uframes_t)delta < runtime->buffer_size / 2) {
 #ifdef CONFIG_SND_DEBUG
-			if (runtime->periods > 1)
+			if (runtime->periods > 1 && substream->pstr->xrun_debug) {
 				snd_printd(KERN_ERR "Unexpected hw_pointer value [1] (stream = %i, delta: -%ld, max jitter = %ld): wrong interrupt acknowledge?\n", substream->stream, (long) delta, runtime->buffer_size / 2);
+				if (substream->pstr->xrun_debug > 1)
+					dump_stack();
+			}
 #endif
 			return 0;
 		}
@@ -232,8 +236,11 @@
 	if (delta > 0) {
 		if ((snd_pcm_uframes_t)delta < runtime->buffer_size / 2) {
 #ifdef CONFIG_SND_DEBUG
-			if (runtime->periods > 2)
+			if (runtime->periods > 2 && substream->pstr->xrun_debug) {
 				snd_printd(KERN_ERR "Unexpected hw_pointer value [2] (stream = %i, delta: -%ld, max jitter = %ld): wrong interrupt acknowledge?\n", substream->stream, (long) delta, runtime->buffer_size / 2);
+				if (substream->pstr->xrun_debug > 1)
+					dump_stack();
+			}
 #endif
 			return 0;
 		}
diff -Nru a/sound/core/pcm_timer.c b/sound/core/pcm_timer.c
--- a/sound/core/pcm_timer.c	Thu Apr  1 00:48:06 2004
+++ b/sound/core/pcm_timer.c	Thu Apr  1 00:48:06 2004
@@ -32,9 +32,9 @@
  */
 
 /* Greatest common divisor */
-static int gcd(int a, int b)
+static unsigned long gcd(unsigned long a, unsigned long b)
 {
-	int r;
+	unsigned long r;
 	if (a < b) {
 		r = a;
 		a = b;
@@ -49,7 +49,7 @@
 
 void snd_pcm_timer_resolution_change(snd_pcm_substream_t *substream)
 {
-	unsigned int rate, mult, fsize, l;
+	unsigned long rate, mult, fsize, l;
 	snd_pcm_runtime_t *runtime = substream->runtime;
 	
         mult = 1000000000;
@@ -67,7 +67,11 @@
 		mult /= 2;
 		rate /= 2;
 	}
-	snd_assert(rate != 0, return);
+	if (rate == 0) {
+		snd_printk(KERN_ERR "pcm timer resolution out of range (rate = %u, period_size = %lu)\n", runtime->rate, runtime->period_size);
+		runtime->timer_resolution = -1;
+		return;
+	}
 	runtime->timer_resolution = mult * fsize / rate;
 }
 
diff -Nru a/sound/core/seq/oss/seq_oss_synth.h b/sound/core/seq/oss/seq_oss_synth.h
--- a/sound/core/seq/oss/seq_oss_synth.h	Thu Apr  1 00:48:06 2004
+++ b/sound/core/seq/oss/seq_oss_synth.h	Thu Apr  1 00:48:06 2004
@@ -37,7 +37,7 @@
 void snd_seq_oss_synth_cleanup(seq_oss_devinfo_t *dp);
 
 void snd_seq_oss_synth_reset(seq_oss_devinfo_t *dp, int dev);
-int snd_seq_oss_synth_load_patch(seq_oss_devinfo_t *dp, int dev, int fmt, const char *buf, int p, int c);
+int snd_seq_oss_synth_load_patch(seq_oss_devinfo_t *dp, int dev, int fmt, const char __user *buf, int p, int c);
 int snd_seq_oss_synth_is_valid(seq_oss_devinfo_t *dp, int dev);
 int snd_seq_oss_synth_sysex(seq_oss_devinfo_t *dp, int dev, unsigned char *buf, snd_seq_event_t *ev);
 int snd_seq_oss_synth_addr(seq_oss_devinfo_t *dp, int dev, snd_seq_event_t *ev);
diff -Nru a/sound/i2c/cs8427.c b/sound/i2c/cs8427.c
--- a/sound/i2c/cs8427.c	Thu Apr  1 00:48:06 2004
+++ b/sound/i2c/cs8427.c	Thu Apr  1 00:48:06 2004
@@ -50,6 +50,7 @@
 typedef struct {
 	unsigned char regmap[0x14];	/* map of first 1 + 13 registers */
 	unsigned int rate;
+	unsigned int reset_timeout;
 	cs8427_stream_t playback;
 	cs8427_stream_t capture;
 } cs8427_t;
@@ -163,6 +164,7 @@
 
 int snd_cs8427_create(snd_i2c_bus_t *bus,
 		      unsigned char addr,
+		      unsigned int reset_timeout,
 		      snd_i2c_device_t **r_cs8427)
 {
 	static unsigned char initvals1[] = {
@@ -256,6 +258,9 @@
 	snd_i2c_unlock(bus);
 
 	/* turn on run bit and rock'n'roll */
+	if (reset_timeout < 1)
+		reset_timeout = 1;
+	chip->reset_timeout = reset_timeout;
 	snd_cs8427_reset(device);
 
 #if 0	// it's nice for read tests
@@ -301,7 +306,7 @@
 	snd_cs8427_reg_write(cs8427, CS8427_REG_CLOCKSOURCE, chip->regmap[CS8427_REG_CLOCKSOURCE]);
 	udelay(200);
 	snd_i2c_unlock(cs8427->bus);
-	end_time = jiffies + HZ / 2;
+	end_time = jiffies + chip->reset_timeout;
 	while (time_after_eq(end_time, jiffies)) {
 		snd_i2c_lock(cs8427->bus);
 		data = snd_cs8427_reg_read(cs8427, CS8427_REG_RECVERRORS);
@@ -309,7 +314,7 @@
 		if (!(data & CS8427_UNLOCK))
 			break;
 		set_current_state(TASK_UNINTERRUPTIBLE);
-		schedule_timeout(HZ/100);
+		schedule_timeout(1);
 	}
 	snd_i2c_lock(cs8427->bus);
 	chip->regmap[CS8427_REG_CLOCKSOURCE] &= ~CS8427_RXDMASK;
diff -Nru a/sound/oss/cs46xx.c b/sound/oss/cs46xx.c
--- a/sound/oss/cs46xx.c	Thu Apr  1 00:48:06 2004
+++ b/sound/oss/cs46xx.c	Thu Apr  1 00:48:06 2004
@@ -3253,7 +3253,7 @@
 			
 		if (dmabuf->channel == NULL) {
 			kfree (card->states[0]);
-			card->states[0] = NULL;;
+			card->states[0] = NULL;
 			return -ENODEV;
 		}
 
@@ -3324,7 +3324,7 @@
 			
 		if (dmabuf->channel == NULL) {
 			kfree (card->states[1]);
-			card->states[1] = NULL;;
+			card->states[1] = NULL;
 			return -ENODEV;
 		}
 
diff -Nru a/sound/oss/i810_audio.c b/sound/oss/i810_audio.c
--- a/sound/oss/i810_audio.c	Thu Apr  1 00:48:06 2004
+++ b/sound/oss/i810_audio.c	Thu Apr  1 00:48:06 2004
@@ -2471,7 +2471,7 @@
 	if(file->f_mode & FMODE_READ) {
 		if((dmabuf->read_channel = card->alloc_rec_pcm_channel(card)) == NULL) {
 			kfree (card->states[i]);
-			card->states[i] = NULL;;
+			card->states[i] = NULL;
 			return -EBUSY;
 		}
 		dmabuf->trigger |= PCM_ENABLE_INPUT;
@@ -2483,7 +2483,7 @@
 			if(file->f_mode & FMODE_READ)
 				card->free_pcm_channel(card,dmabuf->read_channel->num);
 			kfree (card->states[i]);
-			card->states[i] = NULL;;
+			card->states[i] = NULL;
 			return -EBUSY;
 		}
 		/* Initialize to 8kHz?  What if we don't support 8kHz? */
diff -Nru a/sound/oss/nec_vrc5477.c b/sound/oss/nec_vrc5477.c
--- a/sound/oss/nec_vrc5477.c	Thu Apr  1 00:48:06 2004
+++ b/sound/oss/nec_vrc5477.c	Thu Apr  1 00:48:06 2004
@@ -293,7 +293,7 @@
 
 	spin_unlock_irqrestore(&s->lock, flags);
 
-	return result & 0xffff;;
+	return result & 0xffff;
 }
 
 
diff -Nru a/sound/oss/rme96xx.c b/sound/oss/rme96xx.c
--- a/sound/oss/rme96xx.c	Thu Apr  1 00:48:06 2004
+++ b/sound/oss/rme96xx.c	Thu Apr  1 00:48:06 2004
@@ -1320,7 +1320,7 @@
 		count = rme96xx_getispace(dma,val);
 
 		abinfo.fragsize = (s->fragsize*dma->inchannels)>>dma->formatshift;
-                abinfo.bytes = (count*dma->inchannels)>>dma->formatshift;;
+                abinfo.bytes = (count*dma->inchannels)>>dma->formatshift;
                 abinfo.fragstotal = 2;
                 abinfo.fragments = count > s->fragsize; 
 		return copy_to_user((void *)arg, &abinfo, sizeof(abinfo)) ? -EFAULT : 0;
@@ -1348,7 +1348,7 @@
 			return -EINVAL;
 		val = rme96xx_gethwptr(dma->s,0);
 		spin_lock_irqsave(&s->lock,flags);
-                cinfo.bytes = s->fragsize<<1;;
+                cinfo.bytes = s->fragsize<<1;
 		count = val - dma->readptr;
 		if (count < 0)
 			count += s->fragsize<<1;
@@ -1368,7 +1368,7 @@
 			return -EINVAL;
 		val = rme96xx_gethwptr(dma->s,0);
 		spin_lock_irqsave(&s->lock,flags);
-                cinfo.bytes = s->fragsize<<1;;
+                cinfo.bytes = s->fragsize<<1;
 		count = val - dma->writeptr;
 		if (count < 0)
 			count += s->fragsize<<1;
diff -Nru a/sound/oss/soundcard.c b/sound/oss/soundcard.c
--- a/sound/oss/soundcard.c	Thu Apr  1 00:48:06 2004
+++ b/sound/oss/soundcard.c	Thu Apr  1 00:48:06 2004
@@ -706,7 +706,7 @@
 
 void sound_stop_timer(void)
 {
-	del_timer(&seq_timer);;
+	del_timer(&seq_timer);
 }
 
 void conf_printf(char *name, struct address_info *hw_config)
diff -Nru a/sound/oss/sys_timer.c b/sound/oss/sys_timer.c
--- a/sound/oss/sys_timer.c	Thu Apr  1 00:48:06 2004
+++ b/sound/oss/sys_timer.c	Thu Apr  1 00:48:06 2004
@@ -116,7 +116,7 @@
 def_tmr_close(int dev)
 {
 	opened = tmr_running = 0;
-	del_timer(&def_tmr);;
+	del_timer(&def_tmr);
 }
 
 static int
diff -Nru a/sound/parisc/harmony.c b/sound/parisc/harmony.c
--- a/sound/parisc/harmony.c	Thu Apr  1 00:48:06 2004
+++ b/sound/parisc/harmony.c	Thu Apr  1 00:48:06 2004
@@ -544,7 +544,7 @@
 		case SNDRV_PCM_TRIGGER_STOP:
 			if (harmony->cap_stopped) 
 				return -EBUSY;
-			harmony->cap_stopped = 1;;
+			harmony->cap_stopped = 1;
 			snd_harmony_disable_interrupts(harmony);
 			break;
 		case SNDRV_PCM_TRIGGER_START:
diff -Nru a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
--- a/sound/pci/ac97/ac97_codec.c	Thu Apr  1 00:48:06 2004
+++ b/sound/pci/ac97/ac97_codec.c	Thu Apr  1 00:48:06 2004
@@ -396,11 +396,14 @@
 		ac97->spec.ad18xx.pcmreg[codec] = new;
 		spin_unlock(&ac97->reg_lock);
 		/* select single codec */
-		ac97->bus->write(ac97, AC97_AD_SERIAL_CFG, ac97->spec.ad18xx.unchained[codec] | ac97->spec.ad18xx.chained[codec]);
+		ac97->bus->write(ac97, AC97_AD_SERIAL_CFG,
+				 (ac97->regs[AC97_AD_SERIAL_CFG] & ~0x7000) |
+				 ac97->spec.ad18xx.unchained[codec] | ac97->spec.ad18xx.chained[codec]);
 		/* update PCM bits */
 		ac97->bus->write(ac97, AC97_PCM, new);
 		/* select all codecs */
-		ac97->bus->write(ac97, AC97_AD_SERIAL_CFG, 0x7000);
+		ac97->bus->write(ac97, AC97_AD_SERIAL_CFG,
+				 ac97->regs[AC97_AD_SERIAL_CFG] | 0x7000);
 	} else
 		spin_unlock(&ac97->reg_lock);
 	up(&ac97->spec.ad18xx.mutex);
@@ -2032,11 +2035,12 @@
 			if (! ac97->spec.ad18xx.id[codec])
 				continue;
 			/* select single codec */
-			ac97->bus->write(ac97, AC97_AD_SERIAL_CFG, ac97->spec.ad18xx.unchained[codec] | ac97->spec.ad18xx.chained[codec]);
+			snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000,
+					     ac97->spec.ad18xx.unchained[codec] | ac97->spec.ad18xx.chained[codec]);
 			ac97->bus->write(ac97, AC97_AD_CODEC_CFG, ac97->spec.ad18xx.codec_cfg[codec]);
 		}
 		/* select all codecs */
-		ac97->bus->write(ac97, AC97_AD_SERIAL_CFG, 0x7000);
+		snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, 0x7000);
 	}
 
 	/* restore ac97 status */
@@ -2055,12 +2059,13 @@
 						if (! ac97->spec.ad18xx.id[codec])
 							continue;
 						/* select single codec */
-						ac97->bus->write(ac97, AC97_AD_SERIAL_CFG, ac97->spec.ad18xx.unchained[codec] | ac97->spec.ad18xx.chained[codec]);
+						snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000,
+								     ac97->spec.ad18xx.unchained[codec] | ac97->spec.ad18xx.chained[codec]);
 						/* update PCM bits */
 						ac97->bus->write(ac97, AC97_PCM, ac97->spec.ad18xx.pcmreg[codec]);
 					}
 					/* select all codecs */
-					ac97->bus->write(ac97, AC97_AD_SERIAL_CFG, 0x7000);
+					snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, 0x7000);
 					continue;
 				} else if (i == AC97_AD_TEST ||
 					   i == AC97_AD_CODEC_CFG ||
diff -Nru a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
--- a/sound/pci/ac97/ac97_patch.c	Thu Apr  1 00:48:06 2004
+++ b/sound/pci/ac97/ac97_patch.c	Thu Apr  1 00:48:06 2004
@@ -562,8 +562,11 @@
  */
 int patch_ad1819(ac97_t * ac97)
 {
+	unsigned short scfg;
+
 	// patch for Analog Devices
-	snd_ac97_write_cache(ac97, AC97_AD_SERIAL_CFG, 0x7000); /* select all codecs */
+	scfg = snd_ac97_read(ac97, AC97_AD_SERIAL_CFG);
+	snd_ac97_write_cache(ac97, AC97_AD_SERIAL_CFG, scfg | 0x7000); /* select all codecs */
 	return 0;
 }
 
@@ -572,7 +575,7 @@
 	unsigned short val;
 
 	// test for unchained codec
-	snd_ac97_write_cache(ac97, AC97_AD_SERIAL_CFG, mask);
+	snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, mask);
 	snd_ac97_write_cache(ac97, AC97_AD_CODEC_CFG, 0x0000);	/* ID0C, ID1C, SDIE = off */
 	val = snd_ac97_read(ac97, AC97_VENDOR_ID2);
 	if ((val & 0xff40) != 0x5340)
@@ -588,7 +591,7 @@
 	static int cfg_bits[3] = { 1<<12, 1<<14, 1<<13 };
 	unsigned short val;
 	
-	snd_ac97_write_cache(ac97, AC97_AD_SERIAL_CFG, cfg_bits[idx]);
+	snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, cfg_bits[idx]);
 	snd_ac97_write_cache(ac97, AC97_AD_CODEC_CFG, 0x0004);	// SDIE
 	val = snd_ac97_read(ac97, AC97_VENDOR_ID2);
 	if ((val & 0xff40) != 0x5340)
@@ -611,7 +614,8 @@
 	if (cidx1 < 0 && cidx2 < 0)
 		return;
 	// test for chained codecs
-	snd_ac97_write_cache(ac97, AC97_AD_SERIAL_CFG, ac97->spec.ad18xx.unchained[unchained_idx]);
+	snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000,
+			     ac97->spec.ad18xx.unchained[unchained_idx]);
 	snd_ac97_write_cache(ac97, AC97_AD_CODEC_CFG, 0x0002);		// ID1C
 	ac97->spec.ad18xx.codec_cfg[unchained_idx] = 0x0002;
 	if (cidx1 >= 0) {
@@ -634,10 +638,13 @@
 	
 	// patch for Analog Devices
 	unsigned short codecs[3];
+	unsigned short val;
 	int idx, num;
 
 	init_MUTEX(&ac97->spec.ad18xx.mutex);
 
+	val = snd_ac97_read(ac97, AC97_AD_SERIAL_CFG);
+	snd_ac97_write_cache(ac97, AC97_AD_SERIAL_CFG, val);
 	codecs[0] = patch_ad1881_unchained(ac97, 0, (1<<12));
 	codecs[1] = patch_ad1881_unchained(ac97, 1, (1<<14));
 	codecs[2] = patch_ad1881_unchained(ac97, 2, (1<<13));
@@ -659,7 +666,7 @@
 
       __end:
 	/* select all codecs */
-	snd_ac97_write_cache(ac97, AC97_AD_SERIAL_CFG, 0x7000);
+	snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, 0x7000);
 	/* check if only one codec is present */
 	for (idx = num = 0; idx < 3; idx++)
 		if (ac97->spec.ad18xx.id[idx])
@@ -1003,6 +1010,7 @@
 {
 	unsigned short misc;
 	
+	patch_ad1881(ac97);
 	ac97->build_ops = &patch_ad1985_build_ops;
 	misc = snd_ac97_read(ac97, AC97_AD_MISC);
 	/* switch front/surround line-out/hp-out */
diff -Nru a/sound/pci/ac97/ac97_pcm.c b/sound/pci/ac97/ac97_pcm.c
--- a/sound/pci/ac97/ac97_pcm.c	Thu Apr  1 00:48:06 2004
+++ b/sound/pci/ac97/ac97_pcm.c	Thu Apr  1 00:48:06 2004
@@ -89,7 +89,7 @@
 	0xff,				/* slot 6 */
 	AC97_PCM_LFE_DAC_RATE,		/* slot 7 */
 	AC97_PCM_LFE_DAC_RATE,		/* slot 8 */
-	AC97_PCM_FRONT_DAC_RATE,	/* slot 9 */
+	0xff,				/* slot 9 */
 	AC97_PCM_FRONT_DAC_RATE,	/* slot 10 */
 	AC97_PCM_FRONT_DAC_RATE,	/* slot 11 */
   },
@@ -140,7 +140,7 @@
 	0xff,				/* slot 6 */
 	AC97_PCM_LFE_DAC_RATE,		/* slot 7 */
 	AC97_PCM_LFE_DAC_RATE,		/* slot 8 */
-	AC97_PCM_FRONT_DAC_RATE,	/* slot 9 */
+	0xff,				/* slot 9 */
 	AC97_PCM_FRONT_DAC_RATE,	/* slot 10 */
 	AC97_PCM_FRONT_DAC_RATE,	/* slot 11 */
   }
diff -Nru a/sound/pci/ac97/ac97_proc.c b/sound/pci/ac97/ac97_proc.c
--- a/sound/pci/ac97/ac97_proc.c	Thu Apr  1 00:48:06 2004
+++ b/sound/pci/ac97/ac97_proc.c	Thu Apr  1 00:48:06 2004
@@ -241,12 +241,13 @@
 		for (idx = 0; idx < 3; idx++)
 			if (ac97->spec.ad18xx.id[idx]) {
 				/* select single codec */
-				snd_ac97_write_cache(ac97, AC97_AD_SERIAL_CFG, ac97->spec.ad18xx.unchained[idx] | ac97->spec.ad18xx.chained[idx]);
+				snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000,
+						     ac97->spec.ad18xx.unchained[idx] | ac97->spec.ad18xx.chained[idx]);
 				snd_ac97_proc_read_main(ac97, buffer, idx);
 				snd_iprintf(buffer, "\n\n");
 			}
 		/* select all codecs */
-		snd_ac97_write_cache(ac97, AC97_AD_SERIAL_CFG, 0x7000);
+		snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, 0x7000);
 		up(&ac97->spec.ad18xx.mutex);
 		
 		snd_iprintf(buffer, "\nAD18XX configuration\n");
@@ -285,11 +286,12 @@
 		for (idx = 0; idx < 3; idx++)
 			if (ac97->spec.ad18xx.id[idx]) {
 				/* select single codec */
-				snd_ac97_write_cache(ac97, AC97_AD_SERIAL_CFG, ac97->spec.ad18xx.unchained[idx] | ac97->spec.ad18xx.chained[idx]);
+				snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000,
+						     ac97->spec.ad18xx.unchained[idx] | ac97->spec.ad18xx.chained[idx]);
 				snd_ac97_proc_regs_read_main(ac97, buffer, idx);
 			}
 		/* select all codecs */
-		snd_ac97_write_cache(ac97, AC97_AD_SERIAL_CFG, 0x7000);
+		snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, 0x7000);
 		up(&ac97->spec.ad18xx.mutex);
 	} else {
 		snd_ac97_proc_regs_read_main(ac97, buffer, 0);
diff -Nru a/sound/pci/au88x0/au88x0.h b/sound/pci/au88x0/au88x0.h
--- a/sound/pci/au88x0/au88x0.h	Thu Apr  1 00:48:06 2004
+++ b/sound/pci/au88x0/au88x0.h	Thu Apr  1 00:48:06 2004
@@ -17,7 +17,6 @@
 #ifndef __SOUND_AU88X0_H
 #define __SOUND_AU88X0_H
 
-#ifdef __KERNEL__
 #include <sound/driver.h>
 #include <linux/init.h>
 #include <linux/pci.h>
@@ -28,22 +27,6 @@
 #include <sound/mpu401.h>
 #include <sound/hwdep.h>
 #include <sound/ac97_codec.h>
-
-
-#ifndef	PCI_VENDOR_ID_AUREAL
-#define	PCI_VENDOR_ID_AUREAL 0x12eb
-#endif
-#ifndef	PCI_DEVICE_ID_AUREAL_VORTEX
-#define	PCI_DEVICE_ID_AUREAL_VORTEX 0x0001
-#endif
-#ifndef	PCI_DEVICE_ID_AUREAL_VORTEX2
-#define	PCI_DEVICE_ID_AUREAL_VORTEX2 0x0002
-#endif
-#ifndef	PCI_DEVICE_ID_AUREAL_ADVANTAGE
-#define	PCI_DEVICE_ID_AUREAL_ADVANTAGE 0x0003
-#endif
-
-#endif
 
 #ifndef CHIP_AU8820
 #include "au88x0_eq.h"
diff -Nru a/sound/pci/au88x0/au88x0_synth.c b/sound/pci/au88x0/au88x0_synth.c
--- a/sound/pci/au88x0/au88x0_synth.c	Thu Apr  1 00:48:06 2004
+++ b/sound/pci/au88x0/au88x0_synth.c	Thu Apr  1 00:48:06 2004
@@ -155,7 +155,7 @@
 		return hwread(vortex->mmio, WT_PARM(wt, 3));
 	}
 	if (reg == 7) {
-		return hwread(vortex->mmio, WT_GMODE(wt));;
+		return hwread(vortex->mmio, WT_GMODE(wt));
 	}
 
 	return 0;
diff -Nru a/sound/pci/cs46xx/cs46xx.c b/sound/pci/cs46xx/cs46xx.c
--- a/sound/pci/cs46xx/cs46xx.c	Thu Apr  1 00:48:06 2004
+++ b/sound/pci/cs46xx/cs46xx.c	Thu Apr  1 00:48:06 2004
@@ -51,7 +51,7 @@
 static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;	/* Enable this card */
 static int external_amp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
 static int thinkpad[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
-static int mmap_valid[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
+static int mmap_valid[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
 
 MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
 MODULE_PARM_DESC(index, "Index value for the CS46xx soundcard.");
@@ -70,7 +70,7 @@
 MODULE_PARM_SYNTAX(thinkpad, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
 MODULE_PARM(mmap_valid, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
 MODULE_PARM_DESC(mmap_valid, "Support OSS mmap.");
-MODULE_PARM_SYNTAX(mmap_valid, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
+MODULE_PARM_SYNTAX(mmap_valid, SNDRV_ENABLED "," SNDRV_BOOLEAN_TRUE_DESC);
 
 static struct pci_device_id snd_cs46xx_ids[] = {
         { 0x1013, 0x6001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },   /* CS4280 */
@@ -219,7 +219,7 @@
 
 #ifndef MODULE
 
-/* format is: snd-cs46xx=enable,index,id */
+/* format is: snd-cs46xx=enable,index,id,mmap_valid,external_amp,thinkpad */
 
 static int __init alsa_card_cs46xx_setup(char *str)
 {
@@ -229,7 +229,10 @@
 		return 0;
 	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
 	       get_option(&str,&index[nr_dev]) == 2 &&
-	       get_id(&str,&id[nr_dev]) == 2);
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,&mmap_valid[nr_dev]) == 2 &&
+	       get_option(&str,&external_amp[nr_dev]) == 2 &&
+	       get_option(&str,&thinkpad[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/pci/cs46xx/dsp_spos.c b/sound/pci/cs46xx/dsp_spos.c
--- a/sound/pci/cs46xx/dsp_spos.c	Thu Apr  1 00:48:06 2004
+++ b/sound/pci/cs46xx/dsp_spos.c	Thu Apr  1 00:48:06 2004
@@ -823,7 +823,7 @@
 		entry->private_data = chip;
 		entry->mode = S_IFREG | S_IRUGO | S_IWUSR;
 		entry->c.text.read_size = 512;
-		entry->c.text.read = cs46xx_dsp_proc_task_tree_read;;
+		entry->c.text.read = cs46xx_dsp_proc_task_tree_read;
 		if (snd_info_register(entry) < 0) {
 			snd_info_free_entry(entry);
 			entry = NULL;
@@ -836,7 +836,7 @@
 		entry->private_data = chip;
 		entry->mode = S_IFREG | S_IRUGO | S_IWUSR;
 		entry->c.text.read_size = 1024;
-		entry->c.text.read = cs46xx_dsp_proc_scb_read;;
+		entry->c.text.read = cs46xx_dsp_proc_scb_read;
 		if (snd_info_register(entry) < 0) {
 			snd_info_free_entry(entry);
 			entry = NULL;
diff -Nru a/sound/pci/ice1712/delta.c b/sound/pci/ice1712/delta.c
--- a/sound/pci/ice1712/delta.c	Thu Apr  1 00:48:06 2004
+++ b/sound/pci/ice1712/delta.c	Thu Apr  1 00:48:06 2004
@@ -90,6 +90,7 @@
 		tmp |= ICE1712_DELTA_1010LT_CCLK | ICE1712_DELTA_1010LT_CS_CS8427;
 		break;
 	case ICE1712_SUBDEVICE_AUDIOPHILE:
+	case ICE1712_SUBDEVICE_DELTA410:
 		tmp |= ICE1712_DELTA_AP_CCLK | ICE1712_DELTA_AP_CS_CODEC;
 		tmp &= ~ICE1712_DELTA_AP_CS_DIGITAL;
 		break;
@@ -112,6 +113,7 @@
 		tmp |= ICE1712_DELTA_1010LT_CS_NONE;
 		break;
 	case ICE1712_SUBDEVICE_AUDIOPHILE:
+	case ICE1712_SUBDEVICE_DELTA410:
 		tmp |= ICE1712_DELTA_AP_CS_DIGITAL;
 		break;
 	case ICE1712_SUBDEVICE_VX442:
diff -Nru a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c
--- a/sound/pci/ice1712/ice1712.c	Thu Apr  1 00:48:06 2004
+++ b/sound/pci/ice1712/ice1712.c	Thu Apr  1 00:48:06 2004
@@ -82,6 +82,7 @@
 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
 static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;		/* Enable this card */
 static int omni[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 0};	/* Delta44 & 66 Omni I/O support */
+static int cs8427_timeout[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 500}; /* CS8427 S/PDIF transciever reset timeout value in msec */
 
 MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
 MODULE_PARM_DESC(index, "Index value for ICE1712 soundcard.");
@@ -95,6 +96,9 @@
 MODULE_PARM(omni, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
 MODULE_PARM_DESC(omni, "Enable Midiman M-Audio Delta Omni I/O support.");
 MODULE_PARM_SYNTAX(omni, SNDRV_ENABLED "," SNDRV_ENABLE_DESC);
+MODULE_PARM(cs8427_timeout, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(cs8427_timeout, "Define reset timeout for cs8427 chip in msec resolution.");
+MODULE_PARM_SYNTAX(cs8427_timeout, SNDRV_ENABLED ", allows:{{1,1000}},default=500,skill:advanced");
 
 #ifndef PCI_VENDOR_ID_ICE
 #define PCI_VENDOR_ID_ICE		0x1412
@@ -386,7 +390,9 @@
 {
 	int err;
 
-	if ((err = snd_cs8427_create(ice->i2c, addr, &ice->cs8427)) < 0) {
+	if ((err = snd_cs8427_create(ice->i2c, addr,
+				     (ice->cs8427_timeout * HZ) / 1000,
+				     &ice->cs8427)) < 0) {
 		snd_printk("CS8427 initialization failed\n");
 		return err;
 	}
@@ -1505,10 +1511,10 @@
 static int __devinit snd_ice1712_ac97_mixer(ice1712_t * ice)
 {
 	int err;
+	ac97_t ac97;
+	ac97_bus_t bus, *pbus;
 
 	if (ice_has_con_ac97(ice)) {
-		ac97_bus_t bus, *pbus;
-		ac97_t ac97;
 		memset(&bus, 0, sizeof(bus));
 		bus.write = snd_ice1712_ac97_write;
 		bus.read = snd_ice1712_ac97_read;
@@ -1527,8 +1533,6 @@
 	}
 
 	if (! (ice->eeprom.data[ICE_EEP1_ACLINK] & ICE1712_CFG_PRO_I2S)) {
-		ac97_bus_t bus, *pbus;
-		ac97_t ac97;
 		memset(&bus, 0, sizeof(bus));
 		bus.write = snd_ice1712_pro_ac97_write;
 		bus.read = snd_ice1712_pro_ac97_read;
@@ -2404,6 +2408,7 @@
 static int __devinit snd_ice1712_create(snd_card_t * card,
 					struct pci_dev *pci,
 					int omni,
+					int cs8427_timeout,
 					ice1712_t ** r_ice1712)
 {
 	ice1712_t *ice;
@@ -2428,6 +2433,11 @@
 	if (ice == NULL)
 		return -ENOMEM;
 	ice->omni = omni ? 1 : 0;
+	if (cs8427_timeout < 1)
+		cs8427_timeout = 1;
+	else if (cs8427_timeout > 1000)
+		cs8427_timeout = 1000;
+	ice->cs8427_timeout = cs8427_timeout;
 	spin_lock_init(&ice->reg_lock);
 	init_MUTEX(&ice->gpio_mutex);
 	init_MUTEX(&ice->open_mutex);
@@ -2547,7 +2557,7 @@
 	strcpy(card->driver, "ICE1712");
 	strcpy(card->shortname, "ICEnsemble ICE1712");
 	
-	if ((err = snd_ice1712_create(card, pci, omni[dev], &ice)) < 0) {
+	if ((err = snd_ice1712_create(card, pci, omni[dev], cs8427_timeout[dev], &ice)) < 0) {
 		snd_card_free(card);
 		return err;
 	}
diff -Nru a/sound/pci/ice1712/ice1712.h b/sound/pci/ice1712/ice1712.h
--- a/sound/pci/ice1712/ice1712.h	Thu Apr  1 00:48:06 2004
+++ b/sound/pci/ice1712/ice1712.h	Thu Apr  1 00:48:06 2004
@@ -346,6 +346,7 @@
 	snd_i2c_bus_t *i2c;		/* I2C bus */
 	snd_i2c_device_t *cs8404;	/* CS8404A I2C device */
 	snd_i2c_device_t *cs8427;	/* CS8427 I2C device */
+	unsigned int cs8427_timeout;	/* CS8427 reset timeout in HZ/100 */
 	snd_i2c_device_t *i2cdevs[2];	/* additional i2c devices */
 	
 	struct ice1712_gpio {
diff -Nru a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
--- a/sound/pci/intel8x0.c	Thu Apr  1 00:48:06 2004
+++ b/sound/pci/intel8x0.c	Thu Apr  1 00:48:06 2004
@@ -96,7 +96,7 @@
 MODULE_PARM_SYNTAX(ac97_clock, SNDRV_ENABLED ",default:0");
 MODULE_PARM(ac97_quirk, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
 MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware.");
-MODULE_PARM_SYNTAX(ac97_quirk, SNDRV_ENABLED ",allows:{{-1,3}},dialog:list,default:-1");
+MODULE_PARM_SYNTAX(ac97_quirk, SNDRV_ENABLED ",allows:{{-1,4}},dialog:list,default:-1");
 #ifdef SUPPORT_JOYSTICK
 MODULE_PARM(joystick, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
 MODULE_PARM_DESC(joystick, "Enable joystick for Intel i8x0 soundcard.");
@@ -824,19 +824,16 @@
 	spin_lock(&chip->reg_lock);
 	status = igetdword(chip, chip->int_sta_reg);
 	if ((status & chip->int_sta_mask) == 0) {
-		static int err_count = 10;
 		if (status) {
 			/* ack */
 			iputdword(chip, chip->int_sta_reg, status);
+			/* some Nforce[2] boards have problems when
+			   IRQ_NONE is returned here.
+			*/
 			if (chip->device_type != DEVICE_NFORCE)
-				status ^= igetdword(chip, chip->int_sta_reg);
+				status = 0;
 		}
 		spin_unlock(&chip->reg_lock);
-		if (chip->device_type != DEVICE_NFORCE && status && err_count) {
-			err_count--;
-			snd_printd("intel8x0: unknown IRQ bits 0x%x (sta_mask=0x%x)\n",
-				   status, chip->int_sta_mask);
-		}
 		return IRQ_RETVAL(status);
 	}
 
@@ -1690,6 +1687,12 @@
 
 static struct ac97_quirk ac97_quirks[] __devinitdata = {
 	{
+		.vendor = 0x0e11,
+		.device = 0x00b8,
+		.name = "Compaq Evo D510C",
+		.type = AC97_TUNE_HP_ONLY
+	},
+	{
 		.vendor = 0x1014,
 		.device = 0x1f00,
 		.name = "MS-9128",
@@ -2739,6 +2742,7 @@
 
 	pci_read_config_word(pci, 0xe6, &val);
 #ifdef SUPPORT_JOYSTICK
+	val &= ~0x100;
 	if (joystick[dev]) {
 		if (! request_region(ich_gameport.io, 8, "ICH gameport")) {
 			printk(KERN_WARNING "intel8x0: cannot grab gameport 0x%x\n",  ich_gameport.io);
@@ -2751,6 +2755,7 @@
 	}
 #endif
 #ifdef SUPPORT_MIDI
+	val &= ~0x20;
 	if (mpu_port[dev] > 0) {
 		if (mpu_port[dev] == 0x300 || mpu_port[dev] == 0x330) {
 			u8 b;
diff -Nru a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c
--- a/sound/pcmcia/pdaudiocf/pdaudiocf.c	Thu Apr  1 00:48:06 2004
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c	Thu Apr  1 00:48:06 2004
@@ -25,7 +25,6 @@
 #include <pcmcia/ciscode.h>
 #include <pcmcia/cisreg.h>
 #include "pdaudiocf.h"
-#define SNDRV_GET_ID
 #include <sound/initval.h>
 
 /*
diff -Nru a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c
--- a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c	Thu Apr  1 00:48:06 2004
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c	Thu Apr  1 00:48:06 2004
@@ -23,7 +23,6 @@
 #include <sound/core.h>
 #include <sound/info.h>
 #include "pdaudiocf.h"
-#define SNDRV_GET_ID
 #include <sound/initval.h>
 
 /*
diff -Nru a/sound/pcmcia/pdaudiocf/pdaudiocf_irq.c b/sound/pcmcia/pdaudiocf/pdaudiocf_irq.c
--- a/sound/pcmcia/pdaudiocf/pdaudiocf_irq.c	Thu Apr  1 00:48:06 2004
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf_irq.c	Thu Apr  1 00:48:06 2004
@@ -21,7 +21,6 @@
 #include <sound/driver.h>
 #include <sound/core.h>
 #include "pdaudiocf.h"
-#define SNDRV_GET_ID
 #include <sound/initval.h>
 
 /*
diff -Nru a/sound/ppc/powermac.c b/sound/ppc/powermac.c
--- a/sound/ppc/powermac.c	Thu Apr  1 00:48:06 2004
+++ b/sound/ppc/powermac.c	Thu Apr  1 00:48:06 2004
@@ -36,7 +36,7 @@
 
 static int index = SNDRV_DEFAULT_IDX1;		/* Index 0-MAX */
 static char *id = SNDRV_DEFAULT_STR1;		/* ID for this card */
-static int enable = 1;
+/* static int enable = 1; */
 #ifdef PMAC_SUPPORT_PCM_BEEP
 static int enable_beep = 1;
 #endif
@@ -47,9 +47,9 @@
 MODULE_PARM(id, "s");
 MODULE_PARM_DESC(id, "ID string for " CHIP_NAME " soundchip.");
 MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
-MODULE_PARM(enable, "i");
-MODULE_PARM_DESC(enable, "Enable this soundchip.");
-MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+/* MODULE_PARM(enable, "i");
+   MODULE_PARM_DESC(enable, "Enable this soundchip.");
+   MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); */
 #ifdef PMAC_SUPPORT_PCM_BEEP
 MODULE_PARM(enable_beep, "i");
 MODULE_PARM_DESC(enable_beep, "Enable beep using PCM.");
@@ -183,6 +183,8 @@
 
 static int __init alsa_card_pmac_setup(char *str)
 {
+	int __attribute__ ((__unused__)) enable = 1;
+
 	(void)(get_option(&str,&enable) == 2 &&
 	       get_option(&str,&index) == 2 &&
 	       get_id(&str,&id) == 2
diff -Nru a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
--- a/sound/usb/usbaudio.c	Thu Apr  1 00:48:06 2004
+++ b/sound/usb/usbaudio.c	Thu Apr  1 00:48:06 2004
@@ -104,6 +104,7 @@
  */
 
 #define MAX_PACKS	10	
+#define MAX_PACKS_HS	(MAX_PACKS * 8)	/* in high speed mode */
 #define MAX_URBS	5	/* max. 20ms long packets */
 #define SYNC_URBS	2	/* always two urbs for sync */
 #define MIN_PACKS_URB	1	/* minimum 1 packet per urb */
@@ -161,8 +162,8 @@
 	unsigned int datapipe;   /* the data i/o pipe */
 	unsigned int syncpipe;   /* 1 - async out or adaptive in */
 	unsigned int syncinterval;  /* P for adaptive mode, 0 otherwise */
-	unsigned int freqn;      /* nominal sampling rate in USB format, i.e. fs/1000 in Q10.14 */
-	unsigned int freqm;      /* momentary sampling rate in USB format, i.e. fs/1000 in Q10.14 */
+	unsigned int freqn;      /* nominal sampling rate in fs/fps in Q16.16 format */
+	unsigned int freqm;      /* momentary sampling rate in fs/fps in Q16.16 format */
 	unsigned int freqmax;    /* maximum sampling rate, used for buffer management */
 	unsigned int phase;      /* phase accumulator */
 	unsigned int maxpacksize;	/* max packet size in bytes */
@@ -184,7 +185,7 @@
 	unsigned int nurbs;			/* # urbs */
 	snd_urb_ctx_t dataurb[MAX_URBS];	/* data urb table */
 	snd_urb_ctx_t syncurb[SYNC_URBS];	/* sync urb table */
-	char syncbuf[SYNC_URBS * MAX_PACKS * 3]; /* sync buffer; it's so small - let's get static */
+	char syncbuf[SYNC_URBS * MAX_PACKS * 4]; /* sync buffer; it's so small - let's get static */
 	char *tmpbuf;			/* temporary buffer for playback */
 
 	u64 formats;			/* format bitmasks (all or'ed) */
@@ -218,17 +219,38 @@
 
 
 /*
- * convert a sampling rate into USB format (fs/1000 in Q10.14)
- * this will overflow at approx 2MSPS
+ * convert a sampling rate into our full speed format (fs/1000 in Q16.16)
+ * this will overflow at approx 524 kHz
  */
-inline static unsigned get_usb_rate(unsigned int rate)
+inline static unsigned get_usb_full_speed_rate(unsigned int rate)
 {
-	return ((rate << 11) + 62) / 125;
+	return ((rate << 13) + 62) / 125;
+}
+
+/*
+ * convert a sampling rate into USB high speed format (fs/8000 in Q16.16)
+ * this will overflow at approx 4 MHz
+ */
+inline static unsigned get_usb_high_speed_rate(unsigned int rate)
+{
+	return ((rate << 10) + 62) / 125;
+}
+
+/* convert our full speed USB rate into sampling rate in Hz */
+inline static unsigned get_full_speed_hz(unsigned int usb_rate)
+{
+	return (usb_rate * 125 + (1 << 12)) >> 13;
+}
+
+/* convert our high speed USB rate into sampling rate in Hz */
+inline static unsigned get_high_speed_hz(unsigned int usb_rate)
+{
+	return (usb_rate * 125 + (1 << 9)) >> 10;
 }
 
 
 /*
- * prepare urb for capture sync pipe
+ * prepare urb for full speed capture sync pipe
  *
  * fill the length and offset of each urb descriptor.
  * the fixed 10.14 frequency is passed through the pipe.
@@ -243,14 +265,40 @@
 
 	urb->number_of_packets = ctx->packets;
 	urb->dev = ctx->subs->dev; /* we need to set this at each time */
-	for (i = offs = 0; i < urb->number_of_packets; i++, offs += 3, cp += 3) {
+	for (i = offs = 0; i < urb->number_of_packets; i++, offs += 4, cp += 4) {
 		urb->iso_frame_desc[i].length = 3;
 		urb->iso_frame_desc[i].offset = offs;
+		cp[0] = subs->freqn >> 2;
+		cp[1] = subs->freqn >> 10;
+		cp[2] = subs->freqn >> 18;
+	}
+	return 0;
+}
+
+/*
+ * prepare urb for high speed capture sync pipe
+ *
+ * fill the length and offset of each urb descriptor.
+ * the fixed 12.13 frequency is passed as 16.16 through the pipe.
+ */
+static int prepare_capture_sync_urb_hs(snd_usb_substream_t *subs,
+				       snd_pcm_runtime_t *runtime,
+				       struct urb *urb)
+{
+	unsigned char *cp = urb->transfer_buffer;
+	snd_urb_ctx_t *ctx = (snd_urb_ctx_t *)urb->context;
+	int i, offs;
+
+	urb->number_of_packets = ctx->packets;
+	urb->dev = ctx->subs->dev; /* we need to set this at each time */
+	for (i = offs = 0; i < urb->number_of_packets; i++, offs += 4, cp += 4) {
+		urb->iso_frame_desc[i].length = 4;
+		urb->iso_frame_desc[i].offset = offs;
 		cp[0] = subs->freqn;
 		cp[1] = subs->freqn >> 8;
 		cp[2] = subs->freqn >> 16;
+		cp[3] = subs->freqn >> 24;
 	}
-	urb->interval = 1;
 	return 0;
 }
 
@@ -301,7 +349,6 @@
 	spin_unlock_irqrestore(&subs->lock, flags);
 	urb->transfer_buffer = ctx->buf;
 	urb->transfer_buffer_length = offs;
-	urb->interval = 1;
 #if 0 // for check
 	if (! urb->bandwidth) {
 		int bustime;
@@ -372,7 +419,7 @@
 
 
 /*
- * prepare urb for playback sync pipe
+ * prepare urb for full speed playback sync pipe
  *
  * set up the offset and length to receive the current frequency.
  */
@@ -386,16 +433,37 @@
 
 	urb->number_of_packets = ctx->packets;
 	urb->dev = ctx->subs->dev; /* we need to set this at each time */
-	for (i = offs = 0; i < urb->number_of_packets; i++, offs += 3) {
+	for (i = offs = 0; i < urb->number_of_packets; i++, offs += 4) {
 		urb->iso_frame_desc[i].length = 3;
 		urb->iso_frame_desc[i].offset = offs;
 	}
-	urb->interval = 1;
 	return 0;
 }
 
 /*
- * process after playback sync complete
+ * prepare urb for high speed playback sync pipe
+ *
+ * set up the offset and length to receive the current frequency.
+ */
+
+static int prepare_playback_sync_urb_hs(snd_usb_substream_t *subs,
+					snd_pcm_runtime_t *runtime,
+					struct urb *urb)
+{
+	int i, offs;
+	snd_urb_ctx_t *ctx = (snd_urb_ctx_t *)urb->context;
+
+	urb->number_of_packets = ctx->packets;
+	urb->dev = ctx->subs->dev; /* we need to set this at each time */
+	for (i = offs = 0; i < urb->number_of_packets; i++, offs += 4) {
+		urb->iso_frame_desc[i].length = 4;
+		urb->iso_frame_desc[i].offset = offs;
+	}
+	return 0;
+}
+
+/*
+ * process after full speed playback sync complete
  *
  * retrieve the current 10.14 frequency from pipe, and set it.
  * the value is referred in prepare_playback_urb().
@@ -410,11 +478,11 @@
 	unsigned long flags;
 
 	found = 0;
-	for (i = 0; i < urb->number_of_packets; i++, cp += 3) {
+	for (i = 0; i < urb->number_of_packets; i++, cp += 4) {
 		if (urb->iso_frame_desc[i].status ||
 		    urb->iso_frame_desc[i].actual_length < 3)
 			continue;
-		f = combine_triple(cp);
+		f = combine_triple(cp) << 2;
 #if 0
 		if (f < subs->freqn - (subs->freqn>>3) || f > subs->freqmax) {
 			snd_printd(KERN_WARNING "requested frequency %d (%u,%03uHz) out of range (current nominal %d (%u,%03uHz))\n",
@@ -435,6 +503,37 @@
 }
 
 /*
+ * process after high speed playback sync complete
+ *
+ * retrieve the current 12.13 frequency from pipe, and set it.
+ * the value is referred in prepare_playback_urb().
+ */
+static int retire_playback_sync_urb_hs(snd_usb_substream_t *subs,
+				       snd_pcm_runtime_t *runtime,
+				       struct urb *urb)
+{
+	int i;
+	unsigned int found;
+	unsigned char *cp = urb->transfer_buffer;
+	unsigned long flags;
+
+	found = 0;
+	for (i = 0; i < urb->number_of_packets; i++, cp += 4) {
+		if (urb->iso_frame_desc[i].status ||
+		    urb->iso_frame_desc[i].actual_length < 4)
+			continue;
+		found = combine_quad(cp) & 0x0fffffff;
+	}
+	if (found) {
+		spin_lock_irqsave(&subs->lock, flags);
+		subs->freqm = found;
+		spin_unlock_irqrestore(&subs->lock, flags);
+	}
+
+	return 0;
+}
+
+/*
  * prepare urb for playback data pipe
  *
  * we copy the data directly from the pcm buffer.
@@ -464,8 +563,8 @@
 		if (subs->fill_max)
 			counts = subs->maxframesize; /* fixed */
 		else {
-			subs->phase = (subs->phase & 0x3fff) + subs->freqm;
-			counts = subs->phase >> 14;
+			subs->phase = (subs->phase & 0xffff) + subs->freqm;
+			counts = subs->phase >> 16;
 			if (counts > subs->maxframesize)
 				counts = subs->maxframesize;
 		}
@@ -515,7 +614,6 @@
 	spin_unlock_irqrestore(&subs->lock, flags);
 	urb->transfer_buffer_length = offs * stride;
 	ctx->transfer = offs;
-	urb->interval = 1;
 
 	return 0;
 }
@@ -565,6 +663,21 @@
 	},
 };
 
+static struct snd_urb_ops audio_urb_ops_high_speed[2] = {
+	{
+		.prepare =	prepare_playback_urb,
+		.retire =	retire_playback_urb,
+		.prepare_sync =	prepare_playback_sync_urb_hs,
+		.retire_sync =	retire_playback_sync_urb_hs,
+	},
+	{
+		.prepare =	prepare_capture_urb,
+		.retire =	retire_capture_urb,
+		.prepare_sync =	prepare_capture_sync_urb_hs,
+		.retire_sync =	retire_capture_sync_urb,
+	},
+};
+
 /*
  * complete callback from data urb
  */
@@ -822,15 +935,19 @@
 {
 	unsigned int maxsize, n, i;
 	int is_playback = subs->direction == SNDRV_PCM_STREAM_PLAYBACK;
-	unsigned int npacks[MAX_URBS], total_packs;
+	unsigned int npacks[MAX_URBS], urb_packs, total_packs;
 
-	/* calculate the frequency in 10.14 format */
-	subs->freqn = subs->freqm = get_usb_rate(rate);
+	/* calculate the frequency in 16.16 format */
+	if (snd_usb_get_speed(subs->dev) == USB_SPEED_FULL)
+		subs->freqn = get_usb_full_speed_rate(rate);
+	else
+		subs->freqn = get_usb_high_speed_rate(rate);
+	subs->freqm = subs->freqn;
 	subs->freqmax = subs->freqn + (subs->freqn >> 2); /* max. allowed frequency */
 	subs->phase = 0;
 
 	/* calculate the max. size of packet */
-	maxsize = ((subs->freqmax + 0x3fff) * (frame_bits >> 3)) >> 14;
+	maxsize = ((subs->freqmax + 0xffff) * (frame_bits >> 3)) >> 16;
 	if (subs->maxpacksize && maxsize > subs->maxpacksize) {
 		//snd_printd(KERN_DEBUG "maxsize %d is greater than defined size %d\n",
 		//	   maxsize, subs->maxpacksize);
@@ -842,9 +959,14 @@
 	else
 		subs->curpacksize = maxsize;
 
+	if (snd_usb_get_speed(subs->dev) == USB_SPEED_FULL)
+		urb_packs = nrpacks;
+	else
+		urb_packs = nrpacks * 8;
+
 	/* allocate a temporary buffer for playback */
 	if (is_playback) {
-		subs->tmpbuf = kmalloc(maxsize * nrpacks, GFP_KERNEL);
+		subs->tmpbuf = kmalloc(maxsize * urb_packs, GFP_KERNEL);
 		if (! subs->tmpbuf) {
 			snd_printk(KERN_ERR "cannot malloc tmpbuf\n");
 			return -ENOMEM;
@@ -855,16 +977,16 @@
 	total_packs = (period_bytes + maxsize - 1) / maxsize;
 	if (total_packs < 2 * MIN_PACKS_URB)
 		total_packs = 2 * MIN_PACKS_URB;
-	subs->nurbs = (total_packs + nrpacks - 1) / nrpacks;
+	subs->nurbs = (total_packs + urb_packs - 1) / urb_packs;
 	if (subs->nurbs > MAX_URBS) {
 		/* too much... */
 		subs->nurbs = MAX_URBS;
-		total_packs = MAX_URBS * nrpacks;
+		total_packs = MAX_URBS * urb_packs;
 	}
 	n = total_packs;
 	for (i = 0; i < subs->nurbs; i++) {
-		npacks[i] = n > nrpacks ? nrpacks : n;
-		n -= nrpacks;
+		npacks[i] = n > urb_packs ? urb_packs : n;
+		n -= urb_packs;
 	}
 	if (subs->nurbs <= 1) {
 		/* too little - we need at least two packets
@@ -913,6 +1035,7 @@
 		u->urb->pipe = subs->datapipe;
 		u->urb->transfer_flags = URB_ISO_ASAP;
 		u->urb->number_of_packets = u->packets;
+		u->urb->interval = 1;
 		u->urb->context = u;
 		u->urb->complete = snd_usb_complete_callback(snd_complete_urb);
 	}
@@ -929,12 +1052,16 @@
 				release_substream_urbs(subs, 0);
 				return -ENOMEM;
 			}
-			u->urb->transfer_buffer = subs->syncbuf + i * nrpacks * 3;
-			u->urb->transfer_buffer_length = nrpacks * 3;
+			u->urb->transfer_buffer = subs->syncbuf + i * nrpacks * 4;
+			u->urb->transfer_buffer_length = nrpacks * 4;
 			u->urb->dev = subs->dev;
 			u->urb->pipe = subs->syncpipe;
 			u->urb->transfer_flags = URB_ISO_ASAP;
 			u->urb->number_of_packets = u->packets;
+			if (snd_usb_get_speed(subs->dev) == USB_SPEED_HIGH)
+				u->urb->interval = 8;
+			else
+				u->urb->interval = 1;
 			u->urb->context = u;
 			u->urb->complete = snd_usb_complete_callback(snd_complete_sync_urb);
 		}
@@ -1099,7 +1226,7 @@
 
 	/* set interface */
 	if (subs->interface != fmt->iface || subs->format != fmt->altset_idx) {
-		if (usb_set_interface(dev, fmt->iface, fmt->altset_idx) < 0) {
+		if (usb_set_interface(dev, fmt->iface, fmt->altsetting) < 0) {
 			snd_printk(KERN_ERR "%d:%d:%d: usb_set_interface failed\n",
 				   dev->devnum, fmt->iface, fmt->altsetting);
 			return -EIO;
@@ -1116,7 +1243,7 @@
 	else
 		subs->datapipe = usb_rcvisocpipe(dev, ep);
 	subs->syncpipe = subs->syncinterval = 0;
-	subs->maxpacksize = get_endpoint(alts, 0)->wMaxPacketSize;
+	subs->maxpacksize = fmt->maxpacksize;
 	subs->fill_max = 0;
 
 	/* we need a sync pipe in async OUT or adaptive IN mode */
@@ -1836,11 +1963,10 @@
 			snd_iprintf(buffer, "%d ", subs->dataurb[i].packets);
 		snd_iprintf(buffer, "]\n");
 		snd_iprintf(buffer, "    Packet Size = %d\n", subs->curpacksize);
-		snd_iprintf(buffer, "    Momentary freq = %d.%d Hz\n",
-			    (subs->freqm * 125) >> 11,
-			    (subs->freqm >> 10) * 625
-			    + (((subs->freqm & ((1 << 10) - 1)) * 625) >> 10)
-			    - 10 * ((subs->freqm * 125) >> 11));
+		snd_iprintf(buffer, "    Momentary freq = %u Hz\n",
+			    snd_usb_get_speed(subs->dev) == USB_SPEED_FULL
+			    ? get_full_speed_hz(subs->freqm)
+			    : get_high_speed_hz(subs->freqm));
 	} else {
 		snd_iprintf(buffer, "  Status: Stop\n");
 	}
@@ -1890,7 +2016,10 @@
 	subs->stream = as;
 	subs->direction = stream;
 	subs->dev = as->chip->dev;
-	subs->ops = audio_urb_ops[stream];
+	if (snd_usb_get_speed(subs->dev) == USB_SPEED_FULL)
+		subs->ops = audio_urb_ops[stream];
+	else
+		subs->ops = audio_urb_ops_high_speed[stream];
 	snd_pcm_lib_preallocate_pages(as->pcm->streams[stream].substream,
 				      SNDRV_DMA_TYPE_CONTINUOUS,
 				      snd_dma_continuous_data(GFP_KERNEL),
@@ -2351,6 +2480,7 @@
 		fp->altset_idx = i;
 		fp->endpoint = get_endpoint(alts, 0)->bEndpointAddress;
 		fp->ep_attr = get_endpoint(alts, 0)->bmAttributes;
+		/* FIXME: decode wMaxPacketSize of high bandwith endpoints */
 		fp->maxpacksize = get_endpoint(alts, 0)->wMaxPacketSize;
 		fp->attributes = csep[3];
 
@@ -2405,7 +2535,7 @@
 			return err;
 		}
 		/* try to set the interface... */
-		usb_set_interface(chip->dev, iface_no, i);
+		usb_set_interface(chip->dev, iface_no, altno);
 		init_usb_pitch(chip->dev, iface_no, alts, fp);
 		init_usb_sample_rate(chip->dev, iface_no, alts, fp, fp->rate_max);
 	}
@@ -2422,7 +2552,6 @@
 	int idx;
 	snd_usb_stream_t *as;
 	snd_usb_substream_t *subs;
-	struct list_head *p;
 
 	as = list_entry(head, snd_usb_stream_t, list);
 	for (idx = 0; idx < 2; idx++) {
@@ -2431,11 +2560,6 @@
 			return;
 		release_substream_urbs(subs, 1);
 		subs->interface = -1;
-		/* release interfaces */
-		list_for_each(p, &subs->fmt_list) {
-			struct audioformat *fp = list_entry(p, struct audioformat, list);
-			usb_driver_release_interface(driver, usb_ifnum_to_if(subs->dev, fp->iface));
-		}
 	}
 }
 
@@ -2587,14 +2711,13 @@
 				  struct usb_interface *iface,
 				  const snd_usb_audio_quirk_t *quirk)
 {
-	struct usb_host_config *config = chip->dev->actconfig;
 	int probed_ifnum = get_iface_desc(iface->altsetting)->bInterfaceNumber;
 	int err;
 
 	for (quirk = quirk->data; quirk->ifnum >= 0; ++quirk) {
-		if (quirk->ifnum >= get_cfg_desc(config)->bNumInterfaces)
+		iface = usb_ifnum_to_if(chip->dev, quirk->ifnum);
+		if (!iface)
 			continue;
-		iface = get_iface(config, quirk->ifnum);
 		if (quirk->ifnum != probed_ifnum &&
 		    usb_interface_claimed(iface))
 			continue;
@@ -2706,9 +2829,6 @@
 
 static int snd_usb_audio_free(snd_usb_audio_t *chip)
 {
-	down(&register_mutex);
-	usb_chip[chip->index] = NULL;
-	up(&register_mutex);
 	snd_magic_kfree(chip);
 	return 0;
 }
@@ -2723,10 +2843,11 @@
 /*
  * create a chip instance and set its names.
  */
-static int snd_usb_audio_create(snd_card_t *card, struct usb_device *dev,
+static int snd_usb_audio_create(struct usb_device *dev, int idx,
 				const snd_usb_audio_quirk_t *quirk,
 				snd_usb_audio_t **rchip)
 {
+	snd_card_t *card;
 	snd_usb_audio_t *chip;
 	int err, len;
 	char component[14];
@@ -2735,10 +2856,26 @@
 	};
 	
 	*rchip = NULL;
+
+	if (snd_usb_get_speed(dev) != USB_SPEED_FULL &&
+	    snd_usb_get_speed(dev) != USB_SPEED_HIGH) {
+		snd_printk(KERN_ERR "unknown device speed %d\n", snd_usb_get_speed(dev));
+		return -ENXIO;
+	}
+
+	card = snd_card_new(index[idx], id[idx], THIS_MODULE, 0);
+	if (card == NULL) {
+		snd_printk(KERN_ERR "cannot create card instance %d\n", idx);
+		return -ENOMEM;
+	}
+
 	chip = snd_magic_kcalloc(snd_usb_audio_t, 0, GFP_KERNEL);
-	if (! chip)
+	if (! chip) {
+		snd_card_free(card);
 		return -ENOMEM;
+	}
 
+	chip->index = idx;
 	chip->dev = dev;
 	chip->card = card;
 	INIT_LIST_HEAD(&chip->pcm_list);
@@ -2746,6 +2883,7 @@
 
 	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
 		snd_usb_audio_free(chip);
+		snd_card_free(card);
 		return err;
 	}
 
@@ -2788,6 +2926,10 @@
 	if (len < sizeof(card->longname))
 		usb_make_path(dev, card->longname + len, sizeof(card->longname) - len);
 
+	strlcat(card->longname,
+		snd_usb_get_speed(dev) == USB_SPEED_FULL ? ", full speed" : ", high speed",
+		sizeof(card->longname));
+
 	snd_usb_audio_create_proc(chip);
 
 	snd_card_set_dev(card, &dev->dev);
@@ -2814,7 +2956,6 @@
 	struct usb_host_config *config = dev->actconfig;
 	const snd_usb_audio_quirk_t *quirk = (const snd_usb_audio_quirk_t *)usb_id->driver_info;
 	int i, err;
-	snd_card_t *card;
 	snd_usb_audio_t *chip;
 	struct usb_host_interface *alts;
 	int ifnum;
@@ -2842,11 +2983,11 @@
 	down(&register_mutex);
 	for (i = 0; i < SNDRV_CARDS; i++) {
 		if (usb_chip[i] && usb_chip[i]->dev == dev) {
-			chip = usb_chip[i];
-			if (chip->shutdown) {
+			if (usb_chip[i]->shutdown) {
 				snd_printk(KERN_ERR "USB device is in the shutdown state, cannot create a card instance\n");
 				goto __error;
 			}
+			chip = usb_chip[i];
 			break;
 		}
 	}
@@ -2863,17 +3004,9 @@
 			if (enable[i] && ! usb_chip[i] &&
 			    (vid[i] == -1 || vid[i] == dev->descriptor.idVendor) &&
 			    (pid[i] == -1 || pid[i] == dev->descriptor.idProduct)) {
-				card = snd_card_new(index[i], id[i], THIS_MODULE, 0);
-				if (card == NULL) {
-					snd_printk(KERN_ERR "cannot create a card instance %d\n", i);
-					goto __error;
-				}
-				if (snd_usb_audio_create(card, dev, quirk, &chip) < 0) {
-					snd_card_free(card);
+				if (snd_usb_audio_create(dev, i, quirk, &chip) < 0) {
 					goto __error;
 				}
-				chip->index = i;
-				usb_chip[i] = chip;
 				break;
 			}
 		if (! chip) {
@@ -2899,16 +3032,17 @@
 
 	/* we are allowed to call snd_card_register() many times */
 	if (snd_card_register(chip->card) < 0) {
-		if (! chip->num_interfaces)
-			snd_card_free(chip->card);
 		goto __error;
 	}
 
+	usb_chip[chip->index] = chip;
 	chip->num_interfaces++;
 	up(&register_mutex);
 	return chip;
 
  __error:
+	if (chip && !chip->num_interfaces)
+		snd_card_free(chip->card);
 	up(&register_mutex);
  __err_val:
 	return NULL;
@@ -2942,6 +3076,7 @@
 		list_for_each(p, &chip->midi_list) {
 			snd_usbmidi_disconnect(p, &usb_audio_driver);
 		}
+		usb_chip[chip->index] = NULL;
 		up(&register_mutex);
 		snd_card_free_in_thread(card);
 	} else {
diff -Nru a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h
--- a/sound/usb/usbaudio.h	Thu Apr  1 00:48:06 2004
+++ b/sound/usb/usbaudio.h	Thu Apr  1 00:48:06 2004
@@ -207,7 +207,6 @@
  * (conditional for compatibility with the older API)
  */
 #ifndef get_iface_desc
-#define get_iface(cfg, num)	((cfg)->interface[(num)])
 #define get_iface_desc(iface)	(&(iface)->desc)
 #define get_endpoint(alt,ep)	(&(alt)->endpoint[ep].desc)
 #define get_ep_desc(ep)		(&(ep)->desc)
@@ -220,6 +219,10 @@
 
 #ifndef snd_usb_complete_callback
 #define snd_usb_complete_callback(x) (x)
+#endif
+
+#ifndef snd_usb_get_speed
+#define snd_usb_get_speed(dev) ((dev)->speed)
 #endif
 
 #endif /* __USBAUDIO_H */
diff -Nru a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c
--- a/sound/usb/usbmidi.c	Thu Apr  1 00:48:06 2004
+++ b/sound/usb/usbmidi.c	Thu Apr  1 00:48:06 2004
@@ -714,7 +714,6 @@
 		if (ep->in && ep->in->urb)
 			usb_unlink_urb(ep->in->urb);
 	}
-	usb_driver_release_interface(driver, umidi->iface);
 }
 
 static void snd_usbmidi_rawmidi_free(snd_rawmidi_t* rmidi)
